/* ---------- Tokens ---------- */
:root {
  --bg: #0b0f14;
  --bg-2: #0f151d;
  --surface: #141c26;
  --surface-2: #1a2430;
  --line: #243142;
  --text: #e6edf3;
  --muted: #8b9bb0;
  --accent: #2dd4bf;
  --accent-ink: #04201c;
  --signal: #38bdf8;
  --warm: #f59e0b;
  --glow: rgba(45, 212, 191, 0.35);
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', var(--font);
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f5f7fa;
  --bg-2: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --line: #d6dee8;
  --text: #0f1720;
  --muted: #526173;
  --accent: #0d9488;
  --accent-ink: #ffffff;
  --signal: #0284c7;
  --warm: #b45309;
  --glow: rgba(13, 148, 136, 0.25);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--signal); }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.monogram {
  font: 700 1.05rem var(--display); color: var(--text); text-decoration: none;
  border: 1.5px solid var(--accent); border-radius: 10px; padding: 4px 8px; letter-spacing: .04em;
}
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.nav-links a:hover { color: var(--text); }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.lang {
  font: 600 .8rem var(--mono); color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px;
}
.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; display: grid; place-items: center;
}
.theme-toggle span {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--text); box-shadow: inset -5px -2px 0 0 var(--surface);
  transition: box-shadow .3s;
}
:root[data-theme='light'] .theme-toggle span { box-shadow: inset 0 0 0 0 var(--surface); background: var(--warm); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: center;
  padding: 96px clamp(16px, 6vw, 80px) 64px; overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; max-width: 720px; }
.hero-photo {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent); box-shadow: 0 0 0 6px var(--glow); margin-bottom: 20px;
}
.eyebrow { font-family: var(--mono); color: var(--accent); margin: 0 0 4px; }
.hero-name { font-size: clamp(2.6rem, 8vw, 5.2rem); letter-spacing: -.02em; margin: 0; }
.hero-title { font: 500 clamp(1.2rem, 3vw, 1.7rem) var(--display); color: var(--muted); margin: 4px 0 14px; }
.hero-roles { color: var(--signal); font-size: clamp(.9rem, 2.2vw, 1.05rem); min-height: 1.7em; }
.caret { animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lede { color: var(--muted); max-width: 56ch; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 22px; }
.hero-meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); }
.brief {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  margin: 0 0 18px; max-width: 680px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--line);
}
.brief div { background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 10px 14px; }
.brief dt { font: 600 .7rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.brief dd { margin: 2px 0 0; font-size: .9rem; }
.decode .glyph { color: var(--accent); opacity: .75; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer;
  font-weight: 500; font-size: .95rem; transition: transform .15s, border-color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 85%, white); }

