@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
}

@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
}

@property --bg { syntax: "<color>"; inherits: true; initial-value: #090a0c; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #f3f0e8; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #a8a296; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #e2ff54; }
@property --accent-ink { syntax: "<color>"; inherits: true; initial-value: #16180c; }
@property --line { syntax: "<color>"; inherits: true; initial-value: rgba(243, 240, 232, 0.14); }
@property --card { syntax: "<color>"; inherits: true; initial-value: rgba(18, 20, 24, 0.72); }
@property --glow { syntax: "<color>"; inherits: true; initial-value: rgba(226, 255, 84, 0.18); }

:root {
  --bg: #090a0c;
  --ink: #f3f0e8;
  --muted: #a8a296;
  --accent: #e2ff54;
  --accent-ink: #16180c;
  --line: rgba(243, 240, 232, 0.14);
  --card: rgba(18, 20, 24, 0.72);
  --glow: rgba(226, 255, 84, 0.18);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --serif: Fraunces, "Iowan Old Style", Georgia, serif;
  --sans: Outfit, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4efe6;
  --ink: #1b1814;
  --muted: #6f675e;
  --accent: #c2410c;
  --accent-ink: #fff8f3;
  --line: rgba(27, 24, 20, 0.12);
  --card: rgba(255, 251, 245, 0.78);
  --glow: rgba(194, 65, 12, 0.16);
  --shadow: 0 18px 40px rgba(90, 50, 20, 0.08);
  color-scheme: light;
}

html.theme-ready {
  transition:
    --bg 0.7s ease, --ink 0.7s ease, --muted 0.7s ease, --accent 0.7s ease,
    --accent-ink 0.7s ease, --line 0.7s ease, --card 0.7s ease, --glow 0.7s ease;
}

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

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  padding: 8px 12px; background: var(--accent); color: var(--accent-ink); border-radius: 999px;
}
.skip:focus { top: 12px; }

/* ---------- fixed layers ---------- */
#stage {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; opacity: 0; transition: opacity 1.6s ease;
}
#stage.ready { opacity: 1; }

.vignette, .glow, .grain { position: fixed; pointer-events: none; }

.vignette {
  inset: 0; z-index: 1;
  background:
    linear-gradient(color-mix(in srgb, var(--bg) calc(var(--veil, 0) * 80%), transparent), color-mix(in srgb, var(--bg) calc(var(--veil, 0) * 80%), transparent)),
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 78%, transparent) 34%, transparent 62%),
    linear-gradient(to top, var(--bg) 0%, transparent 24%);
}

.glow {
  z-index: 1; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 68%);
  transform: translate3d(var(--mx, 70vw), var(--my, 30vh), 0);
}

.grain {
  inset: -20%; z-index: 4; opacity: 0.16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  background-size: 180px 180px;
}
html[data-theme="light"] .grain { opacity: 0.09; mix-blend-mode: multiply; }

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9;
  background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0));
  pointer-events: none;
}

/* trailing cursor ring (fine pointers only) */
.cursor { display: none; }
@media (pointer: fine) {
  .cursor {
    display: grid; place-items: center;
    position: fixed; left: 0; top: 0; z-index: 10; pointer-events: none;
    width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
    opacity: 0; transition: opacity 0.3s ease, width 0.45s var(--ease), height 0.45s var(--ease), margin 0.45s var(--ease), background 0.3s ease;
  }
  .cursor.on { opacity: 1; }
  .cursor.hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
  .cursor.label { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--accent); border-color: var(--accent); }
  .cursor-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); opacity: 0; transition: opacity 0.25s ease; }
  .cursor.label .cursor-label { opacity: 1; }
}

.shell { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 22px; padding: 18px 28px;
  background: transparent;
}

.nav::before {
  content: ""; position: absolute; inset: 0 0 -28px; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity 0.5s ease;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 55%, transparent 100%);
  backdrop-filter: blur(10px);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.nav.scrolled::before { opacity: 1; }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.03em; font-size: 1.15rem; margin-right: auto;
}

.rocket { flex: none; overflow: visible; transform: rotate(45deg); animation: bob 3.2s ease-in-out infinite; }
.rocket .body { fill: var(--ink); }
.rocket .fin { fill: var(--accent); }
.rocket .win { fill: var(--bg); stroke: var(--accent); stroke-width: 0.9; }
.rocket .flame-out { fill: var(--accent); }
.rocket .flame { transform-box: fill-box; transform-origin: 50% 0; animation: flicker 0.16s ease-in-out infinite alternate; }

