/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --color-bg:         #f3efe8;
    --color-bg-alt:     #ebe6dd;
    --color-text:       #1a1816;
    --color-text-muted: #8c857a;
    --color-border:     #d6d0c6;
    --color-accent:     #c8ddd2;

    --font-display: 'Bricolage Grotesque', serif;
    --font-body:    'Lexend', sans-serif;

    --text-xs:   clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
    --text-sm:   clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
    --text-base: clamp(0.95rem, 0.85rem + 0.5vw, 1.15rem);
    --text-lg:   clamp(1.15rem, 0.9rem + 1.25vw, 1.8rem);
    --text-xl:   clamp(1.8rem, 1.2rem + 3vw, 3.5rem);
    --text-2xl:  clamp(3rem, 1.5rem + 7.5vw, 9rem);

    --space-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
    --space-sm: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    --space-md: clamp(2rem, 1.5rem + 2.5vw, 4rem);
    --space-lg: clamp(4rem, 3rem + 5vw, 8rem);
    --space-xl: clamp(6rem, 4rem + 10vw, 14rem);

    --container-padding: clamp(1.5rem, 1rem + 3vw, 5rem);
    --nav-height: 4.5rem;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 0.3s;
    --duration-mid:  0.6s;
}

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

html {
    background: var(--color-bg);
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--color-text);
    color: var(--color-bg);
}

/* ============================================
   UTILITY
   ============================================ */
.line {
    overflow: hidden;
    display: block;
}

.line__inner {
    display: block;
    transform: translateY(115%);
}

.section-heading {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
}

/* ============================================
   KINETIC BLOCK (RXK-STYLE SCROLL REEL)
   ============================================ */
.kinetic-block {
    width: 100%;
    overflow: hidden;
    /* height set by JS to match one row */
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.reel-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.reel-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.08em 0;
}

.reel-row span {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 10rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--color-text);
    white-space: nowrap;
    display: block;
}

.reel-row--outline span {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--color-text);
}

/* screen-reader only, visually hidden */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--container-padding);
    height: var(--nav-height);
    opacity: 0;
    mix-blend-mode: difference; /* invert on light bg for subtlety — removed, keep simple */
    transition: background 0.4s var(--ease-out-expo), backdrop-filter 0.4s var(--ease-out-expo);
}

.nav--scrolled {
    background: color-mix(in oklch, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav__logo {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.nav__logo-dot {
    color: var(--color-text-muted);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    font-weight: 400;
}

.nav__links a {
    position: relative;
    padding: 0.25em 0;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: width var(--duration-mid) var(--ease-out-expo);
}

.nav__links a:hover::after {
    width: 100%;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: 0 var(--container-padding);
    position: relative;
}

.hero__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: var(--space-lg);
}

.hero__greeting {
    margin-bottom: var(--space-sm);
    opacity: 0;
}

.hero__greeting-word {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    display: inline-block;
}

.hero__name {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.05em;
}

.hero__meta {
    margin-top: var(--space-sm);
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

.hero__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.hero__tagline {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    max-width: 380px;
    line-height: 1.6;
    font-weight: 300;
}

.hero__scroll-indicator {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--container-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
}

.hero__scroll-line {
    width: 1px;
    height: 48px;
    background: var(--color-border);
    position: relative;
    overflow: hidden;
}

.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-text);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%   { top: -100%; }
    50%  { top: 0; }
    100% { top: 100%; }
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee {
    padding: var(--space-sm) 0;
    overflow: hidden;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.marquee__inner {
    display: flex;
    white-space: nowrap;
    gap: 0;
    animation: marquee 30s linear infinite;
    will-change: transform;
}

.marquee__inner span {
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 0.6rem + 1vw, 1.1rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    padding: 0 0.3em;
}

.marquee__sep {
    opacity: 0.3;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   WORK
   ============================================ */
.work {
    padding: var(--space-xl) var(--container-padding);
}

.work__header {
    margin-bottom: var(--space-md);
}

.work__subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: 300;
    margin-top: calc(var(--space-sm) * -0.5);
}

.work__list {
    display: flex;
    flex-direction: column;
}

.work__item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--color-border);
    transition: opacity var(--duration-fast);
}

.work__item:last-child {
    border-bottom: 1px solid var(--color-border);
}

.work__list:hover .work__item {
    opacity: 0.35;
}

.work__list:hover .work__item:hover {
    opacity: 1;
}

.work__item-index {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    padding-top: 0.15em;
    font-weight: 400;
}

.work__item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.work__item-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.work__item-desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: 300;
    max-width: 500px;
}

.work__item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    text-align: right;
}

.work__item-role {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 400;
}

.work__item-year {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    padding: var(--space-xl) var(--container-padding);
}

.about__content {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: var(--space-lg);
    margin-top: var(--space-sm);
}

.about__bio p {
    font-size: var(--text-lg);
    line-height: 1.5;
    letter-spacing: -0.01em;
    font-weight: 300;
}

.about__bio p + p {
    margin-top: var(--space-sm);
}

.about__details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding-top: 0.3em;
}

.about__detail-label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.about__detail-list li {
    font-size: var(--text-sm);
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text);
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    padding: var(--space-xl) var(--container-padding);
    min-height: 70svh;
    display: flex;
    align-items: flex-end;
}

.contact__inner {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: var(--space-md);
}

.contact__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    text-align: center;
}

.contact__email {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 500;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 0.15em;
    border-bottom: 1px solid var(--color-border);
    transition: border-color var(--duration-fast);
}

.contact__email:hover {
    border-color: var(--color-text);
}

.contact__links {
    display: flex;
    gap: var(--space-sm);
}

.contact__links a {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--color-text-muted);
    transition: color var(--duration-fast);
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--container-padding);
    border-top: 1px solid var(--color-border);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: 400;
}

.footer__center {
    font-variant-numeric: tabular-nums;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero__meta {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .about__content {
        grid-template-columns: 1fr;
    }

    .about__details {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .work__item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .work__item-meta {
        grid-column: 2;
        align-items: flex-start;
        flex-direction: row;
        gap: var(--space-xs);
    }

    .contact__inner {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }

    .contact__actions {
        align-items: center;
    }

    .reel-row span {
        font-size: clamp(2rem, 8vw, 6rem);
    }
}

@media (max-width: 480px) {
    .work__item-desc {
        display: none;
    }

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

    .about__details {
        flex-direction: column;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .line__inner {
        transform: none !important;
    }

    .hero__greeting,
    .hero__scroll-indicator,
    .nav {
        opacity: 1 !important;
    }

    .marquee__inner {
        animation: none;
    }
}

/* Focus */
a:focus-visible {
    outline: 1.5px solid var(--color-text);
    outline-offset: 3px;
}
