/* ==========================================================================
   Andra · V3
   Dark charcoal-violet with lavender, carried over from the andravall GitHub
   profile. Rich in details, restrained in composition: Space Grotesk for text,
   wide Archivo for uppercase display, and JetBrains Mono for small labels.
   ========================================================================== */

:root {
  --bg: #0e0d12;
  --bg-2: #121118;
  --panel: #16151d;
  --panel-2: #1c1b25;
  --line: rgba(213, 202, 255, 0.08);
  --line-2: rgba(213, 202, 255, 0.14);
  --line-3: rgba(213, 202, 255, 0.26);
  --text: #efecf5;
  --text-2: #bab5c9;
  --text-3: #8b8699;
  --lav: #a68cff;
  --lav-2: #d5caff;
  --lav-soft: rgba(166, 140, 255, 0.12);

  /* Type system: three families, each with one job.
     Space Grotesk  all text: 400 body at 13 / 14 / 15 / 16 / 17px, 500–600 titles.
     Archivo        uppercase display only, as on the GitHub profile:
                    wght 820 / wdth 125 (section titles, the surname),
                    330 / 125 (first names), 520 / 125 (roles), 640 / 112 (sub-titles).
     JetBrains Mono Medium 11px labels and 12px metadata, chips; Bold for index numbers. */
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 64px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --dots: radial-gradient(rgba(213, 202, 255, 0.075) 1px, transparent 1.2px) 0 0 / 18px 18px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--lav); color: var(--bg); }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--lav); color: var(--bg); border-radius: 8px;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* shared label style */
.label, .eyebrow, .sec-title .n, .facts dt, .kind, .meta, .when, .place, .cert-type, .date, .foot, .lang button, .nav-links .n, .menu .n, .status, .handle, .group-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.nav.is-scrolled {
  background: rgba(14, 13, 18, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav-inner {
  height: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-variation-settings: "wdth" 112; font-size: 16px; letter-spacing: 0.01em; }
.brand-mark { width: 30px; height: 14px; fill: none; stroke: var(--lav); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark path { stroke-dasharray: 60; animation: draw 2.4s var(--ease) 0.2s both; }
@keyframes draw { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.25s, background-color 0.25s;
}
.nav-links .n { color: var(--text-3); font-size: 11px; transition: color 0.25s; }
.nav-links a:hover { color: var(--text); background: var(--panel); }
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a[aria-current="true"] .n { color: var(--lav); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 3px;
  height: 1px;
  background: var(--lav);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }

.nav-tools { display: flex; align-items: center; gap: 8px; }
.lang {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
}
.lang button {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 26px;
  border-radius: 6px;
  color: var(--text-3);
  transition: color 0.25s;
}
.lang button[aria-pressed="true"] { color: var(--text); }
.lang button:hover { color: var(--text); }
.lang-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 34px; height: 26px;
  border-radius: 6px;
  background: var(--lav-soft);
  box-shadow: inset 0 0 0 1px rgba(166, 140, 255, 0.35);
  transition: transform 0.35s var(--ease);
}
.lang[data-active="id"] .lang-thumb { transform: translateX(34px); }

.menu-btn {
  display: none;
  width: 38px; height: 34px;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 9px;
}
.menu-lines { display: grid; gap: 5px; width: 15px; }
.menu-lines i { display: block; height: 1.5px; background: currentColor; transition: transform 0.4s var(--ease); }
.menu-btn[aria-expanded="true"] .menu-lines i:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-lines i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 40;
  padding: 24px var(--gutter);
  background: var(--bg);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; transform: none; }
.menu nav { display: grid; }
.menu a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 26px;
  font-weight: 500;
  font-variation-settings: "wdth" 112;
}
.menu .n { color: var(--lav); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(28px, 6vh, 64px)) 0 clamp(40px, 7vh, 72px);
  background:
    radial-gradient(60% 50% at 78% 40%, rgba(166, 140, 255, 0.07), transparent 70%),
    var(--bg);
  overflow: hidden;
}
.hero::before {
  /* dot texture, faded toward the edges */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dots);
  -webkit-mask: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 85%);
  mask: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 85%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  text-transform: uppercase;
}
.pulse { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--lav); }
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--lav);
  animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.9; } 80%, 100% { transform: scale(1.8); opacity: 0; } }

.hero-name {
  margin-top: 22px;
  font-weight: 600;
  font-variation-settings: "wdth" 112;
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-aka {
  margin-top: 14px;
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--text-2);
  font-variation-settings: "wdth" 100;
}
.hero-aka .mono { font-size: 0.68em; color: var(--lav-2); margin-right: 6px; letter-spacing: 0.06em; }
.hero-roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 26px;
  font-size: 17px;
  font-weight: 500;
}
.role-sep { width: 40px; height: 12px; fill: none; stroke: var(--lav); stroke-width: 1.4; stroke-linejoin: round; }
.hero-intro { margin-top: 18px; max-width: 46ch; color: var(--text-2); font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 32px; }

.btn-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  transition: border-color 0.3s, background-color 0.3s;
}
.btn-line svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s var(--ease); }
.btn-line::before {
  /* a short highlight that sweeps along the top edge on hover */
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 40%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--lav-2), transparent);
  transform: translateX(-120%);
}
.btn-line:hover { border-color: rgba(166, 140, 255, 0.6); background: var(--lav-soft); }
.btn-line:hover svg { transform: translateX(3px); }
.btn-line:hover::before { animation: sweep 1.1s var(--ease); }
@keyframes sweep { to { transform: translateX(260%); } }
.btn-text {
  font-size: 15px;
  color: var(--text-2);
  background: linear-gradient(var(--lav), var(--lav)) left 100% / 0 1px no-repeat;
  transition: color 0.3s, background-size 0.4s var(--ease);
  padding-bottom: 2px;
}
.btn-text:hover { color: var(--text); background-size: 100% 1px; }

/* portrait panel */
.hero-figure { justify-self: end; width: 100%; max-width: 440px; }
.figure-panel {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(70% 55% at 50% 62%, rgba(166, 140, 255, 0.16), transparent 70%),
    var(--dots),
    var(--panel);
  overflow: hidden;
  isolation: isolate;
}
.orbits {
  position: absolute;
  left: 50%; top: 34%;
  width: 118%;
  translate: -50% -50%;
  fill: none;
  pointer-events: none;
  z-index: 0;
}
.orbits circle { stroke: var(--line-3); stroke-width: 1; transform-origin: 200px 200px; }
.orbits .o1 { stroke: var(--line-2); }
.orbits .o2 { stroke-dasharray: 2 7; animation: spin 80s linear infinite; }
.orbits .o3 { stroke-dasharray: 46 14; stroke: rgba(166, 140, 255, 0.35); animation: spin 120s linear infinite reverse; }
.orbits .o-dot { fill: var(--lav); stroke: none; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.portrait {
  position: absolute;
  left: 50%; bottom: 0;
  width: 100%;
  height: auto;
  translate: -50% 0;
  z-index: 1;
  -webkit-mask: linear-gradient(to bottom, #000 78%, transparent 99%);
  mask: linear-gradient(to bottom, #000 78%, transparent 99%);
  will-change: transform;
}
.scan {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 70px;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, rgba(166, 140, 255, 0.07) 85%, rgba(213, 202, 255, 0.55) 100%);
  border-bottom: 1px solid rgba(213, 202, 255, 0.0);
  transform: translateY(-80px);
  animation: scan 7s var(--ease) 1.2s infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}
.scan::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--lav-2); opacity: 0.7; }
@keyframes scan {
  0% { transform: translateY(-80px); opacity: 0; }
  6% { opacity: 1; }
  45% { transform: translateY(calc(100cqh + 10px)); opacity: 1; }
  50%, 100% { transform: translateY(calc(100cqh + 10px)); opacity: 0; }
}
.figure-panel { container-type: size; }
.wave {
  position: absolute;
  left: 0; right: 0; bottom: 22px;
  width: 100%; height: 56px;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
}
.wave path { fill: none; stroke: var(--lav-2); stroke-width: 1.3; stroke-linecap: round; }
.wave .noise { stroke: var(--text-3); stroke-width: 1; opacity: 0.7; }
.corner { position: absolute; z-index: 4; width: 10px; height: 10px; }
.corner::before, .corner::after { content: ""; position: absolute; background: var(--line-3); }
.corner::before { left: 4.5px; top: 0; width: 1px; height: 10px; }
.corner::after { top: 4.5px; left: 0; height: 1px; width: 10px; }
.corner.tl { top: 12px; left: 12px; }
.corner.tr { top: 12px; right: 12px; }
.corner.bl { bottom: 12px; left: 12px; }
.corner.br { bottom: 12px; right: 12px; }

