/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #0c0d0f;
  --bg-2: #121316;
  --surface: #16171b;
  --surface-2: #1d1f24;
  --line: #26282e;
  --line-strong: #383b43;
  --text: #eceae4;
  --text-2: #b4b3ad;
  --muted: #7d7f86;
  --accent: #d4ff3f;          /* signal lime */
  --accent-ink: #0c0d0f;      /* text on accent */
  --accent-text: #d4ff3f;     /* accent used as text */
  --c1: #d4ff3f;
  --c2: #ff7a45;
  --c3: #67d4ff;
  --shadow: 0 30px 60px -30px rgb(0 0 0 / 0.6);
  --radius: 18px;
  --radius-sm: 10px;

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f1ea;
  --bg-2: #ecE9e0;
  --surface: #fbfaf6;
  --surface-2: #f1eee6;
  --line: #dedad0;
  --line-strong: #c7c2b5;
  --text: #131416;
  --text-2: #43454b;
  --muted: #6e7077;
  --accent: #c6f432;
  --accent-ink: #131416;
  --accent-text: #4d6b00;
  --c1: #7fa300;
  --c2: #e2561d;
  --c3: #1f8fc4;
  --shadow: 0 30px 60px -34px rgb(40 35 20 / 0.28);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f3f1ea;
    --bg-2: #ece9e0;
    --surface: #fbfaf6;
    --surface-2: #f1eee6;
    --line: #dedad0;
    --line-strong: #c7c2b5;
    --text: #131416;
    --text-2: #43454b;
    --muted: #6e7077;
    --accent: #c6f432;
    --accent-ink: #131416;
    --accent-text: #4d6b00;
    --c1: #7fa300;
    --c2: #e2561d;
    --c3: #1f8fc4;
    --shadow: 0 30px 60px -34px rgb(40 35 20 / 0.28);
    color-scheme: light;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }
p { margin: 0; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.02em; }
.muted { color: var(--muted); }

/* grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Progress + Nav
   ========================================================================== */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

.nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 50;
  width: min(1180px, 100% - 2 * var(--gutter));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-color: var(--line);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.nav__brand { display: flex; align-items: center; gap: 4px; font-weight: 600; }
.nav__name { margin-left: 8px; font-family: var(--f-mono); font-size: 0.9rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot--a { background: var(--c1); }
.dot--b { background: var(--c2); transform: translateY(-4px); }
.dot--c { background: var(--c3); }

.nav__links { display: flex; gap: 2px; }
.nav__links a {
  position: relative;
  padding: 7px 13px;
  font-size: 0.88rem;
  color: var(--text-2);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.is-active { color: var(--accent-ink); background: var(--accent); }

.nav__actions { display: flex; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .i-sun { display: none; }
  :root:not([data-theme]) .i-moon { display: block; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.95rem; font-weight: 500;
  border: 1px solid var(--line-strong);
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--ghost { background: color-mix(in srgb, var(--surface) 60%, transparent); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--text); }
.btn__icon { flex: none; margin-right: 2px; }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; gap: 6px; }
.btn--sm .btn__icon { width: 16px; height: 16px; }
.btn__note { font-family: var(--f-mono); font-size: 0.68rem; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--accent-ink) 12%, transparent); }
.contact__label { display: inline-flex; align-items: center; gap: 14px; }
.contact__icon { flex: none; width: 22px; height: 22px; opacity: 0.85; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 110px 0 48px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: -1; pointer-events: none;
}
.hero__inner { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 0.78rem;
  color: var(--text-2);
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(6px);
}
.hero .eyebrow { white-space: nowrap; max-width: 100%; }
@media (max-width: 420px) { .hero .eyebrow { font-size: 0.68rem; gap: 7px; } }
.pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 0 0 var(--c1); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c1) 60%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero__name {
  margin-top: 28px;
  font-size: clamp(3.4rem, min(12vw, 17vh), 10rem);
  line-height: 0.86;
  letter-spacing: -0.055em;
  font-weight: 600;
}
.hero__name span { display: block; }
.hero__last { padding-left: clamp(0px, 9vw, 150px); }
.hero__last em { font-size: 1.08em; letter-spacing: -0.035em; color: var(--accent-text); }

.hero__role {
  margin-top: 28px;
  font-family: var(--f-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-2);
}
.hero__lead {
  margin-top: 14px;
  max-width: 34ch;
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  line-height: 1.4;
  color: var(--text);
  text-wrap: balance;
}
.hero__cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }

