/* Geist and Geist Pixel by Vercel (SIL Open Font License) */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Pixel"; src: url("fonts/GeistPixel-Square.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: #000000;
  --side: #000000;
  --text: #ededf0;
  --muted: #9a9aa6;
  --line: #1f1f26;
  --accent: #ffffff;
  --accent-ink: #000000;
  --name-glow: 0 0 6px rgba(255,255,255,.55), 0 0 22px rgba(255,255,255,.38), 0 0 54px rgba(255,255,255,.2);
  --bold-glow: 0 0 8px rgba(255,255,255,.4), 0 0 20px rgba(255,255,255,.18);
  --display: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pixel: "Geist Pixel", "Geist", ui-monospace, Menlo, Consolas, monospace;
  --side-w: 260px;
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --side: #ffffff;
  --text: #0c0c10;
  --muted: #5c5c68;
  --line: #e3e3ea;
  --accent: #0a0a0a;
  --accent-ink: #ffffff;
  --name-glow: 0 0 6px rgba(0,0,0,.28), 0 0 18px rgba(0,0,0,.14);
  --bold-glow: 0 0 7px rgba(0,0,0,.26), 0 0 16px rgba(0,0,0,.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ===== Side navigation (minimal) ===== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w);
  display: flex; flex-direction: column;
  padding: 32px 28px 28px; background: var(--side); border-right: 1px solid var(--line);
  overflow-y: auto; font-size: 14.5px;
}
.logo { display: block; width: 38px; height: 38px; margin: 0 0 34px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #000; flex: none; transition: border-color .15s; }
.logo:hover { border-color: var(--muted); }
.logo svg { display: block; width: 100%; height: 100%; }
.menu { display: flex; flex-direction: column; gap: 4px; padding: 0 0 20px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.menu.last { border-bottom: 0; margin-bottom: 0; }
.menu a { display: flex; align-items: center; gap: 14px; padding: 6px 0; color: var(--muted); font-family: var(--pixel); font-size: 16px; letter-spacing: .01em; transition: color .15s; }
.menu a:hover, .menu a.active { color: var(--text); }
.menu a .icon { width: 17px; height: 17px; }

.menu-toggle { display: none; place-items: center; width: 40px; height: 40px; margin-right: -8px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }
.menu-toggle[aria-expanded="true"] .i-menu { display: none; }
.presence { padding: 0 0 20px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.pres-av { display: flex; margin: 0 0 10px; }
.pres-av svg { flex: none; width: 30px; height: 30px; margin-left: -8px; border-radius: 50%; background: #efefef; box-shadow: 0 0 0 2px var(--bg), inset 0 0 0 1px rgba(0,0,0,.18); }
.pres-av svg:first-child { margin-left: 0; }
/* Glow on bold text: white glow in dark mode, black glow in light mode */
strong, b, .stats .big, .stats .name, .list .result, .rec strong, .pres-text strong { text-shadow: var(--bold-glow); }

/* Animated cats for the viewer widget */
.pres-av svg .eye { transform-box: fill-box; transform-origin: center; animation: cat-blink 4.8s infinite; animation-delay: var(--d, 0s); }
.pres-av svg .ear-r { transform-box: fill-box; transform-origin: 50% 100%; animation: cat-twitch 7s infinite; animation-delay: var(--d2, 0s); }
.pres-av svg .head { transform-box: view-box; transform-origin: 15px 27px; animation: cat-sway 6s ease-in-out infinite; animation-delay: var(--d2, 0s); }
@keyframes cat-blink { 0%, 90%, 100% { transform: scaleY(1); } 93.5% { transform: scaleY(.08); } }
@keyframes cat-twitch { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-16deg); } 94% { transform: rotate(5deg); } 97% { transform: rotate(0); } }
@keyframes cat-sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@media (prefers-reduced-motion: reduce) { .pres-av svg .eye, .pres-av svg .ear-r, .pres-av svg .head { animation: none; } }
.pres-text { margin: 0; font-size: 13px; color: var(--muted); }
.pres-text strong { color: var(--text); font-weight: 600; }
.side-bottom { margin-top: auto; padding-top: 28px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; }
.seg button {
  display: grid; place-items: center; width: 30px; height: 26px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.seg button .icon { width: 15px; height: 15px; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--line); color: var(--text); }
.reach { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 20px 0 10px; }
.mail { display: inline-flex; align-items: center; gap: 12px; font-family: var(--body); font-size: 13px; color: var(--text); }
.mail .icon { width: 16px; height: 16px; color: var(--muted); }
.mail:hover { color: var(--accent); }

/* ===== Main column (centered) ===== */
main { margin-left: var(--side-w); padding: 96px 40px 40px; }
.content { max-width: 625px; margin: 0 auto; }
section { padding: 0 0 80px; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
h3 { font-family: var(--body); font-weight: 500; font-size: 16.5px; line-height: 1.4; margin: 0; letter-spacing: 0; }

/* Hero: name and description, no image */
.hero h1 { font-family: var(--pixel); font-weight: 400; font-size: clamp(25px, 5.9vw, 40px); line-height: 1.15; letter-spacing: 0; margin: 0 0 26px; color: var(--text); text-shadow: var(--name-glow); }
.hero p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 52ch; }
.links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 24px 0 0; padding: 0; list-style: none; font-family: var(--body); font-size: 13px; }
.links a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.links a:hover { color: var(--accent); }
.links .icon { width: 11px; height: 11px; }

/* Stats strip */
.stats { margin: 56px 0 88px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats .row { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats .row + .row { border-top: 1px solid var(--line); }
.stats .cell { padding: 18px 20px; border-left: 1px solid var(--line); min-width: 0; }
.stats .cell:first-child { padding-left: 0; border-left: 0; }
.stats .name { font-family: var(--body); font-size: 13px; font-weight: 500; }
.stats .label { font-family: var(--body); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.stats .big { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.stats .row.nums .cell { padding-top: 22px; padding-bottom: 20px; }
@media (max-width: 560px) {
  .stats { margin: 40px 0 64px; }
  .stats .row:not(.nums) { grid-template-columns: 1fr; padding: 6px 0; }
  .stats .row:not(.nums) .cell { padding: 10px 0; border-left: 0; }
  .stats .row.nums .cell { padding: 18px 14px 16px; }
  .stats .row.nums .cell:first-child { padding-left: 0; }
  .stats .big { font-size: 20px; }
}

/* Section heading: "01 - projects" left, optional link right */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 20px; font-family: var(--body); font-size: 14px; color: var(--muted); }
.sec-head h2 { margin: 0; font: inherit; }
.sec-head a { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.sec-head a:hover { color: var(--accent); }

/* Rows: title left, date right */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 18px 0; border-top: 1px solid var(--line); }
.list > li:last-child { border-bottom: 1px solid var(--line); }
.list .top { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.list .date { flex: none; font-variant-numeric: tabular-nums; font-family: var(--body); font-size: 12.5px; color: var(--muted); }
.list a.title:hover h3, .list.plain a:hover h3 { color: var(--accent); }
.ext { width: 12px; height: 12px; margin-left: 5px; vertical-align: -1px; color: var(--muted); stroke-width: 2; }
.list.plain a.cert-link { display: flex; align-items: center; gap: 14px; }
.list.plain a.cert-link .icon { color: var(--accent); width: 17px; height: 17px; }
.list.plain a.cert-link .ext { width: 12px; height: 12px; color: var(--muted); }
.list .org { color: var(--muted); font-size: 15px; margin-top: 2px; }
.list p { margin: 8px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.list .result { color: var(--text); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; padding: 0; list-style: none; font-family: var(--body); font-size: 12px; color: var(--muted); }
.award { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-family: var(--body); font-size: 12px; margin-bottom: 8px; }
.award .icon { width: 15px; height: 15px; }
.list.plain .top { justify-content: flex-start; gap: 14px; align-items: center; }
.list.plain .icon { color: var(--accent); width: 17px; height: 17px; }

details.earlier { margin-top: 18px; }
details.earlier summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--body); font-size: 13px; }
details.earlier summary:hover { color: var(--text); }
details.earlier summary::-webkit-details-marker { display: none; }
details.earlier summary .icon { width: 15px; height: 15px; }
details.earlier[open] summary .icon { transform: rotate(180deg); }
details.earlier .list { margin-top: 14px; }

/* Stack */
.skill-icon { width: 16px; height: 16px; flex: none; fill: currentColor; stroke: none; }
.skill-icon.line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; line-height: 1.3; color: var(--text); }
.chips li .skill-icon { color: var(--muted); }
.chips li:hover .skill-icon { color: var(--text); }
.stack { margin: 0; padding: 0; }
.stack > div { display: flex; justify-content: space-between; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.stack > div:last-child { border-bottom: 1px solid var(--line); }
.stack dt { font-size: 14px; color: var(--muted); flex: none; width: 150px; padding-top: 6px; }
.stack dd { margin: 0; flex: 1; }
@media (max-width: 560px) { .stack > div { flex-direction: column; gap: 10px; } .stack dt { width: auto; padding-top: 0; } }

/* Recommendations */
figure.quote { margin: 0; padding: 22px 0; border-top: 1px solid var(--line); }
figure.quote:last-of-type { border-bottom: 1px solid var(--line); }
.quote blockquote { margin: 0 0 12px; font-size: 16.5px; line-height: 1.65; }
.quote figcaption strong { display: block; font-size: 15px; font-weight: 500; }
.quote figcaption span { color: var(--muted); font-size: 14px; }

/* Certification tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 148px; padding: 16px;
  background: color-mix(in srgb, var(--text) 3%, var(--bg)); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; transition: border-color .15s;
}
/* pixel-dot texture that fades out from the top-right corner */
.tile::before {
  content: ""; position: absolute; top: 0; right: 0; width: 120px; height: 90px; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--text) 30%, transparent) 1px, transparent 1.4px) 0 0 / 8px 8px;
  -webkit-mask-image: linear-gradient(225deg, #000 0%, transparent 70%); mask-image: linear-gradient(225deg, #000 0%, transparent 70%);
  opacity: .55;
}
.tile:hover { border-color: color-mix(in srgb, var(--text) 45%, var(--line)); }
.tile-icon { position: relative; display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.tile-icon .icon { width: 17px; height: 17px; }
.tile h3 { position: relative; font-size: 15px; font-weight: 500; line-height: 1.35; }
.tile-cat { position: relative; color: var(--muted); font-size: 12.5px; }
.tile-link { position: relative; margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 13px; color: var(--muted); }
.tile-link:hover { color: var(--text); }
.tile-link .icon { width: 12px; height: 12px; stroke-width: 2; }
.tiles.more { margin-top: 12px; }
@media (max-width: 560px) { .tile { min-height: 132px; padding: 14px; } .tile h3 { font-size: 14px; } }
details.all-certs { margin-top: 14px; }
details.all-certs summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
details.all-certs summary:hover { color: var(--text); }
details.all-certs summary::-webkit-details-marker { display: none; }
details.all-certs summary .icon { width: 15px; height: 15px; }
details.all-certs[open] summary .icon { transform: rotate(180deg); }

/* Recommendations carousel */
.carousel { position: relative; }
.car-track {
  display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.car-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) { .car-track { transition: height .25s ease; } }
.rec {
  position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; gap: 18px; margin: 0; padding: 26px 24px 22px;
  background: color-mix(in srgb, var(--text) 3%, var(--bg)); border: 1px solid var(--line); border-radius: 12px;
}
.rec::before { content: ""; position: absolute; top: -1px; left: 24px; width: 32px; height: 2px; background: var(--text); }
.rec .pq { width: 21px; height: 15px; fill: var(--muted); flex: none; }
.rec blockquote { margin: 0; font-size: 16px; line-height: 1.7; max-height: calc(1.7em * 6); overflow: hidden; }
.rec blockquote.clipped { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.rec blockquote p { margin: 0 0 .8em; }
.rec blockquote p:last-child { margin-bottom: 0; }
.rec.open blockquote { max-height: none; -webkit-mask-image: none; mask-image: none; }
.rec-more { align-self: flex-start; margin: -8px 0 0; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.rec-more:hover { color: var(--text); }
.rec figcaption { margin-top: auto; display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px dashed var(--line); }
.rec .av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.rec strong { display: block; font-size: 15px; font-weight: 500; line-height: 1.3; }
.rec figcaption span:not(.av) { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.car-ctrl { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.car-left { display: flex; align-items: center; gap: 12px; }
.car-pause { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.car-pause:hover { color: var(--text); border-color: var(--muted); }
.car-pause .icon { width: 14px; height: 14px; }
.car-pause .i-play { display: none; }
.car-pause[data-state="paused"] .i-pause { display: none; }
.car-pause[data-state="paused"] .i-play { display: block; }
.car-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.car-btns { display: flex; gap: 8px; }
.car-btns button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; transition: border-color .15s; }
.car-btns button:hover:not(:disabled) { border-color: var(--muted); }
.car-btns button:disabled { opacity: .35; cursor: default; }
@media (max-width: 560px) { .rec { padding: 22px 18px 18px; } .rec::before { left: 18px; } .rec blockquote { font-size: 15.5px; max-height: calc(1.7em * 8); } }

.foot { margin-left: var(--side-w); padding: 0 40px 40px; }
.foot-in { max-width: 625px; margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--line); }
.foot .copy { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.foot-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); transition: color .15s; }
.foot-links a:hover { color: var(--text); }
.foot-links .icon { width: 12px; height: 12px; stroke-width: 2; }

/* ===== Mobile: top bar with menu button ===== */
@media (max-width: 900px) {
  html.menu-open { overflow: hidden; }
  .sidebar {
    position: sticky; top: 0; z-index: 30; width: auto; height: auto;
    flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between;
    padding: 0 20px; border-right: 0; border-bottom: 1px solid var(--line);
    background: var(--bg); overflow: visible;
  }
  .logo { margin: 11px 0; width: 36px; height: 36px; }
  .menu-toggle { display: grid; }
  .menu, .side-bottom { display: none; width: 100%; }
  .sidebar.open { position: fixed; inset: 0; overflow-y: auto; align-content: flex-start; }
  .sidebar.open .menu { display: flex; flex-direction: column; gap: 2px; padding-bottom: 16px; margin-bottom: 16px; }
  .sidebar.open .menu.last { padding-bottom: 0; margin-bottom: 0; }
  .sidebar.open .menu a { padding: 9px 0; font-size: 18px; }
  .sidebar.open .side-bottom { display: block; margin-top: 0; padding: 28px 0 32px; }
  main { margin-left: 0; padding: 32px 20px 24px; }
  .foot { margin-left: 0; padding: 0 20px 32px; }
  section { padding-bottom: 64px; }
  .hero h1 { margin-bottom: 20px; }
  .hero p { font-size: 16px; }
}

/* =====================================================================
   Inner pages (projects, experience, stack, certifications, recommendations, blog, article)
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.content.wide { max-width: 860px; }
.menu a.active { color: var(--text); }
.muted-title { color: var(--muted); }
.badge { display: inline-block; margin-left: 10px; padding: 1px 8px; border: 1px dashed var(--muted); border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; vertical-align: 2px; }

/* Page header: breadcrumb in Geist Pixel, big title, one-line intro, quick facts */
.page-head { margin: 0 0 60px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 28px; font-family: var(--pixel); font-size: 15px; color: var(--muted); }
.crumbs a { transition: color .15s; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); }
.page-head h1 { margin: 0 0 16px; font-family: var(--display); font-weight: 600; font-size: clamp(34px, 5.6vw, 50px); line-height: 1.03; letter-spacing: -.045em; text-shadow: var(--bold-glow); }
.lede { margin: 0; max-width: 56ch; color: var(--muted); font-size: 17px; line-height: 1.65; }
.head-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 24px 0 0; padding: 0; font-size: 13.5px; color: var(--muted); }
.head-meta strong { color: var(--text); font-weight: 600; text-shadow: var(--bold-glow); }

/* Projects: year column + details with the tech used */
.proj { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 36px; padding: 34px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.proj:last-child { border-bottom: 1px solid var(--line); }
.proj .when { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.proj .when strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 22px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.proj h2 { margin: 0 0 12px; font-size: 22px; font-weight: 600; letter-spacing: -.028em; line-height: 1.25; text-shadow: var(--bold-glow); }
.proj h2 a { transition: color .15s; }
.proj h2 a:hover { color: var(--muted); }
.proj p { margin: 0 0 12px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.proj .result { color: var(--text); font-weight: 500; }
.proj .award { margin-bottom: 12px; }
.chips.sm { margin-top: 16px; gap: 6px; }
.chips.sm li { padding: 4px 9px; font-size: 13px; border-radius: 7px; }
.chips.lg li { padding: 8px 14px; font-size: 15px; border-radius: 9px; }
.chips.lg li .skill-icon { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .proj { grid-template-columns: 1fr; padding: 28px 0; }
  .proj .when { display: flex; align-items: baseline; gap: 12px; }
  .proj .when strong { display: inline; font-size: 16px; margin: 0; }
}

/* Experience: date gutter, square pixel nodes on a rail, roles with bullet points */
.xp { list-style: none; margin: 0; padding: 0; }
.xp > li { display: grid; grid-template-columns: 150px 24px minmax(0, 1fr); column-gap: 24px; padding-bottom: 48px; }
.xp .gut { padding-top: 4px; text-align: right; color: var(--muted); font-size: 13.5px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.xp .rail { position: relative; }
.xp .rail::before { content: ""; position: absolute; left: 11.5px; top: 22px; bottom: -48px; width: 1px; background: var(--line); }
.xp > li:last-child .rail::before { display: none; }
.xp .node { position: absolute; left: 6px; top: 8px; width: 12px; height: 12px; border: 1.5px solid var(--text); border-radius: 3px; background: var(--bg); }
.xp > li.now .node { background: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 16%, transparent); }
.xp h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; text-shadow: var(--bold-glow); }
.xp .place { margin: 2px 0 16px; color: var(--muted); font-size: 14.5px; }
.xp .award { margin: -6px 0 14px; }
.xp .role { margin: 0 0 22px; }
.xp .role:last-child { margin-bottom: 0; }
.xp .role h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 16.5px; font-weight: 500; }
.xp .role .dates { color: var(--muted); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.xp .pts { margin: 10px 0 0; padding: 0 0 0 18px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.xp .pts li { margin: 0 0 6px; padding-left: 2px; }
@media (max-width: 720px) {
  .xp > li { grid-template-columns: 24px minmax(0, 1fr); column-gap: 14px; }
  .xp .gut { grid-column: 2; grid-row: 1; text-align: left; padding: 0 0 4px; }
  .xp .rail { grid-column: 1; grid-row: 1 / span 2; }
  .xp .xbody { grid-column: 2; grid-row: 2; }
  .xp .rail::before { top: 20px; }
}

/* Stack + certifications: grouped, with a count */
.group { margin: 0 0 46px; }
.group h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; font-size: 15px; font-weight: 500; color: var(--muted); }
.group .gcount { font-size: 12.5px; font-variant-numeric: tabular-nums; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; }
.content.wide .tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 560px) { .content.wide .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Recommendations wall: two columns, full text */
.wall { columns: 2; column-gap: 14px; }
.wall .rec { display: flex; flex: none; break-inside: avoid; margin: 0 0 14px; }
.wall .rec blockquote { max-height: none; overflow: visible; -webkit-mask-image: none; mask-image: none; }
@media (max-width: 760px) { .wall { columns: 1; } }

/* Blog list: date column, filters by topic */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.filters button { padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; transition: color .15s, border-color .15s; }
.filters button:hover { color: var(--text); border-color: var(--muted); }
.filters button[aria-pressed="true"] { color: var(--accent-ink); background: var(--text); border-color: var(--text); }
.posts { list-style: none; margin: 0; padding: 0; }
.post-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 32px; padding: 30px 0; border-top: 1px solid var(--line); }
.post-row:last-child { border-bottom: 1px solid var(--line); }
.post-row[hidden] { display: none; }
.post-row .d { padding-top: 5px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.post-row h2 { margin: 0 0 10px; font-size: 22px; font-weight: 600; letter-spacing: -.028em; line-height: 1.3; text-shadow: var(--bold-glow); }
.post-row h2 a:hover { color: var(--muted); }
.post-row p { margin: 0 0 12px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.post-row .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; }
.post-row.soon h2 { color: var(--muted); text-shadow: none; }
.empty { margin: 24px 0 0; color: var(--muted); }
@media (max-width: 640px) { .post-row { grid-template-columns: 1fr; } .post-row .d { padding: 0; } }

/* Article */
.article-page { max-width: 625px; }
@media (min-width: 1180px) { .article-page { max-width: 871px; } }
.article-head { max-width: 625px; margin: 0 0 44px; }
.post-tags { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.article-head h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(32px, 5.2vw, 46px); line-height: 1.08; letter-spacing: -.045em; text-shadow: var(--bold-glow); }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.byline strong { color: var(--text); font-weight: 500; }
.mini { display: inline-block; flex: none; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #000; }
.mini.lg { width: 44px; height: 44px; border-radius: 10px; }
.mini svg { display: block; width: 100%; height: 100%; }
.article-wrap .toc { margin: 0 0 36px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.toc-title { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: 4px 0; color: var(--muted); transition: color .15s; }
.toc a:hover, .toc a.active { color: var(--text); }
@media (min-width: 1180px) {
  .article-wrap { display: grid; grid-template-columns: minmax(0, 625px) 190px; column-gap: 56px; }
  .article-wrap .toc { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 32px; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .article-wrap .prose { grid-column: 1; grid-row: 1; }
  .toc ol { border-left: 1px solid var(--line); }
  .toc a { padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; }
  .toc a.active { border-left-color: var(--text); }
}
.prose { max-width: 625px; font-size: 17px; line-height: 1.75; }
.prose .dek { margin: 0 0 8px; color: var(--text); font-size: 19px; line-height: 1.6; }
.prose h2 { margin: 54px 0 14px; font-size: 25px; font-weight: 600; letter-spacing: -.03em; line-height: 1.25; scroll-margin-top: 28px; text-shadow: var(--bold-glow); }
.prose p { margin: 0 0 18px; color: color-mix(in srgb, var(--text) 84%, var(--bg)); }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; color: color-mix(in srgb, var(--text) 84%, var(--bg)); }
.prose li { margin: 0 0 10px; padding-left: 4px; }
.prose strong { color: var(--text); }
.prose code { padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--text) 6%, var(--bg)); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .86em; color: var(--text); }
.codeblock { margin: 26px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--text) 3%, var(--bg)); }
.codeblock figcaption { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.codeblock .copy, .btn-sm { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; border-radius: 7px; transition: color .15s; }
.codeblock .copy { padding: 5px 8px; }
.codeblock .copy:hover { color: var(--text); }
.codeblock .icon { width: 14px; height: 14px; }
.codeblock pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.7; }
.codeblock pre code { padding: 0; border: 0; background: none; font-size: inherit; line-height: inherit; white-space: pre; }
.callout { margin: 28px 0; padding: 16px 20px; border: 1px solid var(--line); border-left: 2px solid var(--text); border-radius: 10px; background: color-mix(in srgb, var(--text) 3%, var(--bg)); }
.callout strong { display: block; margin-bottom: 4px; font-size: 15.5px; }
.callout p { margin: 0; font-size: 15.5px; line-height: 1.65; }
.post-end { max-width: 625px; margin-top: 56px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-sm { padding: 8px 14px; border: 1px solid var(--line); color: var(--text); }
.btn-sm:hover { border-color: var(--muted); }
.btn-sm .icon { width: 15px; height: 15px; }
.author { display: flex; align-items: flex-start; gap: 16px; margin: 32px 0 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; }
.author strong { display: block; margin-bottom: 4px; font-weight: 500; }
.author p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.author a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.author a:hover { text-decoration-color: var(--text); }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; font-size: 14.5px; }
.post-nav a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); transition: color .15s; }
.post-nav a:hover { color: var(--text); }
.post-nav .icon { width: 15px; height: 15px; }
.progress { position: fixed; top: 0; left: var(--side-w); right: 0; z-index: 40; height: 2px; background: var(--text); transform: scaleX(0); transform-origin: 0 50%; box-shadow: 0 0 8px var(--text); }
@media (max-width: 900px) { .progress { left: 0; } }

/* breadcrumbs, filters and copy buttons keep the same focus style */
.filters button:focus-visible, .btn-sm:focus-visible, .codeblock .copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 404 page */
.lost { padding: 48px 0 80px; text-align: left; }
.lost-cat { display: block; margin: 0 0 22px; }
.lost-cat svg { width: 112px; height: 112px; margin: 0; border-radius: 50%; background: #efefef; box-shadow: 0 0 0 1px var(--line), 0 0 34px rgba(255,255,255,.16); }
:root[data-theme="light"] .lost-cat svg { box-shadow: 0 0 0 1px var(--line), 0 0 30px rgba(0,0,0,.14); }
.lost-code { margin: 0 0 8px; font-family: var(--pixel); font-size: clamp(64px, 14vw, 120px); line-height: 1; letter-spacing: .02em; color: var(--text); text-shadow: var(--name-glow); }
.lost h1 { margin: 0 0 14px; font-family: var(--display); font-weight: 600; font-size: clamp(26px, 4.4vw, 36px); letter-spacing: -.04em; line-height: 1.1; text-shadow: var(--bold-glow); }
.lost .lede { margin: 0 0 28px; }
.btn-sm.solid { background: var(--text); color: var(--accent-ink); border-color: var(--text); }
.btn-sm.solid:hover { opacity: .88; border-color: var(--text); }
.lost-links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 36px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 15px; }
.lost-links a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); transition: color .15s; }
.lost-links a:hover { color: var(--text); }
.lost-links .icon { width: 14px; height: 14px; }


