/* One block per section, in page order. */

/* =========================================================== hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 120px var(--gutter) 110px;
  overflow: clip;
}
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__inner { position: relative; max-width: var(--max); width: 100%; margin: 0 auto; }

.hero__status {
  display: flex;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 4vh, 36px);
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.7);
  font-family: var(--mono);
  font-size: var(--step--2);
  color: var(--text);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--success); animation: pulse 1.8s var(--ease-out) infinite; }
@keyframes pulse { to { transform: scale(3); opacity: 0; } }

/* the name: real text first; letters and particles enhance it */
.hero__name {
  position: relative;
  display: flex;
  flex-direction: column;
  width: max-content;
  max-width: 100%;
  font-family: var(--display);
  font-size: var(--step-hero);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.045em;
  transform-origin: 0 0;
  will-change: transform;
}
.name__word { position: relative; display: block; white-space: nowrap; }
.name__word--last { margin-left: 0.62em; color: var(--text); }
.name__word--last::after { content: '.'; color: var(--accent); }
.name__word--last.has-particles { color: transparent; }
.name__word--last.has-particles::after { color: var(--accent); }
.name__particles { position: absolute; max-width: none; pointer-events: none; }
.ch {
  --f: 0;
  --lean: 0;
  position: relative;
  display: inline-block;
  font-weight: 500;
  font-variation-settings: 'wght' calc(500 + 200 * var(--f));
  transform: translateY(calc(var(--f) * -0.05em)) scaleY(calc(1 + var(--f) * 0.08)) skewX(calc(var(--lean) * 1deg));
  transform-origin: 50% 100%;
  transition: font-variation-settings 0.25s var(--ease-out), transform 0.25s var(--ease-out), color 0.25s;
}
/* the orange glow under the nearest letters */
.ch::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -0.02em;
  height: 0.22em;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(18px);
  opacity: calc(var(--f) * 0.9);
  pointer-events: none;
}
/* while decoding, a letter keeps its final width (set by scramble()) so nothing around it moves */
.ch.is-scrambling { color: var(--accent); text-align: center; }

.hero__role {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(22px, 4vh, 40px);
  font-size: var(--step-1);
  color: var(--text);
}
.hero__prompt { color: var(--accent); }
.hero__caret { width: 0.55em; height: 1.1em; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; min-height: 48px; margin-top: clamp(26px, 5vh, 44px); }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: clamp(26px, 5vh, 48px);
  min-height: 1.6em;
  font-size: var(--step--1);
}
.hero__learn { color: #8DB6F9; }
.hero__learn::before { content: '● '; color: var(--info); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  transform: translateX(-50%);
}
.hero__mouse { width: 22px; height: 34px; border: 1.5px solid var(--border-strong); border-radius: 12px; display: grid; justify-items: center; padding-top: 6px; }
.hero__mouse span { width: 3px; height: 7px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s var(--ease-in-out) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }

/* intro: the rest of the hero rises in after the preloader */
.hero__status, .hero__role, .hero__ctas, .hero__meta, .hero__scroll { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.is-ready .hero__status { opacity: 1; transform: none; transition-delay: 0.05s; }
.is-ready .hero__role { opacity: 1; transform: none; transition-delay: 0.55s; }
.is-ready .hero__ctas { opacity: 1; transform: none; transition-delay: 0.7s; }
.is-ready .hero__meta { opacity: 1; transform: none; transition-delay: 0.85s; }
.is-ready .hero__scroll { opacity: 1; transform: translateX(-50%); transition-delay: 1.1s; }
.hero__scroll { transform: translate(-50%, 14px); }

@media (max-width: 720px) {
  .hero { align-items: end; padding-bottom: 96px; }
  .name__word--last { margin-left: 0.3em; }
  .hero__role { font-size: var(--step-0); }
  .hero__scroll { display: none; }
  .hero__ctas { min-height: 108px; }
  .hero__meta { min-height: 3.6em; }
  .hero__ctas .btn { height: 46px; padding: 0 18px; }
}

/* =========================================================== about */
.about__grid { display: grid; grid-template-columns: minmax(240px, 0.8fr) 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__photo { position: relative; aspect-ratio: 4 / 5; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.25) contrast(1.05); }
.about__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(255, 106, 19, 0.18), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255, 255, 255, 0.04) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255, 255, 255, 0.04) 23px 24px),
    var(--surface);
}
.about__mono { font-family: var(--display); font-size: clamp(5rem, 14vw, 9rem); font-weight: 700; letter-spacing: -0.06em; line-height: 0.8; color: var(--text); }
/* the data scan: a grid fades in and a bright line sweeps down on hover */
.about__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 11px, rgba(255, 106, 19, 0.22) 11px 12px),
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(255, 106, 19, 0.12) 11px 12px);
  opacity: 0;
  transition: opacity var(--slow);
  mix-blend-mode: screen;
}
.about__scan i { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); box-shadow: 0 0 24px 6px var(--accent-glow); transform: translateY(-10px); }
.about__photo:hover .about__scan, .about__photo:focus-within .about__scan { opacity: 1; }
.about__photo:hover .about__scan i { animation: scan 1.6s var(--ease-in-out) infinite; }
@keyframes scan { 0% { transform: translateY(-10px); } 100% { transform: translateY(calc(var(--h, 520px))); } }
.about__photo { --h: 100%; }
.about__photo:hover .about__scan i { animation-name: scan-pct; }
@keyframes scan-pct { from { top: 0; } to { top: 100%; } }
.about__caption { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.about__text .h2 { margin-bottom: 26px; }
.about__p { max-width: 58ch; margin-top: 16px; color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.about__p:first-of-type { color: var(--text); }
.about__langs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.about__langs li { display: grid; grid-template-columns: auto auto; gap: 2px 10px; align-items: baseline; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; }
.about__langs b { color: var(--accent); font-size: 12px; }
.about__langs small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: clamp(56px, 9vh, 96px); }
.fact { display: grid; gap: 10px; padding: 24px; }
.fact__value { font-family: var(--display); font-size: var(--step-4); font-weight: 600; letter-spacing: -0.03em; color: var(--text); line-height: 1; }
.fact__label { color: var(--muted); font-size: var(--step--1); }

.askme { margin-top: clamp(56px, 9vh, 96px); text-align: center; }
.askme .eyebrow { justify-content: center; }
.askme__cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; max-width: 900px; margin: 10px auto 0; padding: 20px 0; }
.askme__tag {
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--step-0);
  font-weight: 550;
  will-change: transform;
  transition: border-color var(--fast), color var(--fast), background var(--fast);
}
.askme__tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 360px; }
  .facts { grid-template-columns: 1fr 1fr; }
}

