/* Theo Mihas portfolio. Concept: the live status console for the systems Theo builds and runs.
   Hero status console, incident-report story, service catalogue with live demos, architecture map, runbook,
   changelog experience and a help desk ticket for contact. Tokens in tokens.css. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-body)/var(--lh-body) var(--font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand-line); color: var(--ink); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-display); }
p { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 1000; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; transition: top var(--dur-2); }
.skip:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.section { padding-block: var(--section-y); position: relative; }
.section--white { background: var(--surface); border-block: 1px solid var(--line); }
.mono { font-family: var(--font-mono); }

/* ---------- type ---------- */
.hero-title { font-size: var(--fs-hero); line-height: var(--lh-tight); letter-spacing: var(--track-hero); font-weight: 800; }
.hero-title .line { display: block; }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); letter-spacing: var(--track-heading); font-weight: 800; }
.lead { font-size: var(--fs-lead); line-height: 1.62; color: var(--ink-2); max-width: 60ch; }
.brand-text { color: var(--brand); }
.overline { display: inline-flex; align-items: center; gap: 10px; font: 600 var(--fs-2xs)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.overline::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--brand); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4) var(--s-8); align-items: end; margin-bottom: var(--s-7); }
.section-head .overline { grid-column: 1 / -1; }
@media (max-width: 900px) { .section-head { grid-template-columns: minmax(0, 1fr); } }

