/* ═══════════════════════════════════════════════════════════════════════
   NELLY SEIGLAN — PORTFOLIO v3 · editorial / premium dark
   Urbanist display + mono labels. Restrained sky-blue. Cursor halo.
   Tight architectural radius scale.
   ═══════════════════════════════════════════════════════════════════════ */

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

:root {
  --accent-l: 0.82;
  --accent-c: 0.11;
  --accent-h: 233;
  --accent: oklch(var(--accent-l) var(--accent-c) var(--accent-h));
  --accent-bright: oklch(0.88 0.12 var(--accent-h));
  --accent-deep: oklch(0.62 0.13 var(--accent-h));
  --accent-soft: oklch(var(--accent-l) var(--accent-c) var(--accent-h) / 0.16);
  --accent-line: oklch(var(--accent-l) var(--accent-c) var(--accent-h) / 0.28);

  --bg: #09090b;
  --bg-2: #0c0c0f;
  --surface: rgba(255, 255, 255, 0.022);
  --surface-2: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);

  --t1: #f3f3f5;
  --t2: rgba(243, 243, 245, 0.64);
  --t3: rgba(243, 243, 245, 0.42);
  --t4: rgba(243, 243, 245, 0.26);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion: 1;

  /* Urbanist as the single display voice — distinctive, geometric, original */
  --serif: 'Urbanist', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: 'Urbanist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Tighter, architectural radius scale */
  --r-card: 12px;
  --r-media: 8px;
  --r-btn: 9px;
  --r-chip: 6px;
  --r-nav: 16px;
}

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--t1);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent-soft); color: var(--t1); }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

/* — Label / kicker: refined rule + small caps, no glowing dot — */
.kicker {
  display: inline-flex; align-items: center;
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--t3);
}
.kicker .dot {
  display: inline-block; width: 26px; height: 1px;
  background: var(--accent); margin-right: 14px; border-radius: 0;
  box-shadow: none; vertical-align: middle; opacity: 0.85;
}

.shell { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 760px) { .shell { padding: 0 28px; } }
@media (max-width: 480px) { .shell { padding: 0 20px; } }

/* ═══ LOAD / TRANSITION CURTAIN ═══ */
.curtain {
  position: fixed; inset: 0; z-index: 5000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.curtain.lift { opacity: 0; visibility: hidden; }
.curtain.wipe-in { opacity: 1; visibility: visible; }
.curtain-mark {
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em;
  font-size: 1.5rem; color: var(--t3);
  animation: markPulse 1.6s var(--ease) infinite;
}
@keyframes markPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 0.85; } }

/* ═══ CURSOR HALO (the one she loves) ═══ */
.page-halo {
  position: fixed; z-index: 1;
  left: var(--halo-x, 50vw); top: var(--halo-y, 42vh);
  width: 60vmax; height: 60vmax; max-width: 1100px; max-height: 1100px;
  transform: translate(-50%, -50%);
  pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle,
    oklch(0.7 0.13 var(--accent-h) / 0.16) 0%,
    oklch(0.7 0.13 var(--accent-h) / 0.07) 28%,
    transparent 62%);
  opacity: 0; transition: opacity 0.5s var(--ease);
  filter: blur(10px);
}

