/* ---------- colorful gradient position properties ---------- */
@property --g1x { syntax: '<percentage>'; initial-value: 6%;  inherits: false; }
@property --g1y { syntax: '<percentage>'; initial-value: 4%;  inherits: false; }
@property --g2x { syntax: '<percentage>'; initial-value: 94%; inherits: false; }
@property --g2y { syntax: '<percentage>'; initial-value: 12%; inherits: false; }
@property --g3x { syntax: '<percentage>'; initial-value: 82%; inherits: false; }
@property --g3y { syntax: '<percentage>'; initial-value: 88%; inherits: false; }
@property --g4x { syntax: '<percentage>'; initial-value: 14%; inherits: false; }
@property --g4y { syntax: '<percentage>'; initial-value: 76%; inherits: false; }
@property --g5x { syntax: '<percentage>'; initial-value: 48%; inherits: false; }
@property --g5y { syntax: '<percentage>'; initial-value: 46%; inherits: false; }
@property --g6x { syntax: '<percentage>'; initial-value: 30%; inherits: false; }
@property --g6y { syntax: '<percentage>'; initial-value: 30%; inherits: false; }
@property --g7x { syntax: '<percentage>'; initial-value: 64%; inherits: false; }
@property --g7y { syntax: '<percentage>'; initial-value: 22%; inherits: false; }
@property --g8x { syntax: '<percentage>'; initial-value: 10%; inherits: false; }
@property --g8y { syntax: '<percentage>'; initial-value: 42%; inherits: false; }

/* ---------- tokens ---------- */
:root {
  --bg: #f1ede5;
  --font-display: "Syne", system-ui, sans-serif;
  --bg-soft: #e9e3d6;
  --ink: #14130f;
  --ink-2: #4a463d;
  --ink-3: #6a645c;
  --rule: rgba(20, 19, 15, 0.14);
  --rule-soft: rgba(20, 19, 15, 0.08);
  --accent: #d93a2c;
  --pad-x: clamp(20px, 4vw, 56px);
  --gutter: clamp(20px, 3vw, 40px);
  --row-y: clamp(60px, 9vw, 140px);
}

[data-palette="charcoal"] {
  --bg: #161514;
  --bg-soft: #1f1d1b;
  --ink: #ece6d8;
  --ink-2: #a8a297;
  --ink-3: #8a857a;
  --rule: rgba(236, 230, 216, 0.14);
  --rule-soft: rgba(236, 230, 216, 0.07);
  --accent: #3ad9d9;
}

