/* ================================
   CUSTOM PROPERTIES
================================ */
:root {
    --bg:           #f4efe7;
    --text:         #1a1614;
    --text-muted:   #9a8f87;
    --border:       rgba(26, 22, 20, 0.1);
    --terracotta:   #b86b42;
    --sage:         #7a9878;
    --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
    --font-display: 'Cormorant Garamond', serif;
    --font-mono:    'Space Mono', monospace;
}

/* ================================
   RESET & BASE
================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-display);
    cursor: none;
    overflow-x: hidden;
}

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

/* ================================
   LOADER
================================ */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
}

.loader-inner {
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.loader-name {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text);
    transform: translateY(110%);
    will-change: transform;
}

.loader-role {
    display: block;
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 1.2vw, 0.8rem);
    letter-spacing: 0.3em;
    color: var(--terracotta);
    text-transform: uppercase;
    opacity: 0;
    will-change: opacity;
}

.loader-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--terracotta);
    will-change: width;
}

/* ================================
   CUSTOM CURSOR
================================ */
.cursor {
    position: fixed;
    width: 7px;
    height: 7px;
    background: var(--text);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(26, 22, 20, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out),
                height 0.4s var(--ease-out),
                border-color 0.3s;
}

.cursor-follower.is-hovering {
    width: 60px;
    height: 60px;
    border-color: rgba(184, 107, 66, 0.45);
}

/* ================================
   NAVIGATION
================================ */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 3rem;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--text);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.35s var(--ease-out);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ================================
   GRAIN OVERLAY
================================ */
.grain {
    position: absolute;
    inset: -50%;
    pointer-events: none;
    opacity: 0.04;
    width: 200%;
    height: 200%;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ================================
   HERO
================================ */
#hero {
    min-height: 100vh;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 7rem 3rem 4rem;
    gap: 3rem;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    align-self: end;
    padding-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(5rem, 11vw, 10.5rem);
    font-weight: 300;
    line-height: 0.88;
    letter-spacing: -0.02em;
    overflow: hidden;
    color: var(--text);
}

.hero-line {
    display: block;
    transform: translateY(110%);
    will-change: transform;
}

.hero-line--italic {
    font-style: italic;
    color: var(--terracotta);
    padding-left: 0.08em;
}

.hero-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    opacity: 0;
    transform: translateY(16px);
    will-change: opacity, transform;
}

.hero-location,
.hero-scroll {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Collage shown as a floating physical print */
.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hero-image-inner {
    max-height: 78vh;
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    will-change: transform;
    transform: rotate(2.5deg);
    box-shadow:
        0 4px 12px rgba(60, 35, 15, 0.1),
        0 15px 35px rgba(60, 35, 15, 0.12),
        0 35px 70px rgba(60, 35, 15, 0.08);
}

/* ================================
   SECTION COMMON
================================ */
section {
    padding: 8rem 3rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 4rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--terracotta);
    letter-spacing: 0.15em;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--text);
}

/* ================================
   PORTFOLIO GRID
================================ */
#work {
    padding-top: 7rem;
}

/* Masonry columns, images shown at natural proportions, no cropping */
.portfolio-grid {
    columns: 3;
    column-gap: 1.25rem;
}

.portfolio-item {
    break-inside: avoid;
    margin-bottom: 1.25rem;
    cursor: none;
    position: relative;
    display: block;
    color: inherit;
}

/* --large items span all columns for full-width emphasis */
.portfolio-item--large {
    column-span: all;
    margin-bottom: 1.5rem;
}

.portfolio-image {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.portfolio-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s var(--ease-out), box-shadow 0.8s var(--ease-out);
    will-change: transform;
    box-shadow: 0 2px 8px rgba(60, 35, 15, 0.08);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.015);
    box-shadow:
        0 8px 20px rgba(60, 35, 15, 0.12),
        0 20px 50px rgba(60, 35, 15, 0.1);
}

/* Info sits below each image */
.portfolio-info {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 0 0;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.portfolio-item:hover .portfolio-info {
    opacity: 1;
}

.portfolio-number {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--terracotta);
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

.portfolio-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    font-style: italic;
    flex: 1;
    color: var(--text);
}

.portfolio-year {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* ================================
   VISION
================================ */
#vision {
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(184, 107, 66, 0.04) 40%,
        rgba(184, 107, 66, 0.06) 60%,
        transparent 100%
    );
}

.vision-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7rem;
    align-items: start;
}

.vision-statement {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.8rem);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.01em;
    font-style: italic;
    color: var(--text);
    margin-bottom: 2.5rem;
}

.vision-body {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.4vw, 1.1rem);
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.vision-body em {
    font-style: italic;
    color: var(--terracotta);
}

.vision-img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1rem;
    box-shadow:
        0 4px 12px rgba(60, 35, 15, 0.1),
        0 15px 40px rgba(60, 35, 15, 0.1);
}

.vision-caption {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ================================
   BIO
================================ */
.bio-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7rem;
    align-items: start;
}

.bio-opening {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.45;
    color: var(--text);
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.bio-body {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.bio-img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow:
        0 4px 12px rgba(60, 35, 15, 0.1),
        0 15px 40px rgba(60, 35, 15, 0.1);
}

/* ================================
   CONTACT
================================ */
#contact {
    padding-top: 8rem;
    padding-bottom: 4rem;
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}

.contact-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#contact .section-number {
    margin-bottom: -1rem;
}

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 300;
    line-height: 0.9;
    letter-spacing: -0.02em;
    color: var(--text);
}

.contact-title em {
    font-style: italic;
    color: var(--terracotta);
}

.contact-tagline {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 38rem;
}

.contact-email {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 300;
    color: var(--text-muted);
    display: inline-block;
    position: relative;
    width: fit-content;
    transition: color 0.3s;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--terracotta);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease-out);
}

.contact-email:hover {
    color: var(--text);
}

.contact-email:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.contact-links {
    display: flex;
    gap: 2rem;
}

.contact-links a {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.25s;
}

.contact-links a:hover {
    color: var(--text);
}

.contact-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
    section {
        padding: 5rem 1.5rem;
    }

    #nav {
        padding: 1.5rem;
    }

    #hero {
        grid-template-columns: 1fr;
        padding: 6rem 1.5rem 3rem;
        min-height: auto;
    }

    .hero-image {
        justify-content: flex-start;
        padding: 0;
    }

    .hero-image-inner {
        max-height: 55vw;
    }

    .portfolio-grid {
        columns: 2;
        column-gap: 0.75rem;
    }

    .portfolio-item--large {
        column-span: all;
    }

    .vision-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .vision-image {
        order: -1;
    }

    .bio-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .bio-image {
        order: -1;
    }

    .cursor,
    .cursor-follower {
        display: none;
    }

    body {
        cursor: auto;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        columns: 1;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .hero-title {
        font-size: clamp(3.2rem, 13vw, 10.5rem);
    }

    #hero {
        gap: 1.5rem;
    }

    .hero-image-inner {
        max-height: 75vw;
    }

    .portfolio-item {
        cursor: auto;
    }

    .contact-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}