/* ═══ NAV ═══ */
.nav {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  z-index: 1000; display: flex; align-items: center; gap: 6px;
  padding: 8px 8px 8px 22px;
  background: rgba(12, 12, 15, 0.5);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--r-nav);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), top 0.4s var(--ease);
}
.nav.scrolled { top: 14px; background: rgba(9, 9, 11, 0.86); border-color: var(--line-strong); }
.nav-brand {
  font-family: var(--serif); font-weight: 800; letter-spacing: 0.04em; font-size: 1rem;
  color: var(--t2); padding-right: 16px; margin-right: 4px;
  border-right: 1px solid var(--line); line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative; font-size: 0.94rem; font-weight: 500; color: var(--t2);
  padding: 8px 15px; border-radius: var(--r-chip);
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 5px;
  height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover { color: var(--t1); }
.nav-links a.active { color: var(--t1); }
.nav-links a.active::after { transform: scaleX(1); }
.nav-cta {
  font-size: 0.9rem; font-weight: 600; color: #0a0a0c;
  background: var(--t1); padding: 9px 19px; border-radius: var(--r-btn);
  border: none; white-space: nowrap; font-family: var(--sans);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav-cta:hover { background: #fff; transform: translateY(-1px); }

/* — Projects dropdown — */
.nav-dd { position: relative; }
.nav-dd-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 0.94rem; font-weight: 500; color: var(--t2);
  background: none; border: none; cursor: pointer; padding: 8px 15px; border-radius: var(--r-chip);
  transition: color 0.25s var(--ease);
}
.nav-dd-trigger:hover, .nav-dd.open .nav-dd-trigger, .nav-dd-trigger.active { color: var(--t1); }
.nav-dd-trigger .chev { font-size: 0.62em; line-height: 1; transition: transform 0.3s var(--ease); opacity: 0.7; }
.nav-dd.open .nav-dd-trigger .chev { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 210px; padding: 8px; display: flex; flex-direction: column; gap: 2px;
  background: rgba(9, 9, 11, 0.95); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.9);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
/* invisible bridge so the hover doesn't drop in the gap */
.nav-dd-menu::before { content: ''; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav-dd:hover .nav-dd-menu, .nav-dd.open .nav-dd-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-dd-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font-size: 0.92rem; font-weight: 500; color: var(--t2); padding: 10px 14px; border-radius: 9px; white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-dd-menu a .ix { font-family: var(--mono); font-size: 0.64rem; color: var(--t4); }
.nav-dd-menu a:hover { background: var(--surface-2); color: var(--t1); }
.nav-dd-menu a:hover .ix { color: var(--accent-bright); }
.nav-dd-menu .nav-dd-all { color: var(--t3); border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; border-radius: 0; }
.nav-dd-menu .nav-dd-all:hover { background: none; color: var(--accent-bright); }

@media (max-width: 720px) {
  .nav { padding: 7px 7px 7px 16px; gap: 2px; max-width: calc(100vw - 24px); }
  .nav-brand { display: none; }
  .nav-links a { padding: 7px 10px; font-size: 0.84rem; }
  .nav-dd-trigger { padding: 7px 10px; font-size: 0.84rem; }
  .nav-dd-menu { min-width: 180px; }
  .nav-cta { padding: 8px 13px; font-size: 0.84rem; }
}

/* ═══ BACKGROUND LAYERS ═══ */
#haze-canvas {
  position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0; transition: opacity 1.4s var(--ease);
}
#haze-canvas.ready { opacity: 1; }
body[data-bg="aurora"] #haze-canvas, body[data-bg="flat"] #haze-canvas { display: none; }

.bg-aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; display: none; }
body[data-bg="aurora"] .bg-aurora { display: block; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.orb-1 { width: 720px; height: 720px; top: -260px; left: -160px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%); animation: orb1 34s ease-in-out infinite; }
.orb-2 { width: 600px; height: 600px; top: 18vh; right: -160px;
  background: radial-gradient(circle, oklch(0.66 0.12 var(--accent-h) / 0.14) 0%, transparent 68%); animation: orb2 42s ease-in-out infinite; }
.orb-3 { width: 520px; height: 520px; bottom: 8vh; left: 14vw;
  background: radial-gradient(circle, oklch(0.72 0.09 calc(var(--accent-h) + 36) / 0.1) 0%, transparent 68%); animation: orb3 30s ease-in-out infinite; }
@keyframes orb1 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(110px,180px) scale(1.06);} }
@keyframes orb2 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-150px,-100px) scale(0.94);} }
@keyframes orb3 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(100px,-80px) scale(1.08);} }

.bg-grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
body[data-grain="off"] .bg-grain { display: none; }

.page { position: relative; z-index: 2; }
/* baked-in motion preference (replaces the editor-only Tweaks panel) */
body[data-motion="subtle"] { --motion: 0.5; }

/* ═══ HERO ═══ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 170px 0 100px; }
.hero-grid { display: grid; align-items: center; gap: 72px; width: 100%; }

.hero-headline {
  font-family: var(--serif); font-weight: 600;
  letter-spacing: -0.02em; word-spacing: 0.04em; line-height: 1.0; color: var(--t1);
}
.hero-headline em {
  font-style: italic; font-weight: 500;
}
/* padding-bottom gives descenders (g, p, y) room inside the overflow:hidden
   reveal mask; the negative margin cancels the extra gap so the line lockup
   stays tight. */