/* entrance */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- sections ---------- */
.section { position: relative; padding-block: clamp(64px, 8vw, 96px); border-top: 1px solid var(--line); }
.section::before {
  /* small tick ruler on the section edge, echoing the profile's channel strips */
  content: "";
  position: absolute;
  top: -1px; left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  width: 120px; height: 7px;
  background: repeating-linear-gradient(90deg, var(--line-3) 0 1px, transparent 1px 8px);
}
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 32px;
  margin-bottom: 32px;
}
.sec-title {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 600;
  font-variation-settings: "wdth" 112;
  font-size: clamp(22px, 2.3vw, 28px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
}
.sec-title .n { color: var(--lav); font-size: 12px; letter-spacing: 0.06em; }
.sec-note { max-width: 44ch; color: var(--text-3); font-size: 15px; }
.sub-title {
  margin: 56px 0 18px;
  font-weight: 600;
  font-size: 13px;
  font-variation-settings: "wdth" 112;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 14px;
}
.sub-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* about */
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px 48px; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--text); max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.facts dt { color: var(--text-3); text-transform: uppercase; }
.facts dd { margin-top: 4px; font-size: 15px; color: var(--text-2); }

/* ---------- featured work ---------- */
.featured { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.35s, transform 0.5s var(--ease);
}
.card:nth-child(1), .card:nth-child(4) { grid-column: span 7; }
.card:nth-child(2), .card:nth-child(3) { grid-column: span 5; }
.card::before {
  /* cursor-following light, clipped by the card itself */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(166, 140, 255, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover { border-color: rgba(166, 140, 255, 0.42); }
.card:hover::before { opacity: 1; }
/* border trace: two lines draw along the top and bottom edges */
.trace { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.trace::before, .trace::after {
  content: "";
  position: absolute;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--lav-2) 50%, transparent);
  transform: scaleX(0);
  transition: transform 0.7s var(--ease);
}
.trace::before { top: -1px; left: 0; transform-origin: left; }
.trace::after { bottom: -1px; right: 0; transform-origin: right; }
.card:hover .trace::before, .card:hover .trace::after, .card:focus-visible .trace::before, .card:focus-visible .trace::after { transform: scaleX(1); }

.card-visual {
  position: relative;
  height: 236px;
  border-bottom: 1px solid var(--line);
  background: var(--dots), var(--bg-2);
  overflow: hidden;
}
.card-visual .pv { position: absolute; inset: 0; width: 100%; height: 100%; padding: 10px; }
.status {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(14, 13, 18, 0.7);
  color: var(--text-2);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lav); }
.status.done::before { background: #7ad3a5; }
.card-body { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.kind { color: var(--text-3); text-transform: uppercase; }
.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 600;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.card-title svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease), stroke 0.3s; }
.card:hover .card-title svg { transform: translate(3px, -3px); stroke: var(--lav-2); }
.card-line { color: var(--text-2); font-size: 15px; max-width: 52ch; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.role { font-size: 14px; color: var(--text-2); }
.role b { font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 8px; }
.tech-row { display: flex; align-items: center; gap: 10px; }
.tech-row .ico { width: 18px; height: 18px; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--text-2); padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 6px; }
.anon-note { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; color: var(--text-3); text-transform: none; }
.anon-note::before { content: ""; width: 14px; height: 5px; border-radius: 1px; background: var(--text-3); }

/* project visual strokes */
.pv { overflow: visible; }
.pv .v-line { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-linecap: round; transition: stroke 0.4s; }
.pv .v-soft { fill: none; stroke: var(--line-3); stroke-width: 1.5; stroke-linecap: round; }
.pv .v-dim { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.pv .v-accent { fill: none; stroke: var(--lav); stroke-width: 2; stroke-linecap: round; }
.pv .v-fill { fill: var(--lav-soft); stroke: var(--lav); stroke-width: 1.5; }
.pv .v-band { fill: var(--lav-soft); }
.pv .v-play { fill: var(--lav); }
.pv .v-thick { stroke-width: 1.8; }
.pv .v-dash { stroke-dasharray: 6 6; }
.pv .v-move { transition: transform 0.7s var(--ease); }
.card:hover .pv .v-move { transform: translateY(-4px); }
.card:hover .pv .v-slow { transform: translateY(-2px) translateX(3px); }
.card:hover .pv .v-line { stroke: var(--text-2); }

/* icons from logo files, tinted as one set */
.ico {
  display: inline-block;
  width: 20px; height: 20px;
  flex: none;
  background: var(--text-2);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  transition: background-color 0.3s;
}

/* ---------- other projects ---------- */
.other { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 32px; }
.group-label { color: var(--text-3); text-transform: uppercase; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.o-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s;
}
.o-item .ico { width: 18px; height: 18px; margin-top: 3px; background: var(--text-3); }
.o-item .dotmark { width: 18px; height: 18px; margin-top: 3px; display: grid; place-items: center; }
.o-item .dotmark::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line-3); }
.o-name { font-weight: 600; font-size: 15px; font-variation-settings: "wdth" 100; transition: color 0.3s; }
.o-line { display: block; margin-top: 2px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.o-meta { display: block; margin-top: 6px; color: var(--text-3); font-family: var(--mono); font-size: 11px; }
.o-item:hover .o-name { color: var(--lav-2); }
.o-item:hover .ico { background: var(--lav-2); }
.o-anon { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--text-3); font-weight: 500; }

/* ---------- skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.s-group { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.s-group:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
.s-group .group-label { padding: 7px 0 0; border: 0; }
.chips { display: flex; flex-wrap: wrap; align-content: flex-start; align-self: start; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--panel);
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.3s, background-color 0.3s;
}
.chip .ico { width: 17px; height: 17px; }
.chip:hover { border-color: var(--line-3); background: var(--panel-2); }
.chip:hover .ico { background: var(--brand, var(--lav-2)); }

/* ---------- experience ---------- */
.exp-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 48px; align-items: start; }
.edu {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--dots), var(--panel);
  overflow: hidden;
}
.edu-orbit { position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; fill: none; pointer-events: none; }
.edu-orbit circle { stroke: var(--line-2); }
.edu-orbit .d { stroke: rgba(166, 140, 255, 0.35); stroke-dasharray: 30 10; transform-origin: 90px 90px; animation: spin 90s linear infinite; }
.edu .label { color: var(--text-3); text-transform: uppercase; }
.edu-degree { margin-top: 14px; font-size: 22px; font-weight: 600; font-variation-settings: "wdth" 112; line-height: 1.25; }
.edu-school { margin-top: 4px; color: var(--text); }
.edu-dept { margin-top: 2px; color: var(--text-3); font-size: 14px; }
.edu-period { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--lav-2); }
.edu-now { margin-top: 2px; font-size: 14px; color: var(--text-2); }
.training { margin-top: 16px; font-size: 14px; color: var(--text-3); }
.training b { display: block; font-family: var(--mono); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }

.rows-head { color: var(--text-3); text-transform: uppercase; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.when { color: var(--text-3); }
.row-what { font-weight: 500; font-size: 15px; }
.row-where { display: block; color: var(--text-2); font-size: 14px; }
.row-kind { font-family: var(--mono); font-size: 11px; color: var(--text-3); padding: 2px 7px; border: 1px solid var(--line-2); border-radius: 5px; }

.ruler { height: 7px; margin-top: 48px; background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 8px); -webkit-mask: linear-gradient(90deg, #000, transparent); mask: linear-gradient(90deg, #000, transparent); }

.rec-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 48px; align-items: start; }
.award-group + .award-group { margin-top: 24px; }
.award {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.place {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(166, 140, 255, 0.4);
  color: var(--lav-2);
  text-transform: uppercase;
  white-space: nowrap;
}
.award-title { font-weight: 500; font-size: 15px; }
.award-by { display: block; color: var(--text-3); font-size: 14px; }
.year { font-family: var(--mono); font-size: 12px; color: var(--text-3); }

.cert {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--panel);
  transition: border-color 0.3s;
}
.cert + .cert { margin-top: 12px; }
.cert:hover { border-color: var(--line-3); }
.cert-logo { width: 52px; height: 22px; margin-top: 0; background: var(--text-2); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; transition: background-color 0.3s; }
.cert:hover .cert-logo { background: var(--brand); }
.cert-title { margin: 0; font-weight: 600; font-size: 15px; font-variation-settings: "wdth" 100; line-height: 1.35; }
.cert-issuer { margin-top: 2px; color: var(--text-2); font-size: 14px; }
.cert-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; }
.cert-type { color: var(--lav-2); padding: 2px 7px; border: 1px solid rgba(166, 140, 255, 0.35); border-radius: 5px; }
.date { color: var(--text-3); }

