/* ============ Tokens ============ */
:root {
  color-scheme: dark;
  --bg: #0a0f16;
  --bg-2: #0d141d;
  --surface: #111a25;
  --surface-2: #162130;
  --line: #1f2c3c;
  --line-2: #2a3a4e;
  --text: #e7eef6;
  --muted: #8c9cb0;
  --faint: #5d6e83;
  --accent: #5aa9ff;
  --accent-soft: rgb(90 169 255 / 12%);
  --auto: #b49cff;
  --auto-soft: rgb(180 156 255 / 10%);
  --auto-line: rgb(180 156 255 / 34%);
  --ok: #3ddc97;
  --warn: #f5b94a;
  --crit: #ff6b6b;
  --radius: 14px;
  --width: 1160px;
  --shadow: 0 20px 50px rgb(0 0 0 / 35%);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f6f9;
    --bg-2: #eef1f5;
    --surface: #ffffff;
    --surface-2: #f3f6f9;
    --line: #dde3ea;
    --line-2: #cbd4de;
    --text: #0f1a26;
    --muted: #55667a;
    --faint: #7d8c9d;
    --accent: #1d6fd8;
    --accent-soft: rgb(29 111 216 / 9%);
    --auto: #6d4ae0;
    --auto-soft: rgb(109 74 224 / 7%);
    --auto-line: rgb(109 74 224 / 30%);
    --ok: #15a36a;
    --warn: #c98a12;
    --crit: #d64545;
    --shadow: 0 18px 40px rgb(15 26 38 / 9%);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-2: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f3f6f9;
  --line: #dde3ea;
  --line-2: #cbd4de;
  --text: #0f1a26;
  --muted: #55667a;
  --faint: #7d8c9d;
  --accent: #1d6fd8;
  --accent-soft: rgb(29 111 216 / 9%);
  --auto: #6d4ae0;
  --auto-soft: rgb(109 74 224 / 7%);
  --auto-line: rgb(109 74 224 / 30%);
  --ok: #15a36a;
  --warn: #c98a12;
  --crit: #d64545;
  --shadow: 0 18px 40px rgb(15 26 38 / 9%);
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--width), calc(100% - 32px)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 8px 12px; background: var(--accent); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* ============ Nav ============ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
}
.nav { position: relative; display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent-soft); border: 1px solid var(--line-2); color: var(--accent);
  font: 600 12px var(--mono);
}
.nav-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500;
  text-decoration: none; white-space: nowrap; transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); background: var(--surface-2); }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn svg { width: 17px; height: 17px; }

/* ============ Buttons / chips ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: #fff;
  font: 600 14px var(--sans); text-decoration: none; cursor: pointer; transition: transform .15s, filter .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); }
.btn svg { width: 16px; height: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; white-space: nowrap;
}
.chip.auto { border-color: var(--auto-line); background: var(--auto-soft); color: var(--auto); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.warn { background: var(--warn); } .dot.crit { background: var(--crit); }
.pulse { box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; color: rgb(61 220 151 / 50%); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ============ Sections ============ */
.section { padding: 96px 0 0; }
.kicker { margin: 0 0 10px; color: var(--accent); font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; letter-spacing: -.03em; }
h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 650; line-height: 1.12; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 30px; }
.section-head p { max-width: 560px; margin: 12px 0 0; color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* ============ Hero ============ */
.hero { padding: 84px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.status-line { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px; padding: 6px 12px 6px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; }
h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 700; line-height: 1.04; letter-spacing: -.045em; }
h1 .accent { color: var(--accent); }
h1 .soft { color: var(--muted); font-weight: 600; }
.lead { max-width: 600px; margin: 22px 0 0; color: var(--muted); font-size: clamp(16px, 2vw, 18.5px); }
.lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 44px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.stat { padding: 16px 18px; background: var(--surface); }
.stat b { display: block; font: 650 24px var(--sans); letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 12.5px; }

/* Console */
.console { overflow: hidden; box-shadow: var(--shadow); }
.console-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.console-bar span { margin-left: 8px; color: var(--muted); font: 12px var(--mono); }
.console-body { padding: 16px; display: grid; gap: 10px; min-height: 340px; align-content: start; }
.feed-item {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--bg-2);
  animation: feedIn .45s ease both;
}
.feed-item .dot { margin-top: 7px; }
.feed-item p { margin: 0; font-size: 13.5px; }
.feed-item small { grid-column: 2; color: var(--faint); font: 11.5px var(--mono); }
.feed-item .route { color: var(--auto); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); } }

