/* ============================================================
   Inria Serif — local faces
   ============================================================ */
@font-face {
  font-family: "Inria Serif";
  font-weight: 300; font-style: normal; font-display: swap;
  src: url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-300-normal.woff2") format("woff2"),
       url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-300-normal.woff") format("woff");
}
@font-face {
  font-family: "Inria Serif";
  font-weight: 300; font-style: italic; font-display: swap;
  src: url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-300-italic.woff2") format("woff2"),
       url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-300-italic.woff") format("woff");
}
@font-face {
  font-family: "Inria Serif";
  font-weight: 400; font-style: normal; font-display: swap;
  src: url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-400-normal.woff2") format("woff2"),
       url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-400-normal.woff") format("woff");
}
@font-face {
  font-family: "Inria Serif";
  font-weight: 400; font-style: italic; font-display: swap;
  src: url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-400-italic.woff2") format("woff2"),
       url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-400-italic.woff") format("woff");
}
@font-face {
  font-family: "Inria Serif";
  font-weight: 700; font-style: normal; font-display: swap;
  src: url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-700-normal.woff2") format("woff2"),
       url("assets/typography/inria-serif_5.2.8/webfonts/inria-serif-latin-700-normal.woff") format("woff");
}

/* ============================================================
   Tokens
   ============================================================ */
:root {
  --paper:       #F3F1ED;
  --paper-warm:  #F2EFEA;
  --paper-deep:  #EEE7DF;
  --ink:         #303030;
  --ink-soft:    rgba(48, 48, 48, 0.60);
  --ink-faint:   rgba(48, 48, 48, 0.34);
  --hair:        rgba(48, 48, 48, 0.12);
  --gold:        #E0C578;
  --gold-deep:   #C9A94E;

  --serif: "Inria Serif", Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(1.4rem, 5vw, 6rem);
  --measure: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================
   Reset-ish base
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   Ambient background — three diffuse glow points
   ============================================================ */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--paper);
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.9;
  will-change: transform;
}
.glow-a {
  width: 58vw; height: 58vw;
  top: -16vw; left: -12vw;
  background: radial-gradient(circle at center, var(--paper-warm), transparent 68%);
  animation: drift-a 26s var(--ease) infinite alternate;
}
.glow-b {
  width: 66vw; height: 66vw;
  top: 34%; right: -20vw;
  background: radial-gradient(circle at center, var(--paper-deep), transparent 66%);
  animation: drift-b 32s var(--ease) infinite alternate;
}
.glow-c {
  width: 48vw; height: 48vw;
  bottom: -14vw; left: 22%;
  background: radial-gradient(circle at center, var(--paper-deep), transparent 70%);
  animation: drift-c 30s var(--ease) infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(6vw, 4vw, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(-5vw, -3vw, 0) scale(1.10); } }
@keyframes drift-c { to { transform: translate3d(3vw, -5vw, 0) scale(1.06); } }