.nav-links { display: flex; align-items: center; gap: 6px; }

.nav-links a {
  position: relative; padding: 8px 12px; color: var(--muted);
  font-size: 0.92rem; letter-spacing: 0.04em; border-radius: 999px; transition: color 0.35s ease;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--ink); }
.nav-links a[aria-current="true"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--accent); transform-origin: left; animation: grow 0.7s var(--ease) both;
}

.menu {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; place-items: center; cursor: pointer;
}
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative;
  transition: transform 0.4s var(--ease), opacity 0.3s ease, background 0.3s ease;
}
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu[aria-expanded="true"] .menu-bars { background: transparent; }
.menu[aria-expanded="true"] .menu-bars::before { top: 0; transform: rotate(45deg); }
.menu[aria-expanded="true"] .menu-bars::after { top: 0; transform: rotate(-45deg); }

.theme-switch {
  position: relative; width: 54px; height: 30px; border-radius: 999px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 6%, transparent);
  padding: 3px; cursor: pointer; flex: none;
}
.theme-switch::before, .theme-switch::after {
  position: absolute; top: 5px; font-size: 12px; line-height: 1; color: var(--muted); pointer-events: none;
}
.theme-switch::before { content: "☾"; left: 8px; }
.theme-switch::after { content: "☀"; right: 7px; top: 6px; }
.knob {
  position: relative; z-index: 1; display: block; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); transform: translateX(0); transition: transform 0.5s var(--ease), background 0.5s ease;
}
html[data-theme="light"] .knob { transform: translateX(22px); }

/* ---------- layout ---------- */
.page { width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: 0 0 40px; flex: 1; }

h1, h2, h3, .brand { font-family: var(--serif); }

.kicker {
  margin: 0 0 14px; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 70px);
  display: flex; flex-direction: column; justify-content: center; padding: 20px 0 80px;
}

.hero-copy { max-width: min(46rem, 100%); }

.hero-id { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }

.status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--muted); font-size: 0.82rem; letter-spacing: 0.04em;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ping 2.4s ease-out infinite; }

h1 {
  margin: 0; font-weight: 500;
  font-size: clamp(3.6rem, 9.4vw, 8.4rem);
  letter-spacing: -0.05em; line-height: 0.9;
}
h1 .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
h1 .line > span {
  display: block; transform: translateY(108%);
  animation: lineUp 1.15s var(--ease) forwards; animation-delay: var(--d, 0ms);
}

.lede, .intro { max-width: 36rem; color: var(--muted); font-size: 1.18rem; font-weight: 300; }
.lede { margin: 30px 0 10px; }
.intro { margin: 0 0 28px; }

.lede strong, .intro a, .job a { color: var(--ink); font-weight: 500; }

.intro a, .job a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat; background-size: 100% 1px; background-position: 0 100%;
  transition: background-size 0.35s var(--ease), color 0.35s ease;
}
.intro a:hover, .job a:hover { color: var(--accent); background-size: 100% 2px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; border: 0; cursor: pointer;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 25%, transparent);
  transition: box-shadow 0.45s ease, border-color 0.3s ease;
}
.btn svg { transition: transform 0.45s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn.ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; backdrop-filter: blur(8px);
}
.btn.ghost:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.magnetic { will-change: transform; }

.portrait { width: 88px; aspect-ratio: 1; position: relative; flex: none; }
.ring {
  position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 72%, var(--accent) 88%, transparent 100%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  animation: spin 12s linear infinite;
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  position: relative; z-index: 1; border: 5px solid var(--bg);
}

.hero-meta {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; }
.scroll-cue i { display: block; width: 1px; height: 34px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: drip 2s var(--ease) infinite; }

/* ---------- marquee ---------- */
.marquee {
  margin: 0 -28px; padding: 26px 0; overflow: hidden;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(8px);
}
.track { display: flex; width: max-content; align-items: center; gap: 36px; animation: marquee 38s linear infinite; padding-right: 36px; }
.track span {
  font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -0.04em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 55%, transparent);
}
.track span:nth-of-type(odd) { color: var(--ink); -webkit-text-stroke: 0; }
.track i { color: var(--accent); font-style: normal; font-size: 1.5rem; }

/* ---------- sections ---------- */
.section { padding: 130px 0 8px; }

.page-head { padding: 0 0 46px; max-width: 54rem; }