.reveal-line { display: block; overflow: hidden; padding-bottom: 0.24em; margin-bottom: -0.16em; }
.reveal-word { display: inline; }
.reveal-word > span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); }
.hero.in .reveal-word > span { transform: translateY(0); }
.reveal-word.accent > span {
  color: transparent;
  background: linear-gradient(120deg, var(--accent-bright), var(--accent-deep));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.2rem; color: var(--t2); max-width: 40ch; line-height: 1.6;
  opacity: 0; transform: translateY(18px);
  transition: opacity 1s var(--ease) 0.5s, transform 1s var(--ease) 0.5s;
}
.hero.in .hero-sub { opacity: 1; transform: translateY(0); }

.hero-actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  opacity: 0; transform: translateY(18px);
  transition: opacity 1s var(--ease) 0.64s, transform 1s var(--ease) 0.64s;
}
.hero.in .hero-actions { opacity: 1; transform: translateY(0); }

/* — Buttons: clean, no glow, no magnet — */
.btn {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  font-size: 0.98rem; font-weight: 600; padding: 14px 26px; border-radius: var(--r-btn);
  border: 1px solid transparent;
  transition: background 0.28s var(--ease), border-color 0.28s var(--ease), color 0.28s var(--ease), transform 0.28s var(--ease);
}
.btn-primary { background: var(--t1); color: #0a0a0c; }
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-ghost { color: var(--t1); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--t2); background: var(--surface-2); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.28s var(--ease); }
.btn:hover .arrow { transform: translate(3px, -3px); }

/* — Portrait — */
.hero-portrait-wrap { position: relative; justify-self: center; }
.hero-portrait {
  position: relative; border-radius: var(--r-media); overflow: hidden;
  border: 1px solid var(--line-strong);
  filter: grayscale(1) contrast(1.05);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgba(9,9,11,0.55)); pointer-events: none; }
.hero-portrait-glow { position: absolute; inset: -24% -16% -16%; background: radial-gradient(circle at 50% 38%, var(--accent-soft), transparent 60%); filter: blur(50px); z-index: -1; }
.hero-portrait-cap {
  position: absolute; left: 18px; bottom: 16px; z-index: 2;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: rgba(255,255,255,0.82);
}

.hero-scroll {
  position: absolute; bottom: 38px; left: 0;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--t3);
}
.hero-scroll .line { width: 44px; height: 1px; background: var(--t4); position: relative; overflow: hidden; }
.hero-scroll .line::after { content:''; position: absolute; inset: 0; background: var(--accent); transform: translateX(-100%); animation: scrollLine 2.6s var(--ease) infinite; }
@keyframes scrollLine { 0%{transform:translateX(-100%);} 50%{transform:translateX(0);} 100%{transform:translateX(100%);} }

/* — Expressive — */
body[data-hero="expressive"] .hero-grid { grid-template-columns: 1.42fr 0.62fr; }
body[data-hero="expressive"] .hero-headline { font-size: clamp(2.6rem, 5vw, 4.4rem); margin: 0 0 32px; }
body[data-hero="expressive"] .hero-portrait { width: clamp(250px, 28vw, 360px); aspect-ratio: 4/5; }
body[data-hero="expressive"] .hero-sub { margin-bottom: 38px; }
/* keep each headline line on one row on desktop; allow wrap only on small screens */
@media (min-width: 901px) { body[data-hero="expressive"] .reveal-line { white-space: nowrap; } }

/* — Refined — */
body[data-hero="refined"] .hero-grid { grid-template-columns: 1fr; max-width: 940px; margin: 0 auto; }
body[data-hero="refined"] .hero-portrait-wrap { display: none; }
body[data-hero="refined"] .hero { padding-top: 210px; min-height: 90svh; }
body[data-hero="refined"] .hero-headline { font-size: clamp(2.8rem, 6.4vw, 5.6rem); max-width: 15ch; margin: 0 0 32px; }
body[data-hero="refined"] .hero-sub { margin-bottom: 40px; }
body[data-hero="refined"] .hero-refined-portrait { display: flex; }
.hero-refined-portrait {
  display: none; align-items: center; gap: 16px; margin-top: 52px;
  opacity: 0; transform: translateY(18px);
  transition: opacity 1s var(--ease) 0.8s, transform 1s var(--ease) 0.8s;
}
body[data-hero="refined"] .hero.in .hero-refined-portrait { opacity: 1; transform: translateY(0); }
.hero-refined-portrait .mini { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line-strong); filter: grayscale(1); }
.hero-refined-portrait .mini img { width: 100%; height: 100%; object-fit: cover; }
.hero-refined-portrait .meta { font-size: 0.92rem; color: var(--t3); line-height: 1.4; }
.hero-refined-portrait .meta strong { color: var(--t1); font-weight: 600; display: block; }