/* ---------- Room ---------- */
.room { position: relative; padding: 0 0 24px; background: linear-gradient(var(--bg), var(--bg-2)); }
.room-stage { position: relative; height: min(82svh, 760px); min-height: 460px; }
.room-canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.room-canvas.is-hover { cursor: pointer; }
.room-canvas.is-drag { cursor: grabbing; }
.room-hud {
  position: absolute; top: 20px; left: clamp(16px, 4vw, 40px); max-width: 340px; pointer-events: none;
}
.room-hud h2 { font-size: 1.6rem; margin-bottom: 4px; }
.room-hint { color: var(--muted); font-size: .92rem; margin-bottom: 6px; }
.room-clock { color: var(--warm); font-size: .82rem; }
.room-tooltip {
  position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0;
  transform: translate(-50%, -140%); transition: opacity .15s;
  background: var(--surface); border: 1px solid var(--accent); color: var(--text);
  font: 600 .8rem var(--mono); padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.room-tooltip.is-on { opacity: 1; }
.room-fallback { display: none; color: var(--muted); padding: 0 16px; text-align: center; }
.room.no-webgl .room-stage, .no-js .room-stage { display: none; }
.room.no-webgl .room-fallback, .no-js .room-fallback { display: block; padding-top: 24px; }
.hotspots {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  padding: 16px clamp(16px, 4vw, 40px) 8px;
}
.hotspot {
  color: var(--text); text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 8px 14px; font: 500 .85rem var(--mono); cursor: pointer; transition: border-color .15s, background .15s;
}
.hotspot:hover, .hotspot.is-hover { border-color: var(--accent); background: var(--surface-2); }

/* ---------- Sections ---------- */
.cv { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.section { padding: 88px 0 24px; }
.section-title { display: flex; align-items: baseline; gap: 14px; font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 28px; }
.section-title .mono { font-size: .9rem; color: var(--accent); }
.section h3 { margin-top: 1.2em; }
.lead { font-size: 1.12rem; }
.prose p { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }

.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facts li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column;
}
.facts strong { font: 700 1.9rem var(--display); color: var(--accent); }
.facts span { color: var(--muted); font-size: .85rem; }
.langs { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 20px 0 0; }
.langs li { font: .85rem var(--mono); color: var(--muted); border: 1px dashed var(--line); padding: 6px 12px; border-radius: 8px; }

/* Career timeline drawn as a circuit trace with current flowing through it */
.circuit { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; }
.circuit::before {
  content: ''; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--line), var(--line));
}
.circuit::after {
  content: ''; position: absolute; left: 10px; top: 6px; width: 3px; height: 90px; border-radius: 3px;
  background: linear-gradient(transparent, var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent);
  animation: current 4.5s linear infinite;
}
@keyframes current { from { transform: translateY(0); } to { transform: translateY(var(--trace-h, 900px)); } }
.job { position: relative; margin-bottom: 18px; }
.job .node {
  position: absolute; left: -31px; top: 22px; width: 17px; height: 17px; border-radius: 4px;
  background: var(--bg); border: 3px solid var(--signal);
}
.job.is-current .node { border-color: var(--accent); box-shadow: 0 0 0 5px var(--glow); }
.job-card, .card, .project {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  transition: border-color .2s, opacity .25s, transform .2s, box-shadow .2s;
}
.job-card h3 { margin: 0 0 8px; }
.job-card .at { color: var(--muted); font-weight: 500; }
.job-period { color: var(--warm); font-size: .8rem; margin-bottom: 6px; }
.job-card ul { margin: 0; padding-left: 18px; color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.job-card li { margin-bottom: 4px; }

/* DocuSign integration case studies */
.confidential {
  display: flex; gap: 10px; align-items: flex-start; max-width: 820px;
  background: color-mix(in srgb, var(--warm) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warm) 40%, var(--line));
  border-radius: 12px; padding: 12px 16px; font-size: .92rem; margin-bottom: 22px;
}
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.case {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  transition: border-color .2s, opacity .25s, box-shadow .2s;
}
.case.is-featured { border-top: 3px solid var(--accent); }
.case h3 { margin: 2px 0 12px; }
.case-client { color: var(--warm); font-size: .76rem; margin: 0; }
.case dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: .9rem; }
.case dt { font: 600 .72rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.case dd { margin: 0; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.case dd.flow { font-size: .78rem; color: var(--signal); line-height: 1.7; }
.case.is-lit { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }

.research { display: grid; grid-template-columns: 160px 1fr; gap: 32px; align-items: start; }
.research ul { padding-left: 18px; }
.note { color: var(--warm); font-size: .85rem; }
.haptic-wave { position: relative; width: 140px; height: 140px; display: grid; place-items: center; }
.haptic-wave span {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent);
  animation: ripple 2.4s ease-out infinite; opacity: 0;
}
.haptic-wave span:nth-child(2) { animation-delay: .8s; }
.haptic-wave span:nth-child(3) { animation-delay: 1.6s; }
.haptic-wave::after { content: '🥽'; font-size: 44px; }
@keyframes ripple { from { transform: scale(.35); opacity: .9; } to { transform: scale(1); opacity: 0; } }

/* Ask my CV */
.ask {
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 28px;
}
.ask h3 { margin-top: 0; }
.ask-form {
  display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px 6px 6px 14px;
}
.ask-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.prompt { color: var(--accent); }
.ask-form input {
  flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font-size: .95rem; padding: 8px 0;
}
.ask-form input:focus { outline: none; }
.ask-tips { font-size: .75rem; margin: 8px 0 10px; }
.ask-results { margin-top: 14px; display: grid; gap: 10px; }
.ask-results:empty { display: none; }
.result {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  animation: rise .35s ease both;
}
.result .kind {
  font: 600 .68rem var(--mono); text-transform: uppercase; letter-spacing: .04em; max-width: 120px;
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; text-align: center; color: var(--muted);
}
.result .kind-work { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.result .kind-research { color: var(--warm); border-color: color-mix(in srgb, var(--warm) 45%, transparent); }
.result .kind-project { color: var(--signal); border-color: color-mix(in srgb, var(--signal) 45%, transparent); }
.result .strength { font-size: .72rem; }
.result .strength.is-direct { color: var(--accent); }
.result h4 { margin: 0; font-size: .95rem; }
.result p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.result mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); border-radius: 3px; padding: 0 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 6px 12px;
  font-size: .85rem; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.is-on, .chip[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.filters { margin-bottom: 18px; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.project { display: flex; flex-direction: column; transform-style: preserve-3d; will-change: transform; }
.project:hover { border-color: var(--accent); box-shadow: 0 18px 40px -20px var(--glow); }
.project h3 { margin: 0 0 8px; }
.project p { color: var(--muted); font-size: .92rem; }
.project > p:not(.decision) { flex: 1; }
.project .decision {
  font-size: .86rem; color: color-mix(in srgb, var(--text) 85%, var(--muted));
  border-left: 2px solid var(--accent); padding-left: 10px; margin-top: -4px;
}
.project .decision strong { color: var(--accent); font-weight: 600; }
.project.is-featured { border-top: 3px solid var(--accent); }
.project.is-featured h3::after {
  content: '★'; color: var(--accent); font-size: .8em; margin-left: 8px; vertical-align: 2px;
}
.stack { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.stack li { font: .72rem var(--mono); color: var(--signal); border: 1px solid color-mix(in srgb, var(--signal) 35%, transparent); padding: 2px 8px; border-radius: 6px; }
.project-link { font-size: .78rem; word-break: break-all; }
.project[hidden] { display: none; }

/* Highlighting from skill chips and search results */
.is-dim { opacity: .28; }
.is-lit > .job-card, .project.is-lit, .card.is-lit { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 25% { box-shadow: 0 0 0 6px var(--glow); } }

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.skill-group h3 { margin-top: 0; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.skill-trace { margin-top: 20px; min-height: 1.6em; color: var(--muted); }
.skill-trace a { margin-right: 10px; }

.cards { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card h4 { margin: 4px 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }

.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 18px 0; }
.email { font-size: clamp(1.1rem, 3.4vw, 1.6rem); word-break: break-all; }
.contact-links { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; padding: 0; color: var(--muted); }

.footer { text-align: center; padding: 60px 16px 40px; color: var(--muted); font-size: .85rem; }

/* ---------- Panel (opened from room objects) ---------- */
.panel {
  width: min(880px, 100vw - 32px); max-height: min(86svh, 900px); padding: 0;
  border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--text);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.panel::backdrop { background: rgba(3, 6, 10, .55); backdrop-filter: blur(3px); }
.panel[open] { animation: panel-in .35s cubic-bezier(.2,.8,.2,1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.panel-body { padding: 8px clamp(16px, 4vw, 36px) 28px; overflow: auto; max-height: inherit; }
.panel-body .section { padding-top: 28px; }
.panel-close {
  position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-tools { margin-left: auto; }
  .about-grid, .research, .case-grid { grid-template-columns: 1fr; }
  .case dl { grid-template-columns: 1fr; gap: 2px; }
  .case dd { margin-bottom: 8px; }
  .haptic-wave { width: 100px; height: 100px; }
  .room-stage { height: 64svh; min-height: 380px; }
  .room-hud { top: 12px; right: 16px; }
  .room-hud h2 { font-size: 1.25rem; }
  .panel { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 88svh; }
  .result { grid-template-columns: 1fr auto; }
  .result .kind { grid-column: 1 / -1; justify-self: start; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .nav, .hero-canvas, .room, .ask, .filters, .panel, .footer { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Room objects carried through the CV ---------- */
.obj {
  width: 34px; height: 34px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.obj .led { fill: currentColor; stroke: none; }
.obj-sm { width: 18px; height: 18px; stroke-width: 2; }
.obj-lg { width: 54px; height: 54px; color: var(--accent); }
.section-title { align-items: center; }
.section-title .obj { color: var(--accent); }
.hotspot { display: inline-flex; align-items: center; gap: 8px; }
.hotspot .obj { color: var(--accent); }

/* Landing: the room settles into the document instead of the page restarting */
.room { background: linear-gradient(var(--bg), var(--bg-2) 70%, var(--bg)); }
.landing {
  display: flex; align-items: center; gap: 14px; margin: 18px 0 0;
  color: var(--muted); font: 500 .95rem var(--mono);
}
.landing-line { width: 34px; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }

/* Object index: the room's objects become the sticky table of contents */
.object-index {
  position: sticky; top: 57px; z-index: 40;
  display: flex; gap: 4px; margin: 14px calc(-1 * clamp(16px, 4vw, 40px)) 0;
  padding: 8px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  overflow-x: auto; scrollbar-width: none;
}
.object-index::-webkit-scrollbar { display: none; }
.object-index a {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 6px 11px; border-radius: 999px; color: var(--muted); text-decoration: none;
  font: 500 .82rem var(--font); border: 1px solid transparent; transition: color .15s, border-color .15s, background .15s;
}
.object-index a:hover { color: var(--text); border-color: var(--line); }
.object-index a[aria-current='true'] { color: var(--accent-ink); background: var(--accent); }
.object-index a[aria-current='true'] .obj { color: var(--accent-ink); }
.object-index .obj { color: var(--accent); }
.panel-body .object-index { display: none; }
@media (min-width: 861px) { .in-cv .nav-links { visibility: hidden; } }
.section { scroll-margin-top: 112px; }

/* Integration flows light up step by step, like traffic through the rack */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.flow .step {
  padding: 1px 6px; border-radius: 5px; border: 1px solid color-mix(in srgb, var(--signal) 30%, transparent);
  animation: flow-step calc(var(--n) * .8s) linear infinite; animation-delay: calc(var(--i) * .8s);
}
.flow .arrow { color: var(--muted); }
@keyframes flow-step {
  0%, 18% { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); color: var(--text); }
  30%, 100% { background: transparent; }
}

/* Small doses of the room's materials */
.case { position: relative; padding-left: 30px; }
.case::before {
  content: ''; position: absolute; left: 12px; top: 18px; bottom: 18px; width: 4px; border-radius: 2px;
  background: repeating-linear-gradient(var(--accent) 0 4px, transparent 4px 14px);
  opacity: .55;
}
.skill-group h3::before {
  content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #e11d48; margin-right: 8px; vertical-align: 1px; box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
#education .card { border-left: 5px solid var(--warm); }
#education .cards:last-of-type .card { border-left-color: var(--accent); }

/* Recruiter FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 14px 0; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--accent); font: 600 1.1rem var(--mono); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { color: color-mix(in srgb, var(--text) 85%, var(--muted)); margin: 0 0 14px; }
.faq-item.is-lit { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }

/* Closing call to action */
.cta {
  margin: 72px 0 0; padding: 40px clamp(20px, 5vw, 56px); text-align: center;
  border: 1px solid var(--line); border-radius: 20px;
  background: radial-gradient(90% 120% at 50% 0%, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface));
}
.cta .obj-lg { margin: 0 auto 12px; display: block; }
.cta h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.cta p { color: var(--muted); }
.cta .hero-actions { justify-content: center; margin-bottom: 0; }

@media (max-width: 860px) {
  .object-index { top: 57px; }
  .object-index a span { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .flow .step { animation: none; }
}

/* "Download CV: EN | IT" choice */
.cv-choice { padding: 4px 4px 4px 16px; gap: 8px; cursor: default; }
.cv-choice:hover { transform: none; }
.cv-choice a {
  font: 600 .78rem var(--mono); text-decoration: none; color: var(--text);
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
}
.cv-choice a:first-of-type { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cv-choice a:hover { border-color: var(--accent); }
