/* ==========================================================================
   V1 — Editorial Brutalist
   Henry Chag Portfolio
   ========================================================================== */

/* Reset */
*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Tokens */
:root {
  --bg: #f2f1ed;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --line: #0a0a0a;
  --hair: rgba(10,10,10,0.12);
  --accent: #0a0a0a;

  --ff-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --ff-body: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, monospace;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Utilities */
.mono { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.muted { color: var(--muted); }
a { color: inherit; text-decoration: none; }

/* -------------------------------------------------------------------------- */
/* Top bar                                                                    */
/* -------------------------------------------------------------------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 32px;
  background: rgba(242, 241, 237, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hair);
  color: var(--fg);
}
.topbar .brand-mark {
  display: flex; align-items: center;
  color: inherit; text-decoration: none;
  position: relative;
}

.brand-wordmark {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  position: relative;
}
.brand-wordmark .bw-name {
  position: relative;
  display: inline-block;
}
.brand-wordmark .bw-name::before {
  content: '';
  position: absolute; left: 0; right: -2px; bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(.6,.02,.2,1);
}
.topbar .brand-mark:hover .bw-name::before {
  transform: scaleX(1);
}
.brand-wordmark .bw-cursor {
  display: inline-block;
  width: 10px; height: 18px;
  background: currentColor;
  margin-left: 5px;
  transform: translateY(1px);
  animation: bw-blink 1.1s steps(2, end) infinite;
}
@keyframes bw-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
@media (max-width: 640px) {
  .brand-wordmark { font-size: 15px; letter-spacing: 0.16em; }
  .brand-wordmark .bw-cursor { width: 8px; height: 14px; }
}

/* Language switch */
.topbar nav { display: flex; align-items: center; gap: 28px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding-left: 24px;
  border-left: 1px solid var(--hair);
}
.lang-switch button {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.4;
  transition: opacity 0.2s;
}
.lang-switch button:hover { opacity: 0.85; }
.lang-switch button.active { opacity: 1; font-weight: 700; }
.lang-switch .lang-sep { color: var(--muted); opacity: 0.5; font-size: 11px; }

/* Hide Google Translate UI completely */
#google_translate_element { display: none !important; }
.goog-te-banner-frame, .skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-tooltip, .goog-tooltip:hover, .goog-text-highlight {
  background: none !important; box-shadow: none !important;
}
font[style*="background"] { background: transparent !important; }
.topbar nav ul { list-style: none; display: flex; gap: 28px; }
.topbar nav a { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; transition: opacity 0.2s; }
.topbar nav a:hover { opacity: 1; }

.back-link { display: none; }

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  padding: 110px 32px 32px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.hero-meta {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 24px; border-bottom: 1px solid var(--hair);
}
.hero-meta .left { display: flex; gap: 48px; flex-wrap: wrap; }
.hero-meta .cluster { display: flex; flex-direction: column; gap: 4px; }
.hero-meta .cluster .label { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.hero-meta .cluster .val { font-size: 13px; }

.hero-type {
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.hero-type {
  display: block; position: relative;
  min-height: 56vh;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero-overlay {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  height: 100%; min-height: 56vh;
  padding: 24px 0;
  pointer-events: none;
}
.hero-overlay .ho-line {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
}
.hero-overlay .ho-line-top { opacity: 0.7; }
.hero-overlay .ho-mid { letter-spacing: 0.3em; }
.hero-overlay .ho-line-bot { opacity: 0.7; }
.hero-overlay .ho-pulse {
  display: inline-block; width: 7px; height: 7px;
  background: #d23c3c; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(210,60,60,0.6);
  animation: ho-pulse 1.6s ease-out infinite;
}
@keyframes ho-pulse {
  0% { box-shadow: 0 0 0 0 rgba(210,60,60,0.6); }
  100% { box-shadow: 0 0 0 12px rgba(210,60,60,0); }
}
.hero-overlay .ho-arrow {
  display: inline-block;
  animation: bob 2s ease-in-out infinite;
}
.hero-glitch {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(72px, 18vw, 280px);
  line-height: 0.82;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  margin: 0;
  color: var(--fg);
  position: relative;
  pointer-events: auto;
  cursor: crosshair;
  align-self: flex-start;
}
.hero-glitch-alt {
  align-self: flex-end;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.04em;
  font-size: clamp(80px, 20vw, 320px);
  text-transform: lowercase;
  margin-top: -0.18em;
}
.hero-glitch::before, .hero-glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hero-glitch::before { color: #d23c3c; transform: translate(-3px, 0); mix-blend-mode: multiply; }
.hero-glitch::after  { color: #2b6cff; transform: translate(3px, 0);  mix-blend-mode: multiply; }
.hero-glitch:hover::before, .hero-glitch:hover::after { opacity: 0.85; animation: glitch 0.4s steps(2, end) infinite; }
@keyframes glitch {
  0%   { transform: translate(-3px, -1px); }
  25%  { transform: translate(2px, 1px); }
  50%  { transform: translate(-2px, 2px); }
  75%  { transform: translate(3px, -1px); }
  100% { transform: translate(-3px, 0); }
}
.hero-glitch.hero-glitch-alt:hover::before { transform: translate(-2px, 1px); }
.hero-glitch.hero-glitch-alt:hover::after  { transform: translate(2px, -1px); }

@media (max-width: 640px) {
  .hero-overlay .ho-line { font-size: 9px; }
}

/* -------------------------------------------------------------------------- */
/* Hero variant B — Text Wall                                                  */
/* -------------------------------------------------------------------------- */
.hero-wall {
  min-height: 56vh;
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 0 24px;
}
.hw-grid {
  display: flex; flex-wrap: wrap;
  align-items: baseline;
  column-gap: 28px; row-gap: 6px;
  font-family: var(--ff-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
  color: var(--fg);
}
.hw {
  display: inline-block;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(.2,.7,.2,1), color 0.25s ease;
  opacity: 0.92;
  cursor: default;
}
.hw.it {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-style: italic;
  text-transform: lowercase;
  letter-spacing: -0.01em;
}
.hw.sm {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 0.32em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
  align-self: center;
  transform: translateY(-0.4em);
}
/* Per-word sizes — varied for rhythm */
.hw.w-1  { font-size: clamp(64px, 12vw, 200px); }
.hw.w-2  { font-size: clamp(72px, 14vw, 240px); }
.hw.w-3  { font-size: clamp(40px, 6vw, 92px); }
.hw.w-4  { font-size: clamp(40px, 6vw, 92px); opacity: 0.4; font-weight: 300; }
.hw.w-5  { font-size: clamp(40px, 6vw, 92px); }
.hw.w-6  { font-size: clamp(36px, 5.5vw, 84px); }
.hw.w-7  { font-size: clamp(48px, 7vw, 110px); }
.hw.w-8  { font-size: clamp(38px, 5.5vw, 86px); }
.hw.w-9  { font-size: clamp(28px, 4vw, 60px); opacity: 0.5; }
.hw.w-10 { font-size: clamp(40px, 6vw, 96px); letter-spacing: 0.04em; }
.hw.w-11 { font-size: clamp(28px, 4vw, 60px); opacity: 0.5; }
.hw.w-13 { font-size: clamp(40px, 6.5vw, 100px); }
.hw.w-14 { font-size: clamp(48px, 8vw, 130px); letter-spacing: 0.02em; }
.hw.w-17 { font-size: clamp(56px, 10vw, 170px); letter-spacing: 0.04em; }
.hw.w-18 { font-size: clamp(44px, 7vw, 110px); }
.hw.w-19 { font-size: clamp(40px, 6vw, 92px); }
.hw.w-21 { font-size: clamp(36px, 5.5vw, 84px); }
.hw.w-22 { font-size: clamp(48px, 7.5vw, 120px); }
.hw.w-23 { font-size: clamp(56px, 10vw, 160px); letter-spacing: 0.02em; }
/* Hover: focus this word, dim siblings */
.hw-grid:hover .hw { opacity: 0.18; }
.hw-grid .hw:hover { opacity: 1; transform: translateY(-2px); }
.hw-grid .hw.sm:hover { transform: translateY(-0.4em) translateY(-2px); }
.hw-meta {
  position: absolute; bottom: 8px; left: 0;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 720px) {
  .hw-grid { column-gap: 16px; row-gap: 2px; }
}

/* -------------------------------------------------------------------------- */
/* Tweaks panel                                                                */
/* -------------------------------------------------------------------------- */
#tweaks-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 260px;
  background: var(--bg);
  border: 1px solid var(--fg);
  font-family: var(--ff-mono);
  color: var(--fg);
  box-shadow: 6px 6px 0 var(--fg);
}
#tweaks-panel .tp-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hair);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
}
#tweaks-panel .tp-close {
  background: none; border: none; color: var(--fg);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px;
}
#tweaks-panel .tp-body { padding: 14px 12px; }
#tweaks-panel .tp-section + .tp-section { margin-top: 14px; }
#tweaks-panel .tp-label {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
#tweaks-panel .tp-radio { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#tweaks-panel .tp-radio-3 { grid-template-columns: 1fr 1fr; }
#tweaks-panel .tp-radio-3 { grid-template-columns: 1fr; }
#tweaks-panel .tp-radio button {
  background: transparent; border: 1px solid var(--hair);
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 6px; cursor: pointer;
  color: var(--fg);
}
#tweaks-panel .tp-radio button.on {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}

.hero-type[hidden], .hero-wall[hidden], .hero-mask[hidden], .hero-manifesto[hidden], .hero-diptych[hidden], .hero-term[hidden] { display: none !important; }

/* -------------------------------------------------------------------------- */
/* Hero variant G — Live Terminal                                              */
/* -------------------------------------------------------------------------- */
.hero-term {
  min-height: 64vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 0;
}
.hero-term .ht-frame {
  width: 100%;
  max-width: 1100px;
  background: #0a0a0a;
  color: #e8e6df;
  border: 1px solid var(--fg);
  box-shadow: 8px 8px 0 var(--fg);
  font-family: var(--ff-mono);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hero-term .ht-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #181715;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(232,230,223,0.7);
}
.hero-term .ht-dot {
  width: 11px; height: 11px; border-radius: 50%;
  display: inline-block;
}
.hero-term .ht-dot-r { background: #ff5f57; }
.hero-term .ht-dot-y { background: #febc2e; }
.hero-term .ht-dot-g { background: #28c840; }
.hero-term .ht-title { margin-left: 14px; }
.hero-term .ht-status {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  color: #d23c3c;
}
.hero-term .ht-pulse {
  display: inline-block; width: 6px; height: 6px;
  background: #d23c3c; border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}
.hero-term .ht-body {
  padding: 18px 18px 14px;
  font-size: clamp(12px, 1.05vw, 14px);
  line-height: 1.55;
  letter-spacing: 0.01em;
  min-height: 48vh;
  max-height: 60vh;
  overflow-y: auto;
  cursor: text;
  outline: none;
}
.hero-term .ht-out { white-space: pre-wrap; }
.hero-term .ht-out .ht-row { margin-bottom: 2px; }
.hero-term .ht-out .ht-cmd { color: #e8e6df; }
.hero-term .ht-out .ht-prompt { color: #28c840; }
.hero-term .ht-out .ht-tilde { color: #8e96a8; }
.hero-term .ht-out .ht-mute { color: #8e8b82; }
.hero-term .ht-out .ht-ac { color: #d23c3c; }
.hero-term .ht-out .ht-hl { color: #febc2e; }
.hero-term .ht-out .ht-ok { color: #28c840; }
.hero-term .ht-out .ht-link { color: #6ec8ff; text-decoration: underline; }
.hero-term .ht-out .ht-block { color: #c9c7be; }
.hero-term .ht-out .ht-ascii { color: #d23c3c; font-size: 10px; line-height: 1.05; letter-spacing: 0; margin: 6px 0; white-space: pre; }
.hero-term .ht-prompt-line {
  display: flex; align-items: center; gap: 8px;
  padding-top: 4px;
}
.hero-term .ht-prompt { color: #28c840; white-space: nowrap; }
.hero-term .ht-input {
  flex: 1;
  outline: none;
  min-width: 30px;
  color: #e8e6df;
  caret-color: transparent;
}
.hero-term .ht-caret {
  color: #e8e6df;
  animation: ht-blink 1s steps(2) infinite;
}
@keyframes ht-blink { 50% { opacity: 0; } }
.hero-term .ht-statbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: #131210;
  font-size: 10px; letter-spacing: 0.1em;
  color: rgba(232,230,223,0.55);
}
.hero-term .ht-statbar code {
  font-family: var(--ff-mono);
  color: #28c840;
  background: rgba(40,200,64,0.08);
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}
.hero-term .ht-spacer { flex: 1; }

/* Scrollbar */
.hero-term .ht-body::-webkit-scrollbar { width: 8px; }
.hero-term .ht-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
.hero-term .ht-body::-webkit-scrollbar-track { background: transparent; }

/* -------------------------------------------------------------------------- */
/* Hero variant F — Diptych                                                   */
/* -------------------------------------------------------------------------- */
.hero-diptych {
  position: relative;
  height: calc(100vh - 96px);
  min-height: 640px;
  background: #050505;
  color: #f2f1ed;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  overflow: hidden;
  isolation: isolate;
}
.hero-diptych::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
  pointer-events: none; z-index: 3;
}

/* LEFT: single cinematic frame */
.hd-cine {
  position: absolute; inset: 0;
  overflow: hidden;
  background: #050505;
}
.hd-cine-img {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 38% 42%, rgba(216, 182, 90, 0.22) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 65%, rgba(210, 60, 60, 0.18) 0%, transparent 50%),
    linear-gradient(135deg, #1a1612 0%, #0a0a0a 50%, #14100c 100%);
  filter: contrast(1.05) saturate(0.85);
  animation: hd-kenburns 22s ease-in-out infinite alternate;
}
.hd-cine-img::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.06) 2px 3px);
  mix-blend-mode: multiply;
}
@keyframes hd-kenburns {
  0%   { transform: scale(1.05) translate(0, 0); }
  100% { transform: scale(1.18) translate(-2%, -1%); }
}
.hd-cine-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5; mix-blend-mode: overlay; pointer-events: none;
}
.hd-cine-bars {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hd-cine-bars::before,
.hd-cine-bars::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 56px;
  background: #000;
}
.hd-cine-bars::before { top: 0; }
.hd-cine-bars::after  { bottom: 0; }
.hd-cine-tc {
  position: absolute;
  bottom: 76px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(242,241,237,0.7);
  display: flex; gap: 8px;
  z-index: 2;
}
.hd-cine-tc .hd-tc-k { color: rgba(242,241,237,0.4); }
.hd-cine-rec {
  position: absolute;
  top: 76px; right: 24px;
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #f2f1ed;
  display: flex; align-items: center; gap: 8px;
  z-index: 2;
}
.hd-cine-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d23c3c;
  box-shadow: 0 0 12px rgba(210,60,60,0.8);
  animation: hd-rec 1.6s ease-in-out infinite;
}
@keyframes hd-rec { 50% { opacity: 0.3; } }

/* CENTER monolith */
.hd-monolith {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 32px 0;
  gap: 14px;
}
.hd-mono-pre {
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: rgba(242,241,237,0.55);
}
.hd-mono-year {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(48px, 6.5vw, 96px);
  letter-spacing: 0.04em;
  line-height: 1;
  color: #f2f1ed;
}
.hd-mono-rule {
  width: 56px; height: 1px;
  background: rgba(242,241,237,0.4);
  margin: 4px 0;
}
.hd-mono-tag {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.2;
  color: rgba(242,241,237,0.7);
}
.hd-strip {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 40px;
  animation: hd-scroll-up 60s linear infinite;
}
.hd-frame {
  flex: 0 0 auto;
  aspect-ratio: 2.39 / 1;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 50%, #1a1a1a 100%);
  border: 1px solid rgba(242,241,237,0.12);
  position: relative;
  overflow: hidden;
}
.hd-frame::before {
  content: attr(data-num);
  position: absolute;
  top: 6px; left: 8px;
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(242,241,237,0.4);
}
.hd-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(242,241,237,0.08), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(210,60,60,0.15), transparent 60%);
}
.hd-perf {
  flex: 0 0 12px;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
}
.hd-perf span {
  width: 18px; height: 8px;
  background: rgba(242,241,237,0.12);
  border-radius: 1px;
}
@keyframes hd-scroll-up {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* CENTER seam */
.hd-seam {
  position: relative;
  width: clamp(320px, 32vw, 520px);
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  z-index: 2;
}
.hd-seam-line {
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(242,241,237,0.4), transparent);
  justify-self: center;
}
.hd-morph {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0;
  gap: 4px;
}
.hd-morph-pre,
.hd-morph-amp {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 32px);
  color: rgba(242,241,237,0.65);
  font-weight: 400;
}
.hd-morph-word {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(40px, 5.5vw, 80px);
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: lowercase;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(.7,0,.3,1), opacity 0.3s;
}
.hd-morph-word.flip { animation: hd-flip 0.5s cubic-bezier(.7,0,.3,1); }
@keyframes hd-flip {
  0%   { transform: translateY(0)   skewX(0deg);  opacity: 1; }
  45%  { transform: translateY(-22px) skewX(-8deg); opacity: 0; }
  55%  { transform: translateY(22px)  skewX(8deg);  opacity: 0; }
  100% { transform: translateY(0)   skewX(0deg);  opacity: 1; }
}

/* RIGHT: terminal */
.hd-right {
  position: relative;
  overflow: hidden;
  border-left: 1px solid rgba(242,241,237,0.08);
  background: #050505;
}
.hd-term {
  position: absolute;
  inset: 0;
  padding: 32px 40px;
  font-family: var(--ff-mono, ui-monospace, 'Geist Mono', monospace);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(242,241,237,0.78);
  white-space: pre-wrap;
  overflow: hidden;
}
.hd-term .ln-prompt { color: rgba(242,241,237,0.35); }
.hd-term .ln-key    { color: #f2f1ed; }
.hd-term .ln-str    { color: #d23c3c; }
.hd-term .ln-com    { color: rgba(242,241,237,0.4); font-style: italic; }
.hd-term .ln-acc    { color: #d8b65a; }
.hd-cur {
  display: inline-block;
  width: 8px; height: 14px;
  background: #f2f1ed;
  vertical-align: -2px;
  animation: hd-blink 1s steps(2) infinite;
}
@keyframes hd-blink { 50% { opacity: 0; } }

/* Corner meta */
.hd-meta {
  position: absolute;
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 2;
}
.hd-meta-tl { top: 24px;    left: 24px; }
.hd-meta-bl { bottom: 24px; left: 24px; }
.hd-meta-tr { top: 24px;    right: 24px; align-items: flex-end; text-align: right; }
.hd-meta-br { bottom: 24px; right: 24px; align-items: flex-end; text-align: right; }
.hd-meta .hd-k { color: rgba(242,241,237,0.4); }
.hd-meta .hd-v { color: #f2f1ed; margin-bottom: 4px; }

.hd-hint {
  position: absolute;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(242,241,237,0.5);
  z-index: 4;
}

@media (max-width: 880px) {
  .hero-diptych {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto 1fr;
    height: auto;
    min-height: 100vh;
  }
  .hd-seam { width: 100%; height: auto; grid-template-rows: auto; padding: 24px 0; }
  .hd-seam-line { display: none; }
  .hd-meta-tl, .hd-meta-tr { top: 16px; }
  .hd-meta-bl, .hd-meta-br { bottom: 16px; }
}

/* -------------------------------------------------------------------------- */
/* Hero variant E — Liquid Mask Manifesto (no name)                            */
/* -------------------------------------------------------------------------- */
.hero-mask-e .hm-name-e {
  font-family: var(--ff-display);
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: -0.04em;
  line-height: 0.92;
  font-size: clamp(60px, 12vw, 180px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(180deg, #f2f1ed 0%, #d23c3c 50%, #f2f1ed 100%);
  background-size: 100% 200%;
  background-position: 0% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  mix-blend-mode: difference;
  transition: background-position 0.6s ease, letter-spacing 0.4s ease;
  cursor: crosshair;
}
.hero-mask-e .hm-name-e em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.02em;
}
.hero-mask-e .hm-name-e .hme-1 {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.7em;
  margin-bottom: 0.05em;
}
.hero-mask-e .hm-name-e:hover {
  letter-spacing: -0.02em;
  background-position: 0% 100%;
}

/* Variant C v2 — interactive code field, no name */
.hero-mask-c2 { padding: 0; min-height: 72vh; }
.hero-mask-c2::before,
.hero-mask-c2::after { display: none; }
.hm-grid {
  position: absolute; inset: 0;
  padding: 56px 24px 56px;
  display: flex; flex-wrap: wrap; align-content: flex-start;
  gap: 2px 16px;
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(242,241,237,0.32);
  overflow: hidden;
  cursor: default;
  z-index: 2;
}
.hm-tok {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0.02em;
  transition: color 0.15s ease, background 0.15s ease, transform 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.hm-tok:hover {
  color: #f2f1ed;
  background: rgba(242,241,237,0.08);
  transform: translateY(-1px);
}
.hm-tok.ac { color: rgba(210,60,60,0.65); }
.hm-tok.ac:hover { color: #d23c3c; background: rgba(210,60,60,0.1); }
.hm-tok.hl { color: rgba(242,241,237,0.65); }
.hm-tok.glow { color: #f2f1ed; text-shadow: 0 0 14px rgba(242,241,237,0.5); }
.hm-readout {
  position: absolute;
  left: 50%; bottom: 18px; transform: translateX(-50%);
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,241,237,0.8);
  background: rgba(10,10,10,0.6);
  border: 1px solid rgba(242,241,237,0.18);
  padding: 8px 14px;
  z-index: 6;
  min-width: 260px; text-align: center;
}
.hm-readout .hm-k { color: rgba(242,241,237,0.5); }
.hm-readout .hm-v { color: #f2f1ed; }
.hero-mask-c2 .hm-corner { z-index: 6; }

/* -------------------------------------------------------------------------- */
/* Hero variant D — Manifesto                                                  */
/* -------------------------------------------------------------------------- */
.hero-manifesto {
  position: relative;
  min-height: 64vh;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 0;
}
.hero-manifesto .hmf-grid {
  position: relative;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  min-height: inherit;
}
.hero-manifesto .hmf-tag {
  position: absolute;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex; flex-direction: column; gap: 2px;
}
.hero-manifesto .hmf-k { color: var(--muted); }
.hero-manifesto .hmf-v { color: var(--fg); }
.hero-manifesto .hmf-tl { top: 0; left: 0; }
.hero-manifesto .hmf-tr { top: 0; right: 0; text-align: right; align-items: flex-end; }
.hero-manifesto .hmf-bl { bottom: 0; left: 0; }
.hero-manifesto .hmf-br { bottom: 0; right: 0; text-align: right; align-items: flex-end; }
.hero-manifesto .hmf-pulse {
  display: inline-block; width: 6px; height: 6px;
  background: #2a8c4a; border-radius: 50%;
  margin-right: 6px;
  animation: pulse 1.6s ease-in-out infinite;
  transform: translateY(-1px);
}

.hero-manifesto .hmf-text {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(48px, 9vw, 144px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  margin: 0;
  text-align: center;
  max-width: 14ch;
}
.hero-manifesto .hmf-line { display: block; }
.hero-manifesto .hmf-it {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: 1.06em;
}
.hero-manifesto .hmf-amp {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0.18em;
  font-size: 1.1em;
}
.hero-manifesto .hmf-word {
  display: inline-block;
  position: relative;
  cursor: pointer;
  border-bottom: 2px solid var(--hair);
  transition: border-color 0.3s ease, transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.hero-manifesto .hmf-word:hover {
  border-bottom-color: var(--fg);
  transform: translateY(-3px);
}
.hero-manifesto .hmf-word.flip {
  animation: hmf-flip 0.5s ease;
}
@keyframes hmf-flip {
  0%   { transform: rotateX(0); }
  49%  { transform: rotateX(90deg); }
  51%  { transform: rotateX(-90deg); }
  100% { transform: rotateX(0); }
}
.hero-manifesto .hmf-big {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.25em;
  letter-spacing: -0.025em;
  border-bottom-width: 3px;
}
@media (max-width: 720px) {
  .hero-manifesto .hmf-tag { font-size: 9px; }
  .hero-manifesto .hmf-text { font-size: clamp(40px, 12vw, 80px); }
}

/* -------------------------------------------------------------------------- */
/* Hero variant C — Liquid Mask                                                */
/* -------------------------------------------------------------------------- */
.hero-mask {
  position: relative;
  min-height: 64vh;
  background: #0a0a0a;
  color: #f2f1ed;
  overflow: hidden;
  isolation: isolate;
  margin: 0 -32px;
  padding: 32px;
  display: flex; align-items: center; justify-content: center;
}
.hero-mask .hm-stream {
  position: absolute; inset: 0;
  font-family: var(--ff-mono);
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: rgba(242, 241, 237, 0.85);
  white-space: pre-wrap;
  word-break: break-all;
  padding: 16px 24px;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
.hero-mask .hm-stream .hl { color: #fff; font-weight: 500; }
.hero-mask .hm-stream .ac { color: #d23c3c; }

.hero-mask::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(10,10,10,0.86);
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.hero-mask:hover::before { opacity: 0.55; }

.hero-mask .hm-mask {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex; justify-content: center; align-items: center;
}
.hero-mask .hm-name {
  font-family: var(--ff-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  font-size: clamp(72px, 16vw, 240px);
  line-height: 0.86;
  display: flex; flex-direction: column; align-items: center;
  color: transparent;
  background: linear-gradient(180deg, #f2f1ed 0%, #d23c3c 50%, #f2f1ed 100%);
  background-size: 100% 200%;
  background-position: 0% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  mix-blend-mode: difference;
  transition: background-position 0.6s ease, letter-spacing 0.4s ease;
  cursor: crosshair;
  text-align: center;
}
.hero-mask .hm-name span { display: block; }
.hero-mask .hm-name .hm-amp {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.4em;
  margin: -0.15em 0;
  background: none;
  -webkit-text-fill-color: #d23c3c;
  color: #d23c3c;
  mix-blend-mode: normal;
}
.hero-mask .hm-name:hover {
  letter-spacing: -0.02em;
  background-position: 0% 100%;
}

.hero-mask::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(10,10,10,0.7) 100%);
  z-index: 4;
  pointer-events: none;
}

.hero-mask .hm-corner {
  position: absolute;
  z-index: 5;
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-mask .hm-corner .hm-k { color: rgba(242,241,237,0.4); }
.hero-mask .hm-corner .hm-v { color: #f2f1ed; margin-bottom: 4px; }
.hero-mask .hm-tl { top: 18px; left: 24px; }
.hero-mask .hm-tr { top: 18px; right: 24px; text-align: right; align-items: flex-end; }
.hero-mask .hm-bl { bottom: 18px; left: 24px; }
.hero-mask .hm-br { bottom: 18px; right: 24px; text-align: right; align-items: flex-end; }
.hero-mask .hm-rec {
  display: inline-block; width: 6px; height: 6px;
  background: #d23c3c; border-radius: 50%;
  margin-right: 6px;
  animation: pulse 1.6s ease-in-out infinite;
}
.hero-mask .hm-hint {
  position: absolute;
  z-index: 5;
  bottom: 18px; left: 50%; transform: translateX(-50%);
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(242,241,237,0.5);
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .hero-mask .hm-corner { font-size: 8px; }
  .hero-mask .hm-stream { font-size: 9px; }
  .hero-mask .hm-hint { display: none; }
}

.hero-type .amp {
  position: absolute;
  right: 0; top: 12%;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(120px, 22vw, 360px);
  line-height: 0.8;
  font-weight: 400;
  color: var(--fg);
  opacity: 0.08;
  pointer-events: none;
}

.hero-footer {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
  align-items: end;
  padding-top: 24px; border-top: 1px solid var(--hair);
}
.hero-footer .tagline { font-size: 13px; line-height: 1.5; max-width: 44ch; color: var(--fg); }
.hero-footer .tagline .muted { color: var(--muted); }
.hero-foot-meta { display: flex; flex-direction: column; gap: 4px; align-self: end; }
.hero-foot-meta .hf-label { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.hero-foot-meta .hf-val { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg); }
.hero-footer .scroll-cue { text-align: right; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.hero-footer .scroll-cue .arrow { display: inline-block; transform: translateY(2px); margin-left: 8px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(2px); } 50% { transform: translateY(8px); } }

/* -------------------------------------------------------------------------- */
/* Ticker                                                                     */
/* -------------------------------------------------------------------------- */
.ticker {
  background: var(--fg); color: var(--bg);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.ticker-track { display: inline-block; animation: marquee 40s linear infinite; }
.ticker-track span { padding: 0 32px; }
.ticker-track .dot { opacity: 0.4; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* -------------------------------------------------------------------------- */
/* About                                                                      */
/* -------------------------------------------------------------------------- */
.about {
  padding: 140px 32px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  border-bottom: 1px solid var(--line);
}
.about .sticky-label { position: sticky; top: 100px; align-self: start; }
.about .sticky-label .num { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.15em; color: var(--muted); }
.about .sticky-label h2 { font-family: var(--ff-display); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; text-transform: uppercase; margin-top: 8px; line-height: 0.95; }

.about-body { max-width: 720px; }
.about-body .lead {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}
.about-body .lead em { font-style: italic; }
.about-body p { font-size: 17px; line-height: 1.55; margin-bottom: 20px; max-width: 60ch; }

.about-roles { margin-top: 56px; border-top: 1px solid var(--hair); }
.about-roles .role {
  display: grid; grid-template-columns: 80px 1fr 2fr 160px; gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hair);
  align-items: baseline;
}
.about-roles .role .yr { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.about-roles .role .title { font-family: var(--ff-display); font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; }
.about-roles .role .org { font-size: 14px; color: var(--muted); line-height: 1.4; }
.about-roles .role .tag { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; text-align: right; color: var(--muted); }

/* -------------------------------------------------------------------------- */
/* Reel (XML)                                                                 */
/* -------------------------------------------------------------------------- */
.reel {
  padding: 100px 32px;
  border-bottom: 1px solid var(--line);
}
.reel .reel-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end;
  margin-bottom: 48px;
}
.reel .reel-head .num { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.15em; color: var(--muted); margin-bottom: 12px; }
.reel .reel-head h2 { font-family: var(--ff-display); font-size: clamp(56px, 9vw, 140px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; text-transform: uppercase; }
.reel .reel-head .right { justify-self: end; max-width: 42ch; text-align: right; font-size: 15px; line-height: 1.5; }

.reel-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
}
.reel-player .placeholder-video {
  position: absolute; inset: 0;
  background: #0a0a0a;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 48px);
}
.reel-player .placeholder-video::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.08), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(255,255,255,0.06), transparent 50%);
}
.reel-player .overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 32px; color: #fafafa; z-index: 2; }
.reel-player .overlay .top-row { display: flex; justify-content: space-between; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.reel-player .overlay .center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 24px;
}
.reel-player .overlay .play-btn {
  width: 72px; height: 72px; border: 1px solid rgba(255,255,255,0.5); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}
.reel-player:hover .overlay .play-btn { background: #fafafa; border-color: #fafafa; }
.reel-player .overlay .play-btn::after { content: ''; border-left: 14px solid #fafafa; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; transition: border-left-color 0.3s; }
.reel-player:hover .overlay .play-btn::after { border-left-color: #0a0a0a; }
.reel-player .overlay .big-title { font-family: var(--ff-display); font-size: 28px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.02em; }
.reel-player .overlay .bottom-row { display: flex; justify-content: space-between; align-items: flex-end; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

.reel .services { margin-top: 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.reel .services .svc { padding: 20px 0; border-top: 1px solid var(--line); }
.reel .services .svc .n { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 8px; }
.reel .services .svc .t { font-family: var(--ff-display); font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; }

/* -------------------------------------------------------------------------- */
/* Portfolio                                                                  */
/* -------------------------------------------------------------------------- */
.portfolio {
  padding: 100px 32px;
  border-bottom: 1px solid var(--line);
}
.portfolio .head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 48px;
}
.portfolio .head h2 { font-family: var(--ff-display); font-size: clamp(56px, 9vw, 140px); font-weight: 800; letter-spacing: -0.04em; text-transform: uppercase; line-height: 0.9; }
.portfolio .head .num { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.15em; color: var(--muted); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; border-top: 1px solid var(--line); padding-top: 24px; }
.filters button {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 10px 16px; border: 1px solid var(--fg); background: transparent; color: var(--fg); cursor: pointer;
  transition: all 0.2s;
}
.filters button:hover, .filters button.active { background: var(--fg); color: var(--bg); }

.projects { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
/* Project grid spans (12-col) */
.project { grid-column: span 6; aspect-ratio: 4 / 3; background: #0a0a0a; position: relative; overflow: hidden; cursor: pointer; border: 1px solid var(--line); }
.project.wide { grid-column: span 8; }
.project.narrow { grid-column: span 4; }
.project.third { grid-column: span 4; }
.project.half { grid-column: span 6; }
.project.tall { aspect-ratio: 3 / 4; }
.project .thumb { position: absolute; inset: 0; transition: transform 0.6s ease; }
.project:hover .thumb { transform: scale(1.04); }
.project .thumb.style-a { background:
  repeating-linear-gradient(45deg, #1a1a1a 0 2px, #0a0a0a 2px 12px),
  #0a0a0a; }
.project .thumb.style-b { background:
  radial-gradient(circle at 50% 50%, #2a2a2a, #0a0a0a 70%); }
.project .thumb.style-c { background:
  repeating-linear-gradient(0deg, #1a1a1a 0 1px, #0a0a0a 1px 8px); }
.project .thumb.style-d { background:
  linear-gradient(135deg, #2a2a2a 0%, #0a0a0a 100%); }
.project .thumb.style-e { background:
  conic-gradient(from 180deg at 50% 50%, #0a0a0a, #2a2a2a, #0a0a0a); }
.project .thumb.style-f { background:
  repeating-linear-gradient(90deg, #1a1a1a 0 1px, transparent 1px 20px),
  repeating-linear-gradient(0deg, #1a1a1a 0 1px, transparent 1px 20px),
  #0a0a0a; }

.project .info {
  position: absolute; inset: 0;
  padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fafafa;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6) 100%);
  transition: all 0.3s ease;
}
.project .info .top { display: flex; justify-content: space-between; font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.7; }
.project .info .bottom .title { font-family: var(--ff-display); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.02em; }
.project .info .bottom .cat { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.7; margin-top: 4px; }

.project[data-placeholder] .info::after {
  content: '[ REPLACE W/ REAL MEDIA ]';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.15em; color: rgba(255,255,255,0.3);
}

/* -------------------------------------------------------------------------- */
/* Education                                                                  */
/* -------------------------------------------------------------------------- */
.education {
  padding: 120px 32px;
  border-bottom: 1px solid var(--line);
}
.education .edu-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end;
  margin-bottom: 64px;
}
.education .edu-head .num { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.15em; color: var(--muted); margin-bottom: 12px; }
.education .edu-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(56px, 9vw, 140px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
}
.education .edu-head .right {
  justify-self: end; max-width: 42ch; text-align: right;
  font-size: 15px; line-height: 1.5;
}

.education .timeline {
  list-style: none;
  border-top: 1px solid var(--line);
  position: relative;
}

.education .edu-item {
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--hair);
  align-items: baseline;
  position: relative;
  transition: padding 0.25s ease;
}
.education .edu-item:hover { padding-left: 12px; padding-right: 12px; }
.education .edu-item::before {
  content: '';
  position: absolute; left: -1px; top: 0; bottom: 0;
  width: 2px; background: var(--fg);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.3s ease;
}
.education .edu-item:hover::before { transform: scaleY(1); }

.education .edu-yr {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.education .edu-body { max-width: 60ch; }
.education .edu-deg {
  font-family: var(--ff-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 6px;
}
.education .edu-org {
  font-size: 15px; color: var(--muted); line-height: 1.4;
}
.education .edu-note {
  margin-top: 12px;
  font-size: 14px; line-height: 1.55; color: var(--fg); opacity: 0.85;
  max-width: 56ch;
}
.education .edu-tag {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  align-self: start;
}

/* -------------------------------------------------------------------------- */
/* Contact                                                                    */
/* -------------------------------------------------------------------------- */
.contact {
  padding: 140px 32px 80px;
  background: var(--fg); color: var(--bg);
  position: relative;
}
.contact .num { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.15em; color: rgba(242,241,237,0.5); margin-bottom: 24px; }
.contact h2 {
  font-family: var(--ff-display);
  font-size: clamp(64px, 14vw, 220px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.85;
  text-transform: uppercase;
  margin-bottom: 48px;
}
.contact h2 .it { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; text-transform: lowercase; letter-spacing: -0.03em; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; margin-top: 80px; padding-top: 32px; border-top: 1px solid rgba(242,241,237,0.2); }
.contact-grid .col .label { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(242,241,237,0.5); margin-bottom: 12px; }
.contact-grid .col .val { font-size: 18px; line-height: 1.4; }
.contact-grid .col .val a { border-bottom: 1px solid rgba(242,241,237,0.3); padding-bottom: 2px; }
.contact-grid .col ul { list-style: none; }
.contact-grid .col ul li { font-size: 15px; margin-bottom: 6px; }

footer.foot {
  margin-top: 80px; padding-top: 24px;
  border-top: 1px solid rgba(242,241,237,0.2);
  display: flex; justify-content: space-between;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(242,241,237,0.5);
}

/* Responsive */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .hero-footer, .contact-grid, .reel .services, .reel .reel-head { grid-template-columns: 1fr; }
  .reel .reel-head .right { text-align: left; justify-self: start; }
  .projects .project { grid-column: span 12 !important; }
  .about-roles .role { grid-template-columns: 1fr; gap: 4px; }
  .education .edu-head { grid-template-columns: 1fr; }
  .education .edu-head .right { text-align: left; justify-self: start; }
  .education .edu-item { grid-template-columns: 1fr; gap: 6px; }
  .education .edu-item:hover { padding-left: 0; padding-right: 0; }
  .education .edu-tag { text-align: left; }
  .about-roles .role .tag { text-align: left; }
  .topbar nav ul { display: none; }
  .lang-switch { padding-left: 0; border-left: 0; }
}