/* Faint circuit field — technology motif, spread homogeneously in-palette */
.circuit {
  position: absolute;
  inset: -40px;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23C9A94E' stroke-width='1.4'%3E%3Cpath d='M24 24 H84 V72 H132'/%3E%3Cpath d='M180 32 V88 H216'/%3E%3Cpath d='M132 72 V120'/%3E%3Cpath d='M48 132 H96 V192'/%3E%3Cpath d='M156 148 H204 V204'/%3E%3Cpath d='M96 132 H132 V96'/%3E%3C/g%3E%3Cg fill='%23C9A94E'%3E%3Ccircle cx='24' cy='24' r='3'/%3E%3Ccircle cx='84' cy='72' r='3'/%3E%3Ccircle cx='132' cy='72' r='3'/%3E%3Ccircle cx='180' cy='32' r='3'/%3E%3Ccircle cx='216' cy='88' r='3'/%3E%3Ccircle cx='132' cy='120' r='3'/%3E%3Ccircle cx='48' cy='132' r='3'/%3E%3Ccircle cx='96' cy='192' r='3'/%3E%3Ccircle cx='156' cy='148' r='3'/%3E%3Ccircle cx='204' cy='204' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}
@media (prefers-reduced-motion: no-preference) {
  .circuit { animation: circuit-drift 90s linear infinite; }
}
@keyframes circuit-drift { to { background-position: 200px 200px; } }

/* Scattered code tokens — monospace tech glyphs, tiled homogeneously */
.glyphs {
  position: absolute;
  inset: -40px;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg font-family='monospace' fill='%23C9A94E'%3E%3Ctext x='26' y='52' font-size='15'%3E%7B %7D%3C/text%3E%3Ctext x='150' y='38' font-size='12'%3E01%3C/text%3E%3Ctext x='250' y='60' font-size='13'%3E//%3C/text%3E%3Ctext x='344' y='46' font-size='13'%3E.NET%3C/text%3E%3Ctext x='58' y='128' font-size='12'%3E%5B %5D%3C/text%3E%3Ctext x='170' y='150' font-size='16'%3EC%23%3C/text%3E%3Ctext x='300' y='138' font-size='13'%3E%3B%3C/text%3E%3Ctext x='388' y='165' font-size='13'%3E%3D%3E%3C/text%3E%3Ctext x='28' y='214' font-size='13'%3E1010%3C/text%3E%3Ctext x='138' y='236' font-size='12'%3E::%3C/text%3E%3Ctext x='248' y='220' font-size='15'%3E( )%3C/text%3E%3Ctext x='350' y='250' font-size='11'%3Easync%3C/text%3E%3Ctext x='40' y='312' font-size='12'%3Egit%3C/text%3E%3Ctext x='150' y='336' font-size='13'%3E0x1F%3C/text%3E%3Ctext x='266' y='326' font-size='14'%3E%7B %7D%3C/text%3E%3Ctext x='372' y='344' font-size='12'%3E//%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 420px 420px;
}
@media (prefers-reduced-motion: no-preference) {
  .glyphs { animation: glyph-drift 140s linear infinite; }
}
@keyframes glyph-drift { to { background-position: -420px 420px; } }

/* ============================================================
   Masked technical grid + cursor spotlight
   ============================================================ */
.lumen {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  --mx: 50%;
  --my: 32%;
}
.lumen-grid,
.lumen-glow { position: absolute; inset: 0; }

/* Base grid — thin lines, faded softly at the edges by a radial mask */
.lumen-grid {
  background-image:
    linear-gradient(to right, rgba(48, 48, 48, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(48, 48, 48, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 78% 66% at 50% 42%, #000 34%, transparent 100%);
          mask-image: radial-gradient(ellipse 78% 66% at 50% 42%, #000 34%, transparent 100%);
}

/* Spotlight — the same grid in gold plus a soft aura, revealed only under
   the cursor by a blurred radial mask (organic glow, not a hard circle) */
.lumen-glow {
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  background-image:
    linear-gradient(to right, rgba(201, 169, 78, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 169, 78, 0.55) 1px, transparent 1px),
    radial-gradient(circle 220px at var(--mx) var(--my), rgba(224, 197, 120, 0.15), transparent 70%);
  background-size: 48px 48px, 48px 48px, 100% 100%;
  -webkit-mask-image: radial-gradient(circle 240px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.35) 46%, transparent 72%);
          mask-image: radial-gradient(circle 240px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.35) 46%, transparent 72%);
}
.lumen.lit .lumen-glow { opacity: 1; }

/* ============================================================
   Typewriter — hero name
   ============================================================ */
.hero-name .caret {
  display: inline-block;
  width: 3px;
  height: 0.8em;
  margin-left: 0.08em;
  vertical-align: -0.06em;
  background: var(--gold-deep);
  border-radius: 1px;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-name .caret { animation: caret-blink 1.1s infinite; }
}
@keyframes caret-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ============================================================
   Status badge — blinking availability indicator
   ============================================================ */
.status-badge {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1.5rem;
  padding: 0.36em 0.85em 0.36em 0.7em;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(rgba(243, 241, 237, 0.55), rgba(243, 241, 237, 0.55)) padding-box,
    linear-gradient(120deg, rgba(201, 169, 78, 0.6), rgba(48, 48, 48, 0.12)) border-box;
}
.status-dot {
  width: 7px; height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gold-deep);
}
@media (prefers-reduced-motion: no-preference) {
  .status-dot { animation: status-pulse 2.4s var(--ease) infinite; }
}
@keyframes status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(201, 169, 78, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(201, 169, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 169, 78, 0); }
}

/* ============================================================
   Language toggle
   ============================================================ */
.lang {
  position: fixed;
  top: clamp(1rem, 2.4vw, 1.8rem);
  right: clamp(1rem, 3vw, 2.4rem);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.45em 0.9em;
  background: rgba(243, 241, 237, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hair);
  border-radius: 999px;
}
.lang-btn {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: var(--ink-faint);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.4s var(--ease);
}
.lang-btn[aria-pressed="true"] { color: var(--ink); }
.lang-btn:hover { color: var(--ink); }
.lang-sep { color: var(--ink-faint); font-family: var(--sans); font-size: 0.66rem; }

/* ============================================================
   Shared typography atoms
   ============================================================ */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
}
/* Recurring circuit node — carries the tech motif through every section */
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(201, 169, 78, 0.16);
}
.section-title {
  font-weight: 300;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 2.6rem;
}
em { font-style: italic; }