@media (max-width: 900px) {
  body[data-hero="expressive"] .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait-wrap { display: none !important; }
  .hero { padding-top: 150px; min-height: auto; }
}

/* ═══ SECTIONS ═══ */
.section { padding: 110px 0; position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 60px; }
.section-head .kicker { margin-bottom: 18px; }
.section-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.1rem, 4.2vw, 3.3rem); letter-spacing: -0.03em; line-height: 1.12;
}
.section-link {
  font-size: 0.86rem; font-weight: 500; color: var(--t3);
  display: inline-flex; align-items: center; gap: 8px; transition: color 0.25s var(--ease);
}
.section-link:hover { color: var(--t1); }
.section-link .arrow { transition: transform 0.25s var(--ease); }
.section-link:hover .arrow { transform: translate(3px, -3px); }

/* ═══ NOW / BACKGROUND ═══ */
.now-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 40px 44px; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em; margin-bottom: 26px; display: flex; align-items: center; gap: 12px; }
.card .lk { color: var(--t4); font-size: 1rem; transition: color 0.25s; }
.card .lk:hover { color: var(--accent-bright); }
.now-list { list-style: none; display: flex; flex-direction: column; }
.now-list li { display: flex; gap: 18px; align-items: baseline; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; color: var(--t2); }
.now-list li:last-child { border-bottom: none; padding-bottom: 0; }
.now-list .yr { font-family: var(--mono); font-size: 0.7rem; color: var(--t4); letter-spacing: 0.06em; flex: none; width: 52px; padding-top: 4px; }
.now-list a { color: var(--t1); font-weight: 600; border-bottom: 1px solid var(--accent-line); transition: color 0.2s, border-color 0.2s; }
.now-list a:hover { color: var(--accent-bright); border-color: var(--accent); }
.now-list strong { color: var(--t1); font-weight: 600; }
.xp-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.xp { display: flex; align-items: center; gap: 16px; padding: 11px 0; }
.xp-logo {
  width: 38px; height: 38px; border-radius: var(--r-chip); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 0.95rem; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--t2);
}
.xp-meta strong { display: block; font-size: 1rem; color: var(--t1); font-weight: 600; }
.xp-meta span { font-size: 0.86rem; color: var(--t3); }
@media (max-width: 820px) { .now-grid { grid-template-columns: 1fr; } }

/* ═══ TALKS ═══ */
.talks-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 28px; align-items: stretch; }
.talk-photo { position: relative; border-radius: var(--r-media); overflow: hidden; border: 1px solid var(--line-strong); min-height: 440px; filter: grayscale(1) contrast(1.05); }
.talk-photo img { width: 100%; height: 100%; min-height: 440px; object-fit: cover; }
.talk-photo .slot-fallback { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: linear-gradient(150deg, #15212a 0%, #0e1318 60%, #0b0e12 100%); }
.talk-photo .slot-fallback::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 60% 30%, var(--accent-soft), transparent 58%); }
.talk-photo .slot-fallback span { position: relative; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em; line-height: 1.7; color: var(--t3); }
.talk-photo::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, transparent 52%, rgba(9,9,11,0.62)); pointer-events:none; }
.talk-photo .tag { position: absolute; left: 20px; bottom: 18px; z-index: 2; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.13em; text-transform: uppercase; color: rgba(255,255,255,0.85); }
.talk-list { display: flex; flex-direction: column; gap: 14px; }
.talk { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px 32px; transition: border-color 0.3s var(--ease), background 0.3s var(--ease); }
.talk:hover { border-color: var(--line-strong); background: var(--surface-2); }
.talk-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.talk-badge { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--r-chip); }
.talk-badge.up { color: var(--accent-bright); border: 1px solid var(--accent-line); }
.talk-badge.done { color: var(--t3); border: 1px solid var(--line); }
.talk-when { font-family: var(--mono); font-size: 0.68rem; color: var(--t4); letter-spacing: 0.05em; }
.talk h3 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin-bottom: 7px; letter-spacing: -0.02em; }
.talk p { font-size: 0.96rem; color: var(--t3); }
.talk .at { color: var(--t2); }
.talk .at-link { border-bottom: 1px solid var(--accent-line); transition: color 0.2s, border-color 0.2s; }
.talk .at-link:hover { color: var(--accent-bright); border-color: var(--accent); }
@media (max-width: 820px) { .talks-grid { grid-template-columns: 1fr; } .talk-photo, .talk-photo img { min-height: 320px; } }

