/* =========================================================
   Portfolio — Base
   "Night Shift Editorial": warm ink, bone text, champagne gold
   signature, editorial rhythm, ambitious motion.
   ========================================================= */

:root {
    /* Ink (surfaces) */
    --ink-900:      #0a0b0f;   /* page background */
    --ink-850:      #0e1017;
    --ink-800:      #12141c;   /* card surface */
    --ink-700:      #1a1d28;   /* elevated */

    /* Bone (text) — warm, not pure white */
    --bone-50:      #f5f1ea;
    --bone-100:     #ede7dc;
    --bone-200:     #d7d0c2;
    --bone-300:     #a8a294;
    --bone-400:     #8f897b;   /* muted — lightened to clear WCAG AA (4.5:1) on ink */
    --bone-500:     #55514a;

    /* Signature — champagne / warm gold */
    --gold-300:     #f0d4a3;
    --gold-400:     #e8c391;   /* primary signature */
    --gold-500:     #d4a574;
    --gold-600:     #b58651;
    --gold-glow:    rgba(232, 195, 145, 0.35);

    /* Secondary — electric (used sparingly for motion only) */
    --spark-300:    #8fc0f0;
    --spark-400:    #6fb3f2;
    --spark-500:    #3d8fd9;

    /* Status / functional */
    --live-400:     #7dd6a1;   /* "available" dot */
    --ember-400:    #e8866b;   /* ember — rare emphasis */

    /* Lines */
    --line:         rgba(245, 241, 234, 0.08);
    --line-strong:  rgba(245, 241, 234, 0.18);

    /* Semantic aliases — legacy names redirected to new palette.
       Keeping these means older rules in home.css/blog.css still
       resolve while we evolve styles. */
    --bg:           var(--ink-900);
    --bg-2:         var(--ink-850);
    --surface:      var(--ink-800);
    --surface-hi:   var(--ink-700);
    --fg:           var(--bone-50);
    --fg-dim:       var(--bone-200);
    --muted:        var(--bone-400);
    --blue-300:     var(--gold-300);
    --blue-400:     var(--gold-400);
    --blue-500:     var(--gold-500);
    --blue-600:     var(--gold-600);
    --blue-700:     #8d6b40;
    --blue-900:     #3c2e1f;
    --blue-50:      var(--bone-50);
    --blue-glow:    var(--gold-glow);
    --blue-gradient: linear-gradient(135deg, #8d6b40 0%, #d4a574 45%, #f0d4a3 100%);
    --warm:         var(--gold-400);

    /* Motion */
    --ease:         cubic-bezier(0.2, 0.7, 0.15, 1);
    --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in:      cubic-bezier(0.7, 0, 0.84, 0);
    --dur-fast:     0.22s;
    --dur:          0.45s;
    --dur-slow:     0.9s;

    /* Radii */
    --r-sm: 2px;
    --r-md: 6px;
    --r-lg: 14px;

    /* Layout */
    --container: 1240px;
    --gutter:    clamp(20px, 4vw, 56px);
    --status-h:  34px;    /* top ticker height */
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--status-h) + 72px);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background: var(--ink-900);
}

body {
    background: var(--ink-900);
    color: var(--bone-50);
    font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.55;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    letter-spacing: -0.005em;
}

/* Ambient layer 1 — faint grid to anchor editorial feel */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(245, 241, 234, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(245, 241, 234, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

/* Ambient layer 2 — slow drifting aurora in warm gold/ember */
body::after {
    content: '';
    position: fixed;
    inset: -20%;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 40% 30% at 8% 18%, rgba(232, 195, 145, 0.10), transparent 60%),
        radial-gradient(ellipse 50% 40% at 92% 82%, rgba(232, 134, 107, 0.07), transparent 60%),
        radial-gradient(ellipse 30% 25% at 50% 50%, rgba(111, 179, 242, 0.04), transparent 60%);
    filter: blur(90px);
    animation: drift 28s var(--ease) infinite alternate;
}

@keyframes drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(3%, -2%) scale(1.04); }
    100% { transform: translate(-2%, 3%) scale(1.02); }
}