/* ============================================================
   Section rhythm
   ============================================================ */
.section {
  position: relative;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: clamp(4.5rem, 11vh, 9rem);
}

/* Blueprint registration brackets — diagonal corners frame each section */
.section::before,
.section::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border: 1.4px solid var(--gold-deep);
  opacity: 0.34;
  pointer-events: none;
}
.section::before {
  top: clamp(2rem, 5vh, 3.4rem);
  left: calc(var(--gutter) - 0.4rem);
  border-right: 0; border-bottom: 0;
}
.section::after {
  bottom: clamp(2rem, 5vh, 3.4rem);
  right: calc(var(--gutter) - 0.4rem);
  border-left: 0; border-top: 0;
}

/* Grid/flex children must be allowed to shrink below content size */
.hero-copy, .hero-portrait,
.about-copy, .about-portrait { min-width: 0; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Organic "liquid-cut" portrait — asymmetric, wave-edged, grounded */
.portrait { position: relative; width: 100%; }
.portrait-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(0.98) drop-shadow(0 34px 60px rgba(48, 48, 48, 0.32));
}
.clip-a { clip-path: url(#blobA); }
.clip-b { clip-path: url(#blobB); }

/* Gold hairline tracing the exact organic edge */
.portrait-edge {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.portrait-edge path {
  stroke: var(--gold-deep);
  stroke-width: 1.2;
  opacity: 0.6;
}

/* Small circuit node anchoring the portrait to the tech motif */
.portrait-node {
  position: absolute;
  bottom: -14px; left: -12px;
  width: 74px; height: 74px;
  pointer-events: none;
}
.portrait-node-tr { bottom: auto; left: auto; top: -12px; right: -12px; }
.portrait-node path { stroke: var(--gold-deep); stroke-width: 1.2; opacity: 0.55; }
.portrait-node circle { fill: var(--gold-deep); opacity: 0.7; }

/* ============================================================
   1 · Hero
   ============================================================ */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(6rem, 12vh, 9rem);
}
.hero-name {
  font-weight: 300;
  font-size: clamp(3rem, 8.5vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 1.6rem;
  min-height: 1.96em; /* reserve two lines so the typewriter doesn't shift the layout */
}
.hero-name em { color: var(--ink); }
.hero-sub {
  font-size: clamp(1.05rem, 1.9vw, 1.4rem);
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 32ch;
  margin: 0 0 2.8rem;
}
.hero-sub em { color: var(--ink); }
.scroll-cue {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.scroll-cue::after {
  content: "";
  width: 3.4rem; height: 1px;
  background: var(--ink-faint);
  transition: width 0.5s var(--ease), background 0.5s var(--ease);
}
.scroll-cue:hover::after { width: 4.6rem; background: var(--gold-deep); }

.hero-portrait { margin: 0; }
.hero-portrait .portrait {
  max-width: 340px;
  margin-left: auto;
  aspect-ratio: 3 / 4;
}

/* ============================================================
   2 · Work / businesses
   ============================================================ */
.work { text-align: center; }
.marks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.4rem, 4vw, 3rem);
}
.mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px; height: 108px;
  padding: 20px;
  border: 1px solid transparent;
  border-radius: 22px;
  /* translucent fill + 1px gradient border */
  background:
    linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.35)) padding-box,
    linear-gradient(135deg, rgba(201, 169, 78, 0.45), rgba(48, 48, 48, 0.06) 62%) border-box;
  cursor: default;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 0.5s var(--ease);
}
a.mark { cursor: pointer; }
/* Crosshair tick — tech accent on each project card */
.mark::after {
  content: "+";
  position: absolute;
  top: 5px; right: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1;
  color: var(--gold-deep);
  opacity: 0.4;
  transition: opacity 0.5s var(--ease);
}
.mark:hover::after { opacity: 0.85; }
.mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0.86;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.mark:hover {
  transform: translateY(-5px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.62)) padding-box,
    linear-gradient(135deg, rgba(201, 169, 78, 0.75), rgba(48, 48, 48, 0.08) 62%) border-box;
  box-shadow: 0 24px 44px -28px rgba(48, 48, 48, 0.5);
}
.mark:hover img { opacity: 1; transform: scale(1.04); }