/* =========================================================== focus */
.focus__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.focus__card { display: flex; flex-direction: column; gap: 14px; min-height: 340px; padding: 26px; transform-style: preserve-3d; }
.focus__top { display: flex; justify-content: space-between; align-items: center; }
.focus__icon { width: 34px; height: 34px; color: var(--accent); }
.focus__n { color: var(--muted); font-size: 12px; }
.focus__title { margin-top: auto; font-family: var(--display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.focus__exploring { vertical-align: middle; color: #8DB6F9; background: var(--info-soft); }
.focus__blurb { color: var(--muted); font-size: var(--step--1); line-height: 1.5; }
.focus__toggle { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); color: var(--text); font-size: var(--step--1); font-weight: 600; }
.focus__plus, .tl__plus { position: relative; width: 14px; height: 14px; }
.focus__plus::before, .focus__plus::after, .tl__plus::before, .tl__plus::after { content: ''; position: absolute; left: 0; top: 50%; width: 14px; height: 1.5px; background: currentColor; transition: transform var(--base) var(--ease-spring); }
.focus__plus::after, .tl__plus::after { transform: rotate(90deg); }
.is-open .focus__plus::after, .is-open .tl__plus::after { transform: rotate(0); }
.focus__more { display: grid; gap: 14px; animation: drop var(--base) var(--ease-out); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.focus__skills { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.focus__projects { display: grid; gap: 4px; }
.focus__projects a { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-weight: 550; transition: color var(--fast); }
.focus__projects a:hover { color: var(--accent); }
@media (max-width: 1100px) { .focus__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .focus__grid { grid-template-columns: 1fr; } .focus__card { min-height: 0; } }

/* =========================================================== journey */
.tl { position: relative; }
.tl__line { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; overflow: visible; }
.tl__track { fill: none; stroke: var(--border); stroke-width: 2; }
.tl__draw { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--accent-glow)); }
.tl__year { display: grid; grid-template-columns: clamp(80px, 14vw, 200px) 1fr; gap: 0 clamp(20px, 4vw, 56px); }
.tl__label { position: relative; }
.tl__label span { position: sticky; top: 110px; display: block; padding-top: 18px; font-size: var(--step-4); font-weight: 700; letter-spacing: -0.05em; color: var(--border-strong); transition: color var(--slow); }
.tl__year:has(.is-lit) .tl__label span { color: var(--text); }
.tl__items { display: grid; gap: 18px; padding: 10px 0 56px; }
.tl__item { position: relative; padding-left: 44px; }
.tl__node { position: absolute; left: 0; top: 30px; width: 14px; height: 14px; border: 2px solid var(--border-strong); border-radius: 50%; background: var(--bg); transition: border-color var(--base), background var(--base), box-shadow var(--base); }
.tl__node.is-lit { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl__card { position: relative; display: grid; gap: 6px; width: 100%; padding: 20px 56px 20px 22px; text-align: left; transition: border-color var(--fast), background var(--fast); }
.tl__card:not([data-static]):hover { border-color: var(--border-strong); background: var(--surface-2); }
.tl__card[data-static] { cursor: default; }
.tl__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12px; }
.tl__kind { color: var(--text); }
.tl__kind::before { content: '● '; }
.tl__kind--education::before { color: var(--info); }
.tl__kind--experience::before { color: var(--accent); }
.tl__kind--milestone::before { color: var(--success); }
.tl__title { font-family: var(--display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.tl__org { color: var(--muted); font-weight: 550; }
.tl__summary { color: var(--muted); font-size: var(--step--1); max-width: 70ch; }
.tl__more { position: absolute; right: 22px; top: 24px; color: var(--muted); }
.tl__details { display: grid; gap: 8px; margin: 10px 0 0; padding: 0 22px 0 26px; color: var(--muted); font-size: var(--step--1); animation: drop var(--base) var(--ease-out); }
.tl__details li { list-style: '→  '; }
@media (max-width: 720px) {
  .tl__year { grid-template-columns: 1fr; }
  .tl__label span { position: static; padding: 0 0 6px 44px; font-size: var(--step-3); }
}

/* =========================================================== skills */
.skills__side { display: grid; gap: 18px; justify-items: start; }
.skills__legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.skills__graph { display: grid; grid-template-columns: 1fr 280px; overflow: hidden; }
.graph { width: 100%; height: clamp(440px, 62vh, 620px); touch-action: none; user-select: none; }
.graph line { stroke: rgba(245, 245, 244, 0.1); stroke-width: 1; transition: stroke var(--base), stroke-width var(--base); }
.graph line.is-on { stroke: var(--accent); stroke-width: 1.6; }
.gnode { cursor: grab; transition: opacity var(--base); }
.gnode:active { cursor: grabbing; }
.gnode text { fill: var(--muted); font-family: var(--mono); font-size: 11px; pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.gnode--project rect { fill: var(--surface-2); stroke: var(--text); stroke-width: 1.5; }
.gnode--project text { fill: var(--text); font-family: var(--body); font-size: 12px; font-weight: 600; }
.gnode--skill circle { transition: r var(--base) var(--ease-spring), filter var(--base); }
.gnode--skill:hover circle, .gnode--skill:focus-visible circle { filter: drop-shadow(0 0 8px currentColor); }
.gnode--skill:focus-visible { outline: none; }
.gnode--skill:focus-visible text { fill: #9DC1FB; }
.has-selection .gnode:not(.is-on) { opacity: 0.22; }
.has-selection .gnode.is-on text { fill: var(--text); }
.has-selection .gnode--project.is-on rect { fill: var(--accent); stroke: var(--accent); }
.graph__panel { display: grid; align-content: start; gap: 10px; padding: 26px; border-left: 1px solid var(--border); background: var(--surface-2); }
.graph__name { font-family: var(--display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; }
.graph__projects { display: grid; gap: 10px; margin-top: 8px; }
.graph__projects li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.graph__projects a { font-weight: 600; }
.graph__projects a:hover { color: var(--accent); }
.graph__goto { justify-self: start; color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.graph__goto:hover { color: var(--text); }
.skills__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.slist { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.slist__cat { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.slist__item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.slist__item:last-child { border-bottom: 0; }
.slist__name { font-weight: 600; }
.slist__projects { grid-column: 1 / -1; color: var(--muted); font-size: var(--step--1); }
.slist__projects a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
@media (max-width: 860px) { .skills__graph { grid-template-columns: 1fr; } .graph__panel { border-left: 0; border-top: 1px solid var(--border); } }

/* =========================================================== projects */
.featured { display: grid; grid-template-columns: 1.25fr 1fr; overflow: hidden; margin-bottom: clamp(40px, 7vh, 72px); }
.featured__media { position: relative; min-height: 420px; background: radial-gradient(70% 70% at 40% 40%, rgba(255, 106, 19, 0.16), transparent 70%), var(--surface-2); border-right: 1px solid var(--border); }
.featured__media video, .featured__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured__note { position: absolute; left: 16px; bottom: 14px; color: var(--muted); font-size: 11px; }
.featured__body { display: grid; align-content: center; gap: 16px; padding: clamp(26px, 4vw, 52px); }
.featured__title { font-family: var(--display); font-size: var(--step-5); font-weight: 650; letter-spacing: -0.04em; line-height: 0.9; }
.featured__tagline { color: var(--muted); font-size: var(--step-1); line-height: 1.45; }
.featured__metrics { display: flex; flex-wrap: wrap; gap: 28px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.featured__metrics dt { color: var(--muted); font-size: 11px; }
.featured__metrics dd { margin: 4px 0 0; font-family: var(--display); font-size: var(--step-3); font-weight: 600; color: var(--accent); }
.featured__ctas { display: flex; flex-wrap: wrap; gap: 10px; }

.pfilters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.psearch { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); min-width: min(320px, 100%); transition: border-color var(--fast); }
.psearch:focus-within { border-color: var(--info); }
.psearch svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.psearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: var(--step--1); }
.psearch input::placeholder { color: var(--muted); }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pcard__link { display: flex; flex-direction: column; height: 100%; overflow: hidden; transition: border-color var(--fast), transform var(--base) var(--ease-out); }
.pcard.is-hot .pcard__link { border-color: var(--border-strong); transform: translateY(-4px); }
.pcard.is-flash .pcard__link { animation: flash 1.4s var(--ease-out); }
@keyframes flash { 0%, 40% { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); } }
.pcard__media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.pcard__cover, .pcard__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard__status { position: absolute; left: 12px; top: 12px; background: var(--info-soft); color: #9DC1FB; }
.pcard__body { display: grid; gap: 10px; padding: 20px; }
.pcard__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pcard__title { font-family: var(--display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.pcard__year { color: var(--muted); font-size: 12px; }
.pcard__tagline { color: var(--muted); font-size: var(--step--1); }
.pcard__tech { display: flex; flex-wrap: wrap; gap: 6px; }
.pempty { margin-top: 18px; }
.pempty__reset { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1000px) { .pgrid { grid-template-columns: 1fr 1fr; } .featured { grid-template-columns: 1fr; } .featured__media { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--border); } }
@media (max-width: 640px) { .pgrid { grid-template-columns: 1fr; } }

/* =========================================================== data lab */
.lab__tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.lab__tab { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; text-align: left; transition: border-color var(--fast), background var(--fast); }
.lab__tab:hover { border-color: var(--border-strong); }
.lab__tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); }
.lab__n { grid-row: span 2; color: var(--accent); font-size: 12px; padding-top: 4px; }
.lab__label { font-family: var(--display); font-size: var(--step-1); font-weight: 600; }
.lab__blurb { color: var(--muted); font-size: var(--step--1); }
.demo { display: grid; grid-template-columns: 1fr 300px; min-height: 480px; overflow: hidden; }
.demo__loading { padding: 24px; }
.demo__plot { position: relative; min-height: 380px; border-right: 1px solid var(--border); background: radial-gradient(80% 80% at 50% 50%, rgba(255, 106, 19, 0.05), transparent 70%); }
.demo__plot canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.demo__plot canvas:focus-visible { outline-offset: -4px; }
.demo__side { display: grid; align-content: start; gap: 18px; padding: 24px; background: var(--surface-2); }
.demo__readout { display: grid; gap: 12px; }
.demo__readout dt { color: var(--muted); font-size: 11px; }
.demo__readout dd { margin: 2px 0 0; font-size: var(--step--1); }
.demo__big { font-family: var(--display); font-size: var(--step-4) !important; font-weight: 600; letter-spacing: -0.03em; color: var(--accent); line-height: 1; }
.demo__bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.demo__bar span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform var(--base) var(--ease-out); }
.demo__hint { color: var(--muted); font-size: var(--step--1); line-height: 1.5; }
.demo__fine { color: var(--muted); font-size: 11px; }
.demo__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.demo__slider { display: grid; gap: 8px; font-size: 12px; color: var(--muted); }
.demo__slider b { color: var(--text); }
.demo__slider input { accent-color: var(--accent); }
@media (max-width: 900px) { .demo { grid-template-columns: 1fr; } .demo__plot { border-right: 0; border-bottom: 1px solid var(--border); } .lab__tabs { gap: 6px; } .lab__tab { display: block; padding: 12px; text-align: center; } .lab__n { display: none; } .lab__label { font-size: var(--step--1); } .lab__blurb { display: none; } }

/* =========================================================== certificates */
.certs { padding-left: 0; padding-right: 0; }
.certs .wrap { max-width: calc(var(--max) + 2 * var(--gutter)); padding: 0 var(--gutter); }
.certs__track { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 10px var(--gutter) 30px; cursor: grab; }
.certs__track::-webkit-scrollbar { display: none; }
.certs__track.is-dragging { cursor: grabbing; }
.certs__track.is-dragging .cert { pointer-events: none; }
.certs__list { display: flex; gap: 18px; width: max-content; padding-left: max(0px, calc((100vw - var(--max)) / 2 - var(--gutter))); }
.cert { width: 300px; height: 380px; perspective: 1200px; }
.cert__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.7s var(--ease-spring); }
.cert.is-flipped .cert__inner { transform: rotateY(180deg); }
.cert__face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backface-visibility: hidden; -webkit-backface-visibility: hidden; text-align: left; }
.cert__front { background: radial-gradient(90% 60% at 30% 0%, rgba(255, 106, 19, 0.14), transparent 60%), var(--surface); }
.cert__front:hover { border-color: var(--border-strong); }
.cert__back { transform: rotateY(180deg); background: var(--surface-2); }
.cert__badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(255, 106, 19, 0.3); }
.cert__badge svg { width: 30px; height: 30px; }
.cert__issuer { margin-top: auto; color: var(--muted); font-size: 12px; }
.cert__back .cert__issuer { margin-top: 0; }
.cert__title { font-family: var(--display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.cert__date { color: var(--text); font-size: 12px; }
.cert__flip { position: absolute; right: 22px; top: 26px; color: var(--muted); font-size: 11px; }
.cert__skills { display: flex; flex-wrap: wrap; gap: 6px; }
.cert__group { display: grid; gap: 14px; }
.cert__group li { display: grid; gap: 2px; }
.cert__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; }
.cert__back-btn { color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================== achievements */
.ach__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ach { display: flex; flex-direction: column; gap: 10px; padding: 26px; }
.ach--top { background: radial-gradient(90% 70% at 100% 0%, rgba(255, 106, 19, 0.12), transparent 60%), var(--surface); }
.ach__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ach__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); color: var(--accent); border: 1px solid var(--border); }
.ach__icon svg { width: 24px; height: 24px; }
.ach__date { font-size: 12px; }
.ach__metric { display: flex; align-items: baseline; gap: 10px; }
.ach__metric .mono { font-family: var(--display); font-size: var(--step-4); font-weight: 600; color: var(--accent); letter-spacing: -0.03em; line-height: 1; }
.ach__metric small { color: var(--muted); }
.ach__title { font-family: var(--display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.ach__context { color: var(--muted); font-size: 12px; }
.ach__desc { color: var(--muted); font-size: var(--step--1); }
.ach__links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 8px; font-weight: 600; font-size: var(--step--1); }
.ach__links a:hover { color: var(--accent); }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: var(--z-toast); pointer-events: none; }

/* =========================================================== github */
.gh__link { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.gh__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.gh__cal { padding: 26px; min-width: 0; }
.gh__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.gh__big { font-family: var(--display); font-size: var(--step-4); font-weight: 650; color: var(--accent); line-height: 1; }
.gh__scroll { overflow-x: auto; scrollbar-width: thin; }
.heat { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; grid-auto-columns: 11px; gap: 3px; width: max-content; }
.heat__d { width: 11px; height: 11px; border-radius: 3px; background: #1C1C1C; }
.heat__d[data-l="1"] { background: rgba(255, 106, 19, 0.35); }
.heat__d[data-l="2"] { background: rgba(255, 106, 19, 0.55); }
.heat__d[data-l="3"] { background: rgba(255, 106, 19, 0.8); }
.heat__d[data-l="4"] { background: #FF6A13; }
.heat__legend { display: flex; align-items: center; gap: 4px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.heat__legend .heat__d { display: inline-block; }
.gh__langs { display: grid; place-items: center; padding: 26px; }
.donut { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.donut svg { width: 150px; height: 150px; }
.donut__n { fill: var(--text); font-family: var(--display); font-size: 30px; font-weight: 650; }
.donut__l { fill: var(--muted); font-family: var(--mono); font-size: 10px; }
.donut__legend { display: grid; gap: 8px; font-size: var(--step--1); }
.donut__legend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; }
.donut__legend i { width: 10px; height: 10px; border-radius: 3px; }
.gh__repos { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.gh__repo { display: grid; gap: 6px; height: 100%; padding: 18px 20px; transition: border-color var(--fast); }
.gh__repo:hover { border-color: var(--accent); }
.gh__name { font-weight: 650; }
.gh__desc { font-size: var(--step--1); }
.gh__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; white-space: nowrap; color: var(--muted); font-size: 11px; }
.gh__dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent); }
.gh__more { place-content: center; text-align: center; border-style: dashed; }
@media (max-width: 900px) { .gh__grid { grid-template-columns: 1fr; } }

/* =========================================================== now */
.now__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.now__cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.now__stack { display: grid; gap: 16px; align-content: start; }
.now__card { padding: 26px; }
.now__h { margin-bottom: 16px; color: var(--accent); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.now__bars { display: grid; gap: 18px; }
.now__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 600; }
.now__bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.now__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--info), #7FB0FF); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.2s var(--ease-out) 0.2s; }
.is-in .now__bar span { transform: scaleX(var(--p)); }
.now__bar.is-todo span { background: repeating-linear-gradient(-45deg, rgba(59, 130, 246, 0.35) 0 6px, transparent 6px 12px); }
.now__detail { margin-top: 6px; color: var(--muted); font-size: 12px; }
.now__list { display: grid; gap: 10px; color: var(--muted); }
@media (max-width: 1000px) { .now__grid, .now__cols { grid-template-columns: 1fr; } }

/* =========================================================== contact */
.contact { padding-bottom: clamp(80px, 12vh, 140px); }
.contact__big {
  margin: 10px 0 clamp(40px, 7vh, 72px);
  font-family: var(--display);
  font-size: clamp(3rem, 1rem + 9vw, 10rem);
  font-weight: 650;
  line-height: 0.88;
  letter-spacing: -0.05em;
}
.contact__word { display: inline-block; white-space: nowrap; }
.contact__word.is-accent { color: var(--accent); }
.cl { --f: 0; display: inline-block; font-variation-settings: 'wght' calc(500 + 200 * var(--f)); transform: translateY(calc(var(--f) * -0.06em)); transition: font-variation-settings 0.2s var(--ease-out), transform 0.2s var(--ease-out); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact__left { display: grid; gap: 24px; }
.contact__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.contact__email { font-family: var(--display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size var(--slow) var(--ease-out); padding-bottom: 2px; overflow-wrap: anywhere; }
.contact__email:hover { background-size: 100% 2px; }
.contact__socials { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__where { font-size: 12px; }
.cform { padding: clamp(22px, 3vw, 34px); }
.cform__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cform__field { display: grid; gap: 6px; font-size: var(--step--1); font-weight: 600; }
.cform__field--wide { grid-column: 1 / -1; }
.cform input, .cform textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg); font-weight: 450; resize: vertical; transition: border-color var(--fast); }
.cform input:focus, .cform textarea:focus { outline: none; border-color: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.cform [aria-invalid="true"] { border-color: #F87171; }
.cform__err { min-height: 1.2em; color: #FCA5A5; font-weight: 500; }
.cform__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; }
.cform__note { font-size: 11px; }
.cform.is-done .cform__fields, .cform.is-done .cform__foot { display: none; }
.cform__done { display: grid; justify-items: start; gap: 16px; }
.cform__done svg { width: 56px; height: 56px; fill: none; stroke: var(--success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cform__done circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 0.7s var(--ease-out) forwards; }
.cform__done path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.4s var(--ease-out) 0.5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.cform__done a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } .cform__fields { grid-template-columns: 1fr; } }

/* =========================================================== footer */
.footer { padding: 0 var(--gutter) 36px; }
.footer__inner { display: grid; gap: 18px; padding-top: 36px; border-top: 1px solid var(--border); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; }
.footer__mark { font-family: var(--display); font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; }
.footer__mark span { color: var(--accent); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 12px; }
.footer__row a:hover { color: var(--text); }
kbd { padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 5px; font-family: var(--mono); font-size: 0.92em; }