[data-palette="colorful"] {
  --bg: #0c0a10;
  --bg-soft: #161221;
  --ink: #ffffff;
  --ink-2: #c8c8c8;
  --ink-3: #c8c8c8;
  --rule: rgba(255, 255, 255, 0.18);
  --rule-soft: rgba(255, 255, 255, 0.08);
  --accent: #ffffff;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  transition: background-color 380ms ease, color 380ms ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Geist", "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

body {
  min-height: 100vh;
  margin: 0;
}
main,
footer { max-width: 1440px; margin-inline: auto; }

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

a { color: inherit; text-decoration: none; }
p { margin-block: 0.5em; }

/* ---------- utility bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px var(--pad-x);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.bar .left  { display: flex; gap: 18px; align-items: center; }
.bar .mid   { justify-self: center; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.bar .right { justify-self: end; display: flex; gap: 18px; align-items: center; }
.bar .mid a {
  color: var(--ink-2);
  transition: color 200ms ease;
}
.bar .mid a:is(:hover, :focus-visible) { color: var(--ink); }
.bar .mid span { color: var(--ink-3); }
.bar .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 14px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent);
  transform: translateY(-1px);
  animation: pulse 2.6s ease-out infinite;
}

/* mode selector inside the bar — always charcoal style */
.mode-seg {
  --indicator-x: 0px;
  --indicator-width: 0px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(236, 230, 216, 0.14);
  border-radius: 999px;
  padding: 2px;
  background: #161514;
}
.mode-seg::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: var(--indicator-width);
  border-radius: 999px;
  background: #ece6d8;
  transform: translateX(var(--indicator-x));
  pointer-events: none;
}
.mode-seg.is-ready::before {
  transition:
    width 280ms cubic-bezier(.2, .7, .2, 1),
    transform 280ms cubic-bezier(.2, .7, .2, 1);
}
.mode-btn {
  position: relative;
  z-index: 1;
  font: inherit;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a857a;
  background: transparent;
  border: 0;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color 200ms ease;
}
.mode-btn:is(:hover, :focus-visible) { color: #ece6d8; }
.mode-btn.is-active {
  color: #161514;
  background: transparent;
}
.mode-btn .swatch {
  display: inline-block;
  width: 9px; height: 9px; border-radius: 50%;
  flex: 0 0 9px;
  background: #161514;
  box-shadow: none;
  margin-right: 6px;
  vertical-align: 1px;
  opacity: 0;
  transition: opacity 200ms ease, background 0ms 200ms, box-shadow 0ms 200ms;
}
.mode-btn.is-active .swatch {
  opacity: 1;
  background: #161514;
  transition: opacity 200ms ease, background 0ms, box-shadow 0ms;
}
.mode-btn[data-palette="warm"].is-active .swatch {
  background: transparent;
  box-shadow: inset 0 0 0 1px #161514;
}
.mode-btn[data-palette="colorful"].is-active .swatch {
  background: linear-gradient(135deg, #f479a2, #5f5fc7);
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}

@media (max-width: 1100px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar .mid { display: none; }
}
@media (max-width: 800px) {
  .bar { padding: 10px var(--pad-x); }
  .bar .right { display: flex; font-size: 10px; }
  .mode-btn { padding: 4px 9px 5px; font-size: 9px; }
}
@media (max-width: 480px) {
  .bar { grid-template-columns: 1fr; }
  .bar .left { display: none; }
  .bar .right { justify-self: center; }
}

/* ---------- section scaffolding ---------- */
section {
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
section[id] { scroll-margin-top: 64px; }
.row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--gutter);
  padding-top: var(--row-y);
  padding-bottom: var(--row-y);
}
.row .label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 11px;
  line-height: inherit;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
  padding-top: 8px;
}
@media (max-width: 800px) {
  .row { grid-template-columns: 1fr; gap: 24px; }
  .row .label { padding-top: 0; }
}

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(40px, 7vw, 90px);
  padding-bottom: clamp(60px, 8vw, 110px);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--gutter);
  align-items: stretch;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(86px, 9.2vw, 150px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0 0 28px -0.13em;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-size: 1.5em;
  line-height: 0;
}
.hero .claim {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.18;
  color: var(--ink);
  max-width: 22ch;
  margin: 0;
  letter-spacing: -0.01em;
}
.hero .intro {
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
}
.canvas-frame {
  position: relative;
  container-type: inline-size;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  min-height: 320px;
  align-self: stretch;
  overflow: hidden;
}
.canvas-frame canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7" fill="none" stroke="%23000000" stroke-width="1" stroke-opacity="0.35"/><circle cx="12" cy="12" r="1.5" fill="%23000000" fill-opacity="0.5"/></svg>') 12 12, crosshair;
}
.canvas-frame .cap {
  position: absolute;
  inset: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-size: clamp(7px, 2.15cqw, 10px);
  text-transform: uppercase;
  color: var(--ink-3);
  pointer-events: none;
}
.canvas-frame .cap-primary,
.canvas-frame .cap-secondary {
  position: absolute;
  white-space: nowrap;
}
.canvas-frame .cap-primary {
  left: 24px;
  left: clamp(12px, 4cqw, 24px);
  bottom: 16px;
  bottom: clamp(10px, 3cqw, 16px);
}
.canvas-frame .cap-secondary {
  top: 28px;
  top: clamp(22px, 5cqw, 32px);
  right: 16px;
  right: clamp(10px, 3cqw, 16px);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.canvas-frame .corner {
  position: absolute; width: 10px; height: 10px;
  border: 1px solid var(--ink-3);
}
.canvas-frame .c-tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.canvas-frame .c-tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.canvas-frame .c-bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.canvas-frame .c-br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

/* ---------- disciplines marquee/wrap ---------- */
.disciplines {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 0;
}
.discipline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: transparent;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}
.discipline { cursor: default; }
.discipline .n { color: var(--ink-3); }

/* ─────────────────────────────────────────────────────────────────
   COLORFUL — dark paint-splash mode.
   Deep saturated body wash + every chip / card a unique gradient.
   Light cream text on color, à la Charcoal.
   ───────────────────────────────────────────────────────────────── */