/* Custom tooltip */
.tip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, 6px);
  width: max-content;
  max-width: 240px;
  padding: 0.85rem 1.05rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
  z-index: 5;
}
.tip::after {
  content: "";
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.mark:hover .tip,
.mark:focus-within .tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.tip-name {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.2rem;
}
.tip-desc {
  display: block;
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(243, 241, 237, 0.72);
}

/* ============================================================
   4 · About
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about-portrait { margin: 0; }
.about-portrait .portrait { max-width: 300px; aspect-ratio: 4 / 5; }
.about-body p {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  font-weight: 300;
  color: var(--ink);
  margin: 0 0 1.1rem;
  max-width: min(46ch, 100%);
}
.about-body em { color: var(--ink); }

/* ============================================================
   5 · Timeline — signature
   ============================================================ */
.timeline { text-align: center; }
.curve {
  position: relative;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  aspect-ratio: 1000 / 300;
}
.curve-svg { width: 100%; height: 100%; overflow: visible; }
.curve-path {
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.55;
}
.curve.drawn .curve-path {
  animation: draw 2.4s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.nodes { position: absolute; inset: 0; }
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 76px; height: 76px;
  padding: 0;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--hair);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px -18px rgba(48, 48, 48, 0.45);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.node::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: 0;
  animation: pulse 3.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.9); opacity: 0.55; }
  70%  { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}
.node:nth-child(2)::before { animation-delay: 1.2s; }
.node:nth-child(3)::before { animation-delay: 2.4s; }