.sec-no {
  display: flex; align-items: center; gap: 14px; margin: 0 0 22px;
  color: var(--muted); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
}
.sec-no b { color: var(--accent); font-weight: 500; font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0; }
.sec-no::after { content: ""; height: 1px; width: 64px; background: var(--line); }

.section-title {
  margin: 0; font-weight: 500;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem); letter-spacing: -0.045em; line-height: 1;
}
.section-title em, .cta em { font-style: italic; color: var(--accent); }

.section-lede { margin: 22px 0 0; max-width: 38rem; color: var(--muted); font-size: 1.12rem; font-weight: 300; }

code {
  padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink); font-size: 0.88em;
}

/* ---------- experience ---------- */
.timeline { display: flex; flex-direction: column; border-top: 1px solid var(--line); }

.job {
  display: grid; grid-template-columns: minmax(180px, 0.32fr) 1fr; gap: 34px;
  padding: 36px 0; border-bottom: 1px solid var(--line);
  transition: opacity 0.5s ease, transform 0.9s var(--ease);
}
.timeline:hover .job.in:not(:hover) { opacity: 0.5; }

.when { display: block; color: var(--accent); font-family: var(--serif); font-size: 1.05rem; white-space: nowrap; }
.company { margin: 6px 0 0; color: var(--muted); font-size: 0.98rem; font-weight: 500; }

.job-body h3 {
  margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1;
}
.job-body ul { margin: 16px 0 0; padding-left: 1.1rem; }
.job li { margin: 7px 0; color: var(--muted); max-width: 44rem; }
.job li::marker { color: var(--accent); }

/* ---------- projects ---------- */
.stack { display: flex; flex-direction: column; border-top: 1px solid var(--line); }

.project {
  position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 22px; align-items: start;
  padding: 30px 8px; border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: padding 0.5s var(--ease), opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.project::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 80%);
  transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease);
}
.project:hover::before { transform: scaleX(1); }
.project:hover { padding-left: 24px; padding-right: 24px; }

.index-no { font-family: var(--serif); color: var(--accent); font-size: 1rem; padding-top: 0.5rem; }

.project h3 {
  margin: 0; font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 3rem); letter-spacing: -0.04em; line-height: 1.05;
}
.project.flagship h3 { font-size: clamp(2.2rem, 5vw, 4rem); }
.project p { margin: 10px 0 0; max-width: 46rem; color: var(--muted); }
.project .tag { margin: 0 0 6px; }

.tag { margin: 0 0 4px; color: var(--accent); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; }