/* Film-grain noise overlay, barely visible */
.grain {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.06;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.8 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* =========================================================
   Typography
   ========================================================= */

.serif {
    font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
    font-optical-sizing: auto;
}

.mono {
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
    font-feature-settings: "ss02", "cv11";
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.025em;
    font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
    color: var(--bone-50);
}

h2 { font-size: clamp(2.2em, 5vw, 4em); }
h3 { font-size: clamp(1.4em, 2.5vw, 2em); }

p {
    color: var(--bone-200);
}

em {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

a {
    color: var(--gold-400);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}

a:hover { color: var(--gold-300); }

/* Visible keyboard focus (WCAG 2.4.7) — keyboard users only, not mouse clicks. */
:focus-visible {
    outline: 2px solid var(--gold-400);
    outline-offset: 3px;
    border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Skip link — off-screen until focused, then slides into view. */
.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2000;
    padding: 10px 16px;
    background: var(--gold-400);
    color: var(--ink-900);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78em;
    letter-spacing: 0.08em;
    border-radius: var(--r-sm);
    transform: translateY(-180%);
    transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--ink-900); }

::selection {
    background: var(--gold-500);
    color: var(--ink-900);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68em;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--bone-400);
    font-weight: 500;
}

.eyebrow::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--gold-400);
}

/* =========================================================
   Layout primitives
   ========================================================= */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

section {
    position: relative;
    padding: clamp(90px, 13vw, 180px) 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(48px, 6vw, 88px);
    flex-wrap: wrap;
}

.section-header h2 em {
    color: var(--gold-400);
    font-style: italic;
}

.section-header .section-index {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72em;
    color: var(--bone-400);
    letter-spacing: 0.22em;
}

/* =========================================================
   Top status ticker — terminal-style strip above topbar
   ========================================================= */

.statusbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--status-h);
    z-index: 51;
    background: var(--ink-900);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68em;
    letter-spacing: 0.12em;
    color: var(--bone-300);
    text-transform: uppercase;
    overflow: hidden;
}

.statusbar .track {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 var(--gutter);
    width: 100%;
}

.statusbar .chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.statusbar .chip + .chip::before {
    content: '/';
    margin-right: 24px;
    color: var(--bone-500);
}

.statusbar .live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--live-400);
    box-shadow: 0 0 10px var(--live-400);
    animation: livePulse 1.8s var(--ease) infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(0.85); }
}

.statusbar .spacer { flex: 1; }

.statusbar .clock { color: var(--gold-400); }

/* =========================================================
   Top navigation
   ========================================================= */

.topbar {
    position: fixed;
    top: var(--status-h);
    left: 0;
    right: 0;
    z-index: 50;
    padding: 14px 0;
    background: rgba(10, 11, 15, 0.55);
    backdrop-filter: saturate(160%) blur(20px);
    -webkit-backdrop-filter: saturate(160%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur-fast) var(--ease),
                background var(--dur-fast) var(--ease),
                padding var(--dur-fast) var(--ease);
}

.topbar.scrolled {
    background: rgba(10, 11, 15, 0.88);
    border-bottom-color: var(--line);
    padding: 10px 0;
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Fraunces', serif;
    font-size: 1.05em;
    font-weight: 500;
    color: var(--bone-50);
    letter-spacing: -0.01em;
}

.logo .mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid var(--gold-500);
    color: var(--gold-400);
    font-style: italic;
    font-weight: 600;
    font-size: 0.95em;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                transform 0.6s var(--ease);
}

.logo .mark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold-400);
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.5s var(--ease);
}

.logo:hover .mark {
    color: var(--ink-900);
    transform: rotate(360deg);
}

.logo:hover .mark::before { transform: scale(1); }

.logo .mark em { position: relative; z-index: 1; }

.logo .sep {
    color: var(--bone-500);
    margin: 0 2px;
}

.logo .job {
    color: var(--bone-400);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7em;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.nav a {
    display: inline-block;
    padding: 10px 16px;
    color: var(--bone-200);
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.88em;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: var(--r-sm);
    position: relative;
    transition: color var(--dur-fast) var(--ease);
}

.nav a:not(.cta)::before {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 1px;
    background: var(--gold-400);
    transform-origin: right;
    transform: scaleX(0);
    transition: transform 0.4s var(--ease);
}

.nav a:not(.cta):hover {
    color: var(--bone-50);
}

.nav a:not(.cta):hover::before {
    transform-origin: left;
    transform: scaleX(1);
}

.nav a.cta {
    margin-left: 10px;
    padding: 10px 20px;
    background: var(--bone-50);
    color: var(--ink-900);
    border-radius: 40px;
    font-weight: 500;
    transition: background var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease);
}