/* =====================================================================
   Headings and bold text use Geist Pixel (one weight, so never faux-bold)
   ===================================================================== */
h1, h2, h3, h4, h5, h6, strong, b,
.stats .big, .stats .name, .stats dd, .list .result, .tfaq summary,
.head-meta strong, .rec strong, .pres-text strong, .drop strong, .author strong, .callout strong, .proj .when strong,
.proj .result, .summary, .rec .av, .kw th, .tile h3, .tcard h3, .sec-head h2 {
  font-family: var(--pixel) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

/* =====================================================================
   Sidebar text: 13px / 400 / 20px line height / rgb(244, 244, 245)
   ===================================================================== */
:root { --side-text: rgb(244, 244, 245); }
:root[data-theme="light"] { --side-text: rgb(12, 12, 16); }
.sidebar { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--side-text); }
.sidebar .menu a { color: var(--side-text); font-size: 13px; line-height: 20px; font-weight: 400; letter-spacing: 0; padding: 6px 0; }
.sidebar .menu a:hover { color: var(--side-text); opacity: .75; }
.sidebar .menu a.active { color: var(--side-text); }
.sidebar .menu a.active::after { content: ""; width: 5px; height: 5px; margin-left: auto; background: var(--side-text); }
.sidebar .menu a .icon { width: 16px; height: 16px; }
.sidebar .reach { font-size: 13px; line-height: 20px; color: var(--side-text); opacity: .7; }
.sidebar .mail { font-size: 13px; line-height: 20px; color: var(--side-text); }
.sidebar .pres-text { font-size: 13px; line-height: 20px; color: var(--side-text); }
@media (max-width: 900px) {
  .sidebar.open .menu a { font-size: 13px; line-height: 20px; padding: 11px 0; }
}

