/* ===== Tokens ===== */
:root {
  --bg: #f7f8fb;
  --bg-alt: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --border: #dfe3ec;
  --text: #0f172a;
  --muted: #526077;
  --accent: #0d9488;
  --accent-2: #4f46e5;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --code-bg: #0f172a;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Sora", var(--font);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120;
    --bg-alt: #0e1528;
    --surface: #111a2e;
    --surface-2: #16213a;
    --border: #22304d;
    --text: #e6ebf5;
    --muted: #94a3bd;
    --accent: #2dd4bf;
    --accent-2: #818cf8;
    --accent-soft: rgba(45, 212, 191, 0.12);
    --code-bg: #0a1020;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120;
  --bg-alt: #0e1528;
  --surface: #111a2e;
  --surface-2: #16213a;
  --border: #22304d;
  --text: #e6ebf5;
  --muted: #94a3bd;
  --accent: #2dd4bf;
  --accent-2: #818cf8;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --code-bg: #0a1020;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg .fill { fill: currentColor; stroke: none; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--accent-soft); color: var(--accent); padding: 0.1em 0.4em; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 28px; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px;
  font: 600 15px/1 var(--font);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn--primary { color: #04201c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--primary { color: #04201c; } }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 8px 14px; font-size: 14px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; }
.logo__mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 14px; letter-spacing: 0.02em;
}
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a:not(.btn) { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: var(--text); background: var(--surface-2); }
.nav__resume { margin-left: 8px; }
.nav__actions { display: flex; gap: 8px; }
.nav__burger { display: none; }

@media (max-width: 1080px) {
  .logo__name { display: none; }
  .nav__burger { display: inline-grid; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 12px; }
  .nav__resume { margin: 8px 0 0; justify-content: center; }
}

/* ===== Hero ===== */
.hero { position: relative; padding: 72px 0 56px; overflow: hidden; }
.hero__glow {
  position: absolute; inset: -20% -10% auto; height: 640px; pointer-events: none;
  background:
    radial-gradient(600px 300px at 20% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(500px 280px at 80% 20%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 70%);
  filter: blur(10px);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero__title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; margin-bottom: 18px; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__role { font-family: var(--mono); font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.rotator { color: var(--text); border-right: 2px solid var(--accent); padding-right: 4px; }
.hero__lead { font-size: 1.08rem; color: var(--muted); max-width: 620px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero__social { display: flex; flex-wrap: wrap; gap: 18px; }
.hero__social a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.hero__social a:hover { color: var(--accent); }
.hero__social svg { width: 18px; height: 18px; }

.code { background: var(--code-bg); border: 1px solid #1e2a44; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.code__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid #1e2a44; }
.code__bar span { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.code__bar span:nth-child(1) { background: #f87171; }
.code__bar span:nth-child(2) { background: #fbbf24; }
.code__bar span:nth-child(3) { background: #34d399; }
.code__bar em { margin-left: 10px; font: 12px var(--mono); color: #7c8aa5; font-style: normal; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 13px/1.7 var(--mono); color: #cbd5e1; }
.code code { background: none; color: inherit; padding: 0; font-size: inherit; }
.code .k { color: #c084fc; } .code .t { color: #5eead4; } .code .v { color: #93c5fd; } .code .s { color: #fcd34d; } .code .f { color: #f9a8d4; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 56px 0 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column-reverse; gap: 4px; }
.stat dd { margin: 0; font-family: var(--display); font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat dt { color: var(--muted); font-size: 14px; }

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) { .code pre { font-size: 11.5px; padding: 14px; } }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.section__sub { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }
.eyebrow { font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 10px; }
@media (max-width: 640px) { .section { padding: 64px 0; } .section__head { margin-bottom: 32px; } }

/* About */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.about__text p { color: var(--muted); font-size: 1.05rem; }
.about__text strong { color: var(--text); }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pillar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.pillar h3 { font-size: 1.02rem; margin: 12px 0 6px; }
.pillar p { color: var(--muted); font-size: 14px; margin: 0; }
.pillar__icon, .card__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .pillars { grid-template-columns: 1fr; } }

/* Infrastructure stack */
.stack { display: grid; gap: 8px; max-width: 820px; margin: 0 auto 40px; position: relative; }
.stack__layer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
}
.stack__layer:nth-child(n+4) { border-left-color: var(--accent-2); }
.stack__layer:nth-child(n+5) { background: color-mix(in srgb, var(--accent-2) 8%, var(--surface)); }
.stack__layer--base { background: color-mix(in srgb, var(--accent-2) 14%, var(--surface)) !important; }
.stack__name { font-family: var(--display); font-weight: 600; }
.stack__items { font: 13px var(--mono); color: var(--muted); }
.stack__note { text-align: center; font: 500 13px var(--mono); color: var(--accent); margin: 8px 0 0; }

/* Timeline */
.timeline { position: relative; display: grid; gap: 20px; }
.job { display: grid; grid-template-columns: 200px 1fr; gap: 28px; position: relative; }
.job__meta { display: flex; flex-direction: column; gap: 4px; padding-top: 22px; }
.job__date { font: 500 14px var(--mono); color: var(--accent); }
.job__place { color: var(--muted); font-size: 14px; }
.job__body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.job__body h3 { font-size: 1.15rem; margin-bottom: 12px; }
.at { color: var(--muted); font-weight: 500; }
.job__body > ul:not(.tags) { display: grid; gap: 8px; margin-bottom: 16px; }
.job__body > ul:not(.tags) li, .mini li, .checks li { position: relative; padding-left: 18px; color: var(--muted); }
.job__body > ul:not(.tags) li::before, .mini li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.job__body strong { color: var(--text); }
@media (max-width: 760px) { .job { grid-template-columns: 1fr; gap: 6px; } .job__meta { flex-direction: row; gap: 12px; padding-top: 0; } }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 500 12px var(--mono); padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* Feature project */
.feature {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 36px; box-shadow: var(--shadow); margin-bottom: 24px;
}
.kicker { font: 500 12px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.feature h3 { font-size: 2rem; }
.feature__sub { color: var(--accent-2); font-weight: 600; margin: 6px 0 14px; }
.feature__copy > p { color: var(--muted); }
.checks { display: grid; gap: 8px; margin: 18px 0 22px; }
.checks li { padding-left: 26px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.checks strong { color: var(--text); }

.flow { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; align-self: start; }
.flow__title { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 16px; }
.flow__steps { display: grid; gap: 0; }
.flow__steps li { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.flow__steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 2px; background: var(--border); }
.flow__steps span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); color: var(--accent); font: 600 13px var(--mono); flex-shrink: 0; }
.flow__end span { background: var(--accent); color: #fff; }
.flow__steps strong { display: block; font-size: 15px; }
.flow__steps small { color: var(--muted); font-size: 13px; }
.flow__channels { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; border-top: 1px dashed var(--border); }
.flow__channels span { font: 500 12px var(--mono); padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; padding: 24px; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__label { font: 500 11.5px var(--mono); color: var(--muted); text-align: right; }
.card h3 { font-size: 1.2rem; margin-top: 4px; }
.card > p { color: var(--muted); margin: 0; font-size: 15px; }
.mini { display: grid; gap: 6px; font-size: 14px; margin: 4px 0 8px; flex: 1; }
@media (max-width: 1000px) { .cards, .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards, .cards--4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.panel__title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 16px; }
.panel__title svg { color: var(--accent); }
.list { display: grid; }
.list li { display: flex; flex-direction: column; padding: 12px 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.skill h3 { font-size: 1rem; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.chips li.hl { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); font-weight: 600; }
@media (max-width: 760px) { .skills { grid-template-columns: 1fr; } }

.edu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.edu__item { border-top: 2px solid var(--accent); padding-top: 16px; }
.edu__item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.edu__item p:last-child { color: var(--muted); font-size: 14px; margin: 0; }
@media (max-width: 760px) { .edu { grid-template-columns: 1fr; } }

/* Contact */
.contact {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 44px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px 220px at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
.contact > * { position: relative; }
.contact h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 14px; }
.contact__copy > p { color: var(--muted); }
.contact__list { display: grid; gap: 4px; }
.contact__list li { display: flex; flex-direction: column; padding: 12px 0; border-top: 1px solid var(--border); min-width: 0; }
.contact__list li:first-child { border-top: 0; }
.contact__label { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.contact__list a { font-weight: 500; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--accent); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; padding: 28px 20px; } }

/* Footer */
.footer { padding: 28px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer__top:hover { color: var(--accent); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 60;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  .btn, .card { transition: none; }
}

@media print {
  .nav, .hero__glow, .toast, .hero__card { display: none; }
  .reveal { opacity: 1; transform: none; }
}

/* Grid children must be allowed to shrink so wide code blocks scroll instead of overflowing */
.hero__grid > *, .about > *, .feature > *, .contact > *, .job > *, .split > *, .cards > *, .skills > * { min-width: 0; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }
.code pre, .stack__items { font-variant-ligatures: none; }

/* ===== Skills (every skill has equal weight) ===== */
.skills { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill {
  position: relative; overflow: hidden; padding: 22px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.skill::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.skill:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); }
.skill__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.skill__head h3 { margin: 0; font-size: 1.05rem; flex: 1; }
.skill__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.skill__count {
  font: 600 12px var(--mono); color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  padding: 3px 9px; border-radius: 999px;
}
.skill__count:empty { display: none; }
.skill .chips li {
  font-size: 13.5px; font-weight: 500; padding: 6px 12px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  color: var(--text);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.skill .chips li:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.section__sub b { color: var(--accent); }
@media (max-width: 1000px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .skills { grid-template-columns: 1fr; } }

/* ===== Experience durations ===== */
.job__dur {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px;
  font: 600 13px var(--mono); color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 4px 10px; border-radius: 999px;
}
.job__type { font-size: 13px; color: var(--muted); }

/* ===== Playground ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pg { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.pg__tabs { display: flex; gap: 4px; padding: 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.pg__tabs::-webkit-scrollbar { display: none; }
.pg__tab {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 14px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  font: 600 14px var(--font); color: var(--muted); cursor: pointer;
}
.pg__tab:hover { color: var(--text); }
.pg__tab[aria-selected="true"] { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.pg__tab svg { width: 18px; height: 18px; color: var(--accent); }
.pg__kind { font: 500 11px var(--mono); color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); padding: 2px 7px; border-radius: 999px; }
.pg__panel { padding: 28px; }
.pg__intro { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.pg__intro p { margin: 0; color: var(--muted); max-width: 720px; }
.pg__intro strong { color: var(--text); }
.pg__shows { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.pg__shows li { font: 500 12px var(--mono); padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pg__shows--end { margin-top: 22px; }
@media (max-width: 640px) { .pg__panel { padding: 18px 14px; } }

.inp {
  font: 15px var(--font); color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; min-width: 0;
}
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp--sel { cursor: pointer; }
.inp--sm { padding: 8px 12px; font-size: 14px; }
.inp--mono { font-family: var(--mono); }
.link-btn { background: none; border: 0; padding: 4px 2px; font: 500 14px var(--font); color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--accent); }
.chip-btn { font: 500 13px var(--mono); padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Task board */
.tb__form { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin-bottom: 14px; }
.tb__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.tb__tools .inp { width: 200px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 7px 12px; font: 500 13px var(--font); color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.is-on { background: var(--accent); color: #fff; }
.tb__progress { font: 500 13px var(--mono); color: var(--muted); margin-left: auto; }
.tb__board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tb__board > * { min-width: 0; }
.tb__col { background: var(--surface-2); border: 1px dashed transparent; border-radius: 14px; padding: 14px; min-height: 220px; transition: border-color .15s ease, background .15s ease; }
.tb__col.is-over { border-color: var(--accent); background: var(--accent-soft); }
.tb__col h4 { margin: 0 0 12px; font: 600 14px var(--display); display: flex; align-items: center; gap: 8px; }
.tb__col .cnt { font: 500 12px var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.tb__list { display: grid; gap: 10px; }
.tb__card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: grab; display: grid; gap: 8px; animation: pop .2s ease; }
.tb__card.is-drag { opacity: .45; }
.tb__card.is-done .tb__title { text-decoration: line-through; color: var(--muted); }
.tb__title { margin: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.tb__actions { display: flex; gap: 6px; justify-content: flex-end; }
.tb__btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 15px; line-height: 1; }
.tb__btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.tb__btn:disabled { opacity: .35; cursor: default; }
.tb__btn--del:hover:not(:disabled) { border-color: #ef4444; color: #ef4444; }
.tb__empty { font-size: 13px; color: var(--muted); text-align: center; padding: 22px 8px; border: 1px dashed var(--border); border-radius: 10px; }
.prio { justify-self: start; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; }
.prio--high { background: rgba(239, 68, 68, .14); color: #dc2626; }
.prio--medium { background: rgba(245, 158, 11, .16); color: #b45309; }
.prio--low { background: rgba(34, 197, 94, .15); color: #15803d; }
:root[data-theme="dark"] .prio--high { color: #f87171; }
:root[data-theme="dark"] .prio--medium { color: #fbbf24; }
:root[data-theme="dark"] .prio--low { color: #4ade80; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .prio--high { color: #f87171; }
  :root:not([data-theme="light"]) .prio--medium { color: #fbbf24; }
  :root:not([data-theme="light"]) .prio--low { color: #4ade80; }
}
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 760px) {
  .tb__form { grid-template-columns: 1fr 1fr; }
  .tb__form #tb-title { grid-column: 1 / -1; }
  .tb__board { grid-template-columns: 1fr; }
  .tb__col { min-height: 0; }
  .tb__tools .inp { width: 100%; }
  .tb__progress { margin-left: 0; }
}

/* API console */
.api { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.api > * { min-width: 0; }
.api__line { display: flex; gap: 10px; margin-bottom: 12px; }
.api__line .inp { flex: 1; font-family: var(--mono); font-size: 13.5px; }
.api__label { display: block; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.api__code {
  display: block; width: 100%; margin: 0; padding: 14px 16px; border-radius: 12px; resize: vertical;
  background: var(--code-bg); color: #cbd5e1; border: 1px solid #1e2a44;
  font: 12.5px/1.6 var(--mono); font-variant-ligatures: none; tab-size: 2;
}
.api__code:focus { outline: none; border-color: var(--accent); }
textarea.api__code:disabled { color: #64748b; }
.api__out { min-height: 340px; max-height: 470px; overflow: auto; white-space: pre; }
.api__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; min-height: 26px; }
.api__meta .api__label { margin: 0; }
.api__status { font: 600 12px var(--mono); padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.api__status.is-ok { background: rgba(34, 197, 94, .14); color: #16a34a; border-color: transparent; }
.api__status.is-err { background: rgba(239, 68, 68, .14); color: #dc2626; border-color: transparent; }
.api__time { font: 12px var(--mono); color: var(--muted); }
.api__curl { margin: 10px 0 0; display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.api__curl span { font: 600 11px var(--mono); color: var(--muted); padding-top: 3px; }
.api__curl code { font-size: 11.5px; overflow-wrap: anywhere; color: var(--muted); background: var(--surface-2); }
@media (max-width: 900px) { .api { grid-template-columns: 1fr; } .api__out { min-height: 220px; } }

/* Subnet calculator */
.net__form { display: flex; gap: 10px; max-width: 520px; }
.net__form .inp { flex: 1; }
.net__presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 13px; color: var(--muted); }
.net__err { color: #dc2626; min-height: 1.4em; margin: 6px 0; font-size: 14px; }
.net__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0 0 18px; }
.net__cell { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; min-width: 0; }
.net__cell dt { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.net__cell dd { margin: 2px 0 0; font: 600 15px var(--mono); overflow-wrap: anywhere; }
.net__bits { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font: 600 13px var(--mono); }
.net__bit { display: inline-grid; place-items: center; width: 18px; height: 24px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.net__bit.is-net { background: var(--accent); color: #fff; }
.net__dot { padding: 0 3px; color: var(--muted); }
.net__legend { flex-basis: 100%; margin: 10px 0 0; font: 12px var(--mono); color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.net__key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.net__key.is-net { background: var(--accent); border-color: var(--accent); }
@media (max-width: 480px) { .net__bit { width: 14px; height: 20px; font-size: 11px; } }

/* Games */
.games { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.game { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 20px; min-width: 0; }
.game__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.game__head h3 { font-size: 1.1rem; }
.game__sub { color: var(--muted); font-size: 14px; margin: 6px 0 12px; }
.game__msg { min-height: 1.5em; margin: 12px 0 0; font-weight: 600; color: var(--accent); text-align: center; }
.mem__stats { display: flex; gap: 16px; font: 13px var(--mono); color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.mem__stats b { color: var(--text); }
.mem__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mem__card { aspect-ratio: 1 / 1; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; }
.mem__inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .4s ease; transform-style: preserve-3d; }
.mem__card.is-open .mem__inner, .mem__card.is-matched .mem__inner { transform: rotateY(180deg); }
.mem__back, .mem__front {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.mem__back { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: rgba(255,255,255,.85); font: 600 14px var(--mono); }
.mem__front { transform: rotateY(180deg); background: var(--surface); border: 2px solid var(--border); font: 600 clamp(11px, 1.6vw, 14px) var(--display); color: var(--text); padding: 4px; text-align: center; }
.mem__card.is-matched .mem__front { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 280px; margin: 0 auto; }
.ttt__cell {
  aspect-ratio: 1 / 1; border-radius: 12px; border: 2px solid var(--border); background: var(--surface);
  font: 700 2.2rem var(--display); color: var(--text); cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.ttt__cell:hover:not(:disabled) { border-color: var(--accent); }
.ttt__cell:disabled { cursor: default; }
.ttt__cell.is-x { color: var(--accent); }
.ttt__cell.is-o { color: var(--accent-2); }
.ttt__cell.is-win { background: var(--accent-soft); border-color: var(--accent); }
@media (max-width: 900px) { .games { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .mem__inner { transition: none; } .tb__card { animation: none; } }
.mem__grid { max-width: 400px; margin: 0 auto; }

/* ===== Products ===== */
.product {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px; margin-bottom: 24px; box-shadow: var(--shadow);
}
.product__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.product h3 { font-size: 1.8rem; }
.product__alt { font-size: 1.1rem; color: var(--muted); font-weight: 500; }
.product__sub { color: var(--accent-2); font-weight: 600; margin: 6px 0 0; }
.product__lead { color: var(--muted); margin: 16px 0 20px; max-width: 860px; }
.product__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 32px; margin-bottom: 20px; }
.product__grid > * { min-width: 0; }
.fgroup h4 { font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin: 0 0 4px; }
.fgroup .checks { margin: 8px 0 14px; }
.fgroup .checks li { font-size: 14.5px; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px var(--mono); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--live { background: rgba(34, 197, 94, .14); color: #16a34a; }
.status--live .status__dot { animation: pulse 2s infinite; box-shadow: 0 0 0 0 currentColor; }
.status--staging { background: rgba(245, 158, 11, .16); color: #b45309; }
:root[data-theme="dark"] .status--live { color: #4ade80; }
:root[data-theme="dark"] .status--staging { color: #fbbf24; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .status--live { color: #4ade80; }
  :root:not([data-theme="light"]) .status--staging { color: #fbbf24; }
}
@media (max-width: 760px) { .product { padding: 22px 18px; } .product__grid { grid-template-columns: 1fr; } .product h3 { font-size: 1.5rem; } }

.nda {
  display: flex; gap: 16px; align-items: flex-start; margin-top: 24px; padding: 22px 24px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: var(--radius);
  background: var(--accent-soft);
}
.nda__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface); color: var(--accent); flex-shrink: 0; }
.nda h3 { font-size: 1.05rem; margin-bottom: 6px; }
.nda p { margin: 0; color: var(--muted); font-size: 15px; }

/* ===== Playground v2 ===== */
.game, .tb__board, .net__box, .mon { position: relative; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: fall 1.3s ease-in forwards; }
@keyframes fall { to { transform: translate(var(--dx), 420px) rotate(var(--r)); opacity: 0; } }

/* Arcade */
.arcade__menu { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.arcade__pick {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; color: var(--text);
  font: 600 14px var(--font); transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.arcade__pick:hover { transform: translateY(-2px); border-color: var(--accent); }
.arcade__pick.is-on { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.arcade__pick small { font: 500 11px var(--mono); color: var(--muted); }
.arcade__emoji { font-size: 26px; line-height: 1.2; }
@media (max-width: 760px) { .arcade__menu { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .arcade__menu { grid-template-columns: repeat(2, 1fr); } }

.game { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 22px; min-width: 0; overflow: hidden; }
.game__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.game__head h3 { font-size: 1.2rem; }
.game__head > div:first-child { flex: 1 1 320px; }
.game__sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.game__ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.game__msg { min-height: 1.5em; margin: 14px 0 0; font-weight: 600; color: var(--accent); text-align: center; }
.hud { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hud span { font: 12px var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; }
.hud b { color: var(--text); font-size: 13px; margin-left: 4px; }

/* Whack-a-Bug */
.wb__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 460px; margin: 0 auto; touch-action: manipulation; user-select: none; }
.wb__cell {
  position: relative; aspect-ratio: 4 / 3; border-radius: 14px; border: 2px solid var(--border); cursor: pointer;
  background: linear-gradient(180deg, var(--surface), var(--surface-2)); overflow: hidden; padding: 0;
}
.wb__rack { position: absolute; left: 12%; right: 12%; bottom: 14%; height: 26%; border-radius: 6px; background: repeating-linear-gradient(180deg, var(--border) 0 4px, transparent 4px 9px); opacity: .9; }
.wb__rack::after { content: ""; position: absolute; right: 8px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.wb__thing { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(28px, 6vw, 44px); transform: translateY(70%) scale(.6); opacity: 0; transition: transform .14s ease, opacity .14s ease; }
.wb__cell.is-up .wb__thing { transform: translateY(-8%) scale(1); opacity: 1; }
.wb__cell.is-bug, .wb__cell.is-boss { border-color: #ef4444; }
.wb__cell.is-boss { background: linear-gradient(180deg, rgba(239,68,68,.15), var(--surface-2)); }
.wb__cell.is-bug .wb__rack::after, .wb__cell.is-boss .wb__rack::after { background: #ef4444; box-shadow: 0 0 8px #ef4444; animation: blink .4s infinite; }
.wb__cell.is-feature { border-color: #f59e0b; }
@keyframes blink { 50% { opacity: .2; } }
.wb__float { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font: 700 18px var(--display); animation: floatUp .7s ease forwards; pointer-events: none; }
.wb__float.is-good { color: #16a34a; } .wb__float.is-bad { color: #dc2626; }
@keyframes floatUp { to { transform: translate(-50%, -40px); opacity: 0; } }

/* Typing */
.ty__target {
  font: 500 clamp(14px, 2vw, 19px)/1.7 var(--mono); padding: 18px 20px; border-radius: 12px; cursor: text;
  background: var(--code-bg); color: #64748b; border: 1px solid #1e2a44; margin-bottom: 12px; overflow-wrap: anywhere; font-variant-ligatures: none;
}
.ty__ch { white-space: pre-wrap; }
.ty__ch.is-ok { color: #5eead4; }
.ty__ch.is-bad { color: #fff; background: #dc2626; border-radius: 3px; }
.ty__ch.is-cur { border-left: 2px solid #fcd34d; margin-left: -2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { border-left-color: transparent; } }
.ty__input { width: 100%; font-size: 15px; }

/* Quiz */
.qz__timer { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin-bottom: 18px; }
.qz__timer span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1s linear; }
.qz__timer span.is-low { background: #ef4444; }
.qz__cat { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); margin: 0 0 6px; min-height: 1.2em; }
.qz__q, .nq__q { font: 600 1.15rem/1.4 var(--display); margin: 0 0 16px; }
.qz__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qz__opt {
  text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: 500 14.5px var(--font); cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.qz__opt:hover:not(:disabled) { border-color: var(--accent); }
.qz__opt:disabled { cursor: default; }
.qz__opt.is-right { border-color: #16a34a; background: rgba(34, 197, 94, .14); }
.qz__opt.is-wrong { border-color: #dc2626; background: rgba(239, 68, 68, .12); }
.qz__exp { min-height: 1.5em; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .qz__opts { grid-template-columns: 1fr; } }

/* Memory (v2) */
.mem__grid { grid-template-columns: repeat(var(--cols, 4), 1fr); max-width: 460px; margin: 0 auto; }

/* Live API v2 */
.api__line { flex-wrap: wrap; }
.api__line .btn { flex: 1; justify-content: center; }
.api__viz { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.viz__sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.viz__sum div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.viz__sum b { display: block; font: 700 1.2rem var(--display); color: var(--accent); }
.viz__sum span { font-size: 11.5px; color: var(--muted); }
.viz__group + .viz__group { margin-top: 10px; }
.viz__title { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.viz__row { display: grid; grid-template-columns: 120px 1fr 72px; gap: 8px; align-items: center; margin-bottom: 5px; font-size: 12.5px; }
.viz__label { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz__track { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.viz__fill { display: block; height: 100%; border-radius: 999px; background: var(--accent-2); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.viz__fill.is-ok { background: #22c55e; } .viz__fill.is-warn { background: #f59e0b; } .viz__fill.is-err { background: #ef4444; }
.viz__val { font: 12px var(--mono); color: var(--muted); text-align: right; }
.api__out { min-height: 200px; max-height: 340px; }
.api__hist { margin-top: 12px; }
.api__hist ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.api__hist li { display: grid; grid-template-columns: 44px 1fr 44px 64px; gap: 8px; font: 12px var(--mono); padding: 6px 10px; background: var(--surface-2); border-radius: 8px; animation: pop .2s ease; }
.api__hist li.api__empty { display: block; color: var(--muted); }
.h__m { color: var(--accent-2); font-weight: 600; } .h__u { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h__s.is-ok { color: #16a34a; font-weight: 600; } .h__s.is-err { color: #dc2626; font-weight: 600; } .h__ms { color: var(--muted); text-align: right; }
@media (max-width: 560px) { .viz__sum { grid-template-columns: repeat(2, 1fr); } .viz__row { grid-template-columns: 90px 1fr 64px; } }

.mon { margin-top: 22px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.mon__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mon__head h3 { font-size: 1.1rem; }
.mon__head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.mon__stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; }
.mon__stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.mon__stats span { display: block; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mon__stats b { font: 600 14px var(--mono); }
.mon__stats b.is-ok { color: #16a34a; } .mon__stats b.is-err { color: #dc2626; }
.mon__chart { width: 100%; height: 120px; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.mon__axis { stroke: var(--border); stroke-width: 1; }
.mon__line { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.mon__area { fill: var(--accent-soft); stroke: none; }
@media (max-width: 900px) { .mon__stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .mon__stats { grid-template-columns: repeat(2, 1fr); } }

/* Network lab v2 */
.net__form { max-width: 640px; flex-wrap: wrap; }
.net__form .inp { flex: 1 1 220px; }
.net__two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.net__two > * { min-width: 0; }
.net__box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 18px; overflow: hidden; }
.net__boxhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.net__boxhead h3 { font-size: 1.05rem; }
.net__score { font: 12px var(--mono); color: var(--muted); }
.net__score b { color: var(--text); }
.split__bar { display: flex; gap: 2px; height: 14px; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.split__seg { flex: 1; }
.split__list { display: grid; gap: 4px; max-height: 300px; overflow: auto; }
.split__row { display: grid; grid-template-columns: 10px minmax(0, 1.1fr) minmax(0, 1.6fr) auto; gap: 8px; align-items: center; font: 12px var(--mono); padding: 6px 8px; background: var(--surface); border-radius: 8px; }
.split__row span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split__row em { font-style: normal; color: var(--accent); }
.split__dot { width: 10px; height: 10px; border-radius: 3px; }
.split__note { color: var(--muted); font-size: 14px; margin: 0; }
.nq__q { font-size: 1rem; }
@media (max-width: 900px) { .net__two { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .split__row { grid-template-columns: 10px 1fr auto; } .split__row span { display: none; } }

/* Task board v2 */
.tb__form { grid-template-columns: 1fr auto auto auto; }
.tb__progress { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font: 500 13px var(--mono); color: var(--muted); }
.tb__bar { flex: 1; height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.tb__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .5s ease; }
@media (max-width: 760px) { .tb__form { grid-template-columns: 1fr 1fr; } .tb__progress { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .wb__thing, .viz__fill, .tb__bar span, .qz__timer span { transition: none; } .ty__ch.is-cur { animation: none; } }