/* ---------- contact & footer ---------- */
.contact { position: relative; padding-block: clamp(36px, 4.5vw, 52px); border-top: 1px solid var(--line); background: var(--dots), var(--bg-2); }
.contact-body { color: var(--text-2); font-size: 15px; }
.arrow { width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s var(--ease), stroke 0.3s; }
.contact-panel { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 2fr); gap: 16px; }
.c-mail { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); transition: border-color 0.3s; }
.c-mail:hover { border-color: rgba(166, 140, 255, 0.4); }
.c-mail .label { display: flex; align-items: center; gap: 8px; color: var(--text-3); text-transform: uppercase; }
.c-mail .label .ico { width: 15px; height: 15px; background: var(--lav-2); }
.c-mail-addr { font-size: clamp(19px, 1.8vw, 23px); font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; transition: color 0.3s; }
.c-mail-addr:hover { color: var(--lav-2); }
.c-mail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 4px; }
.c-mail-actions .copy { height: 40px; padding: 0 14px; font-size: 12px; }
.c-socials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.c-card { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; height: 100%; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); transition: border-color 0.3s, background-color 0.3s; }
.c-top { display: flex; justify-content: space-between; align-items: center; }
.c-idx { font-family: var(--mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.06em; }
.c-bottom { display: flex; align-items: center; gap: 12px; }
.c-bottom .ico { flex: none; width: 26px; height: 26px; background: var(--text-2); transition: background-color 0.3s; }
.c-label { display: block; font-size: 18px; font-weight: 600; }
.c-handle { display: block; margin-top: 2px; font-family: var(--mono); font-size: 12px; color: var(--lav-2); }
.c-card:hover { border-color: rgba(166, 140, 255, 0.4); background: var(--panel-2); }
.c-card:hover .ico { background: var(--brand); }
.c-card:hover .arrow { transform: translate(3px, -3px); stroke: var(--lav-2); }
@media (max-width: 980px) {
  .contact-panel { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .c-socials { grid-template-columns: 1fr; gap: 10px; }
  .c-card { flex-direction: row-reverse; align-items: center; min-height: 0; padding: 16px; }
  .c-top { gap: 14px; }
  .c-mail { padding: 20px; }
}
.copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  transition: color 0.3s, border-color 0.3s;
}
.copy:hover { color: var(--text); border-color: var(--line-3); }
.copy.is-done { color: var(--lav-2); border-color: rgba(166, 140, 255, 0.45); }

.foot { border-top: 1px solid var(--line); color: var(--text-3); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 22px; }
.clock time { color: var(--text-2); }
.to-top { transition: color 0.3s; }
.to-top:hover { color: var(--lav-2); }

/* ==========================================================================
   Detail page
   ========================================================================== */
.detail { padding: calc(var(--nav-h) + 40px) 0 72px; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 14px; margin-bottom: 32px; transition: color 0.3s; }
.back:hover { color: var(--text); }
.detail-head { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px 48px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.detail-title { margin-top: 10px; font-weight: 600; font-variation-settings: "wdth" 112; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.05; letter-spacing: -0.02em; }
.detail-line { margin-top: 14px; color: var(--text-2); font-size: 17px; max-width: 54ch; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.detail-meta dt { font-family: var(--mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.detail-meta dd { margin-top: 3px; font-size: 15px; }
.detail-visual { margin: 28px 0 8px; padding: 28px; min-height: 280px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--dots), var(--bg-2); overflow: hidden; position: relative; }
.detail-visual .pv { width: 100%; height: 100%; padding: 16px; }
.d-sec { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 12px 48px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.d-sec h2 { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lav-2); padding-top: 4px; }
.d-sec p { font-size: 16px; max-width: 62ch; color: var(--text); }
.d-list li { position: relative; padding: 8px 0 8px 20px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.d-list li:last-child { border-bottom: 0; }
.d-list li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 8px; height: 1px; background: var(--lav); }
.arch { padding: 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--dots), var(--panel); }
.arch-cap { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-family: var(--mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.arch-cap .mine { color: var(--lav-2); display: inline-flex; align-items: center; gap: 6px; }
.arch-cap .mine::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--lav); }
.arch-flow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 26px; }
.arch-layer { position: relative; display: grid; align-content: center; gap: 8px; }
.arch-layer > span { font-family: var(--mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.arch-layer:not(:last-child)::after { content: "→"; position: absolute; right: -19px; top: 50%; color: var(--text-3); font-size: 13px; }
.node { padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); }
.node b { display: block; font-size: 14px; font-weight: 600; }
.node small { display: block; font-size: 12px; color: var(--text-3); }
.node.mine { border-color: var(--lav); background: var(--lav-soft); }
.node.pending { border-style: dashed; background: transparent; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 40px; padding: 22px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); transition: border-color 0.3s; }
.next small { font-family: var(--mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.next strong { display: block; margin-top: 4px; font-size: 20px; font-weight: 600; font-variation-settings: "wdth" 112; }
.next svg { width: 20px; height: 20px; fill: none; stroke: var(--text-3); stroke-width: 1.6; transition: transform 0.4s var(--ease), stroke 0.3s; }
.next:hover { border-color: rgba(166, 140, 255, 0.42); }
.next:hover svg { transform: translateX(4px); stroke: var(--lav-2); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .card:nth-child(n) { grid-column: span 6; }
  .other { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .s-group:nth-last-child(-n + 2) { border-bottom: 0; }
  .s-group:last-child { border-bottom: 1px solid var(--line); }
  .exp-grid, .rec-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  .nav-links { display: none; }
  .nav-tools { margin-left: auto; }
  .menu-btn { display: grid; }

  .hero { padding-bottom: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-figure { justify-self: center; max-width: 360px; }
  .hero-name { font-size: clamp(34px, 10vw, 48px); }

  .split { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 12px; }
  .card:nth-child(n) { grid-column: 1 / -1; }
  .card-visual { height: 170px; }
  .other { grid-template-columns: 1fr; gap: 24px; }
  .s-group { grid-template-columns: 1fr; gap: 8px; }
  .s-group .group-label { padding-top: 0; }
  .row { grid-template-columns: 1fr auto; }
  .row .when { grid-column: 1 / -1; }
  .award { grid-template-columns: 70px minmax(0, 1fr); }
  .award .year { grid-column: 2; }

  .detail-head, .d-sec { grid-template-columns: 1fr; }
  .detail-visual { padding: 16px; min-height: 0; }
  .arch-flow { grid-auto-flow: row; gap: 22px; }
  .arch-layer:not(:last-child)::after { content: "↓"; right: auto; left: 2px; top: auto; bottom: -19px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .scan { display: none; }
}

/* ==========================================================================
   V4 additions
   ========================================================================== */

/* hero name spotlight: a lavender copy of the name revealed under the cursor */
.hero-name { position: relative; }
.name-glow {
  position: absolute;
  inset: 0;
  color: var(--lav-2);
  pointer-events: none;
  opacity: var(--so, 0);
  -webkit-mask: radial-gradient(150px circle at var(--sx, -999px) var(--sy, -999px), #000 0%, rgba(0, 0, 0, 0.55) 35%, transparent 70%);
  mask: radial-gradient(150px circle at var(--sx, -999px) var(--sy, -999px), #000 0%, rgba(0, 0, 0, 0.55) 35%, transparent 70%);
  text-shadow: 0 0 22px rgba(166, 140, 255, 0.35);
}
.hero-name::after {
  /* a measuring ruler under the name */
  content: "";
  display: block;
  margin-top: 18px;
  width: min(100%, 420px);
  height: 7px;
  background: repeating-linear-gradient(90deg, var(--line-3) 0 1px, transparent 1px 8px);
  -webkit-mask: linear-gradient(90deg, #000 60%, transparent);
  mask: linear-gradient(90deg, #000 60%, transparent);
}
.hero-roles { margin-top: 18px; }
.panel-grid {
  position: absolute;
  inset: -20px;
  z-index: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px;
  -webkit-mask: radial-gradient(75% 60% at 50% 40%, #000, transparent 80%);
  mask: radial-gradient(75% 60% at 50% 40%, #000, transparent 80%);
  pointer-events: none;
}

/* ---------- featured showcases ---------- */
.showcases { display: grid; gap: 22px; }
.show {
  --mx: 50%; --my: 50%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.35s;
}
.show.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.show.flip .show-visual { order: 2; border-right: 0; border-left: 1px solid var(--line); }
.show::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(166, 140, 255, 0.07), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.show:hover { border-color: rgba(166, 140, 255, 0.36); }
.show:hover::before { opacity: 1; }
.show:hover .trace::before, .show:hover .trace::after, .cert:hover .trace::before, .cert:hover .trace::after { transform: scaleX(1); }
.show-visual {
  position: relative;
  min-height: 340px;
  border-right: 1px solid var(--line);
  background: var(--dots), var(--bg-2);
  display: grid;
  align-content: center;
  padding: 34px 26px 40px;
}
.show-canvas { position: relative; }
.show-caption { position: absolute; left: 24px; bottom: 14px; font-family: var(--mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.06em; }
.show-body { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 30px 30px 30px; }
.show-title { font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; font-variation-settings: "wdth" 112; letter-spacing: -0.01em; line-height: 1.12; }
.show .status { position: static; }
.status.proposal::before { background: var(--lav); box-shadow: 0 0 0 3px rgba(166, 140, 255, 0.18); }
.show-line { color: var(--text-2); font-size: 15px; }
.show-points { display: grid; gap: 6px; margin: 4px 0 6px; }
.show-points li { position: relative; padding-left: 18px; font-size: 14px; color: var(--text-2); }
.show-points li::before { content: ""; position: absolute; left: 1px; top: 10px; width: 8px; height: 1px; background: var(--lav); }
.show-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; width: 100%; padding-top: 12px; margin-top: auto; border-top: 1px solid var(--line); }
.show .btn-line { margin-top: 10px; }

/* tooltips on tech icons */
.tip { position: relative; display: inline-grid; }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  translate: -50% 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, translate 0.25s var(--ease);
}
.tip:hover::after { opacity: 1; translate: -50% 0; }
.tip:hover .ico { background: var(--brand, var(--lav-2)); }

/* forecast chart */
.fc { width: 100%; height: auto; overflow: visible; }
.fc-grid line { stroke: var(--line); }
.fc-grid .tick { stroke: var(--line-2); }
.fc-grid .tick.major { stroke: var(--line-3); }
.fc-hist { fill: none; stroke: var(--text-2); stroke-width: 1.6; stroke-linejoin: round; }
.fc-band { fill: rgba(166, 140, 255, 0.1); }
.fc-a { fill: none; stroke: var(--lav-2); stroke-width: 1.3; stroke-dasharray: 4 5; opacity: 0.8; }
.fc-b { fill: none; stroke: var(--text-3); stroke-width: 1.3; stroke-dasharray: 2 4; }
.fc-e { fill: none; stroke: var(--lav); stroke-width: 2.2; stroke-linecap: round; }
.fc-origin { stroke: var(--line-3); stroke-dasharray: 3 5; }
.fc-label { fill: var(--text-3); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; }
.fc-label.accent { fill: var(--lav-2); }
.fc-scrub { transition: opacity 0.4s; }
.fc-scrub line { stroke: var(--lav-2); stroke-width: 1; opacity: 0.55; }
.fc-scrub .dot-a { fill: var(--bg-2); stroke: var(--lav-2); stroke-width: 1.4; }
.fc-scrub .dot-b { fill: var(--bg-2); stroke: var(--text-3); stroke-width: 1.4; }
.fc-scrub .dot-e { fill: var(--lav); stroke: var(--bg-2); stroke-width: 1.5; }
.fc-tag { fill: var(--lav-2); font-family: var(--mono); font-size: 11px; }
.fc-legend { display: flex; gap: 14px; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }

/* bot flow: stepper + a generic chat preview */
.flow { --p: 0; position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.flow::before, .flow::after { content: ""; position: absolute; top: 13px; left: 10%; height: 1px; }
.flow::before { right: 10%; background: var(--line-2); }
.flow::after { width: calc(80% * var(--p)); background: var(--lav); transition: width 0.6s var(--ease); }
.flow-step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; width: 100%; padding: 0; }
.flow-n { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line-3); border-radius: 50%; background: var(--panel); font-family: var(--mono); font-size: 11px; color: var(--text-3); transition: border-color 0.3s, background-color 0.3s, color 0.3s; }
.flow-name { font-size: 12px; font-weight: 560; color: var(--text-3); transition: color 0.3s; }
.flow-step:hover .flow-name { color: var(--text-2); }
.flow-step.is-past .flow-n { border-color: var(--lav); color: var(--lav-2); }
.flow-step.is-on .flow-n { border-color: var(--lav); background: var(--lav); color: var(--bg); box-shadow: 0 0 0 4px rgba(166, 140, 255, 0.16); }
.flow-step.is-on .flow-name { color: var(--text); }
.flow-mock { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.fm-head { display: flex; align-items: center; gap: 8px; }
.fm-avatar { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lav); color: var(--bg); font-size: 11px; font-weight: 720; }
.fm-name { font-size: 13px; font-weight: 620; }
.fm-tag { padding: 0 5px; border-radius: 4px; background: var(--lav-soft); font-family: var(--mono); font-size: 11px; line-height: 16px; color: var(--lav-2); }
.fm-body { display: grid; gap: 8px; height: 112px; overflow: hidden; margin-top: 8px; padding-left: 30px; align-content: start; animation: fm-in 0.45s var(--ease); }
@keyframes fm-in { from { opacity: 0; transform: translateY(6px); } }
.fm-embed { display: grid; gap: 1px; padding: 6px 10px; line-height: 1.45; border-left: 2px solid var(--lav); border-radius: 4px; background: rgba(255, 255, 255, 0.025); font-size: 13px; }
.fm-embed b { font-weight: 620; }
.fm-row { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); }
.fm-row small { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.fm-btns { display: flex; gap: 6px; }
.fm-btn { justify-self: start; padding: 2px 9px; border: 1px solid var(--line-3); border-radius: 6px; font-size: 12px; color: var(--text-2); }
.fm-btn.is-primary { border-color: var(--lav); background: var(--lav); color: var(--bg); font-weight: 620; }
.fm-select { display: grid; max-width: 240px; border: 1px solid var(--line-3); border-radius: 8px; overflow: hidden; font-size: 13px; }
.fm-select-head { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; border-bottom: 1px solid var(--line-2); color: var(--text-2); }
.fm-select-head svg { width: 12px; height: 12px; fill: none; stroke: var(--text-3); stroke-width: 1.5; transform: rotate(180deg); }
.fm-opt { padding: 3px 10px; color: var(--text-3); }
.fm-opt.is-on { background: var(--lav-soft); color: var(--text); }
.fm-system { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px dashed var(--line-3); border-radius: 8px; font-size: 13px; }
.fm-system b { display: block; font-weight: 620; }
.fm-system small { display: block; color: var(--text-3); font-size: 12px; }
.fm-hash { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--lav-soft); color: var(--lav-2); font-family: var(--mono); font-size: 12px; }
.fm-system.is-closed { border-style: solid; opacity: 0.85; }
.fm-done { margin-left: auto; padding: 1px 7px; border: 1px solid rgba(124, 214, 160, 0.4); border-radius: 5px; font-family: var(--mono); font-size: 11px; color: #9fe0b8; }

/* ---------- archive ---------- */
.archive { margin-top: 64px; }
.archive-head { display: grid; gap: 8px; }
.archive-head .sub-title { margin: 0; }
.archive-head .sec-note { max-width: 60ch; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 24px 0 0; border-bottom: 1px solid var(--line-2); }
.arc-tabs { display: flex; flex-wrap: wrap; gap: 2px 22px; }
.arc-tab { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 10px 0 12px; font-size: 14px; color: var(--text-3); transition: color 0.25s; }
.arc-tab .n { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.arc-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--lav); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.arc-tab:hover { color: var(--text); }
.arc-tab[aria-pressed="true"] { color: var(--text); }
.arc-tab[aria-pressed="true"] .n { color: var(--lav-2); }
.arc-tab[aria-pressed="true"]::after { transform: scaleX(1); }
.arc-selects { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 10px; }
.arc-select { position: relative; display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel); transition: border-color 0.25s; }
.arc-select:hover, .arc-select:focus-within { border-color: var(--line-3); }
.arc-select.is-set { border-color: rgba(166, 140, 255, 0.55); background: var(--lav-soft); }
.arc-select-label { padding-left: 11px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); pointer-events: none; }
.arc-select select { height: 100%; padding: 0 30px 0 8px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; -webkit-appearance: none; appearance: none; cursor: pointer; outline: none; }
.arc-select select option { background: var(--panel); color: var(--text); }
.arc-select svg { position: absolute; right: 10px; width: 12px; height: 12px; fill: none; stroke: var(--text-3); stroke-width: 1.5; pointer-events: none; }
.arc-reset { height: 34px; padding: 0 10px; font-size: 13px; color: var(--lav-2); }
.arc-reset:hover { color: var(--text); }
.arc-list { margin-top: 4px; }
.arc-row {
  display: grid;
  grid-template-columns: 64px 26px minmax(0, 1fr) minmax(0, 220px) 120px;
  gap: 4px 16px;
  align-items: start;
  padding: 13px 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  transition: background-color 0.25s;
}
.arc-row:hover { background: var(--panel); }
.arc-row:hover .arc-name { color: var(--lav-2); }
.arc-row:hover .ico { background: var(--brand, var(--lav-2)); }
.arc-sem { font-family: var(--mono); font-size: 12px; color: var(--lav-2); }
.arc-sem small { display: block; font-size: 11px; color: var(--text-3); }
.arc-icon { padding-top: 2px; }
.arc-icon .ico { width: 17px; height: 17px; background: var(--text-3); }
.dotmark { display: grid; place-items: center; width: 17px; height: 17px; }
.dotmark::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line-3); }
.arc-name { font-weight: 600; font-size: 15px; font-variation-settings: "wdth" 100; transition: color 0.25s; }
.arc-line { display: block; margin-top: 2px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.arc-meta { display: grid; gap: 2px; font-size: 13px; }
.arc-course { color: var(--text); }
.arc-how { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.arc-field { justify-self: end; font-family: var(--mono); font-size: 11px; color: var(--text-3); padding: 2px 7px; border: 1px solid var(--line-2); border-radius: 5px; white-space: nowrap; }
.arc-empty { padding: 20px 8px; color: var(--text-3); }
.arc-more { margin-top: 16px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 9px; font-size: 14px; color: var(--text-2); transition: border-color 0.3s, color 0.3s; }
.arc-more:hover { color: var(--text); border-color: rgba(166, 140, 255, 0.5); }
.arc-more .mono { font-size: 11px; color: var(--text-3); }
/* archive rows: one baseline across columns, icon tiles, tags in a fixed column */
.arc-row { grid-template-columns: 60px 34px minmax(0, 1fr) 260px 128px; gap: 4px 18px; align-items: baseline; padding: 16px 8px; }
.arc-sem { font-size: 12px; }
.arc-icon { align-self: start; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel); transition: border-color 0.25s; }
.arc-icon .ico { width: 17px; height: 17px; background: var(--text-2); }
.arc-row:hover .arc-icon { border-color: var(--line-3); }
.arc-row:hover .arc-icon.generic .ico { background: var(--lav-2); }
.arc-anon { display: inline-block; margin-left: 10px; padding: 1px 6px; vertical-align: 2px; border: 1px dashed var(--line-3); border-radius: 5px; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--text-3); }
.arc-meta { display: grid; gap: 3px; min-width: 0; }
.arc-course { color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arc-how { font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--text-3); }
.arc-field { justify-self: start; }

/* ---------- skills: 7 channels ---------- */
.skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.s-group { grid-template-columns: 1fr; gap: 12px; padding: 18px 0; }
.s-group .group-label { display: flex; align-items: baseline; gap: 10px; padding: 0; }
.s-group .ch { color: var(--lav); }
.s-group .cnt { margin-left: auto; color: var(--text-3); }
.chip { position: relative; overflow: hidden; }
.chip::after {
  /* border trace along the bottom edge */
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--lav-2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease);
}
.chip:hover::after { transform: translateX(100%); }
.chip.generic .ico { background: var(--text-3); }
/* one row per channel: label on the left, chips on an even grid */
.skills-grid { grid-template-columns: minmax(0, 1fr); gap: 0; border-bottom: 1px solid var(--line); }
.s-group, .s-group:nth-last-child(-n + 2) { grid-template-columns: 172px minmax(0, 1fr); gap: 28px; align-items: start; padding: 20px 0; border-bottom: 0; }
.s-group .group-label { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 6px 10px; padding-top: 8px; }
.s-group .cnt { justify-self: end; }
.s-group .g-name { grid-column: 1 / -1; color: var(--text-2); }
.s-group .chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1180px) { .s-group .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 980px) { .s-group .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.s-group .chip { display: flex; min-width: 0; }
.s-group .chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- education & recognition ---------- */
.edu-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.its-logo { width: 92px; height: auto; filter: grayscale(1) brightness(2.4) contrast(0.9); opacity: 0.88; transition: filter 0.4s, opacity 0.4s; }
.edu:hover .its-logo { filter: none; opacity: 1; }
.edu-school { margin-top: 18px; font-size: 22px; font-weight: 600; font-variation-settings: "wdth" 112; line-height: 1.25; }
.edu-degree { margin-top: 4px; font-size: 16px; font-weight: 500; color: var(--text); }

.rec-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
.award-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.award-groups .award-group + .award-group { margin-top: 0; }
.award-group { display: flex; flex-direction: column; padding: 20px 22px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--dots), var(--panel); }
.certs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.certs .cert + .cert { margin-top: 0; }
.cert-col .rows-head { margin-bottom: 14px; }
/* education + organisations + training in one card */
.exp-grid { display: block; }
.journey { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 16px; background: var(--dots), var(--panel); }
.j-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px 28px; padding: 26px 28px; border-bottom: 1px solid var(--line-2); }
.j-head .its-logo { width: 84px; }
.journey:hover .its-logo { filter: none; opacity: 1; }
.j-id .label { color: var(--text-3); text-transform: uppercase; }
.j-head .edu-school { margin-top: 6px; font-size: 22px; }
.j-head .edu-degree { margin-top: 2px; }
.j-status { position: relative; z-index: 1; justify-self: end; text-align: right; padding: 12px 16px; border: 1px solid rgba(166, 140, 255, 0.3); border-radius: 10px; background: rgba(14, 13, 18, 0.6); }
.j-status .edu-period { margin-top: 0; }
.j-status .edu-now { margin-top: 4px; }
.j-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.j-col { padding: 22px 28px 26px; }
.j-col + .j-col { border-left: 1px solid var(--line-2); }
.j-label { margin-bottom: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.j-line { position: relative; display: grid; gap: 18px; padding-left: 22px; }
.j-line::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.j-item { position: relative; }
.j-item::before { content: ""; position: absolute; left: -22px; top: 4px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--lav); background: var(--panel); }
.j-item:first-child::before { background: var(--lav); }
.j-when { font-family: var(--mono); font-size: 11px; color: var(--lav-2); }
.j-what { margin-top: 3px; font-weight: 600; font-size: 15px; line-height: 1.35; }
.j-where { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; font-size: 14px; color: var(--text-2); }
.j-train { display: grid; }
.j-train li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; color: var(--text); }
.j-train li:first-child { padding-top: 0; }
.j-train li:last-child { border-bottom: 0; }
.j-year { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
@media (max-width: 980px) {
  .j-head { grid-template-columns: auto minmax(0, 1fr); }
  .j-status { grid-column: 1 / -1; justify-self: stretch; text-align: left; }
}
@media (max-width: 760px) {
  .j-head { grid-template-columns: 1fr; padding: 20px; gap: 14px; }
  .j-head .its-logo { width: 72px; }
  .j-head .edu-school { font-size: 20px; }
  .j-body { grid-template-columns: 1fr; }
  .j-col { padding: 20px; }
  .j-col + .j-col { border-left: 0; border-top: 1px solid var(--line-2); }
}
.ag-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.ag-logo { width: 84px; height: auto; filter: grayscale(1) brightness(1.6); opacity: 0.9; transition: filter 0.4s; }
.award-group:hover .ag-logo { filter: none; }
.ag-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 50%; }
.ag-icon .ico { width: 18px; height: 18px; background: var(--lav-2); }
.award-group:hover .ag-icon .ico { animation: roll 1.2s var(--ease); }
@keyframes roll { to { transform: rotate(360deg); } }
.ag-title { display: block; font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; font-variation-settings: "wdth" 112; }
.ag-sub { display: block; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.award-group .award { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; }
.award-group .place { justify-self: stretch; text-align: center; }
.award-group .award:last-child { border-bottom: 0; }
.ag-also { margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--text-3); }
.cert { position: relative; overflow: hidden; }

@media (max-width: 980px) {
  .show, .show.flip { grid-template-columns: 1fr; }
  .show.flip .show-visual { order: 0; border-left: 0; }
  .show-visual { border-right: 0; border-bottom: 1px solid var(--line); }
  .rec-grid { grid-template-columns: 1fr; }
  .arc-row { grid-template-columns: 56px 34px minmax(0, 1fr) 190px; }
  .arc-field { display: none; }
}
@media (max-width: 760px) {
  .show-visual { min-height: 0; padding: 24px 16px 36px; }
  .show-body { padding: 22px 18px; }
  .flow-step:not(.is-on) .flow-name { visibility: hidden; }
  .fm-body { padding-left: 0; }
  .s-group, .s-group:nth-last-child(-n + 2) { grid-template-columns: 1fr; gap: 12px; padding: 18px 0; }
  .s-group .group-label { grid-template-columns: auto 1fr auto; padding-top: 0; }
  .s-group .g-name { grid-column: auto; order: 2; }
  .s-group .cnt { order: 3; }
  .s-group .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s-group .chip { height: auto; min-height: 34px; padding: 6px 10px 6px 9px; font-size: 14px; line-height: 1.25; }
  .s-group .chip span { white-space: normal; }
  .award-groups, .certs { grid-template-columns: 1fr; }
  .award-group { padding: 16px; }
  .award-group .award { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
  .filters { display: grid; border-bottom: 0; gap: 14px; }
  .arc-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-2); margin: 0 -16px; padding: 0 16px; }
  .arc-tab { flex: none; }
  .arc-selects { display: grid; grid-template-columns: 1fr 1fr; padding-bottom: 0; }
  .arc-select select { flex: 1; min-width: 0; }
  .arc-reset { grid-column: 1 / -1; justify-self: start; height: auto; padding: 0; }
  .arc-list { border-top: 1px solid var(--line-2); }
  .arc-row { grid-template-columns: 34px minmax(0, 1fr); gap: 6px 14px; align-items: start; padding: 14px 4px; }
  .arc-sem { grid-column: 2; grid-row: 1; display: flex; gap: 8px; }
  .arc-sem small { display: inline; }
  .arc-icon { grid-column: 1; grid-row: 1 / span 3; }
  .arc-main { grid-column: 2; }
  .arc-anon { display: table; margin: 4px 0 0; }
  .arc-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .arc-course { font-size: 13px; }
  .hero-name::after { width: 70%; }
}
@media (prefers-reduced-motion: reduce) {
  .name-glow { display: none; }
  .fm-body { animation: none; }
}

/* ==========================================================================
   Type matched to the GitHub profile + featured projects side by side
   ========================================================================== */
.hero-copy { container-type: inline-size; }
.hero-name, .hero-roles, .sec-title, .sub-title, .ag-title, .g-name { font-family: var(--display); }
.hero-name { font-size: min(76px, calc(100cqi / 8.8)); line-height: 0.98; letter-spacing: 0; text-transform: uppercase; font-variation-settings: "wdth" 125; }
.hero-name .nm-1 { display: block; font-size: 0.42em; font-weight: 330; letter-spacing: 0.08em; line-height: 1.2; margin-bottom: 0.12em; }
.hero-name .nm-2 { display: block; font-weight: 820; letter-spacing: 0.01em; }
.sec-title { font-weight: 820; font-variation-settings: "wdth" 125; letter-spacing: 0.04em; }
.sec-title .n, .nav-links .n, .menu .n, .s-group .ch, .flow-n { font-weight: 700; }
.sub-title, .ag-title, .g-name { font-weight: 640; font-variation-settings: "wdth" 112; letter-spacing: 0.1em; }
.show-title, .detail-title { font-weight: 600; letter-spacing: -0.015em; }
.edu-school { font-weight: 600; letter-spacing: -0.01em; }
.arc-name, .j-what, .cert-title, .award-title { font-weight: 600; }
.btn-line, .btn-text, .arc-tab { font-weight: 500; }
.chip { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.hero-roles { font-size: 14px; font-weight: 520; font-variation-settings: "wdth" 125; letter-spacing: 0.14em; text-transform: uppercase; }

.showcases { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.show, .show.flip { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.show .show-visual, .show.flip .show-visual { order: 0; min-height: 0; height: 300px; border: 0; border-bottom: 1px solid var(--line); padding: 22px 22px 42px; }
.show-body { padding: 24px 26px 26px; gap: 10px; }
.show-title { font-size: clamp(22px, 2vw, 26px); }
.show-line { font-size: 14px; }
.show-points li { font-size: 13px; }
.show-foot { margin-top: auto; }
@media (max-width: 980px) {
  .showcases { grid-template-columns: minmax(0, 1fr); }
  .show .show-visual, .show.flip .show-visual { height: auto; min-height: 260px; }
  .show .show-visual, .show.flip .show-visual { padding-bottom: 18px; }
  .show-caption { position: static; margin-top: 14px; }
}
@media (max-width: 760px) {
  .hero-name { font-size: min(48px, calc(100cqi / 8.8)); }
  .hero-roles { flex-wrap: nowrap; gap: 10px; font-size: 12px; letter-spacing: 0.08em; font-variation-settings: "wdth" 100; white-space: nowrap; }
  .hero-roles .role-sep { width: 28px; flex: none; }
}
.detail-visual .flow-mock { max-width: 560px; margin-inline: auto; }

/* hero carries the only self-description; About section removed */
.hero-intro { max-width: 560px; }
.hero-facts { max-width: 560px; margin-top: 22px; padding-top: 14px; gap: 12px 20px; }
.hero-facts dd { font-size: 14px; color: var(--text); }
.hero-actions { margin-top: 28px; }

/* justified paragraphs, hyphenated so the spacing stays even */
.hero-intro, .show-line, .show-points li, .detail-line, .d-sec p, .d-list li, .contact-body, .arc-line {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
@media (max-width: 760px) {
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts > div:last-child { grid-column: 1 / -1; }
}
#contact .sec-head { margin-bottom: 20px; }
.c-mail-actions .btn-line { height: 38px; padding-block: 0; }
.c-mail-actions .copy { height: 38px; }

/* certificate links (files shared from Drive) */
.award.has-link { grid-template-columns: 88px minmax(0, 1fr) auto; }
.cert-link { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 8px; transition: border-color 0.3s, background-color 0.3s; }
.cert-link svg, .cert-view svg { width: 14px; height: 14px; fill: none; stroke: var(--text-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease), stroke 0.3s; }
.cert-link:hover, .cert-link:focus-visible { border-color: rgba(166, 140, 255, 0.5); background: var(--lav-soft); }
.cert-link:hover svg, .cert-view:hover svg { stroke: var(--lav-2); transform: translate(2px, -2px); }
.cert > div { display: flex; flex-direction: column; align-items: flex-start; height: 100%; }
.cert-view { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--lav-2); }
.cert-view:hover { color: var(--text); }
.cert { align-content: stretch; grid-template-rows: 1fr; }
@media (max-width: 980px) {
  .certs { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .award-group .award.has-link { grid-template-columns: 80px minmax(0, 1fr) auto; }
}

/* certificates: one ledger panel, every row the same shape */
.cert-list { border: 1px solid var(--line-2); border-radius: 16px; background: var(--dots), var(--panel); overflow: hidden; }
.cert-list li + li { border-top: 1px solid var(--line); }
.cert-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 250px 112px 150px; align-items: center; gap: 20px; padding: 16px 22px; transition: background-color 0.3s; }
.cert-tile { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); }
.cert-tile .cert-logo { width: 26px; height: 18px; }
.cert-main { min-width: 0; }
.cert-main .cert-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.cert-main .cert-issuer { display: block; margin-top: 2px; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cert-row .cert-type { justify-self: start; }
.cert-row .date { color: var(--text-3); }
.cert-go { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-3); transition: color 0.3s; }
.cert-go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.cert-row:hover { background: rgba(166, 140, 255, 0.05); }
.cert-row:hover .cert-logo { background: var(--brand); }
.cert-row:hover .cert-go { color: var(--lav-2); }
.cert-row:hover .cert-go svg { transform: translate(2px, -2px); }
.cert-row:hover .cert-title { color: var(--lav-2); }
@media (max-width: 1100px) {
  .cert-row { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 8px; }
  .cert-row .cert-type { grid-column: 2; grid-row: 2; }
  .cert-row .date { grid-column: 3; grid-row: 2; justify-self: end; }
  .cert-go { grid-column: 3; grid-row: 1; }
}
@media (max-width: 760px) {
  .cert-row { grid-template-columns: 40px minmax(0, 1fr); gap: 6px 14px; padding: 14px 16px; }
  .cert-tile { width: 40px; height: 40px; grid-row: 1 / span 3; align-self: start; }
  .cert-row .cert-type { grid-column: 2; grid-row: 2; }
  .cert-row .date { grid-column: 2; grid-row: 3; justify-self: start; }
  .cert-go { grid-column: 2; grid-row: 4; justify-self: start; margin-top: 4px; }
  .cert-main .cert-issuer { white-space: normal; }
}

/* proof links inside the education card */
.j-proof { margin-top: 6px; padding-top: 0; }
.j-train li { display: grid; grid-template-columns: minmax(0, 1fr) auto 30px; align-items: center; gap: 14px; }
.j-train .cert-link { width: 28px; height: 28px; }
.cert-link.is-none { border-color: transparent; }
.award-col .rows-head { margin-bottom: 14px; }

/* ==========================================================================
   Mobile: compact hero, photo viewer, swipeable work, skill accordions
   ========================================================================== */
.figure-tap { display: none; }
.lightbox { width: min(92vw, 420px); max-height: 92vh; padding: 0; border: 1px solid var(--line-2); border-radius: 20px; background: var(--panel); color: var(--text); overflow: hidden; }
.lightbox::backdrop { background: rgba(8, 7, 12, 0.78); backdrop-filter: blur(6px); }
.lightbox[open] { animation: lb-in 0.35s var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: scale(0.96) translateY(8px); } }
.lightbox-panel { margin: 0; background: radial-gradient(70% 55% at 50% 62%, rgba(166, 140, 255, 0.18), transparent 70%), var(--dots), var(--panel); }
.lightbox-panel img { display: block; width: 100%; height: auto; -webkit-mask: linear-gradient(to bottom, #000 82%, transparent 100%); mask: linear-gradient(to bottom, #000 82%, transparent 100%); }
.lightbox-panel figcaption { display: grid; gap: 2px; padding: 4px 18px 18px; }
.lightbox-panel figcaption b { font-family: var(--display); font-weight: 820; font-variation-settings: "wdth" 125; text-transform: uppercase; letter-spacing: 0.04em; font-size: 15px; }
.lightbox-panel figcaption span { font-family: var(--mono); font-size: 11px; color: var(--lav-2); letter-spacing: 0.06em; }
.lightbox-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-3); border-radius: 50%; background: rgba(14, 13, 18, 0.7); }
.lightbox-close svg { width: 14px; height: 14px; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; }

@media (max-width: 760px) {
  .hero { padding-top: calc(var(--nav-h) + 28px); padding-bottom: 40px; }
  /* phone hero: the portrait becomes a wide banner card above the name */
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; }
  .hero-figure { order: -1; position: relative; width: 100%; max-width: none; margin: 0 0 26px; justify-self: auto; }
  .hero-figure .figure-panel { aspect-ratio: auto; height: clamp(220px, 62vw, 290px); border-radius: 18px; transition: transform 0.25s var(--ease); }
  .hero-figure .scan { display: none; }
  .hero-figure .orbits { width: 92%; top: 46%; }
  .hero-figure .portrait { width: 74%; max-width: none; top: 7%; bottom: auto; -webkit-mask: linear-gradient(to bottom, #000 70%, transparent 98%); mask: linear-gradient(to bottom, #000 70%, transparent 98%); }
  .hero-figure .wave { bottom: 12px; height: 40px; }
  .figure-tap { display: block; position: absolute; inset: 0; z-index: 5; border-radius: inherit; }
  .figure-tap::after { content: ""; position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(14, 13, 18, 0.72) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5l-4.5 4.5M2.5 13.5l4.5-4.5' fill='none' stroke='%23d5caff' stroke-width='1.4' stroke-linecap='round'/></svg>") center / 13px no-repeat; border: 1px solid var(--line-3); }
  .hero-figure:active .figure-panel { transform: scale(0.985); }
  .hero-figure .corner.tr { display: none; }
  .hero-copy .eyebrow { display: flex; align-items: flex-start; line-height: 1.6; }
  .hero-copy .eyebrow .pulse { margin-top: 6px; flex: none; }
  .hero-name { margin-top: 14px; }
  .hero-name .nm-1 { font-size: 0.46em; line-height: 1.25; margin-bottom: 0.15em; }
  .hero-name::after { margin-top: 14px; }
  .hero-intro { margin-top: 16px; }
}

/* skill group headers are buttons so they can fold on phones */
.s-group .group-label { width: 100%; text-align: left; cursor: default; }
.s-chev { display: none; }

/* swipe dots (phones only) */
.show-dots { display: none; }

@media (max-width: 760px) {
  /* featured: one card per swipe, the next one peeking in */
  .showcases { display: flex; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
  .showcases::-webkit-scrollbar { display: none; }
  .showcases .show { flex: 0 0 88%; scroll-snap-align: start; }
  .show-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
  .show-dots button { width: 8px; height: 8px; border-radius: 4px; background: var(--line-3); transition: width 0.3s var(--ease), background-color 0.3s; }
  .show-dots button[aria-current] { width: 24px; background: var(--lav); }

  /* skills: tap a channel to open it */
  .s-group .group-label { cursor: pointer; grid-template-columns: auto 1fr auto auto; align-items: center; padding: 4px 0; }
  .s-chev { display: block; order: 4; width: 14px; height: 14px; fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-linecap: round; transition: transform 0.3s var(--ease); }
  .s-group.is-collapsed .s-chev { transform: rotate(-90deg); }
  .s-group.is-collapsed .chips { display: none; }
  .s-group, .s-group:nth-last-child(-n + 2) { gap: 12px; padding: 14px 0; }
  .s-group.is-collapsed { gap: 0; }
  .s-group:not(.is-collapsed) .chips { animation: fm-in 0.35s var(--ease); }
}

/* press feedback on touch screens */
@media (hover: none) {
  .btn-line, .btn-text, .c-card, .c-mail, .cert-row, .arc-row, .award, .fchip, .arc-tab, .chip, .s-group .group-label, .show-dots button, .flow-step { -webkit-tap-highlight-color: transparent; }
  .btn-line:active, .c-card:active, .cert-row:active, .arc-row:active, .cert-link:active, .chip:active { transform: scale(0.98); transition: transform 0.12s; }
  .s-group .group-label:active .g-name { color: var(--lav-2); }
}

/* archive v2: course + team info under the description, field as a dot label */
.arc-list { margin-top: 0; }
.arc-row { grid-template-columns: 64px 40px minmax(0, 1fr) 168px; gap: 4px 20px; align-items: start; padding: 20px 10px; border-radius: 0; }
.arc-row:hover { background: rgba(166, 140, 255, 0.04); }
.arc-sem { padding-top: 2px; font-size: 13px; font-weight: 700; color: var(--lav-2); }
.arc-sem small { margin-top: 2px; font-weight: 500; }
.arc-icon { width: 40px; height: 40px; border-radius: 10px; }
.arc-main { display: grid; gap: 4px; min-width: 0; }
.arc-name { font-size: 16px; line-height: 1.35; }
.arc-line { margin-top: 0; font-size: 14px; }
.arc-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 6px; }
.arc-course { display: inline-flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text); white-space: normal; overflow: visible; }
.arc-course::before { content: ""; flex: none; width: 10px; height: 1px; background: var(--lav); transform: translateY(-4px); }
.arc-how { font-size: 11px; color: var(--text-3); }
.arc-how::before { content: "·"; margin-right: 10px; color: var(--line-3); }
.arc-field { justify-self: end; display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.arc-field::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fc, var(--lav)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc, var(--lav)) 18%, transparent); }
.arc-field[data-field="software"] { --fc: #a68cff; }
.arc-field[data-field="data"] { --fc: #6fd6c4; }
.arc-field[data-field="systems"] { --fc: #7fb2ff; }
.arc-field[data-field="research"] { --fc: #f2c27b; }
.arc-field[data-field="design"] { --fc: #ef93c1; }
@media (max-width: 980px) {
  .arc-row { grid-template-columns: 56px 40px minmax(0, 1fr); }
  .arc-field { display: inline-flex; grid-column: 3; justify-self: start; margin-top: 8px; }
  .arc-meta { grid-column: auto; }
}
@media (max-width: 760px) {
  .arc-row { grid-template-columns: 40px minmax(0, 1fr); gap: 6px 14px; padding: 18px 2px; }
  .arc-icon { display: grid; grid-column: 1; grid-row: 1 / span 3; }
  .arc-sem { grid-column: 2; grid-row: 1; display: flex; gap: 8px; padding-top: 0; }
  .arc-main { grid-column: 2; grid-row: 2; }
  .arc-field { grid-column: 2; grid-row: 3; margin-top: 4px; }
  .arc-how::before { display: none; }
  .arc-meta { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 2px; }
  .arc-main .arc-line { grid-column: auto; }
}

/* ==========================================================================
   Case study pages
   ========================================================================== */
.cs-head { max-width: 860px; }
.cs-head .kind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-3); text-transform: uppercase; }
.cs-head .status { position: static; }
.cs-head .detail-title { margin-top: 16px; font-size: clamp(34px, 5vw, 58px); }
.cs-lead { margin-top: 16px; max-width: 62ch; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.cs-facts { display: grid; grid-template-columns: 120px 1fr 1fr 1.6fr; margin-top: 32px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); overflow: hidden; }
.cs-facts > div { padding: 16px 20px; }
.cs-facts > div + div { border-left: 1px solid var(--line); }
.cs-facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.cs-facts dd { margin-top: 6px; font-size: 15px; font-weight: 500; }
.cs-stack ul { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-stack li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 7px; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--text); }
.cs-stack .ico { width: 14px; height: 14px; background: var(--text-2); }
.detail .detail-visual { margin: 20px 0 0; }

.cs-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; margin-top: 56px; }
.cs-toc { position: sticky; top: calc(var(--nav-h) + 28px); align-self: start; }
.cs-toc .label { color: var(--text-3); text-transform: uppercase; margin-bottom: 12px; }
.cs-toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line-2); }
.cs-toc a { position: relative; display: flex; gap: 10px; padding: 7px 0 7px 16px; font-size: 14px; color: var(--text-3); transition: color 0.25s; }
.cs-toc a .n { font-family: var(--mono); font-size: 11px; font-weight: 700; padding-top: 2px; }
.cs-toc a::before { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--lav); transform: scaleY(0); transition: transform 0.3s var(--ease); }
.cs-toc a:hover { color: var(--text); }
.cs-toc a[aria-current] { color: var(--text); }
.cs-toc a[aria-current] .n { color: var(--lav); }
.cs-toc a[aria-current]::before { transform: scaleY(1); }