/* =====================================================================
   Flying Cat: sidebar row + game panel
   ===================================================================== */
/* Keycap colors: dark mode first, light mode mirrors it */
:root { --row-text: rgb(161, 161, 170); --kbd-bg: rgb(30, 30, 34); --kbd-border: rgb(58, 58, 66); --kbd-text: rgb(212, 212, 216); --kbd-muted: rgb(138, 138, 148); --game-shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 22px 60px rgba(0, 0, 0, .6); }
:root[data-theme="light"] { --row-text: rgb(113, 113, 122); --kbd-bg: rgb(244, 244, 245); --kbd-border: rgb(212, 212, 216); --kbd-text: rgb(63, 63, 70); --kbd-muted: rgb(113, 113, 122); --game-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 18px 50px rgba(0, 0, 0, .18); }

.sidebar .game-row { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; margin: 0; padding: 4px 0; border: 0; background: none; color: var(--row-text); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }
.side-keys { display: grid; gap: 2px; margin: 0 0 14px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.side-keys .game-note { margin: 6px 0 0; }
/* the typing test is for desktop only: hide its row on phones, tablets and narrow windows */
@media (max-width: 900px), (hover: none), (pointer: coarse) { .sidebar .type-row { display: none; } }
.game-row .gr-label { color: var(--row-text); transition: color .15s; }
.game-row:hover .gr-label, .game-row[aria-expanded="true"] .gr-label { color: var(--side-text); }
.game-row:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 6px; }
.keys { display: inline-flex; align-items: center; gap: 8px; color: var(--kbd-muted); }
.keys[data-ready="0"] { visibility: hidden; }
.keys .plus { font-size: 13px; line-height: 1; }
.keys kbd { display: inline-grid; place-items: center; box-sizing: border-box; min-width: 28px; height: 24px; padding: 0 7px; border: 1px solid var(--kbd-border); border-radius: 6px; background: var(--kbd-bg); color: var(--kbd-text); font: 12px/1 var(--body); transition: border-color .15s, background-color .15s, color .15s; }
.keys kbd.wide { min-width: 38px; }
.game-row:hover .keys kbd { border-color: color-mix(in srgb, var(--kbd-text) 45%, var(--kbd-border)); }
.game-row[aria-expanded="true"] .keys kbd { background: var(--text); color: var(--accent-ink); border-color: var(--text); }
.game-row .gr-play { display: none; width: 16px; height: 16px; }
.game-row.touch .keys { display: none; }
.game-row.touch .gr-play { display: block; }
.game-note { margin: 6px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-left: 2px solid var(--text); border-radius: 8px; color: var(--side-text); font-size: 12.5px; line-height: 18px; }
.game-note[hidden] { display: none; }