.nav a.cta:hover {
    background: var(--gold-400);
    color: var(--ink-900);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    background: transparent;
    color: var(--bone-50);
    border: 1px solid var(--line-strong);
    padding: 8px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72em;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    min-height: 44px;   /* comfortable tap target on mobile */
    min-width: 44px;
}

/* =========================================================
   Buttons — magnetic, slicing fill
   ========================================================= */

.btn {
    --btn-bg: transparent;
    --btn-fg: var(--bone-50);
    --btn-border: var(--line-strong);
    --btn-fill: var(--bone-50);
    --btn-fill-fg: var(--ink-900);

    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72em;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                transform 0.3s var(--ease-out);
    text-decoration: none;
    will-change: transform;
}

.btn > span,
.btn > .arrow {
    position: relative;
    z-index: 2;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--btn-fill);
    transform: translate3d(-101%, 0, 0) skewX(-12deg);
    transition: transform 0.55s var(--ease);
    z-index: 1;
}

.btn:hover {
    color: var(--btn-fill-fg);
    border-color: var(--btn-fill);
}

.btn:hover::before {
    transform: translate3d(0, 0, 0) skewX(0);
}

.btn.primary {
    --btn-bg: var(--bone-50);
    --btn-fg: var(--ink-900);
    --btn-border: var(--bone-50);
    --btn-fill: var(--gold-400);
    --btn-fill-fg: var(--ink-900);
}

.btn.gold {
    --btn-bg: var(--gold-400);
    --btn-fg: var(--ink-900);
    --btn-border: var(--gold-400);
    --btn-fill: var(--ink-900);
    --btn-fill-fg: var(--bone-50);
}

.btn .arrow {
    transition: transform var(--dur-fast) var(--ease);
}

.btn:hover .arrow { transform: translateX(6px); }

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    position: relative;
    padding: clamp(80px, 12vw, 140px) 0 32px;
    overflow: hidden;
    border-top: 1px solid var(--line);
    background:
        radial-gradient(ellipse 70% 120% at 50% 100%, rgba(232, 195, 145, 0.12), transparent 60%);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
    opacity: 0.8;
}

.site-footer .wordmark-line {
    display: block;
    overflow: hidden;
    line-height: 0.9;
}

.site-footer .wordmark {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(3.8em, 14vw, 13em);
    line-height: 0.86;
    letter-spacing: -0.045em;
    font-variation-settings: "opsz" 144, "SOFT" 20;
    color: var(--bone-50);
    margin-bottom: 56px;
    user-select: none;
    display: inline-block;
}

.site-footer .wordmark em {
    font-style: italic;
    color: var(--gold-400);
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

.site-footer .foot-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--line);
}

.site-footer .foot-col h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68em;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--bone-400);
    margin-bottom: 20px;
    font-weight: 500;
}

.site-footer .foot-col p,
.site-footer .foot-col a {
    color: var(--bone-200);
    font-size: 0.95em;
    display: inline-block;
    margin-right: 16px;
    margin-bottom: 8px;
    transition: color var(--dur-fast) var(--ease);
}

.site-footer .foot-col a:hover {
    color: var(--gold-400);
}

.site-footer .socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.site-footer .socials a {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--bone-200);
    transition: color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                background var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease);
    margin: 0;
}

.site-footer .socials a:hover {
    color: var(--ink-900);
    border-color: var(--gold-400);
    background: var(--gold-400);
    transform: translateY(-2px);
}

.site-footer .foot-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72em;
    letter-spacing: 0.08em;
    color: var(--bone-400);
    flex-wrap: wrap;
    gap: 16px;
    text-transform: uppercase;
}

.site-footer .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 40px;
    color: var(--bone-200);
}

.site-footer .badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--live-400);
    box-shadow: 0 0 10px var(--live-400);
    animation: livePulse 1.8s var(--ease) infinite;
}