.node-inner {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.node-inner img { width: 40px; height: 40px; object-fit: contain; }

/* Node showing a company logo → circular badge filling the node */
.node.has-logo { background: #fff; }
.node.has-logo .node-inner { width: 100%; height: 100%; }
.node.has-logo .node-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.node-label {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 4px);
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: rgba(243, 241, 237, 0.9);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.node:hover, .node:focus-visible { transform: translate(-50%, -50%) scale(1.08); border-color: var(--gold); }
.node:hover .node-label, .node:focus-visible .node-label { opacity: 1; transform: translate(-50%, 0); }
.node:active { transform: translate(-50%, -50%) scale(0.98); }
.node.is-active {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(201, 169, 78, 0.28), 0 14px 30px -18px rgba(48, 48, 48, 0.45);
}

/* Detail panel */
.detail {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.6s var(--ease), opacity 0.5s var(--ease), margin 0.6s var(--ease);
}
.detail.open { max-height: 820px; opacity: 1; margin-top: 3.2rem; }
.detail-inner {
  max-width: 540px;
  margin: 0 auto;
  padding: 2rem 2.2rem;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)) padding-box,
    linear-gradient(135deg, rgba(201, 169, 78, 0.5), rgba(48, 48, 48, 0.07) 60%) border-box;
  text-align: center;
}
.detail-when { margin-bottom: 0.9rem; }
.detail-role {
  font-weight: 400;
  font-size: 1.35rem;
  margin: 0 0 0.2rem;
}
.detail-org {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}
.detail-text {
  font-weight: 300;
  color: var(--ink);
  margin: 0;
}
.detail-highlight {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hair);
  text-align: left;
  cursor: pointer;
}
.detail-highlight[hidden] { display: none; }
.detail-highlight-media {
  position: relative;
  flex-shrink: 0;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hair);
}
.detail-highlight-img {
  width: 88px; height: 88px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.detail-highlight-zoom {
  position: absolute;
  right: 5px; bottom: 5px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: rgba(48, 48, 48, 0.62);
  color: var(--paper);
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.detail-highlight-zoom svg { width: 12px; height: 12px; }
.detail-highlight:hover .detail-highlight-img,
.detail-highlight:focus-visible .detail-highlight-img { transform: scale(1.06); }
.detail-highlight:hover .detail-highlight-zoom,
.detail-highlight:focus-visible .detail-highlight-zoom { opacity: 1; }
.detail-highlight-cap { display: flex; flex-direction: column; gap: 0.3rem; }
.detail-highlight-title { font-size: 1.02rem; color: var(--ink); }
.detail-highlight:hover .detail-highlight-title,
.detail-highlight:focus-visible .detail-highlight-title {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold-deep);
}
.detail-highlight-text {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ============================================================
   Post modal (timeline highlight → post)
   ============================================================ */
.post-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.4rem;
}
.post-modal[hidden] { display: none; }
.post-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 33, 30, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.post-modal.open .post-backdrop { opacity: 1; }
.post-card {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100dvh - 2.8rem);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 20px;
  box-shadow: 0 40px 90px -30px rgba(35, 33, 30, 0.6);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.post-modal.open .post-card { opacity: 1; transform: none; }
.post-close {
  position: absolute;
  top: 0.8rem; right: 0.8rem;
  z-index: 2;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--hair);
  border-radius: 50%;
  background: rgba(243, 241, 237, 0.9);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.post-close svg { width: 15px; height: 15px; }
.post-close:hover { background: #fff; border-color: var(--gold); }
.post-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem 0.9rem;
}
.post-avatar {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  border: 1px solid var(--hair);
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.post-head-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.post-author { font-size: 0.98rem; color: var(--ink); }
.post-sub {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.post-img {
  width: 100%;
  display: block;
  background: var(--paper-deep);
  border-block: 1px solid var(--hair);
}
.post-body { padding: 1.1rem 1.25rem 1.4rem; }
.post-text {
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

/* ============================================================
   3 · Social
   ============================================================ */
.social { text-align: center; padding-block: clamp(4rem, 9vh, 7rem); }
.social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.55rem;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease),
              transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.45s var(--ease);
}
.social-link::before {
  content: "//";
  font-family: var(--mono);
  font-size: 0.82em;
  letter-spacing: 0.05em;
  color: var(--gold-deep);
  opacity: 0.6;
}
.social-icon { display: inline-flex; }
.social-link svg { width: 20px; height: 20px; }
.social-name { font-weight: 500; }
.social-link:hover {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-3px);
  box-shadow: 0 20px 34px -22px rgba(48, 48, 48, 0.5);
}
.social-link.hidden { display: none; }

/* ============================================================
   Fluid wave divider
   ============================================================ */
.wave-divider {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.wave-svg {
  width: 100%;
  height: clamp(56px, 8vw, 86px);
  display: block;
  overflow: visible;
}
.wave-line {
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 1.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.5;
}
.wave-line-2 { opacity: 0.26; }
@media (prefers-reduced-motion: no-preference) {
  .wave-line-1 { animation: wave-bob-a 9s var(--ease) infinite alternate; }
  .wave-line-2 { animation: wave-bob-b 11s var(--ease) infinite alternate; }
}
@keyframes wave-bob-a { to { transform: translateY(-5px); } }
@keyframes wave-bob-b { to { transform: translateY(4px); } }

/* ============================================================
   6 · Footer
   ============================================================ */
.foot {
  max-width: var(--measure);
  margin-inline: auto;
  padding: 2.4rem var(--gutter) 3rem;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.foot-mark { font-size: 1rem; color: var(--ink); }
.foot-mark em { color: var(--gold-deep); }
.foot-meta, .foot-top {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot-top { color: var(--ink-soft); transition: color 0.4s var(--ease); }
.foot-top:hover { color: var(--ink); }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  /* Stacked layout: centered so it stays balanced instead of hugging the left */
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
    min-height: auto;
    padding-block: clamp(7rem, 16vh, 10rem) clamp(3rem, 8vh, 5rem);
  }
  .hero-portrait { order: -1; }
  .hero-portrait .portrait { max-width: 260px; margin: 0 auto; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .status-badge { margin-inline: auto; }

  .about { grid-template-columns: 1fr; text-align: center; }
  .about-portrait { order: -1; }
  .about-portrait .portrait { max-width: 240px; margin: 0 auto; }
  .about-body p { margin-left: auto; margin-right: auto; }

  /* Timeline → vertical organic flow, centered */
  .curve {
    aspect-ratio: auto;
    max-width: 420px;
  }
  .curve-svg { display: none; }
  .nodes {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.2rem;
  }
  .nodes::before {
    content: "";
    position: absolute;
    left: 50%; top: 20px; bottom: 20px;
    transform: translateX(-50%);
    width: 1.4px;
    background: linear-gradient(var(--gold), var(--gold-deep), var(--gold));
    opacity: 0.5;
    border-radius: 2px;
  }
  .node {
    position: relative; /* keep in flow, but anchor the pulse ring to the node */
    /* neutralize the desktop path coordinates set inline by JS */
    left: auto !important;
    top: auto !important;
    transform: none;
    width: 64px; height: 64px;
  }
  .node:hover, .node:focus-visible { transform: scale(1.06); }
  .node:active { transform: scale(0.98); }
  /* On touch there is no hover; tapping a node opens the detail panel
     with its name, so the floating labels are redundant here. */
  .node-label { display: none; }
}

@media (max-width: 460px) {
  .marks { gap: 1rem; }
  .lang { top: 0.8rem; right: 0.9rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
  .node::before { animation: none; }
  .curve.drawn .curve-path { animation: none; stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .post-backdrop, .post-card { transition: none; }
  * { scroll-behavior: auto; }
}