/* ============ Projects ============ */
.projects { display: grid; gap: 26px; }
.project { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 0; overflow: hidden; }
.project-info { padding: 32px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); }
.project-tag { display: flex; align-items: center; gap: 10px; color: var(--faint); font: 12px var(--mono); }
.project h3 { font-size: 26px; font-weight: 650; line-height: 1.2; }
.project .tagline { margin: 0; color: var(--accent); font-weight: 550; }
.project .desc { margin: 0; color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.outcomes { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 14px; color: var(--muted); }
.outcomes li { display: flex; gap: 9px; }
.outcomes li::before { content: ""; width: 14px; height: 14px; flex: none; margin-top: 4px; border-radius: 4px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%235aa9ff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.project-shots { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--bg-2); }
.shots-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.shots-head p { margin: 0; color: var(--muted); font-size: 13px; }
.shots-nav { display: flex; align-items: center; gap: 8px; }
.shots-nav .count { color: var(--faint); font: 12px var(--mono); min-width: 48px; text-align: center; }
.shots-nav button { width: 32px; height: 32px; }
.shots { display: flex; gap: 16px; padding: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1; }
.shots::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.shot figcaption { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12.5px; }
.shot figcaption b { color: var(--text); font-weight: 600; }
.screen { flex: 1; min-height: 290px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13px; overflow: hidden; }

/* Mock: fleet */
.fleet-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.donut { width: 74px; height: 74px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--ok) 0 66%, var(--surface) 0 67.5%, var(--warn) 0 82%, var(--surface) 0 83.5%, var(--crit) 0 98.5%, var(--surface) 0);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%); mask: radial-gradient(circle, transparent 54%, #000 55%); }
.fleet-top b { font-size: 20px; }
.fleet-top span { display: block; color: var(--muted); font-size: 12px; }
.devices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.device { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); }
.device b { display: flex; align-items: center; gap: 6px; font: 600 11.5px var(--mono); }
.device span { color: var(--faint); font-size: 11px; }
.device.crit { border-color: rgb(255 107 107 / 45%); }
.device.warn { border-color: rgb(245 185 74 / 45%); }
.bar { height: 4px; margin-top: 7px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 2px; }

/* Mock: slack */
.slack-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 650; }
.slack-head span { color: var(--faint); font-weight: 400; font-size: 12px; }
.msg { display: grid; grid-template-columns: 34px 1fr; gap: 10px; margin-bottom: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 12px var(--mono); }
.avatar.auto { background: var(--auto-soft); color: var(--auto); }
.msg header { font-size: 13px; } .msg header b { margin-right: 6px; } .msg header span { color: var(--faint); font-size: 11.5px; }
.msg p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.msg p strong { color: var(--text); }
.quote { margin-top: 6px; padding-left: 10px; border-left: 3px solid var(--line-2); color: var(--faint); font-size: 12px; }
.linkish { color: var(--accent); }

/* Mock: email */
.mail-row { display: grid; grid-template-columns: 6px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.mail-row:last-child { border-bottom: 0; }
.mail-row i { width: 6px; height: 30px; border-radius: 3px; background: var(--line-2); }
.mail-row i.crit { background: var(--crit); } .mail-row i.ok { background: var(--ok); } .mail-row i.warn { background: var(--warn); }
.mail-row b { display: block; font-size: 12.5px; } .mail-row span { color: var(--faint); font-size: 11.5px; }
.mail-row small { color: var(--faint); font: 11px var(--mono); }
.label { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font: 10.5px var(--mono); }

/* Mock: sheet */
.sheet { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.sheet th, .sheet td { padding: 7px 8px; border: 1px solid var(--line); text-align: left; white-space: nowrap; }
.sheet th { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.sheet td { color: var(--muted); }
.t { padding: 1px 7px; border-radius: 5px; font-weight: 600; font-size: 11px; }
.t.outage { background: rgb(255 107 107 / 16%); color: var(--crit); }
.t.maint { background: rgb(245 185 74 / 16%); color: var(--warn); }
.t.bill { background: var(--accent-soft); color: var(--accent); }
.t.other { background: var(--surface-2); color: var(--muted); }

/* Mock: flow / terminal / form */
.flow { display: grid; gap: 7px; }
.flow-step { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); }
.flow-step .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--auto-soft); color: var(--auto); font: 600 11px var(--mono); }
.flow-step b { font-size: 12.5px; } .flow-step span { display: block; color: var(--faint); font-size: 11px; }
.flow-step em { color: var(--ok); font: normal 11px var(--mono); }
.term { margin: 0; color: var(--muted); font: 12px/1.7 var(--mono); white-space: pre-wrap; }
.term .ok { color: var(--ok); } .term .dim { color: var(--faint); }
.form-mock { display: grid; gap: 9px; }
.field span { display: block; color: var(--faint); font-size: 11px; margin-bottom: 3px; }
.field div { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); font-size: 12.5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