/* =========================================================
   Reveal utilities
   ========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
    transition-delay: var(--d, 0s);
    animation: revealSafety 0.5s var(--ease) 2.5s forwards;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
    animation: none;
}

.reveal-x {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    transition-delay: var(--d, 0s);
    animation: revealSafetyX 0.6s var(--ease) 2.5s forwards;
}

.reveal-x.in {
    opacity: 1;
    transform: translateX(0);
    animation: none;
}

.reveal-zoom {
    opacity: 0;
    transform: scale(0.9);
    filter: blur(12px);
    transition: opacity var(--dur-slow) var(--ease-out),
                transform var(--dur-slow) var(--ease-out),
                filter var(--dur-slow) var(--ease-out);
    transition-delay: var(--d, 0s);
    animation: revealSafetyZoom 0.6s var(--ease) 2.5s forwards;
    will-change: transform, opacity, filter;
}

.reveal-zoom.in {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    animation: none;
}

/* Clip-path reveal — like a shutter opening */
.reveal-clip {
    opacity: 1;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.2s var(--ease-out);
    transition-delay: var(--d, 0s);
    animation: revealSafetyClip 0.6s var(--ease) 2.5s forwards;
}

.reveal-clip.in {
    clip-path: inset(0 0 0 0);
    animation: none;
}

@keyframes revealSafety     { to { opacity: 1; transform: translateY(0); } }
@keyframes revealSafetyX    { to { opacity: 1; transform: translateX(0); } }
@keyframes revealSafetyZoom { to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes revealSafetyClip { to { clip-path: inset(0 0 0 0); } }

/* =========================================================
   Word / character split reveals
   ========================================================= */

.word-reveal .word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
}

.word-reveal .word > span {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    transition: transform 1.1s var(--ease-out), opacity 1.1s var(--ease-out);
    transition-delay: calc(var(--wi, 0) * 55ms);
}

.word-reveal.in .word > span {
    transform: translateY(0);
    opacity: 1;
}

.char-reveal .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.55em) rotate(4deg);
    transition: transform 0.85s var(--ease-out), opacity 0.85s var(--ease-out);
    transition-delay: calc(var(--ci, 0) * 28ms);
}

.char-reveal .char.space {
    width: 0.25em;
}

.char-reveal.in .char {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

/* =========================================================
   Scroll progress bar — gold hairline
   ========================================================= */

.scroll-progress {
    position: fixed;
    top: var(--status-h);
    left: 0;
    right: 0;
    height: 2px;
    z-index: 100;
    pointer-events: none;
    background: rgba(245, 241, 234, 0.05);
}

.scroll-progress > span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        var(--gold-500) 0%,
        var(--gold-400) 40%,
        var(--gold-300) 75%,
        var(--bone-50) 100%
    );
    box-shadow: 0 0 14px var(--gold-400), 0 0 28px var(--gold-glow);
    transform-origin: left center;
    transition: width 80ms linear;
}

/* =========================================================
   Marquee — infinite scroll band
   ========================================================= */

.marquee {
    position: relative;
    overflow: hidden;
    padding: clamp(36px, 5vw, 64px) 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(to bottom, transparent, rgba(232, 195, 145, 0.02), transparent);
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 56px;
    width: max-content;
    animation: marquee 40s linear infinite;
    will-change: transform;
}

.marquee-track:hover { animation-play-state: paused; }

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(2em, 5vw, 4em);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--bone-100);
    white-space: nowrap;
}

.marquee-item em {
    font-style: italic;
    color: var(--gold-400);
}

.marquee-star {
    display: inline-block;
    width: 18px;
    height: 18px;
    color: var(--gold-400);
    opacity: 0.7;
}

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

/* =========================================================
   Custom cursor (desktop only)
   ========================================================= */

.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold-400);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate3d(-50%, -50%, 0);
    transition: width 0.3s var(--ease), height 0.3s var(--ease),
                background 0.2s var(--ease), opacity 0.3s var(--ease);
    opacity: 0;
}

.cursor.visible {
    opacity: 1;
}

.cursor.hover-link {
    width: 52px;
    height: 52px;
    background: var(--gold-400);
}

.cursor-label {
    position: fixed;
    top: 0;
    left: 0;
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--gold-400);
    color: var(--ink-900);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66em;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    pointer-events: none;
    z-index: 9999;
    transform: translate3d(-50%, -50%, 0) scale(0.4);
    opacity: 0;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    white-space: nowrap;
}