/* colorful gradient on a fixed pseudo-element so it can fade in/out via opacity */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(960px 760px  at var(--g1x) var(--g1y), rgba(214, 22, 96,   0.85) 0%, transparent 52%),
    radial-gradient(820px 660px  at var(--g2x) var(--g2y), rgba(32, 60, 220,   0.80) 0%, transparent 55%),
    radial-gradient(1080px 820px at var(--g3x) var(--g3y), rgba(196, 130, 12,  0.78) 0%, transparent 52%),
    radial-gradient(720px 620px  at var(--g4x) var(--g4y), rgba(10, 130, 130,  0.78) 0%, transparent 58%),
    radial-gradient(900px 780px  at var(--g5x) var(--g5y), rgba(110, 36, 200,  0.62) 0%, transparent 65%),
    radial-gradient(620px 520px  at var(--g6x) var(--g6y), rgba(210, 60, 30,   0.65) 0%, transparent 60%),
    radial-gradient(700px 600px  at var(--g7x) var(--g7y), rgba(16, 120, 70,   0.65) 0%, transparent 60%),
    radial-gradient(520px 460px  at var(--g8x) var(--g8y), rgba(184, 30, 170,  0.60) 0%, transparent 60%),
    #0a0810;
  background-attachment: fixed;
  opacity: 0;
  transition: opacity 380ms ease;
}
html[data-palette="colorful"]::before {
  opacity: 1;
  animation: colorful-bg-drift 32s ease-in-out infinite;
}

@keyframes colorful-bg-drift {
  0% {
    --g1x: 6%;  --g1y: 4%;   --g2x: 94%; --g2y: 12%;
    --g3x: 82%; --g3y: 88%;  --g4x: 14%; --g4y: 76%;
    --g5x: 48%; --g5y: 46%;  --g6x: 30%; --g6y: 30%;
    --g7x: 64%; --g7y: 22%;  --g8x: 10%; --g8y: 42%;
  }
  25% {
    --g1x: 28%; --g1y: 22%;  --g2x: 72%; --g2y: 4%;
    --g3x: 96%; --g3y: 68%;  --g4x: 2%;  --g4y: 92%;
    --g5x: 62%; --g5y: 28%;  --g6x: 52%; --g6y: 14%;
    --g7x: 82%; --g7y: 8%;   --g8x: 32%; --g8y: 22%;
  }
  50% {
    --g1x: 18%; --g1y: 60%;  --g2x: 80%; --g2y: 38%;
    --g3x: 60%; --g3y: 96%;  --g4x: 36%; --g4y: 54%;
    --g5x: 30%; --g5y: 66%;  --g6x: 14%; --g6y: 56%;
    --g7x: 46%; --g7y: 42%;  --g8x: 4%;  --g8y: 68%;
  }
  75% {
    --g1x: 2%;  --g1y: 38%;  --g2x: 98%; --g2y: 28%;
    --g3x: 70%; --g3y: 72%;  --g4x: 22%; --g4y: 96%;
    --g5x: 56%; --g5y: 20%;  --g6x: 44%; --g6y: 44%;
    --g7x: 76%; --g7y: 36%;  --g8x: 20%; --g8y: 56%;
  }
  100% {
    --g1x: 6%;  --g1y: 4%;   --g2x: 94%; --g2y: 12%;
    --g3x: 82%; --g3y: 88%;  --g4x: 14%; --g4y: 76%;
    --g5x: 48%; --g5y: 46%;  --g6x: 30%; --g6y: 30%;
    --g7x: 64%; --g7y: 22%;  --g8x: 10%; --g8y: 42%;
  }
}
[data-palette="colorful"] .bar {
  background: rgba(10, 8, 16, 0.55);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: rgba(244, 238, 222, 0.08);
}

/* italic flourishes use the white accent */
[data-palette="colorful"] .hero h1 em {
  -webkit-text-stroke: clamp(1px, 0.15vw, 2px) #ffffff;
  color: transparent;
}
[data-palette="colorful"] .bar .dot {
  background: transparent;
  border-color: var(--accent);
}

/* canvas + portrait: deep gradient washes */
[data-palette="charcoal"] .canvas-frame canvas,
[data-palette="colorful"] .canvas-frame canvas {
  cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7" fill="none" stroke="%23ffffff" stroke-width="1" stroke-opacity="0.35"/><circle cx="12" cy="12" r="1.5" fill="%23ffffff" fill-opacity="0.5"/></svg>') 12 12, crosshair;
}