/* ═══ PROJECTS ═══ */
.projects { display: flex; flex-direction: column; }
.project { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 72px 0; border-top: 1px solid var(--line); }
.project:nth-child(even) .project-info { order: 2; }
.project:nth-child(even) .project-media { order: 1; }
.project-media { position: relative; border-radius: var(--r-media); overflow: hidden; aspect-ratio: 16/10; background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; }
.project-media video, .project-media .placeholder { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease); }
.project-media:hover video, .project-media:hover .placeholder { transform: scale(1.03); }
.project-media .placeholder { display: flex; align-items: center; justify-content: center; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 14px, transparent 14px 28px); }
.project-media .placeholder .ph-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t4); padding: 8px 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-chip); }
.project-media .play-hint { position: absolute; top: 14px; right: 14px; z-index: 2; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.85); background: rgba(0,0,0,0.4); padding: 6px 11px; border-radius: var(--r-chip); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.3s var(--ease); }
.project-media:hover .play-hint { opacity: 1; }
.project-index { font-family: var(--mono); font-size: 0.72rem; color: var(--t3); letter-spacing: 0.08em; margin-bottom: 20px; }
.project-name { font-family: var(--serif); font-weight: 700; font-size: clamp(2.3rem, 4.2vw, 3.4rem); letter-spacing: -0.035em; line-height: 0.98; }
.project-desc { font-size: 1.08rem; color: var(--t2); line-height: 1.6; margin: 22px 0 26px; max-width: 44ch; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.project-tags .tag { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--r-chip); }
.project-result { display: flex; align-items: center; gap: 20px; padding: 24px 0 6px; border-top: 1px solid var(--line); margin-bottom: 28px; }
.project-result .num { font-family: var(--serif); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.6rem); letter-spacing: -0.04em; color: var(--accent-bright); font-variant-numeric: tabular-nums; line-height: 0.9; }
.project-result .num-label { font-size: 0.95rem; color: var(--t3); max-width: 22ch; }
.project-links { display: flex; align-items: center; gap: 24px; }
.project-cta { display: inline-flex; align-items: center; gap: 9px; font-size: 0.94rem; font-weight: 600; color: var(--t1); padding: 12px 22px; border-radius: var(--r-btn); border: 1px solid var(--line-strong); transition: border-color 0.25s, background 0.25s; }
.project-cta:hover { border-color: var(--t2); background: var(--surface-2); }
.project-cta .arrow { transition: transform 0.25s var(--ease); }
.project-cta:hover .arrow { transform: translateX(3px); }
.project-web { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--t3); transition: color 0.2s; }
.project-web:hover { color: var(--accent-bright); }
@media (max-width: 820px) {
  .project { grid-template-columns: 1fr; gap: 30px; padding: 50px 0; }
  .project:nth-child(even) .project-info, .project:nth-child(even) .project-media { order: unset; }
}

/* ═══ WRITING ═══ */
.writing-card { background: linear-gradient(160deg, var(--surface-2) 0%, var(--bg-2) 100%); border: 1px solid var(--line); border-radius: var(--r-card); padding: 64px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; overflow: hidden; position: relative; }
.writing-card::before { content: ''; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; background: radial-gradient(circle, var(--accent-soft), transparent 65%); filter: blur(30px); pointer-events: none; }
.writing-card h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 4vw, 3.2rem); letter-spacing: -0.03em; margin-bottom: 18px; line-height: 1.14; }
.writing-card p { font-size: 1.1rem; color: var(--t2); line-height: 1.6; margin-bottom: 32px; max-width: 42ch; }
.writing-posts { display: flex; flex-direction: column; position: relative; z-index: 1; }
.post { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 0; border-bottom: 1px solid var(--line); transition: padding 0.3s var(--ease); }
.post:hover { padding-left: 8px; }
.post:last-child { border-bottom: none; }
.post .ptitle { font-size: 1.04rem; color: var(--t1); font-weight: 500; }
.post .pmeta { font-family: var(--mono); font-size: 0.62rem; color: var(--t4); letter-spacing: 0.06em; flex: none; }
.post .arrow { color: var(--t4); transition: transform 0.25s var(--ease), color 0.25s; }
.post:hover .arrow { color: var(--accent-bright); transform: translate(3px,-3px); }
@media (max-width: 820px) { .writing-card { grid-template-columns: 1fr; padding: 42px 28px; gap: 38px; } }

