* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: white;
    cursor: url('../images/drop.png'), auto;
}

.homepage {
    font-family: 'Space Grotesk', sans-serif;
}

.project-page-view {
    font-family: 'Space Grotesk', sans-serif;
    background-image: url('../images/background1.png');
    background-size: cover;
    background-attachment: fixed;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Playfair Display', serif;
    color: white;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.nav-title-original {
    transition: opacity 0.8s ease;
}

.nav-title a {
    color: inherit;
    text-decoration: none;
}

.nav-title::before {
    content: 'Miche O\'higgins';
    position: absolute;
    left: 0;
    top: 0;
    color: white;
    opacity: 0;
    transition: opacity 0.8s ease;
    white-space: nowrap;
}

.nav-title:hover .nav-title-original {
    opacity: 0;
}

.nav-title:hover::before {
    opacity: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: white;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: black;
    margin: 5px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-image: url('../images/background1.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.projects-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 3rem 4rem;
    max-width: 600px;
}

.project-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding-top: 0;
}

.project-layout .projects-container {
    position: sticky;
    top: 80px;
    flex: 0 0 420px;
    padding: 3rem 2rem 3rem 4rem;
}

.project-page-view .project-page {
    flex: 1;
    margin: 0;
    padding-top: 2rem;
    background-color: white;
    color: black;
}

.project-page-links {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.project-page-links a {
    color: black;
    text-decoration: none;
}

.project-page-links a:hover {
    text-decoration: underline;
}

.project-page-view .navbar {
    background: transparent;
}

.project-page-view .nav-title,
.project-page-view .nav-title::before,
.project-page-view .nav-menu a {
    color: white;
}

.project-card {
    text-decoration: none;
    color: white;
    text-align: left;
}

.project-card img {
    width: 220px;
    aspect-ratio: 16 / 9;
    height: 124px;
    object-fit: cover;
    display: block;
    margin: 0 0 0.6rem;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0.3s ease;
}

.project-card:hover img,
.project-card:focus-visible img {
    opacity: 1;
    visibility: visible;
    max-height: 124px;
}

.project-card p {
    margin-top: 0.5rem;
    font-size: 1.2rem;
    font-family: 'Playfair Display', serif;
}

/* Project Page Styles */
.project-page {
    padding-top: 80px;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 3rem;
    background-color: white;
}

.project-header {
    text-align: center;
    margin-bottom: 3rem;
}

.project-title {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

.project-hero-image {
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    display: block;
}

.project-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-style: italic;
    color: #555;
}

.project-description {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #333;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
}

.project-video {
    margin-bottom: 2rem;
}

.project-video iframe {
    width: 100%;
    height: 500px;
    border: none;
}

.project-additional-text {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #333;
}

/* Navigation Links */
.project-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.nav-link {
    text-decoration: none;
    color: black;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #666;
}

.back-home {
    text-align: center;
    margin-bottom: 2rem;
}

.back-home a {
    text-decoration: none;
    color: black;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.back-home a:hover {
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-title {
        font-size: 1.2rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .projects-container {
        padding: 2rem 1.5rem;
    }

    .project-layout {
        flex-direction: column;
        gap: 0;
        padding-top: 0;
    }

    .project-layout .projects-container {
        position: static;
        flex-basis: auto;
        padding: 2rem 1.5rem;
    }

    .hero {
        padding-top: 80px;
    }

    .project-page {
        padding-top: 60px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .project-title {
        font-size: 1.8rem;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    .project-video iframe {
        height: 300px;
    }

    .project-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }
}