.cs-main { display: grid; gap: 56px; min-width: 0; max-width: 820px; }
.cs-sec { scroll-margin-top: calc(var(--nav-h) + 24px); }
.cs-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.cs-h .n { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--lav); }
.cs-text { font-size: 16.5px; line-height: 1.75; color: var(--text); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.cs-sub { margin: 26px 0 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.cs-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cs-highlights li { padding: 16px; border: 1px solid var(--line-2); border-top: 2px solid var(--lav); border-radius: 12px; background: var(--panel); font-size: 14px; line-height: 1.55; color: var(--text-2); }
.cs-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.cs-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--dots), var(--panel); }
.cs-steps .n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--lav-soft); border: 1px solid rgba(166, 140, 255, 0.35); font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--lav-2); }
.cs-steps p { font-size: 14.5px; line-height: 1.55; color: var(--text); padding-top: 6px; }
.cs-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cs-card { padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.cs-card-h { margin-bottom: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lav-2); }
.cs-checks { display: grid; gap: 10px; }
.cs-checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.cs-checks svg { width: 16px; height: 16px; margin-top: 2px; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cs-checks.is-ok svg { stroke: #7ad3a5; }
.cs-checks.is-note svg { stroke: var(--text-3); }
.cs-main .arch { margin: 0; }
.detail .next { margin-top: 64px; }

@media (max-width: 980px) {
  .cs-facts { grid-template-columns: 1fr 1fr; }
  .cs-facts > div:nth-child(3) { border-left: 0; }
  .cs-facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .cs-body { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 40px; }
  .cs-toc { position: static; min-width: 0; margin: 0 calc(var(--gutter) * -1) 36px; padding-inline: var(--gutter); }
  .cs-toc ol { padding-bottom: 2px; }
  .cs-toc ol { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; border-left: 0; scrollbar-width: none; }
  .cs-toc a { flex: none; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; }
  .cs-toc a::before { display: none; }
  .cs-toc a[aria-current] { border-color: rgba(166, 140, 255, 0.55); background: var(--lav-soft); }
  .cs-highlights { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cs-lead { font-size: 16px; }
  .cs-facts > div { padding: 14px 16px; }
  .cs-stack { grid-column: 1 / -1; border-left: 0 !important; }
  .cs-steps, .cs-cards { grid-template-columns: 1fr; }
  .cs-main { gap: 44px; }
  .cs-h { font-size: 21px; }
  .cs-text { font-size: 15.5px; }
}
.detail .detail-visual .show-canvas { max-width: 820px; margin-inline: auto; }

/* ==========================================================================
   Phones: lighter, editorial case study (no cards inside cards) and
   left-aligned paragraphs (justified text opens wide gaps in narrow columns)
   ========================================================================== */
@media (max-width: 760px) {
  .hero-intro, .show-line, .show-points li, .detail-line, .d-sec p, .d-list li, .contact-body, .arc-line, .cs-text, .cs-lead { text-align: left; hyphens: manual; -webkit-hyphens: manual; }

  .detail { padding-top: calc(var(--nav-h) + 24px); }
  .back { margin-bottom: 22px; }
  .cs-head .detail-title { font-size: clamp(30px, 9vw, 38px); margin-top: 12px; }
  .cs-lead { margin-top: 12px; font-size: 16px; }

  .cs-facts { grid-template-columns: 1fr 1fr; margin-top: 24px; border: 0; border-radius: 0; background: none; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
  .cs-facts > div, .cs-facts > div + div { padding: 14px 0; border: 0 !important; }
  .cs-facts > div:nth-child(even) { padding-left: 16px; }
  .cs-facts > div:nth-child(n + 3) { border-top: 1px solid var(--line) !important; }
  .cs-facts .cs-stack { grid-column: 1 / -1; padding-left: 0 !important; }
  .cs-facts dd { font-size: 14.5px; }

  .detail .detail-visual { margin-top: 20px; padding: 14px 10px; border-radius: 14px; }
  .cs-toc { display: none; }
  .cs-body { margin-top: 36px; }
  .cs-main { gap: 40px; }
  .cs-h { margin-bottom: 14px; font-size: 21px; }
  .cs-text { font-size: 15.5px; line-height: 1.7; }

  .cs-sub { margin: 22px 0 10px; }
  .cs-highlights { gap: 0; }
  .cs-highlights li { position: relative; padding: 11px 0 11px 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; font-size: 14.5px; color: var(--text); }
  .cs-highlights li:last-child { border-bottom: 0; }
  .cs-highlights li::before { content: ""; position: absolute; left: 2px; top: 21px; width: 9px; height: 2px; border-radius: 1px; background: var(--lav); }

  .cs-steps { position: relative; gap: 0; }
  .cs-steps::before { content: ""; position: absolute; left: 13px; top: 18px; bottom: 18px; width: 1px; background: linear-gradient(var(--lav), var(--line-2)); }
  .cs-steps li { position: relative; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding: 8px 0; border: 0; border-radius: 0; background: none; }
  .cs-steps .n { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); font-size: 11px; }
  .cs-steps p { padding-top: 3px; font-size: 14.5px; }

  .cs-main .arch { padding: 14px; border-radius: 14px; }
  .cs-main .arch-cap { margin-bottom: 10px; }
  .cs-main .arch-flow { gap: 16px; }
  .cs-main .arch-layer { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cs-main .arch-layer > span { grid-column: 1 / -1; }
  .cs-main .arch-layer:not(:last-child)::after { left: 50%; bottom: -15px; translate: -50% 0; font-size: 12px; }
  .cs-main .node { padding: 8px 10px; }
  .cs-main .node b { font-size: 13px; }
  .cs-main .node small { font-size: 11px; }
  .cs-main .arch-layer:has(.node:only-of-type) { grid-template-columns: 1fr; }

  .cs-cards { gap: 22px; }
  .cs-card { padding: 0; border: 0; border-radius: 0; background: none; }
  .cs-card + .cs-card { padding-top: 20px; border-top: 1px solid var(--line); }
  .cs-checks li { font-size: 14.5px; }
  .detail .next { margin-top: 48px; padding: 18px; }
  .next strong { font-size: 18px; }
}