/* ═══ CONTACT ═══ */
.contact { text-align: center; padding: 140px 0 120px; }
.contact .kicker { margin-bottom: 24px; }
.contact h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.8rem, 7vw, 5.2rem); letter-spacing: -0.04em; line-height: 1.07; margin-bottom: 20px; }
.contact h2 em { font-style: italic; font-weight: 500; color: transparent; background: linear-gradient(120deg, var(--accent-bright), var(--accent-deep)); -webkit-background-clip: text; background-clip: text; }
.contact p { font-size: 1.15rem; color: var(--t2); max-width: 46ch; margin: 0 auto 42px; }
.contact-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ═══ FOOTER ═══ */
footer { border-top: 1px solid var(--line); padding: 42px 0 58px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-row .left { font-size: 0.92rem; color: var(--t3); }
.footer-meta { font-family: var(--mono); font-size: 0.64rem; color: var(--t4); letter-spacing: 0.05em; text-align: right; line-height: 1.7; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--t3); transition: color 0.2s, border-color 0.2s, background 0.2s; }
.footer-social a:hover { color: var(--accent-bright); border-color: var(--accent-line); background: var(--surface-2); }
.footer-social svg { width: 18px; height: 18px; }

/* ═══ SCROLL REVEAL ═══ */
@media (prefers-reduced-motion: no-preference) {
  .r { opacity: 0; transform: translateY(calc(32px * var(--motion))); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); will-change: opacity, transform; }
  .r.in { opacity: 1; transform: translateY(0); }
  .r-d1 { transition-delay: 0.08s; } .r-d2 { transition-delay: 0.16s; } .r-d3 { transition-delay: 0.24s; } .r-d4 { transition-delay: 0.32s; }
}

/* ═══ VIDEO LIGHTBOX ═══ */
.video-lightbox { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 28px; background: rgba(4, 4, 7, 0.92); backdrop-filter: blur(14px); opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s; }
.video-lightbox.open { opacity: 1; visibility: visible; }
.video-lightbox-content { position: relative; width: 100%; max-width: 1080px; border-radius: 12px; overflow: hidden; box-shadow: 0 40px 120px -40px rgba(0,0,0,0.9); }
.video-lightbox-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.video-lightbox-close:hover { background: rgba(0,0,0,0.85); }
.video-lightbox-player { width: 100%; height: auto; max-height: 84vh; display: block; background: #000; }

/* ═══ TWEAKS PANEL ═══ */
#tweaks { position: fixed; top: 86px; right: 22px; z-index: 7000; width: 288px; padding: 20px; background: rgba(13,13,16,0.95); backdrop-filter: blur(20px); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 40px 120px -40px rgba(0,0,0,0.9); display: none; font-family: var(--sans); }
#tweaks.open { display: block; }
.tw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tw-head h4 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--t2); font-weight: 500; }
.tw-close { background: none; border: none; color: var(--t3); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.tw-close:hover { color: var(--t1); }
.tw-group { margin-bottom: 18px; }
.tw-group > label { display: block; font-size: 0.74rem; color: var(--t3); margin-bottom: 9px; }
.tw-seg { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 4px; }
.tw-seg button { flex: 1; font-family: var(--sans); font-size: 0.78rem; font-weight: 500; padding: 8px 6px; border-radius: 8px; border: none; background: none; color: var(--t3); cursor: pointer; transition: background 0.2s, color 0.2s; }
.tw-seg button.on { background: var(--t1); color: #0a0a0c; font-weight: 600; }
.tw-swatches { display: flex; gap: 10px; }
.tw-swatches button { width: 34px; height: 34px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.tw-swatches button:hover { transform: scale(1.08); }
.tw-swatches button.on { border-color: var(--t1); }
.tw-toggle { display: flex; align-items: center; justify-content: space-between; }
.tw-switch { width: 42px; height: 24px; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background 0.2s; }
.tw-switch.on { background: var(--accent); }
.tw-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.tw-switch.on::after { transform: translateX(18px); }
@media (max-width: 720px) { #tweaks { right: 12px; left: 12px; width: auto; } }