.cursor-label.visible {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
}

@media (hover: none), (pointer: coarse) {
    .cursor, .cursor-label { display: none !important; }
}

/* =========================================================
   Parallax primer
   ========================================================= */

[data-parallax] { will-change: transform; }

/* =========================================================
   Hero entrance (played once on page load)
   ========================================================= */

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

.hero-title .line > span {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    animation: heroLineIn 1.1s var(--ease-out) forwards;
}

.hero-title .line:nth-child(1) > span { animation-delay: 0.20s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.40s; }

.hero-meta > * {
    opacity: 0;
    transform: translateY(24px);
    animation: heroFadeIn 0.85s var(--ease-out) forwards;
}
.hero-meta > *:nth-child(1) { animation-delay: 0.65s; }
.hero-meta > *:nth-child(2) { animation-delay: 0.75s; }
.hero-meta > *:nth-child(3) { animation-delay: 0.85s; }
.hero-meta > *:nth-child(4) { animation-delay: 0.95s; }
.hero-meta > *:nth-child(5) { animation-delay: 1.05s; }
.hero-meta > *:nth-child(6) { animation-delay: 1.15s; }

@keyframes heroLineIn { to { transform: translateY(0); opacity: 1; } }
@keyframes heroFadeIn { to { transform: translateY(0); opacity: 1; } }

/* =========================================================
   Magnetic primer
   ========================================================= */

.magnetic {
    display: inline-flex;
    transition: transform 0.35s var(--ease-out);
    will-change: transform;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1000px) {
    section { padding: clamp(64px, 11vw, 110px) 0; }
    .section-header { margin-bottom: 36px; }
    h2 { font-size: clamp(2em, 7vw, 3em); }
    h3 { font-size: clamp(1.25em, 4vw, 1.6em); }
    .eyebrow { font-size: 0.62em; letter-spacing: 0.28em; }
    .eyebrow::before { width: 22px; }

    .logo .job, .logo .sep { display: none; }
}

@media (max-width: 820px) {
    .statusbar {
        font-size: 0.6em;
        letter-spacing: 0.08em;
    }
    .statusbar .chip:nth-child(n+3) { display: none; }
    .statusbar .chip + .chip::before { margin-right: 16px; }

    .site-footer { padding: 72px 0 28px; }
    .site-footer .wordmark { font-size: clamp(3em, 18vw, 5.6em); margin-bottom: 36px; }
    .site-footer .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; padding-bottom: 32px; }
    .site-footer .foot-bottom { font-size: 0.62em; letter-spacing: 0.06em; }

    .topbar { padding: 10px 0; }
    .logo span:last-child {
        max-width: 180px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .nav { display: none; }
    .nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 11, 15, 0.98);
        backdrop-filter: blur(20px);
        padding: 14px 24px 22px;
        border-bottom: 1px solid var(--line);
        gap: 0;
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    }
    .nav.open li {
        list-style: none;
        border-bottom: 1px solid var(--line);
    }
    .nav.open li:last-child { border-bottom: none; padding-top: 10px; }
    .nav.open a {
        display: block;
        padding: 14px 4px;
        font-size: 0.98em;
    }
    .nav.open a.cta {
        margin-left: 0;
        text-align: center;
        margin-top: 10px;
    }
    .nav-toggle { display: inline-block; }
}

@media (max-width: 540px) {
    .container { padding: 0 22px; }
    .btn { padding: 13px 22px; font-size: 0.68em; letter-spacing: 0.18em; }
    .site-footer .wordmark { font-size: clamp(2.6em, 18vw, 4.6em); }
    .site-footer .foot-grid { grid-template-columns: 1fr; }
    .site-footer .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .reveal-x, .reveal-right, .reveal-zoom, .reveal-clip {
        opacity: 1;
        transform: none;
        filter: none;
        clip-path: none;
    }
    .word-reveal .word > span,
    .char-reveal .char {
        transform: none;
        opacity: 1;
        transition: none;
    }
    [data-parallax] { transform: none !important; }
    .scroll-progress > span { transition: none; }
    .marquee-track { animation: none; }
    .hero-title .line > span,
    .hero-meta > * {
        animation: none;
        transform: none;
        opacity: 1;
    }
}

@media (hover: none) {
    .nav a:hover { background: transparent; }
}