/* ---------- small parts ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px/1 var(--font-sans); color: var(--ok); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 2.2s infinite; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 11px; border-radius: 999px; background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
  font: 600 12.5px/1 var(--font-sans); color: var(--ok); white-space: nowrap; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.kbd { display: inline-grid; place-items: center; min-width: 22px; height: 21px; padding: 0 5px; font: 500 11px/1 var(--font-mono); color: var(--ink-3);
  background: var(--surface); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font: 600 11.5px/1 var(--font-sans); color: var(--ink-2);
  background: var(--surface-3); border: 1px solid var(--line); white-space: nowrap; }
.tech { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 6px; font: 500 12px/1 var(--font-mono); color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line-2); white-space: nowrap; }
a.tech:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.tile { --accent: var(--brand); width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 70%, #fff) 0%, var(--accent) 50%, color-mix(in srgb, var(--accent) 80%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .15), 0 1px 2px rgba(14, 20, 22, .15); }
.tile svg { width: 54%; height: 54%; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 10px; font: 700 15px/1 var(--font-display);
  letter-spacing: -.005em; white-space: nowrap; border: 1px solid transparent; transition: transform var(--dur-2) var(--ease), background var(--dur-2), border-color var(--dur-2), color var(--dur-2); }
.btn svg { width: 17px; height: 17px; transition: transform var(--dur-2) var(--ease); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn--primary { background: var(--ink); color: var(--surface); box-shadow: 0 1px 2px rgba(14, 20, 22, .2), 0 8px 18px -8px rgba(14, 20, 22, .55); }
.btn--primary:hover { transform: translateY(-1px); background: var(--brand-ink); }
:root[data-scheme="dark"] .btn--primary { background: var(--brand); color: var(--on-brand); }
:root[data-scheme="dark"] .btn--primary:hover { background: var(--brand-bright); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.btn--ghost:hover { border-color: var(--line-3); }
.btn--brand { background: var(--brand); color: var(--on-brand); }
.btn--brand:hover { background: var(--brand-ink); transform: translateY(-1px); }
.btn--sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; gap: 7px; }
.btn--sm svg { width: 15px; height: 15px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--ink-3); border: 1px solid transparent; transition: background var(--dur-2), color var(--dur-2), border-color var(--dur-2); }
.icon-btn:hover { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: var(--z-nav); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5); border-bottom: 1px solid var(--line); }
.topbar .container { height: var(--nav-h); display: flex; align-items: center; gap: var(--s-4); }
.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--ink); color: var(--brand-bright); }
.logo-mark svg { width: 18px; height: 18px; }
.logo-name { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name b { font: 800 16px/1.1 var(--font-display); letter-spacing: -.02em; }
.logo-name span { font: 500 10.5px/1.2 var(--font-mono); color: var(--ink-3); letter-spacing: .04em; }
.topbar .status-pill { margin-left: var(--s-2); }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { padding: 8px 10px; border-radius: 8px; font: 600 14px/1 var(--font-display); color: var(--ink-2); transition: color var(--dur-2), background var(--dur-2); }
.nav-links a:hover { color: var(--ink); background: var(--surface-3); }
.nav-links a[aria-current="true"] { color: var(--brand); }
.nav-tools { display: flex; align-items: center; gap: 6px; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 7px 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-3); font-size: 13.5px; box-shadow: var(--shadow-1); }
.search-btn:hover { border-color: var(--line-3); color: var(--ink-2); }
.search-btn svg { width: 15px; height: 15px; }
.menu-btn, .mobile-menu { display: none; }
@media (max-width: 1080px) { .topbar .status-pill { display: none; } }
@media (max-width: 960px) {
  .nav-links, .search-btn .label, .search-btn .kbd, .nav-tools .resume-btn { display: none; }
  .nav-tools { margin-left: auto; }
  .menu-btn { display: inline-grid; }
  .mobile-menu { display: block; position: fixed; top: calc(var(--nav-h) + 8px); left: 12px; right: 12px; z-index: var(--z-nav); background: var(--surface); border: 1px solid var(--line-2);
    border-radius: var(--r-lg); padding: 8px; box-shadow: var(--shadow-3); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity var(--dur-2), transform var(--dur-2), visibility var(--dur-2); }
  .mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
  .mobile-menu a { display: block; padding: 13px 12px; border-radius: var(--r-sm); font: 600 17px/1.2 var(--font-display); }
  .mobile-menu a:hover { background: var(--surface-3); }
  .mobile-menu .btn { width: 100%; margin-top: 6px; display: flex; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 88px); overflow: clip; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 90%); -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 90%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-5); min-width: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-1); }
.note-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--ink-3); font-size: var(--fs-sm); }
.note-row .keys { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* status console */
.console { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden; min-width: 0; }
.console-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 16px; background: var(--console-head); border-bottom: 1px solid var(--line); }
.console-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.console-title b { font: 800 15px/1 var(--font-display); letter-spacing: -.01em; }
.console-title span { font: 500 11.5px/1 var(--font-mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-rows { list-style: none; margin: 0; padding: 4px; }
.console-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; cursor: pointer;
  transition: background var(--dur-2); text-align: left; width: 100%; }
.console-row:hover, .console-row:focus-visible { background: var(--surface-3); }
.console-row .tile { width: 30px; height: 30px; border-radius: 9px; }
.console-row .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.console-row .t b { font: 700 14px/1.2 var(--font-display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-row .t .who { font: 500 11px/1.35 var(--font-mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-row .status { font-size: 12px; }
.console-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); font: 500 11.5px/1.4 var(--font-mono); color: var(--ink-3); }
@media (max-width: 520px) { .console-row .status { font-size: 0; gap: 0; } }

/* ---------- metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.metric { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-5); display: flex; flex-direction: column; gap: 10px; min-width: 0; box-shadow: var(--shadow-1); }
.metric .k { font: 600 var(--fs-2xs)/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.metric .v { font: 800 clamp(2rem, 3.4vw, 2.75rem)/1 var(--font-display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric .v.brand-text { color: var(--brand); }
.metric .d { color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.45; }
@media (max-width: 860px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- incident report (story) ---------- */
.report { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }
.report-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); overflow: hidden; min-width: 0; box-shadow: var(--shadow-1); }
.report-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--console-head); }
.report-card header span { font: 700 var(--fs-2xs)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.report-card--incident header span:first-child { color: var(--err); }
.report-card--resolved header span:first-child { color: var(--ok); }
.report-card header em { font: 500 11.5px/1 var(--font-mono); font-style: normal; color: var(--ink-3); }
.report-body { padding: clamp(18px, 2.6vw, 28px); display: flex; flex-direction: column; gap: var(--s-4); }
.report-body h3 { font-size: var(--fs-h4); font-weight: 800; letter-spacing: -.01em; }
.report-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.report-list li { display: flex; gap: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.report-list svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.report-card--incident .report-list svg { color: var(--err); opacity: .75; }
.report-card--resolved .report-list svg { color: var(--ok); }
@media (max-width: 820px) { .report { grid-template-columns: minmax(0, 1fr); } }

/* ---------- service catalogue ---------- */
.work-grid { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); align-items: start; }
.app-index { position: sticky; top: calc(var(--nav-h) + 16px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 6px; display: flex;
  flex-direction: column; gap: 2px; box-shadow: var(--shadow-2); }
.app-index-head { display: flex; justify-content: space-between; padding: 10px 10px 8px; font: 600 var(--fs-2xs)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.app-index button { position: relative; display: flex; align-items: center; gap: 11px; padding: 7px 9px; border-radius: 10px; text-align: left; color: var(--ink-2); transition: background var(--dur-2), color var(--dur-2); min-width: 0; }
.app-index button .tile { width: 30px; height: 30px; border-radius: 9px; }
.app-index button .t { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.app-index button .t b { font: 700 14px/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.app-index button .t span { font: 500 11px/1.2 var(--font-mono); color: var(--ink-4); }
.app-index button:hover { background: var(--surface-3); color: var(--ink); }
.app-index button[aria-selected="true"] { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.app-index button[aria-selected="true"]::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); flex: none; }
@media (max-width: 1040px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .app-index { position: relative; top: 0; flex-direction: row; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .app-index::-webkit-scrollbar { display: none; }
  .app-index-head { display: none; }
  .app-index button { flex: none; scroll-snap-align: start; }
  .app-index button .t span { display: none; }
}
.panel { display: none; min-width: 0; }
.panel.active { display: block; animation: rise var(--dur-4) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.demo-head { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); justify-content: space-between; align-items: flex-start; margin-bottom: var(--s-4); }
.demo-id { display: flex; gap: var(--s-4); min-width: 0; flex: 1 1 460px; }
.demo-id .tile { width: 52px; height: 52px; border-radius: 14px; }
.demo-titles { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.demo-titles .row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.demo-titles h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.demo-titles .cat { font: 600 var(--fs-2xs)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.demo-titles p { color: var(--ink-2); max-width: 70ch; }
.built-with { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.demo-actions { display: flex; align-items: center; gap: var(--s-2); }

/* ---------- browser frame ---------- */
.frame { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-3); }
.frame-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; height: 44px; padding: 0 8px 0 14px; background: var(--console-head); border-bottom: 1px solid var(--line); }
.frame-dots { display: flex; gap: 6px; }
.frame-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-4); }
.frame-url { justify-self: center; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; max-width: 100%; border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-3); font: 500 12px/1 var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-url b { color: var(--ink); font-weight: 600; }
.frame-url svg { width: 12px; height: 12px; flex: none; color: var(--ok); }
.frame-tools { display: flex; align-items: center; gap: 4px; }
.frame-tools .chip { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-line); }
.frame-tools .icon-btn { width: 30px; height: 30px; }
.frame-tools .icon-btn svg { width: 15px; height: 15px; }
.frame-body { position: relative; background: var(--surface-2); }
.frame-body iframe { width: 100%; height: clamp(540px, 74vh, 780px); border: 0; background: #fff; }
.frame-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font: 500 var(--fs-xs)/1 var(--font-mono); pointer-events: none; }
.frame-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 24px; }
.frame-empty b { font: 800 var(--fs-h4)/1.2 var(--font-display); color: var(--ink); }
.frame-empty span { color: var(--ink-3); font: 400 var(--fs-sm)/1.4 var(--font-sans); }
@media (max-width: 640px) { .frame-body iframe { height: 74vh; } .frame-tools .chip, .frame-dots { display: none; } .frame-bar { grid-template-columns: minmax(0, 1fr) auto; } }

.psr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.psr-card { background: var(--surface); border: 1px solid var(--line-2); border-top-width: 3px; border-radius: var(--r-md); padding: var(--s-5); display: flex; flex-direction: column; gap: 10px; min-width: 0; box-shadow: var(--shadow-1); }
.psr-card--problem { border-top-color: color-mix(in srgb, var(--err) 70%, transparent); }
.psr-card--built { border-top-color: var(--brand); }
.psr-card--result { border-top-color: var(--ok); }
.psr-card .k { font: 700 var(--fs-2xs)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.psr-card p, .psr-card li { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.psr-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 1100px) { .psr { grid-template-columns: minmax(0, 1fr); } }

/* ---------- architecture ---------- */
.arch { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.cap { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-5); display: flex; flex-direction: column; gap: 8px; min-width: 0; box-shadow: var(--shadow-1); }
.cap .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
.cap .ico svg { width: 18px; height: 18px; }
.cap h3 { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; }
.cap p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.cap .where { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 4px; }
@media (max-width: 1000px) { .arch { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .caps { grid-template-columns: minmax(0, 1fr); } }

.sysmap { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1 / 1; margin: 0 auto; }
.sysmap-ring { position: absolute; inset: 8%; border-radius: 50%; border: 1px dashed var(--line-2); }
.sysmap-ring.inner { inset: 27%; border-style: solid; border-color: var(--line); }
.sysmap svg.links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sysmap .links path { stroke: var(--line-3); stroke-width: 1.2; fill: none; stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; animation: flow 1.4s linear infinite; }
.sysmap .links path.on { stroke: var(--node); stroke-width: 2; stroke-dasharray: none; animation: none; }
.sysmap .links circle { fill: var(--node); }
@keyframes flow { to { stroke-dashoffset: -14; } }
.sysmap .hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 38%; padding: 16px 12px 14px; text-align: center; color: #fff; z-index: 1;
  background: radial-gradient(120% 120% at 30% 0%, #2bc4b6 0%, #0b7a72 55%, #064f4a 100%); border-radius: 18px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 24px 48px -18px rgba(11, 122, 114, .6); }
.sysmap .hub::before { content: ""; position: absolute; inset: -9px; border-radius: 24px; border: 1px solid var(--brand-line); pointer-events: none; }
.sysmap .hub svg { width: 24px; height: 24px; margin: 0 auto 8px; }
.sysmap .hub b { display: block; font: 800 clamp(13px, 1.4vw, 15px)/1.2 var(--font-display); }
.sysmap .hub span { display: block; margin-top: 5px; font: 500 10.5px/1.35 var(--font-mono); color: rgba(255, 255, 255, .8); }
.sysmap .node { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; z-index: 1; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 10px; font: 700 12px/1 var(--font-display); white-space: nowrap; box-shadow: var(--shadow-2); transition: transform var(--dur-2) var(--ease), border-color var(--dur-2), box-shadow var(--dur-2); }
.sysmap .node .tile { width: 24px; height: 24px; border-radius: 7px; --accent: var(--node); }
.sysmap .node:hover, .sysmap .node.on { border-color: color-mix(in srgb, var(--node) 55%, transparent); transform: translate(-50%, -50%) scale(1.05); z-index: 2;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--node) 14%, transparent), var(--shadow-3); }
@media (max-width: 560px) { .sysmap .node .label { display: none; } .sysmap .node { padding: 4px; } .sysmap .hub { width: 44%; } .sysmap .hub svg { display: none; } }

/* ---------- runbook ---------- */
.runbook { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.step { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; box-shadow: var(--shadow-1); }
.step .n { display: flex; align-items: center; justify-content: space-between; font: 700 var(--fs-2xs)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.step .n i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-style: normal; letter-spacing: 0; }
.step h3 { font-size: var(--fs-h4); line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.step p { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.checks { list-style: none; padding: 0; margin: var(--s-1) 0 0; display: flex; flex-direction: column; gap: 7px; }
.checks li { display: flex; gap: 9px; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.checks li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 4px; background-color: var(--ok-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310a35a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E");
  background-size: 10px; background-position: center; background-repeat: no-repeat; }
@media (max-width: 980px) { .runbook { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .runbook { grid-template-columns: minmax(0, 1fr); } }

/* ---------- changelog (experience) ---------- */
.changelog { position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding-left: 28px; }
.changelog::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; background: var(--line-2); border-radius: 2px; }
.release { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--s-5); padding: var(--s-5); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.release::before { content: ""; position: absolute; left: -26px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink-4); }
.release.current::before { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.release-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.release-meta .ver { font: 700 12px/1 var(--font-mono); padding: 5px 8px; border-radius: 6px; background: var(--ink); color: var(--surface); }
.release.current .release-meta .ver { background: var(--brand); color: var(--on-brand); }
.release-meta time { font: 500 12px/1.4 var(--font-mono); color: var(--ink-3); }
.release h3 { font-size: 1.12rem; font-weight: 800; letter-spacing: -.015em; }
.release .org { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 2px; }
.release ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.release .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
@media (max-width: 760px) { .release { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); } .release-meta { flex-direction: row; align-items: center; } }

.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-6); }
.skill-group { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-5); min-width: 0; box-shadow: var(--shadow-1); }
.skill-group h3 { font: 700 var(--fs-2xs)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s-4); }
.skill-group .list { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 860px) { .skills { grid-template-columns: minmax(0, 1fr); } }

/* ---------- contact: a help desk ticket ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(32px, 6vw, 80px); align-items: center; }
.contact-grid .h2 { margin: var(--s-4) 0; }
.ticket { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden; }
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--console-head); border-bottom: 1px solid var(--line); }
.ticket-head b { font: 700 13px/1 var(--font-mono); }
.ticket-head .badges { display: flex; gap: 6px; }
.ticket-head .badges span { font: 700 11px/1 var(--font-sans); padding: 5px 8px; border-radius: 6px; }
.ticket-head .open { color: var(--ok); background: var(--ok-soft); }
.ticket-head .prio { color: var(--warn); background: var(--warn-soft); }
.ticket-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.ticket-row .k { font: 600 var(--fs-2xs)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ticket-row b { font-weight: 600; overflow-wrap: anywhere; }
.ticket-row a b { color: var(--brand); }
.ticket-body { padding: 16px 18px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 440px) { .ticket-row { grid-template-columns: minmax(0, 1fr) auto; } .ticket-row .k { grid-column: 1 / -1; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding-top: var(--s-8); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.footer h4 { font: 700 var(--fs-2xs)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s-4); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer ul a { color: var(--ink-2); font-size: 14.5px; display: inline-flex; align-items: center; gap: 9px; }
.footer ul a:hover { color: var(--brand); }
.footer ul a i { width: 8px; height: 8px; border-radius: 3px; background: var(--accent); }
.footer .blurb { color: var(--ink-3); font-size: 15px; max-width: 38ch; margin: var(--s-4) 0; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); margin-top: var(--s-8); padding-block: var(--s-5); border-top: 1px solid var(--line); color: var(--ink-4); font-size: var(--fs-sm); }
.to-top { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 600; }
.to-top:hover { color: var(--brand); }
.to-top svg { width: 15px; height: 15px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- command palette ---------- */
.palette-back { position: fixed; inset: 0; z-index: var(--z-palette); background: rgba(14, 20, 22, .32); backdrop-filter: blur(4px); display: none; padding: 12vh 16px 16px; }
.palette-back.open { display: block; }
.palette { max-width: 600px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; }
.palette input { width: 100%; height: 54px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 16px var(--font-sans); padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--ink-2); }
.palette li a .tile { width: 28px; height: 28px; border-radius: 8px; }
.palette li a small { margin-left: auto; color: var(--ink-4); font: 500 11px/1 var(--font-mono); }
.palette li a[aria-selected="true"], .palette li a:hover { background: var(--surface-3); color: var(--ink); }

/* ---------- reveal (only with JavaScript; ?static shows everything at once, for screenshots) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-4) var(--ease), transform var(--dur-4) var(--ease); }
.js .reveal.in, .static .reveal { opacity: 1; transform: none; }
.static, .static body { scroll-behavior: auto; }
.static .reveal, .static .panel.active { transition: none; animation: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .sysmap .links path, .status::before, .status-pill::before { animation: none; }
  .panel.active { animation: none; }
}
/* stories under each demo: problem and result side by side, then what I built full width in two columns */
.psr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.psr-card--built { grid-column: 1 / -1; order: 3; }
.psr-card--result { order: 2; }
.psr-card--problem { order: 1; }
.psr-card--built ul { display: block; columns: 2; column-gap: 36px; }
.psr-card--built li { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 760px) { .psr { grid-template-columns: minmax(0, 1fr); } .psr-card--built ul { columns: 1; } }