/* ============ Blueprint ============ */
.blueprint { overflow: hidden; }
.bp-tabs { display: flex; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.bp-tab { padding: 8px 14px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--muted); font: 500 13.5px var(--sans); cursor: pointer; white-space: nowrap; }
.bp-tab[aria-selected="true"] { border-color: var(--line-2); background: var(--surface-2); color: var(--text); }
.bp-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.bp-canvas { padding: 22px; border-right: 1px solid var(--line);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px; }
.bp-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.bp-controls .status { margin-left: auto; color: var(--faint); font: 12px var(--mono); }
.nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; counter-reset: node; }
.node {
  position: relative; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  text-align: left; color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.node:hover { border-color: var(--line-2); }
.node .k { display: flex; justify-content: space-between; color: var(--faint); font: 11px var(--mono); }
.node b { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.35; }
.node span { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.node.active { border-color: var(--auto); box-shadow: 0 0 0 3px var(--auto-soft); transform: translateY(-2px); }
.node.done { border-color: var(--auto-line); }
.node.done .k::after { content: "✓"; color: var(--ok); }
.node.selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.bp-side { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.bp-side h3 { font-size: 17px; }
.bp-side .sel p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.log { flex: 1; min-height: 180px; max-height: 300px; overflow: auto; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--muted); font: 12px/1.75 var(--mono); }
.log .ok { color: var(--ok); } .log .lt { color: var(--auto); }

/* ============ Toolkit ============ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: 500 13px var(--sans); cursor: pointer; }
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.filter[data-cat="automation"][aria-pressed="true"] { border-color: var(--auto); background: var(--auto-soft); }
.filter .n { margin-left: 4px; color: var(--faint); font: 11px var(--mono); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tool {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); animation: feedIn .3s ease both;
}
.tool .mono-badge {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--accent); font: 600 12px var(--mono);
}
.tool b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.tool span { color: var(--faint); font-size: 12px; }
.tool.is-auto { border-color: var(--auto-line); background: linear-gradient(135deg, var(--auto-soft), transparent 70%), var(--surface); }
.tool.is-auto .mono-badge { color: var(--auto); border-color: var(--auto-line); }
.tool.is-auto::after { content: "✦"; position: absolute; top: 8px; right: 10px; color: var(--auto); font-size: 11px; opacity: .8; }
.tool-note { margin: 16px 0 0; color: var(--faint); font-size: 13px; }
.tool-note b { color: var(--auto); font-weight: 600; }

/* Marquee */
.marquee { margin-top: 26px; overflow: hidden; border-block: 1px solid var(--line); padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: scroll 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { color: var(--faint); font: 500 14px var(--mono); white-space: nowrap; }
.marquee-track span.a { color: var(--auto); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============ Experience ============ */
.timeline { display: grid; gap: 12px; }
.job { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; padding: 22px 24px; }
.job .when { color: var(--faint); font: 12.5px var(--mono); }
.job .when b { display: block; margin-bottom: 4px; color: var(--text); font: 600 14px var(--sans); }
.job h3 { font-size: 17px; font-weight: 600; }
.job ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.job li + li { margin-top: 4px; }
.job .chips { margin-top: 12px; }

/* ============ Certifications ============ */
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cert { display: flex; flex-direction: column; gap: 10px; padding: 22px; text-decoration: none; transition: border-color .15s, transform .15s; }
.cert:hover { border-color: var(--auto-line); transform: translateY(-2px); }
.cert .seal { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--auto-soft); color: var(--auto); font: 700 13px var(--mono); }
.cert h3 { font-size: 17px; font-weight: 600; }
.cert p { margin: 0; color: var(--muted); font-size: 13.5px; }
.cert .open { margin-top: auto; color: var(--accent); font-size: 13px; font-weight: 600; }

/* ============ Contact / footer ============ */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 40px; margin-top: 96px;
  background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 55%), var(--surface); }
.contact p { margin: 10px 0 0; color: var(--muted); max-width: 560px; }
.contact .hero-actions { margin-top: 0; }
/* ============ Multi-page layout ============ */
.nav-tools { display: flex; gap: 8px; margin-left: 8px; }
.menu-btn { display: none; }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.page { padding-top: 64px; }
.page-title { font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1.08; letter-spacing: -.04em; }
.crumb { display: flex; gap: 8px; margin-bottom: 18px; color: var(--faint); font-size: 13px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 26px; }
.subnav a { display: inline-flex; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13.5px; text-decoration: none; }
.subnav a:hover { color: var(--text); border-color: var(--line-2); }
.subnav span { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.project { scroll-margin-top: 90px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 72px; }
.pager-link { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: border-color .15s; }
.pager-link:hover { border-color: var(--accent); }
.pager-link span { color: var(--faint); font-size: 12.5px; }
.pager-link b { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.pager-link b svg { width: 16px; height: 16px; color: var(--accent); }
.pager-link.next { text-align: right; align-items: flex-end; }
.dir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dir-card { display: flex; flex-direction: column; gap: 8px; min-height: 210px; padding: 24px; text-decoration: none; transition: border-color .15s, transform .15s; }
.dir-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.dir-card:hover .dir-go { color: var(--accent); transform: translateX(3px); }
.dir-n { color: var(--faint); font: 12px var(--mono); }
.dir-card h3 { font-size: 20px; font-weight: 650; }
.dir-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.dir-meta { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font: 12.5px var(--mono); }
.dir-go { display: inline-flex; margin-left: auto; color: var(--faint); transition: transform .15s, color .15s; }
.dir-go svg { width: 16px; height: 16px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.contact-card { display: flex; flex-direction: column; gap: 6px; padding: 24px; text-decoration: none; transition: border-color .15s; }
a.contact-card:hover { border-color: var(--accent); }
.contact-card b { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.label-sm { color: var(--faint); font: 12px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.contact-card .open { margin-top: 10px; color: var(--accent); font-size: 13px; font-weight: 600; }
.contact-card .muted { margin-top: 10px; color: var(--muted); font-size: 13px; }
.site-footer { margin-top: 96px; padding: 44px 0 36px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.footer-grid { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-grid p { margin: 10px 0 0; }
.footer-links { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 32px; }
.footer-links a, .footer-base a { color: var(--muted); text-decoration: none; }
.footer-links a:hover, .footer-base a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero-grid, .project, .bp-body { grid-template-columns: 1fr; }
  .project-info { border-right: 0; border-bottom: 1px solid var(--line); }
  .bp-canvas { border-right: 0; border-bottom: 1px solid var(--line); }
  .certs, .dir-grid { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 2px; padding: 10px 16px 16px;
    border-bottom: 1px solid var(--line); background: var(--bg); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; font-size: 15px; }
  .nav-tools { margin-left: auto; }
  .menu-btn { display: grid; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding-top: 48px; }
  .dir-grid, .pager { grid-template-columns: 1fr; }
  .pager-link.next { text-align: left; align-items: flex-start; }
  .footer-links { grid-template-columns: repeat(2, auto); }
  .page { padding-top: 40px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .project-info, .bp-canvas, .bp-side { padding: 20px; }
  .devices { grid-template-columns: 1fr 1fr; }
  .job { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .certs { grid-template-columns: 1fr; }
  .contact { padding: 26px 20px; margin-top: 72px; }
  .section { padding-top: 72px; }
  .sheet-wrap { overflow-x: auto; }
}
