:root {
    --bg-color: #f5f5f0;
    --text-color: #1a1a1a;
    --accent-color: #8c8c8c;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --container-width: 1400px;
}

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

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(245, 245, 240, 0.98);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-close {
    position: absolute;
    top: 40px;
    right: 60px;
    background: none;
    border: none;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 201;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 1);
}

.modal-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    max-width: 1400px;
    width: 100%;
    height: 80vh;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease 0.2s;
}

.project-modal.active .modal-content {
    opacity: 1;
    transform: translateY(0);
}

.modal-image-container {
    height: 100%;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 60px;
    line-height: 1;
}

.modal-meta {
    margin-bottom: 60px;
    border-top: 1px solid #ddd;
    padding-top: 30px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.meta-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
}

.meta-value {
    color: var(--text-color);
}

.modal-description p {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    font-weight: 300;
}

@media (max-width: 768px) {
    .project-modal {
        padding: 20px;
    }

    .modal-close {
        top: 20px;
        right: 20px;
    }

    .modal-content {
        grid-template-columns: 1fr;
        height: auto;
        gap: 40px;
        overflow-y: auto;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        padding-top: 60px;
    }

    .modal-image-container {
        width: 100%;
        height: 300px;
        flex-shrink: 0;
    }

    .modal-title {
        font-size: 2.5rem;
        margin-bottom: 30px;
    }

    .modal-meta {
        margin-bottom: 30px;
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Hide default cursor */
}

a {
    text-decoration: none;
    color: inherit;
    cursor: none;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

/* Custom Cursor */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--text-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, background 0.3s ease;
}

body.hovering .cursor-follower {
    transform: translate(-50%, -50%) scale(1.5);
    background: rgba(26, 26, 26, 0.05);
    border-color: transparent;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
    color: white;
}

.header.mix-blend {
    mix-blend-mode: difference;
    color: #fff;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    color: inherit;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: none;
    flex-direction: column;
    gap: 6px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
}

/* Hero (Index) */
.home-main {
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.hero {
    height: 100%;
    width: 100%;
    position: relative;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    transition: transform 10s ease;
}

.hero:hover .hero-image {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 10vw;
    color: #fff;
    mix-blend-mode: normal;
    /* Reset blend mode for clear text if needed, or difference */
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 8vw;
    line-height: 0.9;
    font-weight: 300;
    margin-bottom: 2rem;
}

.hero-title .line {
    display: block;
    overflow: hidden;
}

.hero-sub {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    margin-bottom: 4rem;
    max-width: 400px;
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    padding-left: 20px;
}

.btn-explore {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid #fff;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    transition: all 0.4s ease;
}

.btn-explore:hover {
    background: #fff;
    color: #000;
}

/* Horizontal Scroll (Projects) */
.projects-page {
    overflow: hidden;
    /* Important for JS scroll */
    height: 100vh;
}

.horizontal-scroll-wrapper {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

.scroll-container {
    display: flex;
    height: 100%;
    width: max-content;
    padding: 0 15vw;
    /* Intro padding */
    align-items: center;
    gap: 15vw;
}

.gallery-item {
    width: 60vh;
    /* Aspect ratio control */
    height: 80vh;
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.text-item {
    width: 40vh;
    margin-right: -5vw;
}

.project-info .project-year {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.project-info h2 {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 30px;
    line-height: 1;
}

.project-info p {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
}

.project-link {
    display: block;
    width: 100%;
}

.image-wrapper {
    width: 100%;
    height: 65vh;
    overflow: hidden;
    margin-bottom: 20px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover .image-wrapper img {
    transform: scale(1.05);
}

.image-wrapper.grayscale img {
    filter: grayscale(100%);
}

.project-details h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 5px;
}

.project-details span {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    text-transform: uppercase;
}

.end-item {
    padding-right: 15vw;
}

.btn-line {
    display: inline-block;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--text-color);
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin-top: 20px;
}

.scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 60px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.6;
}

.scroll-indicator .line {
    width: 60px;
    height: 1px;
    background: var(--text-color);
}

/* Initial styling for animation */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.4s;
}

/* About Page */
.about-main {
    padding: 160px 0 100px;
}

.small-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

.about-intro {
    text-align: center;
    margin-bottom: 120px;
}

.about-intro h1 {
    font-family: var(--font-sans);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.about-intro .lead {
    font-family: var(--font-serif);
    font-size: 3rem;
    line-height: 1.3;
    font-weight: 300;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-image img {
    width: 100%;
    filter: grayscale(100%);
    display: block;
}

.about-text h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 30px;
}

.about-text p {
    margin-bottom: 20px;
    color: #555;
    font-weight: 300;
}

.studio-details {
    margin-top: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    border-top: 1px solid #ddd;
    padding-top: 40px;
}

.detail-item h3 {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.contact-section {
    margin-top: 120px;
    padding-top: 40px;
    border-top: 1px solid #ddd;
    max-width: 760px;
}

.contact-section#contact {
    scroll-margin-top: 120px;
}

.contact-kicker {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 18px;
}

.contact-section h2 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 20px;
}

.contact-section p {
    color: #555;
    margin-bottom: 24px;
    max-width: 62ch;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 20px;
        mix-blend-mode: normal;
        color: var(--text-color);
    }

    .header.mix-blend {
        mix-blend-mode: normal;
        color: var(--text-color);
    }

    .nav {
        display: flex;
        flex-direction: column;
        gap: 24px;
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 82vw);
        height: 100vh;
        padding: 96px 28px 32px;
        background: rgba(245, 245, 240, 0.96);
        color: var(--text-color);
        transform: translateX(110%);
        transition: transform 0.3s ease;
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
        z-index: 100;
    }

    .nav.active {
        transform: translateX(0);
    }

    .menu-toggle {
        display: flex;
        z-index: 101;
        /* Ensure above other elements */
        color: var(--text-color);
        /* Fallback color */
    }

    .menu-toggle span {
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        transform: translateY(-4px) rotate(-45deg);
    }

    body.menu-open {
        overflow: hidden !important;
    }

    body {
        cursor: auto !important;
        /* Reset cursor on mobile */
        overflow-y: auto;
    }

    .projects-page {
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .hero-title {
        font-size: 15vw;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-intro .lead {
        font-size: 2rem;
    }

    .contact-section {
        margin-top: 80px;
        padding-top: 30px;
    }

    .contact-section h2 {
        font-size: 2rem;
    }

    .horizontal-scroll-wrapper {
        position: static;
        height: auto;
        overflow-y: auto;
        width: 100%;
    }

    .scroll-container {
        flex-direction: column;
        height: auto;
        width: 100%;
        padding: 100px 20px;
        gap: 60px;
    }

    .gallery-item {
        width: 100%;
        height: auto;
    }

    .text-item {
        width: 100%;
        margin-right: 0;
    }

    .image-wrapper {
        height: 50vh;
    }

    .scroll-indicator {
        display: none;
    }
}