.game { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--bg); color: var(--text); outline: none; }
.game[hidden] { display: none; }
html.game-open { overflow: hidden; }
.game-bar { display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); font-size: 14px; }
.game-bar strong { margin-right: auto; font-size: 16px; }
.game-best { color: var(--muted); font-size: 13px; }
.game-x { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; transition: border-color .15s; }
.game-x:hover { border-color: var(--muted); }
.game-x:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.game-x[hidden] { display: none; }
.game-x .icon { width: 16px; height: 16px; }
.game-x .i-compress { display: none; }
.game-x[aria-pressed="true"] .i-expand { display: none; }
.game-x[aria-pressed="true"] .i-compress { display: block; }
.game-stage { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#catCanvas { display: block; image-rendering: pixelated; touch-action: none; }
.game-help { margin: 0; padding: 10px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border-top: 1px solid var(--line); text-align: center; font-size: 12.5px; color: var(--muted); }

/* =====================================================================
   Typing test (desktop only): full screen, black and white, with a ghost cat
   ===================================================================== */
.tt { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--bg); color: var(--text); outline: none; }
.tt[hidden] { display: none; }
.tt-bar { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tt-bar > strong { font-size: 16px; white-space: nowrap; }
.tt-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-left: 14px; }
.tt-seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; }
.tt-seg button { padding: 5px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; transition: color .15s, background-color .15s; }
.tt-seg button:hover { color: var(--text); }
.tt-seg button[aria-pressed="true"] { background: var(--text); color: var(--accent-ink); }
.tt-seg button:focus-visible, .tt-ghost select:focus-visible, .tt-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.tt-ghost { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.tt-ghost select { padding: 6px 28px 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.tt-best { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tt-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 32px; overflow: auto; }
.tt-run, .tt-result { width: min(1040px, 100%); }
.tt-hud { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 18px; }
.tt-time { font-family: var(--pixel); font-size: clamp(56px, 8vw, 96px); line-height: .9; text-shadow: var(--name-glow); font-variant-numeric: tabular-nums; }
.tt-live { padding-bottom: 6px; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.tt-live span { color: var(--text); font-family: var(--pixel); font-size: 22px; text-shadow: var(--bold-glow); }
.tt-live i { font-style: normal; margin: 0 6px; }
.tt-text { position: relative; height: calc(var(--tt-lh) * 3); overflow: hidden; -webkit-mask-image: linear-gradient(#000 0, #000 calc(100% - var(--tt-lh) * .55), transparent 100%); mask-image: linear-gradient(#000 0, #000 calc(100% - var(--tt-lh) * .55), transparent 100%); }
.tt { --tt-lh: clamp(46px, 4.6vw, 66px); }
.tt-words { position: relative; font-family: var(--pixel); font-size: clamp(22px, 2.5vw, 34px); line-height: var(--tt-lh); letter-spacing: .02em; transition: transform .14s ease-out; }
.tt-words .w { display: inline-block; white-space: pre; }
.tt-words .c { color: color-mix(in srgb, var(--text) 30%, transparent); }
.tt-words .c.ok { color: var(--text); }
.tt-words .c.bad { color: var(--text); background: color-mix(in srgb, var(--text) 22%, transparent); text-decoration: underline wavy; text-underline-offset: 6px; }
.tt-words .c.skip { color: color-mix(in srgb, var(--text) 55%, transparent); text-decoration: underline dotted; text-underline-offset: 6px; }
.tt-words .c.cur { background: var(--text); color: var(--bg); animation: tt-blink 1.1s steps(1) infinite; }
.tt.shake .tt-text { animation: tt-shake .12s; }
@keyframes tt-blink { 50% { background: transparent; color: var(--text); } }
@keyframes tt-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .tt-words { transition: none; } .tt-words .c.cur { animation: none; } .tt.shake .tt-text { animation: none; } }
.tt-hint { margin: 10px 0 0; min-height: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.tt-track { display: block; width: 100%; height: 92px; margin: 22px 0 0; }
.tt-track[hidden], .tt-pace[hidden] { display: none; }
.tt-pace { margin: 6px 0 0; min-height: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.tt-run[hidden], .tt-result[hidden] { display: none; }
/* result */
.tt-result { text-align: center; }
.tt-kicker { margin: 0 0 6px; color: var(--muted); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.tt-big { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.tt-big span { font-family: var(--pixel); font-size: clamp(88px, 14vw, 168px); line-height: 1; text-shadow: var(--name-glow); font-variant-numeric: tabular-nums; }
.tt-big small { color: var(--muted); font-size: 20px; }
.tt-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 26px auto 0; max-width: 720px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tt-grid > div { padding: 14px 8px; border-left: 1px solid var(--line); }
.tt-grid > div:first-child { border-left: 0; }
.tt-grid dt { color: var(--muted); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.tt-grid dd { margin: 4px 0 0; font-family: var(--pixel); font-size: 26px; font-variant-numeric: tabular-nums; }
.tt-ghostline { margin: 18px 0 0; font-size: 16px; }
.tt-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 92px; margin: 22px auto 0; max-width: 720px; padding-bottom: 4px; border-bottom: 1px solid var(--text); }
.tt-bars i { flex: 1 1 0; max-width: 18px; background: var(--text); }
.tt-actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.tt-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.tt-btn:hover { border-color: var(--muted); }
.tt-btn.solid { background: var(--text); color: var(--accent-ink); border-color: var(--text); }
.tt-btn kbd, .tt-k { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border: 1px solid currentColor; border-radius: 5px; font: 11px/1 var(--body); opacity: .75; }
.tt .game-help { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--line); text-align: center; }
.tt .game-help .tt-k { color: var(--kbd-text); border-color: var(--kbd-border); background: var(--kbd-bg); opacity: 1; margin-right: 4px; }
.tt-gap { display: inline-block; width: 18px; }

/* Home hero: greeting and the typed list of roles */
.hero .hello { margin: 0 0 10px; color: var(--muted); font-size: 16px; line-height: 1.4; }
.hero h1 { margin-bottom: 12px; }
.hero .roles { display: flex; align-items: center; min-height: 1.5em; margin: 0 0 26px; color: var(--text); font-family: var(--pixel); font-size: clamp(18px, 5vw, 28px); line-height: 1.5; letter-spacing: .02em; white-space: nowrap; }
.hero .roles #roleText { display: inline-block; }
.role-caret { display: inline-block; flex: none; width: .52em; height: 1.05em; margin-left: .18em; background: var(--text); animation: role-blink 1s steps(1) infinite; }
.roles.typing .role-caret { animation: none; }
@keyframes role-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .role-caret { animation: none; } }

/* Viewer avatars: smaller, with a "+N" chip when more than three people are here (like the reference) */
.pres-av { align-items: center; margin: 0 0 8px; }
.pres-av svg { width: 24px; height: 24px; margin-left: -7px; box-shadow: 0 0 0 2px var(--bg), inset 0 0 0 1px rgba(0, 0, 0, .18); }
.pres-av svg:first-child { margin-left: 0; }
.pres-more { flex: none; display: grid; place-items: center; box-sizing: border-box; min-width: 24px; height: 24px; margin-left: -7px; padding: 0 5px; border-radius: 999px; background: var(--kbd-bg); color: var(--kbd-text); font-size: 10.5px; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--bg), inset 0 0 0 1px var(--kbd-border); }

/* =====================================================================
   Ventures: a gem emblem, one "plate" per venture, discipline tiles and a blueprint stepper
   ===================================================================== */
.emblem { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 12px; background: #000; color: #fff; }
.emblem svg { width: 30px; height: 30px; fill: #fff; shape-rendering: crispEdges; }
.emblem.lg { width: 88px; height: 88px; border-radius: 18px; }
.emblem.lg svg { width: 52px; height: 52px; }
.v-tag { display: inline-block; padding: 2px 9px; border: 1px dashed var(--muted); border-radius: 6px; color: var(--muted); font-family: var(--pixel); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }

/* home card */
.vcard { position: relative; display: flex; gap: 20px; align-items: flex-start; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--text) 3%, var(--bg)); }
.vcard::before, .plate::before { content: ""; position: absolute; top: 0; right: 0; width: 150px; height: 104px; pointer-events: none; opacity: .5;
  background: radial-gradient(circle, color-mix(in srgb, var(--text) 30%, transparent) 1px, transparent 1.4px) 0 0 / 8px 8px;
  -webkit-mask-image: linear-gradient(225deg, #000 0%, transparent 70%); mask-image: linear-gradient(225deg, #000 0%, transparent 70%); }
.vcard-body { position: relative; min-width: 0; }
.vcard h3 { margin: 10px 0 6px; font-size: 22px; text-shadow: var(--bold-glow); }
.vcard p { margin: 0 0 10px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.vlinks { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 6px 0 0 !important; font-size: 14px; }
.vlinks a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.vlinks a:last-child { color: var(--muted); }
.vlinks a:hover { color: var(--muted); }
.vlinks a:last-child:hover { color: var(--text); }
.vlinks .icon, .plate-actions .icon { width: 13px; height: 13px; stroke-width: 2; }
@media (max-width: 560px) { .vcard { flex-direction: column; gap: 14px; padding: 18px; } }

/* page: the plate */
.plate { position: relative; display: flex; gap: 28px; align-items: flex-start; padding: 32px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--text) 3%, var(--bg)); }
.plate-main { position: relative; min-width: 0; }
.plate h2 { margin: 12px 0 2px; font-size: clamp(30px, 4.6vw, 44px); line-height: 1.05; text-shadow: var(--name-glow); }
.plate-kind { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.plate-main > p { max-width: 60ch; color: var(--muted); font-size: 16.5px; line-height: 1.7; margin: 0 0 18px; }
.v-facts { display: flex; flex-wrap: wrap; gap: 16px 36px; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px dashed var(--line); }
.v-facts dt { color: var(--muted); font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; }
.v-facts dd { margin: 2px 0 0; font-size: 15.5px; }
.plate-main > .plate-actions { margin: 24px 0 0; }
@media (max-width: 640px) { .plate { flex-direction: column; padding: 22px; gap: 18px; } }

.vsec { margin: 64px 0 0; }
.vsec > h2 { margin: 0 0 20px; font-size: 24px; text-shadow: var(--bold-glow); }
.disc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.disc { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--text) 3%, var(--bg)); }
.disc .ticon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.disc .ticon .icon { width: 18px; height: 18px; }
.disc h3 { margin: 0; font-size: 18px; }
.disc p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.disc .chips { margin-top: auto; padding-top: 10px; }

/* blueprint stepper: four square nodes on one line */
.blueprint { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.blueprint::before { content: ""; position: absolute; top: 17px; left: 17px; right: 17px; height: 0; border-top: 1px dashed var(--muted); }
.blueprint li { position: relative; }
.blueprint .node { position: relative; display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 14px; border: 1px solid var(--text); border-radius: 8px; background: var(--bg); font-family: var(--pixel); font-size: 14px; }
.blueprint h3 { margin: 0 0 6px; font-size: 17px; }
.blueprint p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
@media (max-width: 820px) {
  .blueprint { grid-template-columns: 1fr; gap: 22px; padding-left: 8px; }
  .blueprint::before { top: 17px; bottom: 17px; left: 25px; right: auto; width: 0; height: auto; border-top: 0; border-left: 1px dashed var(--muted); }
  .blueprint li { display: grid; grid-template-columns: 35px 1fr; column-gap: 16px; }
  .blueprint .node { grid-row: 1 / span 2; margin: 0; }
}
.vcta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; }
.vcta p { margin: 0; font-size: 16.5px; }

/* Shortcut rows: a leading icon, lined up with the menu links above */
.game-row .gr-ico { flex: none; width: 16px; height: 16px; margin-right: 2px; color: var(--row-text); transition: color .15s; }
.game-row:hover .gr-ico, .game-row[aria-expanded="true"] .gr-ico { color: var(--side-text); }

/* Smaller key caps in the shortcut rows (closer to the reference) */
.keys { gap: 6px; }
.keys .plus { font-size: 10px; }
.keys kbd { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; font-size: 10px; line-height: 1; }
.keys kbd.wide { min-width: 28px; }

/* Viewer widget: always the same height, so the sidebar never jumps while the count loads */
.pres-av { min-height: 24px; }
.pres-text { min-height: 20px; }