/* At a glance — the 10-second summary */
.glance {
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}
.glance > div { padding: 16px 20px; border-left: 1px solid var(--line); margin-left: -1px; border-top: 1px solid var(--line); margin-top: -1px; }
.glance dt { font-family: var(--f-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.glance dd { margin: 6px 0 0; font-size: 0.95rem; line-height: 1.35; color: var(--text); }
.hero__print-contacts { display: none; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(80px, 12vw, 140px) 0 0; }
.section__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 22px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.section__index { color: var(--accent-text); }
.section__head h2 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1; }
.section__note { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 640px) {
  .section__head { grid-template-columns: auto 1fr; }
  .section__note { grid-column: 1 / -1; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

.about__photo { margin: 0; position: relative; max-width: 440px; }
.about__photo img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius);
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.6s var(--ease);
  border: 1px solid var(--line);
}
.about__photo:hover img { filter: grayscale(0); }
.about__photo figcaption {
  position: absolute; left: 14px; bottom: 14px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}

.prose p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.prose p + p { margin-top: 18px; }
.prose p:first-child { color: var(--text); }

.stats { margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stats > div { padding: 22px 18px 4px 0; }
.stats > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.stats dt { order: 2; color: var(--muted); font-size: 0.85rem; line-height: 1.35; margin-top: 8px; }
.stats dd { margin: 0; font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.stats > div { display: flex; flex-direction: column; }
.stats dd { order: 1; }
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .stats > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .stats > div { padding-bottom: 18px; }
}

.langs { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.langs li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.88rem; color: var(--text-2); }
.langs li b { color: var(--text); font-weight: 500; margin-right: 6px; }

/* ==========================================================================
   Stack
   ========================================================================== */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: all 0.2s var(--ease);
}
.tab:hover { color: var(--text); border-color: var(--line-strong); }
.tab[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tab .count { font-family: var(--f-mono); font-size: 0.72rem; opacity: 0.6; margin-left: 6px; }

.skills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; min-height: 120px; }
.skill {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 1rem;
  cursor: default;
  animation: pop 0.45s var(--ease) both;
  transition: border-color 0.2s, transform 0.25s var(--ease), background 0.2s;
}
.skill:hover, .skill:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.skill__dot { width: 6px; height: 6px; border-radius: 50%; flex: none; opacity: 0.9; }
.skill__used {
  font-family: var(--f-mono); font-size: 0.7rem;
  padding: 2px 7px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ==========================================================================
   Projects
   ========================================================================== */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 820px) { .projects { grid-template-columns: 1fr; } }

.card {
  --mx: 50%; --my: 50%;
  position: relative;
  display: flex; flex-direction: column;
  min-height: 440px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.3s, transform 0.5s var(--ease), box-shadow 0.4s, opacity 0.3s, filter 0.3s;
  transform-style: preserve-3d;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(520px circle at var(--mx) var(--my), color-mix(in srgb, var(--card-color, var(--accent)) 16%, transparent), transparent 45%);
  opacity: 0; transition: opacity 0.35s;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card.is-dim { opacity: 0.35; filter: saturate(0.4); }
.card.is-lit { border-color: var(--accent); }

.card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card__kicker { color: var(--muted); }
.card__arrow {
  flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  transition: transform 0.4s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.card:hover .card__arrow { transform: rotate(-45deg); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Card with a live demo: GitHub link covers the card, demo button sits above it. */
.card__cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card__demo {
  position: relative; z-index: 2;
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; padding: 9px 14px;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 0.78rem; font-weight: 600;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.card__demo:hover { transform: translateY(-2px); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.card__demo-host { font-weight: 400; opacity: 0.65; }
.card__live {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  animation: live 1.8s ease-in-out infinite;
}
@keyframes live { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .card__live { animation: none; } }

.card__visual { flex: 1; min-height: 120px; margin: 22px -6px; display: flex; align-items: center; }
.card__visual svg { width: 100%; height: 130px; overflow: visible; }

.card__title { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.05; }
.card__desc { margin-top: 12px; color: var(--text-2); font-size: 0.98rem; line-height: 1.55; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 20px; border-top: 1px solid var(--line); }
.metric { padding: 12px 10px 0 0; }
.metric + .metric { padding-left: 10px; border-left: 1px solid var(--line); }
.metric b { display: block; font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.metric span { font-family: var(--f-mono); font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; list-style: none; padding: 0; }
.tags li { font-family: var(--f-mono); font-size: 0.72rem; padding: 4px 9px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }

.card--more {
  min-height: 0;
  grid-column: 1 / -1;
  flex-direction: row; align-items: center; justify-content: space-between;
  background: transparent; border-style: dashed;
}
.card--more h3 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.card--more p { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }

/* svg visual strokes */
.viz-line { fill: none; stroke: var(--card-color, var(--accent)); stroke-width: 2; stroke-linecap: round; }
.viz-ref { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 5; }
.viz-grid { stroke: var(--line); stroke-width: 1; }
.viz-fill { fill: color-mix(in srgb, var(--card-color, var(--accent)) 12%, transparent); }
.viz-label { font-family: var(--f-mono); font-size: 10px; fill: var(--muted); }
.viz-node { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.viz-node--hot { stroke: var(--card-color, var(--accent)); stroke-width: 1.5; }
.viz-edge { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.viz-edge--hot { stroke: var(--card-color, var(--accent)); stroke-dasharray: 4 4; animation: flow 1.2s linear infinite; }
.viz-text { font-family: var(--f-mono); font-size: 10.5px; fill: var(--text-2); }
@keyframes flow { to { stroke-dashoffset: -16; } }

.draw { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); transition: stroke-dashoffset 1.6s var(--ease); }
.is-visible .draw { stroke-dashoffset: 0; }

/* ==========================================================================
   Logos (companies, schools, certificate issuers)
   ========================================================================== */
.logo { display: inline-flex; flex: none; align-items: center; }
.logo img, .logo__initials {
  width: 48px; height: 48px; border-radius: 12px;
  object-fit: contain; background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}
.logo__initials {
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-2);
  font-family: var(--f-mono); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em;
}
.logo--pair img + img, .logo--pair img + .logo__initials { margin-left: -12px; outline: 3px solid var(--surface); }
.cert__badge img, .cert__badge .logo__initials { width: 44px; height: 44px; }

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.tl:first-child { padding-top: 0; }
.tl__period { color: var(--muted); padding-top: 12px; }
.tl__head { display: flex; align-items: center; gap: 16px; }
.tl__dur { display: block; margin-top: 6px; color: var(--text-2); }
.tl__points b { color: var(--text); font-weight: 500; }
.tl__stack { margin-top: 14px; }
.tl__title { font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.2; }
.tl__org { color: var(--accent-text); margin-top: 4px; font-size: 0.98rem; }
.tl__points { margin: 12px 0 0; padding: 0; list-style: none; color: var(--text-2); }
.tl__points li { position: relative; padding-left: 18px; margin-top: 6px; }
.tl__points li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1px; background: var(--muted); }
.tl--empty { color: var(--muted); }
@media (max-width: 640px) { .tl { grid-template-columns: 1fr; gap: 10px; } .tl__period { padding-top: 0; } }

/* ==========================================================================
   Certificates
   ========================================================================== */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.certs.is-collapsed .cert--extra { display: none; }
.certs__more { margin-top: 20px; }
.cert {
  position: relative;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
a.cert:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.cert__badge { margin-bottom: 10px; }
.cert__title { font-size: 1.12rem; font-weight: 500; line-height: 1.3; }
.cert__issuer { color: var(--text-2); font-size: 0.92rem; }
.cert__meta { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.cert__verify { margin-left: auto; color: var(--accent-text); opacity: 0.7; transition: opacity 0.2s; }
a.cert:hover .cert__verify { opacity: 1; }
.cert__title { text-wrap: balance; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; border: 1px solid var(--line); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c2); }
.status--done::before { background: var(--c1); }
.progressbar { height: 3px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 12px; }
.progressbar span { display: block; height: 100%; width: 0; background: var(--c2); transition: width 1.4s var(--ease); }
.is-visible .progressbar span { width: var(--p, 80%); }

/* ==========================================================================
   Contact + footer
   ========================================================================== */
.contact { padding: clamp(110px, 16vw, 200px) 0 clamp(70px, 10vw, 120px); }
.contact__title {
  margin-top: 24px;
  font-size: clamp(2.4rem, 8vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.contact__title em { color: var(--accent-text); }
.contact__links { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); column-gap: 40px; }
.contact__link { border-top: 1px solid var(--line); }
.contact__link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  transition: color 0.2s, padding 0.3s var(--ease);
}
.contact__link > span:last-child { transition: transform 0.3s var(--ease); }
.contact__link:hover { color: var(--accent-text); padding-left: 14px; }
.contact__link:hover > span:last-child { transform: translate(4px, -4px); }
.contact__link small { display: block; font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--text-2); }

/* ==========================================================================
   Reveal
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .draw { stroke-dashoffset: 0; }
}

/* ==========================================================================
   Print — "Save as PDF" produces a clean one-column resume
   ========================================================================== */
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  :root { --bg: #fff; --surface: #fff; --surface-2: #f1f1f1; --text: #111; --text-2: #333; --muted: #666; --line: #ddd; --line-strong: #bbb; --accent-text: #111; --accent: #e8ff9a; --accent-ink: #111; color-scheme: light; }
  html { font-size: 9.5pt; }
  body { background: #fff; }
  body::before, .progress, .nav, .hero__canvas, .hero__cta, .section__note, .tabs, .card__arrow, .card__visual, .card--more,
  .contact__title, .about__photo, .stats, .certs__more, .footer, .eyebrow, .card .tags { display: none !important; }
  .wrap { width: 100%; }
  .reveal { opacity: 1 !important; transform: none !important; }

  /* header */
  .hero { min-height: 0; padding: 0 0 8pt; display: block; }
  .hero::after { display: none; }
  .hero__name { font-size: 26pt; margin-top: 0; line-height: 1; letter-spacing: -0.03em; }
  .hero__name span { display: inline; }
  .hero__last { padding-left: 0; }
  .hero__last em { font-size: 1em; color: #111; }
  .hero__role { margin-top: 4pt; font-size: 9pt; letter-spacing: 0.08em; }
  .hero__lead { max-width: none; font-size: 11pt; margin-top: 6pt; }
  .hero__print-contacts { display: block; margin-top: 6pt; font-family: var(--f-mono); font-size: 8.5pt; color: #333; }
  .glance { margin-top: 10pt; backdrop-filter: none; border-radius: 6pt; grid-template-columns: repeat(5, 1fr); }
  .glance > div { padding: 6pt 8pt; }
  .glance dd { font-size: 8.5pt; margin-top: 2pt; }

  /* sections */
  .section { padding-top: 11pt; }
  .section__head { margin-bottom: 8pt; padding-bottom: 4pt; break-after: avoid; }
  .section__head h2 { font-size: 14pt; }
  .section__index { display: none; }
  .about { display: block; }
  .prose p { margin: 0 0 4pt; font-size: 9.5pt; line-height: 1.45; }
  .langs { margin-top: 6pt; }

  .skills { gap: 3pt; min-height: 0; }
  .skill { padding: 1pt 6pt; gap: 4pt; animation: none !important; opacity: 1 !important; transform: none !important; font-size: 8pt; }
  .skill__used { display: none; }

  .projects { gap: 8pt; grid-template-columns: 1fr 1fr; }
  .card { min-height: 0; break-inside: avoid; padding: 8pt 10pt; transform: none !important; }
  .card__title { font-size: 12pt; margin-top: 2pt; }
  .card__desc { font-size: 9pt; margin-top: 4pt; }
  .metrics { margin-top: 6pt; }

  .tl { padding: 6pt 0; gap: 10pt; grid-template-columns: 100pt minmax(0, 1fr); break-inside: avoid; }
  .tl__period { padding-top: 2pt; font-size: 8pt; }
  .tl__title { font-size: 12pt; }
  .tl__points { margin-top: 4pt; font-size: 9pt; line-height: 1.4; }
  .tl__points li { margin-top: 2pt; }
  .tl__stack { margin-top: 5pt; }
  .tags li { font-size: 7.5pt; padding: 1pt 5pt; }
  .logo img, .logo__initials { width: 28pt !important; height: 28pt !important; border-radius: 6pt; box-shadow: none; }
  .tl__head { gap: 8pt; }

  .certs { grid-template-columns: 1fr 1fr; gap: 0 14pt; }
  .certs.is-collapsed .cert--extra { display: flex; }
  .cert { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2pt 8pt; padding: 2.5pt 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; break-inside: avoid; }
  .cert__badge { margin: 0; }
  .cert__badge img, .cert__badge .logo__initials { width: 18pt !important; height: 18pt !important; border-radius: 4pt; }
  .logo--pair img + img { margin-left: -6pt; outline-width: 2px; }
  .cert__title { font-size: 9pt; flex: 1; }
  .cert__issuer { display: none; }
  .cert__meta { padding: 0; margin: 0; font-size: 7.5pt; }
  .cert__meta .status--done, .cert__verify, .progressbar { display: none; }
  .cert__meta .status { padding: 0 5pt; font-size: 7pt; }

  .contact { display: none !important; }
  .contact .eyebrow { display: block; border: 0; padding: 0; background: none; }
  .contact__links { margin-top: 4pt; }
  .contact__link { padding: 4pt 0; font-size: 10pt; }
  a[href^="http"]::after { content: none; }
  .contact__link::after, .card::after { content: none !important; }
}