[data-palette="colorful"] .canvas-frame {
  background: linear-gradient(135deg, rgba(214,22,96,0.50), rgba(110,36,200,0.55) 55%, rgba(32,60,220,0.55));
  border-color: rgba(244,238,222,0.20);
}
[data-palette="colorful"] .portrait {
  background: linear-gradient(135deg, rgba(196,130,12,0.55), rgba(214,22,96,0.55) 55%, rgba(110,36,200,0.60));
  border-color: rgba(244,238,222,0.20);
}
[data-palette="colorful"] .portrait img { opacity: .8; }

/* ── discipline chips — transparent in colorful mode ── */
[data-palette="colorful"] .discipline {
  background: transparent;
  color: #ffffff;
}
[data-palette="colorful"] .discipline .n { color: inherit; opacity: 0.70; }

/* ── social cards — 8 unique DARK gradients (distinct from chips) ── */
[data-palette="colorful"] .social-card { border-color: transparent; color: #ffffff; }
[data-palette="colorful"] .social-card:nth-child(1) { background: linear-gradient(150deg, #7e1438 0%, #3a18a0 100%); }
[data-palette="colorful"] .social-card:nth-child(2) { background: linear-gradient(150deg, #142a8c 0%, #0a7a9a 100%); }
[data-palette="colorful"] .social-card:nth-child(3) { background: linear-gradient(150deg, #8a4a08 0%, #b8164a 100%); }
[data-palette="colorful"] .social-card:nth-child(4) { background: linear-gradient(150deg, #2a1c8a 0%, #8a128a 100%); }
[data-palette="colorful"] .social-card:nth-child(5) { background: linear-gradient(150deg, #a8281c 0%, #8a4a08 100%); }
[data-palette="colorful"] .social-card:nth-child(6) { background: linear-gradient(150deg, #0a5a44 0%, #1d2dbc 100%); }
[data-palette="colorful"] .social-card:nth-child(7) { background: linear-gradient(150deg, #8a128a 0%, #a8281c 100%); }
[data-palette="colorful"] .social-card:nth-child(8) { background: linear-gradient(150deg, #14704e 0%, #1d2dbc 100%); }

[data-palette="colorful"] .social-card .sc-top,
[data-palette="colorful"] .social-card .sc-handle,
[data-palette="colorful"] .social-card .sc-desc,
[data-palette="colorful"] .social-card .sc-logo,
[data-palette="colorful"] .social-card .sc-arrow { color: inherit; }
[data-palette="colorful"] .social-card .sc-desc { border-top-color: rgba(255,255,255,0.28); }
[data-palette="colorful"] .social-card .sc-handle .at { color: inherit; opacity: 0.82; }
[data-palette="colorful"] .social-card:is(:hover, :focus-visible) { background-color: inherit; border-color: transparent; }
[data-palette="colorful"] .social-card:is(:hover, :focus-visible) .sc-handle,
[data-palette="colorful"] .social-card:is(:hover, :focus-visible) .sc-arrow,
[data-palette="colorful"] .social-card:is(:hover, :focus-visible) .sc-logo { color: inherit; }

/* ── now rows — colorful: vivid numerals + accent marks (no card gradients) ── */
[data-palette="colorful"] .now-list  { border-top-color: rgba(255,255,255,0.18); }
[data-palette="colorful"] .now-row   { border-bottom-color: rgba(255,255,255,0.18); }
[data-palette="colorful"] .now-row:hover {
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.06) 18%, rgba(255,255,255,0.06) 82%, transparent);
}
[data-palette="colorful"] .now-row:nth-child(1) .now-n   { color: #7a5cff; }
[data-palette="colorful"] .now-row:nth-child(2) .now-n   { color: #ffd23a; }
[data-palette="colorful"] .now-row:nth-child(3) .now-n   { color: #3ad9d9; }
[data-palette="colorful"] .now-row:nth-child(4) .now-n   { color: #ff3b30; }
[data-palette="colorful"] .now-row:nth-child(1) .now-mark { color: #7a5cff; }
[data-palette="colorful"] .now-row:nth-child(2) .now-mark { color: #ffd23a; }
[data-palette="colorful"] .now-row:nth-child(3) .now-mark { color: #3ad9d9; }
[data-palette="colorful"] .now-row:nth-child(4) .now-mark { color: #ff3b30; }
[data-palette="colorful"] .now-tag { border-left-color: rgba(255,255,255,0.22); }
[data-palette="colorful"] .now-tag span + span { color: #ffffff; }

/* ── work rows — saturated hover bands ── */
[data-palette="colorful"] .work .title { color: var(--ink); }
[data-palette="colorful"] .work:is(:hover, :focus-visible) .title { color: #ffffff; }
[data-palette="colorful"] .work:is(:hover, :focus-visible)              { background: linear-gradient(90deg, transparent, rgba(214,22,96,0.30), rgba(110,36,200,0.30), transparent); }
[data-palette="colorful"] .work:nth-child(2):is(:hover, :focus-visible) { background: linear-gradient(90deg, transparent, rgba(32,60,220,0.30), rgba(10,122,154,0.30), transparent); }
[data-palette="colorful"] .work:nth-child(3):is(:hover, :focus-visible) { background: linear-gradient(90deg, transparent, rgba(196,130,12,0.32), rgba(184,52,28,0.32), transparent); }

/* mailto */
[data-palette="colorful"] .contact .mailto:is(:hover, :focus-visible) { color: var(--accent); border-color: var(--accent); }

/* ---------- bio ---------- */
.bio { width: 100%; }
.bio-grid {
  display: grid;
  grid-template-columns: clamp(260px, 28vw, 420px) 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 1000px) {
  .bio-grid { grid-template-columns: 1fr; }
  .bio-grid > :first-child { width: 100%; max-width: 420px; }
}
.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  display: block;
  position: relative;
  overflow: hidden;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.bio p {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.7vw, 36px);
  line-height: 1.28;
  margin: 0 0 0.6em;
  color: var(--ink);
}
.bio p + p {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 0.8em;
  color: var(--ink-2);
  max-width: 68ch;
}
.bio p + p + p {
  margin-top: 0;
}
/* ---------- works ---------- */
.works {
  display: flex;
  flex-direction: column;
}
.work {
  display: grid;
  grid-template-columns: 64px 1.6fr 1fr 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.work:last-of-type { border-bottom: 1px solid var(--rule); }
.work .idx {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.work .title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color 200ms ease;
}
.work .desc {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 32ch;
  line-height: 1.45;
}
.work .kind {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.work .go {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.work .go svg { transition: transform 320ms cubic-bezier(.2,.7,.2,1); }
.work:is(:hover, :focus-visible) .go svg { transform: translate(3px, -3px); }
.work:is(:hover, :focus-visible) { background: linear-gradient(to right, transparent, var(--bg-soft) 30%, var(--bg-soft) 70%, transparent); }
.work:is(:hover, :focus-visible) .title { color: var(--accent); }
.work .thumb {
  position: absolute;
  pointer-events: none;
  width: 200px;
  height: 200px;
  right: 7%;
  top: 50%;
  transform: translateY(-50%) translateY(20px) scale(.94);
  opacity: 0;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  overflow: hidden;
  transition: opacity 280ms ease, transform 380ms cubic-bezier(.2,.7,.2,1);
  z-index: 2;
}
[data-palette="colorful"] .work .thumb {
  background: rgba(10, 8, 16, 0.55);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.work:is(:hover, :focus-visible) .thumb { opacity: 1; transform: translateY(-50%) translateY(0) scale(1); }
.work .thumb canvas { display: block; width: 100%; height: 100%; }

@media (max-width: 1100px) {
  .work {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 0;
  }
  .work .thumb { display: none; }
  .work .desc { max-width: none; }
  .work .go { margin-top: 6px; }
}

/* ---------- socials ---------- */
.socials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
@media (max-width: 520px) {
  .socials-grid { grid-template-columns: 1fr; }
}
.social-card {
  position: relative;
  border: 1px solid var(--rule);
  padding: 18px 20px 20px;
  background: transparent;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  min-height: 200px;
  color: inherit;
  transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
  overflow: hidden;
}
.social-card:is(:hover, :focus-visible) { border-color: var(--ink); background: var(--bg-soft); transform: scale(1.03); }
.social-card:is(:hover, :focus-visible) .sc-handle { color: var(--accent); }
.social-card:is(:hover, :focus-visible) .sc-arrow { transform: translate(3px, -3px); color: var(--ink); }
.social-card:is(:hover, :focus-visible) .sc-logo  { color: var(--ink); }
.sc-top {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 2.8em;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.sc-logo {
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: color 220ms ease;
}
.sc-logo svg { display: block; }
.sc-logo .platform { font-size: 10px; letter-spacing: 0.14em; }
.sc-meta {
  display: grid;
  grid-template-columns: max-content 12px;
  align-items: center;
  justify-self: end;
  gap: 8px;
  min-width: 0;
  text-align: right;
}
.sc-meta > span { white-space: nowrap; }
.sc-arrow {
  color: var(--ink-3);
  flex: 0 0 auto;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1), color 200ms ease;
}
.sc-handle {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  align-self: end;
  word-break: break-word;
  transition: color 200ms ease;
}
.sc-handle .at { color: var(--ink-3); margin-right: 2px; }
.sc-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  border-top: 1px solid var(--rule-soft);
  padding-top: 12px;
  min-height: calc(4.35em + 13px);
  max-width: 32ch;
}

/* ---------- now — editorial entries (distinct from Channels grid) ---------- */
.now-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}
.now-row {
  display: grid;
  grid-template-columns: 110px 110px 1fr 28px;
  gap: clamp(18px, 3vw, 38px);
  align-items: start;
  padding: clamp(22px, 3vw, 34px) 0 clamp(26px, 3.4vw, 40px);
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background 220ms ease;
}
.now-row:hover { background: linear-gradient(to right, transparent, var(--bg-soft) 18%, var(--bg-soft) 82%, transparent); }
.now-n {
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: block;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.now-tag {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-left: 1px solid var(--rule);
  padding-left: 14px;
}
.now-tag span + span { color: var(--ink); }
.now-body { padding-top: 10px; }
.now-body .head {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 32ch;
}
.now-body .sub {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 52ch;
}
.now-mark {
  font-size: 42px;
  color: var(--ink-3);
  align-self: center;
  justify-self: end;
  transition: color 220ms ease, transform 320ms cubic-bezier(.2,.7,.2,1);
}
.now-row:nth-child(2) .now-mark { font-size: 53px; }
.now-row:nth-child(3) .now-mark { font-size: 53px; }
.now-row:nth-child(4) .now-mark { font-size: 72px; }
.now-row:hover .now-mark { color: var(--accent); transform: rotate(45deg); }

@media (max-width: 800px) {
  .now-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 0 26px;
  }
  .now-n { font-size: 64px; }
  .now-tag { border-left: 0; padding-left: 0; padding-top: 0; flex-direction: row; gap: 14px; }
  .now-mark { display: none; }
}

/* ---------- contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
}
.contact h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 8.5vw, 130px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.contact .ct-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
  text-align: right;
  min-width: 260px;
}
.contact .mailto {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 3px;
  transition: color 200ms ease, border-color 200ms ease;
}
.contact .mailto:is(:hover, :focus-visible) { color: var(--accent); border-color: var(--accent); }
.contact-arrow {
  display: inline-block;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
.contact .mailto:hover .contact-arrow,
.contact .mailto:focus-visible .contact-arrow {
  transform: translateX(4px);
}
.contact-link:hover .contact-arrow--external,
.contact-link:focus-visible .contact-arrow--external {
  transform: translate(3px, -3px);
}
.contact .avail {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 32ch;
}
.contact-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.contact-link {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  transition: color 200ms ease, border-color 200ms ease;
}
.contact-link:is(:hover, :focus-visible) { color: var(--ink); border-color: var(--ink); }
@media (max-width: 800px) {
  .contact { grid-template-columns: 1fr; }
  .contact .ct-right { align-items: flex-start; text-align: left; }
  .contact-links { justify-content: flex-start; }
}

/* ---------- footer ---------- */
footer {
  margin-top: clamp(40px, 6vw, 80px);
  padding: 24px var(--pad-x) 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
@media (max-width: 720px) {
  footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .work:is(:hover, :focus-visible) .go svg,
  .social-card:is(:hover, :focus-visible),
  .social-card:is(:hover, :focus-visible) .sc-arrow,
  .now-row:hover .now-mark,
  .contact a:hover .contact-arrow,
  .contact a:focus-visible .contact-arrow { transform: none; }
  .work:is(:hover, :focus-visible) .thumb { transform: translateY(-50%); }
}

/* ---------- privacy ---------- */
.footer-privacy { color: inherit; margin-left: 12px; text-decoration: none; }
.footer-privacy:is(:hover, :focus-visible) { color: var(--ink); text-decoration: underline; }
.privacy-page { max-width: 720px; margin: 0 auto; padding: clamp(48px, 10vw, 120px) var(--pad-x); }
.privacy-page h1 { font-family: var(--font-display); margin: 48px 0 24px; }
.privacy-page p { color: var(--ink-2); }
.privacy-page a { color: var(--ink); }