.p-go {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); font-size: 1.2rem;
  transition: transform 0.5s var(--ease), background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.project:hover .p-go { transform: rotate(45deg); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- contact ---------- */
.contact { padding-bottom: 60px; }

.cta {
  margin: 0; font-weight: 500; font-size: clamp(2.8rem, 8vw, 7rem); letter-spacing: -0.05em; line-height: 0.96; max-width: 60rem;
}

.mail {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; margin-top: 44px;
  padding: 26px 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: transparent; cursor: pointer; text-align: left;
  transition: padding 0.5s var(--ease), background 0.4s ease, opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.mail:hover { padding-left: 18px; padding-right: 18px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.mail-text { font-family: var(--serif); font-size: clamp(1.5rem, 4.4vw, 3.4rem); letter-spacing: -0.04em; overflow-wrap: anywhere; }
.mail-go { color: var(--accent); font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; flex: none; }

.socials { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.social {
  display: flex; justify-content: flex-start; align-items: center; gap: 10px; padding: 22px 8px;
  font-family: var(--serif); font-size: 1.3rem; letter-spacing: -0.02em;
  transition: color 0.3s ease, padding 0.45s var(--ease), opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.social i { font-style: normal; color: var(--accent); transition: transform 0.45s var(--ease); }
.social:hover { color: var(--accent); padding-left: 18px; }
.social:hover i { transform: translate(4px, -4px); }

/* ---------- footer ---------- */
.foot { width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: 0 0 26px; overflow: hidden; }
.wordmark {
  font-family: var(--serif); font-size: clamp(3rem, 11.4vw, 11rem); letter-spacing: -0.06em; line-height: 0.9; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 30%, transparent);
  padding-bottom: 0.08em; user-select: none;
}
.foot-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.92rem; padding-top: 14px; }
.foot-row a:hover { color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 11; transform: translate(-50%, 12px);
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 999px; font-size: 0.92rem;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease, transform 0.5s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.rise { animation: rise 0.9s var(--ease) both; animation-delay: var(--d, 0ms); }

html.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition-delay: var(--d, 0ms);
}
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal:not(.job):not(.project):not(.mail):not(.social) {
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

/* ---------- skills web ---------- */
.web {
  --web-h: 640px;
  position: relative; width: 100%; height: var(--web-h);
  border: 1px solid var(--line); border-radius: 28px;
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 96px, color-mix(in srgb, var(--ink) 7%, transparent) 96px 97px),
    var(--card);
  box-shadow: var(--shadow); backdrop-filter: blur(14px); overflow: hidden; touch-action: pan-y;
}
.web-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.edge {
  stroke: var(--ink); stroke-opacity: 0.13; stroke-width: 1; fill: none;
  transition: stroke 0.35s ease, stroke-opacity 0.35s ease, stroke-width 0.35s ease;
}
.edge.core { stroke: var(--accent); stroke-opacity: 0.4; stroke-width: 1.3; }
.edge.cross { stroke-dasharray: 3 5; stroke-opacity: 0.24; }
.edge.on { stroke: var(--accent); stroke-opacity: 0.95; stroke-width: 1.6; stroke-dasharray: 4 5; animation: flow 1s linear infinite; }
.edge.dim { stroke-opacity: 0.04; }

.node {
  position: absolute; left: 0; top: 0; white-space: nowrap; user-select: none; cursor: default;
  border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: color-mix(in srgb, var(--ink) 82%, transparent);
  padding: 5px 12px; font-size: 0.86rem; line-height: 1.3; will-change: transform;
  transition: opacity 0.35s ease, border-color 0.35s ease, background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
.node.hub {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  font-family: var(--serif); font-size: 1.08rem; letter-spacing: -0.02em; color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, var(--bg));
}
.node.hub::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.node.center {
  padding: 11px 20px; font-family: var(--serif); font-size: 1.2rem; letter-spacing: -0.02em;
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent), 0 0 44px color-mix(in srgb, var(--accent) 45%, transparent);
}
.node.on {
  color: var(--ink); border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--bg));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 30%, transparent);
}
.node.dim { opacity: 0.2; }
.web-hint { margin: 14px 4px 0; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.04em; }

/* ---------- icon popover ---------- */
.tip {
  position: fixed; left: 0; top: 0; z-index: 7; padding: 6px 14px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px);
  color: var(--ink); font-family: var(--serif); font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap;
  pointer-events: none; opacity: 0;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 22%, transparent); transition: opacity 0.3s ease;
}
.tip.show { opacity: 1; }
.tip::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-right: 1px solid color-mix(in srgb, var(--accent) 60%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--bg) 82%, transparent); transform: rotate(45deg);
}

/* ---------- keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { to { transform: none; } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drip { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes flow { to { stroke-dashoffset: -18; } }
@keyframes flicker { from { transform: scale(0.85, 0.7); } to { transform: scale(1.1, 1.25); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 1px -1.5px; } }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .vignette {
    background:
      linear-gradient(color-mix(in srgb, var(--bg) calc(var(--veil, 0) * 93%), transparent), color-mix(in srgb, var(--bg) calc(var(--veil, 0) * 93%), transparent)),
      linear-gradient(to bottom, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 46%, transparent 78%);
  }
  .menu { display: grid; }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; padding: 10px;
    flex-direction: column; align-items: stretch; background: var(--card);
    border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; animation: rise 0.45s var(--ease) both; }
  .page, .foot { width: min(1180px, calc(100% - 32px)); }
  .nav { padding-left: 16px; padding-right: 16px; }
  .marquee { margin: 0 -16px; }
  .hero { min-height: auto; padding: 18px 0 110px; }
  .section { padding-top: 88px; }
  .job { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
  .timeline:hover .job.in:not(:hover) { opacity: 1; }
  .project { grid-template-columns: 36px 1fr; padding: 24px 0; }
  .project:hover { padding-left: 0; padding-right: 0; }
  .p-go { display: none; }
  .socials { grid-template-columns: 1fr 1fr; }
  .mail { flex-direction: column; align-items: flex-start; gap: 8px; }
  .node { font-size: 0.78rem; padding: 4px 9px; }
  .node.hub { font-size: 0.95rem; padding: 6px 12px; }
  .node.center { font-size: 1rem; padding: 8px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
  }
  #stage, html.js .reveal, .rise { opacity: 1; transform: none; }
  h1 .line > span { transform: none; }
  .track { animation: none; }
}
