/* ==========================================================================
   Vishnu Muralikrishnan — profile
   Neutral, professional theme · light + dark
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;

  color-scheme: light;
  --bg: #fafafa;
  --bg-2: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --hover: #f4f4f5;
  --text: #09090b;
  --text-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --dot: #e4e4e7;
  --accent: #2563eb;
  --accent-text: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-line: #bfdbfe;
  --glow: rgba(37, 99, 235, .07);
  --success: #15803d;
  --success-soft: #f0fdf4;
  --success-line: #bbf7d0;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, .05);
  --shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 2px 6px -2px rgba(9, 9, 11, .06);
  --shadow-lg: 0 2px 4px rgba(9, 9, 11, .04), 0 16px 36px -12px rgba(9, 9, 11, .18);
  --scrim: rgba(9, 9, 11, .4);
  --bar-bg: rgba(250, 250, 250, .82);

  --c-sp: #0e7490;
  --c-pp: #7c3aed;
  --c-wf: #c2410c;
  --c-az: #1d4ed8;
  --c-dev: #be185d;
  --c-ops: #15803d;

  --t-k: #cf222e;
  --t-p: #0550ae;
  --t-s: #0a3069;
  --t-c: #6e7781;
  --t-pu: #57606a;
  --t-v: #8250df;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --bg-2: #0f0f12;
  --surface: #111113;
  --surface-2: #0c0c0e;
  --hover: #1b1b1f;
  --text: #fafafa;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #71717a;
  --line: #26262b;
  --line-2: #3f3f46;
  --dot: #26262b;
  --accent: #60a5fa;
  --accent-text: #93c5fd;
  --accent-soft: rgba(96, 165, 250, .1);
  --accent-line: rgba(96, 165, 250, .3);
  --glow: rgba(96, 165, 250, .08);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, .08);
  --success-line: rgba(74, 222, 128, .25);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px -2px rgba(0, 0, 0, .5);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 20px 44px -12px rgba(0, 0, 0, .7);
  --scrim: rgba(0, 0, 0, .6);
  --bar-bg: rgba(9, 9, 11, .8);

  --c-sp: #22d3ee;
  --c-pp: #a78bfa;
  --c-wf: #fb923c;
  --c-az: #60a5fa;
  --c-dev: #f472b6;
  --c-ops: #4ade80;

  --t-k: #ff7b72;
  --t-p: #79c0ff;
  --t-s: #a5d6ff;
  --t-c: #8b949e;
  --t-pu: #8b949e;
  --t-v: #d2a8ff;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.is-locked { overflow: hidden; }
html.is-locked body { padding-right: var(--sbw, 0px); }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(1100px 480px at 50% -180px, var(--glow), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s, color .3s;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
strong { font-weight: 600; }
kbd {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
  font-family: var(--f-mono);
  font-size: .68rem;
  line-height: 1.55;
  text-align: center;
  color: var(--muted);
}
::selection { background: var(--accent-line); color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.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; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 400;
  padding: 8px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateY(-160%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

.progress {
  position: fixed; inset: 0 0 auto 0; z-index: 120; height: 2px;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--hover); border-color: var(--line-2); }
.btn .i { color: var(--muted); }
.btn--icon { width: 36px; padding: 0; }
.btn kbd { margin-left: auto; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  transition: background-color .15s, border-color .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }

.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- Motion ---------- */
.anim-in { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms + 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.js .reveal { opacity: 0; translate: 0 12px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; translate: 0 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-101%);
  transition: transform .35s var(--ease);
}
.topbar.is-shown { transform: none; }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 56px; }
.tb-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-id img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.tb-name { font-size: .92rem; font-weight: 600; white-space: nowrap; }
.tb-role { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.tb-nav { display: flex; gap: 2px; margin-left: auto; }
.tb-nav a {
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: .85rem;
  color: var(--muted);
  transition: color .15s, background-color .15s;
}
.tb-nav a:hover { color: var(--text); }
.tb-nav a.is-active { color: var(--text); background: var(--hover); }
.tbar-tools { display: flex; gap: 6px; }

/* ---------- Header card ---------- */
.masthead { padding-top: clamp(20px, 4vw, 40px); }
.tblock {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.tb-cell { min-width: 0; padding: 22px 24px; }
.tb-contact, .tb-tools { align-self: stretch; border-left: 1px solid var(--line); }
.tb-photo { padding-right: 0; }
.tb-photo img {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 4px var(--surface), 0 0 0 5px var(--accent-line);
}
.tb-main { display: flex; flex-direction: column; justify-content: center; padding-left: 20px; }
.cell-label {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--accent-text);
}
.name {
  margin-top: 4px;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.1;
}
.role { margin-top: 6px; font-size: .98rem; color: var(--text-2); }
.role .sep { margin: 0 4px; color: var(--faint); }
.role .at { color: var(--muted); }

.tb-contact { display: grid; align-content: center; gap: 8px; margin: 0; }
.tb-contact > div { display: grid; grid-template-columns: 70px auto; gap: 12px; align-items: baseline; }
.tb-contact dt { font-size: .78rem; color: var(--muted); }
.tb-contact dd { margin: 0; font-size: .88rem; font-weight: 500; white-space: nowrap; }
.tb-contact a { transition: color .15s; }
.tb-contact a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

.tb-tools { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.tb-tools-row { display: flex; gap: 8px; }
.tb-tools-row .btn:first-child { flex: 1; }
.tb-tools > .btn[data-palette] { justify-content: flex-start; min-width: 190px; color: var(--muted); font-weight: 400; background: var(--surface-2); }

/* ---------- Shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  padding-top: 28px;
  align-items: start;
}

/* ---------- Tech stack (left rail) ---------- */
.rail {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.legend {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.legend-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; }
.legend-title { font-size: .92rem; font-weight: 600; }
.legend-count {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--hover);
  font-family: var(--f-mono);
  font-size: .72rem;
  color: var(--muted);
}
.legend-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 24px);
  height: 34px;
  margin: 0 12px 12px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: .84rem;
  color: var(--muted);
  transition: border-color .15s;
}
.legend-search:hover { border-color: var(--line-2); }
.legend-search kbd { margin-left: auto; }

.cat { border-top: 1px solid var(--line); --c: var(--accent); }
.cat-btn {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  background: none;
  text-align: left;
  font-size: .86rem;
  font-weight: 500;
  color: var(--text-2);
  transition: background-color .15s, color .15s;
}
.cat-btn:hover { background: var(--hover); color: var(--text); }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); transition: box-shadow .2s; }
.cat.is-open .cat-btn { color: var(--text); font-weight: 600; }
.cat.is-trace-hint .cat-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.cat-count { font-family: var(--f-mono); font-size: .72rem; color: var(--faint); }
.cat-sign {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg);
  transition: transform .25s var(--ease);
}
.cat.is-open .cat-sign { transform: rotate(-135deg); margin-top: 3px; }

.cat-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.cat.is-open .cat-panel { grid-template-rows: 1fr; }
.cat-inner { min-height: 0; overflow: hidden; }
.items { margin: 0; padding: 0 8px 10px; list-style: none; }
.item {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px 6px 18px;
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: left;
  font-size: .84rem;
  line-height: 1.35;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), background-color .15s, color .15s;
}
.cat.is-open .item { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 25ms + 60ms), calc(var(--i, 0) * 25ms + 60ms), 0s, 0s; }
.item:hover { background: var(--hover); color: var(--text); }
.item.is-traced { background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--text); }
.item-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); opacity: .85; }
.item-yrs { font-family: var(--f-mono); font-size: .7rem; color: var(--faint); font-variant-numeric: tabular-nums; }

.legend-hint { padding: 12px 16px 14px; border-top: 1px solid var(--line); font-size: .76rem; line-height: 1.5; color: var(--muted); }
html:not(.js) .legend-search, html:not(.js) .legend-hint { display: none; }

/* ---------- Sections ---------- */
.main { min-width: 0; }
.section { padding-top: 64px; }
.section--first { padding-top: 0; }
.sec-head { margin-bottom: 18px; }
.sec-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sec-kicker span { color: var(--accent-text); }
.sec-title { margin-top: 8px; font-size: clamp(1.4rem, 2.2vw, 1.7rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.sec-sub { margin-top: 6px; max-width: 64ch; font-size: .95rem; color: var(--muted); }

/* ---------- Code card ---------- */
.code-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.code-bar::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 34px;
  border-radius: 50%;
  background: var(--line-2);
  box-shadow: 16px 0 var(--line-2), 32px 0 var(--line-2);
}
.code-tab { font-family: var(--f-mono); font-size: .78rem; color: var(--text-2); }
.code-lang { margin-left: auto; font-family: var(--f-mono); font-size: .72rem; color: var(--faint); }
.code {
  padding: 14px 0 16px;
  overflow-x: auto;
  font-family: var(--f-mono);
  font-size: .82rem;
  line-height: 1.85;
  counter-reset: ln;
}
.line { position: relative; min-height: 1.85em; padding: 0 20px 0 54px; white-space: pre; transition: background-color .15s; }
.line::before {
  counter-increment: ln;
  content: counter(ln);
  position: absolute;
  left: 0;
  width: 34px;
  text-align: right;
  color: var(--faint);
  opacity: .7;
}
.line:hover { background: var(--hover); }
.js .code .line { opacity: 0; }
.js .code .line.is-on { opacity: 1; transition: opacity .2s; }
.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -.22em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.t-k { color: var(--t-k); }
.t-p { color: var(--t-p); }
.t-s { color: var(--t-s); }
.t-c { color: var(--t-c); font-style: italic; }
.t-pu { color: var(--t-pu); }
.t-v { color: var(--t-v); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.stats > div { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats dd { order: -1; margin: 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -.035em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stats dd small { font-size: 1.1rem; font-weight: 500; color: var(--muted); }
.stats dt { font-size: .78rem; color: var(--muted); }

/* ---------- Blueprints ---------- */
.bp-tabs {
  display: flex;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
}
.bp-tabs::-webkit-scrollbar { display: none; }
.bp-tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  font-size: .83rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color .15s, background-color .15s, box-shadow .15s;
}
.bp-tab .no { font-family: var(--f-mono); font-size: .7rem; color: var(--faint); }
.bp-tab:hover { color: var(--text); }
.bp-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.bp-tab[aria-selected="true"] .no { color: var(--accent-text); }
.bp-tab.is-traced::after {
  content: "";
  position: absolute;
  top: 5px; right: 4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--trace, var(--accent));
}

.bp-card {
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.bp-card[hidden] { display: none; }
html:not(.js) .bp-card { margin-bottom: 16px; }
.bp-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.bp-no {
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: .72rem;
  color: var(--muted);
}
.bp-title { font-size: 1.12rem; font-weight: 600; letter-spacing: -.02em; }
.bp-cat { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--hover); font-size: .75rem; font-weight: 500; color: var(--text-2); }
.bp-desc { margin-top: 8px; max-width: 72ch; font-size: .93rem; color: var(--text-2); }

/* Flow diagram */
.flow {
  display: flex;
  align-items: stretch;
  margin: 20px 0;
  padding: 26px 20px 22px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background-color: var(--surface-2);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 16px 16px;
}
.node { position: relative; flex: 1 1 0; min-width: 0; display: flex; --c: var(--faint); }
.node-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.node-box::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c);
}
button.node-box:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
.node--step .node-box { border-style: dashed; background: transparent; box-shadow: none; }
.node--step .node-box::before { display: none; }
.node-cat { font-size: .68rem; font-weight: 500; letter-spacing: .01em; color: var(--c); }
.node--step .node-cat { color: var(--muted); }
.node-name { font-size: .86rem; font-weight: 600; line-height: 1.3; }
.node-role { font-size: .76rem; color: var(--muted); }
.node-box.is-traced { border-color: var(--trace, var(--c)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--trace, var(--c)) 22%, transparent), var(--shadow); }

.link { position: relative; flex: 0 0 32px; align-self: center; height: 10px; }
.link::before {
  content: "";
  position: absolute;
  left: 3px; right: 6px; top: 4px;
  height: 1.5px;
  background: var(--faint);
  transform-origin: left;
}
.link::after {
  content: "";
  position: absolute;
  right: 2px; top: 1.5px;
  border-left: 6px solid var(--faint);
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
}
.packet {
  position: absolute;
  left: 3px; top: 2px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: packet 2s var(--ease) infinite;
  animation-delay: calc(var(--k, 0) * .45s);
  opacity: 0;
}
@keyframes packet {
  0% { transform: translateX(0); opacity: 0; }
  20%, 75% { opacity: 1; }
  100% { transform: translateX(20px); opacity: 0; }
}

.bp-card.is-drawing .node-box { animation: node-in .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.bp-card.is-drawing .link::before { animation: link-in .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
.bp-card.is-drawing .link::after { animation: fade-in .2s both; animation-delay: calc(var(--i, 0) * 90ms + 240ms); }
.bp-card.is-drawing .bp-head,
.bp-card.is-drawing .bp-desc,
.bp-card.is-drawing .bp-foot { animation: fade-in .4s var(--ease) both; }
.bp-card.is-drawing .bp-foot { animation-delay: .3s; }
@keyframes node-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes link-in { from { transform: scaleX(0); } }
@keyframes fade-in { from { opacity: 0; } }

.bp-foot { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; }
.bp-used { padding-left: 24px; border-left: 1px solid var(--line); }
.bp-label { margin-bottom: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.bp-notes ol { margin: 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 6px; }
.bp-notes li { position: relative; padding-left: 30px; font-size: .88rem; line-height: 1.55; color: var(--text-2); counter-increment: n; }
.bp-notes li::before {
  content: counter(n);
  position: absolute;
  left: 0; top: 1px;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--hover);
  font-family: var(--f-mono);
  font-size: .68rem;
  color: var(--muted);
}
.bp-used p:last-child { font-size: .88rem; font-weight: 500; line-height: 1.75; }

/* ---------- Experience ---------- */
.revs {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.rev-cols, .rev-head {
  display: grid;
  grid-template-columns: 72px 180px minmax(0, 1fr) 48px;
  align-items: center;
}
.rev-cols {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: .74rem;
  font-weight: 500;
  color: var(--muted);
}
.rev-cols span { padding: 9px 16px; }
.rev-list { margin: 0; padding: 0; list-style: none; }
.rev + .rev { border-top: 1px solid var(--line); }
.rev-head {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  transition: background-color .15s;
}
.rev-head:hover { background: var(--surface-2); }
.rev-head > span { display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; min-width: 0; }
.rev-no { align-items: flex-start; }
.rev-mono {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text-2);
  transition: box-shadow .2s, border-color .2s;
}
.rev.is-current .rev-mono { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.rev.is-traced .rev-mono { border-color: var(--trace, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--trace, var(--accent)) 22%, transparent); }
.rev-when { gap: 2px; font-family: var(--f-mono); font-size: .78rem; color: var(--text-2); }
.rev-when .job-dur { font-size: .72rem; color: var(--muted); }
.rev-org { display: flex; align-items: center; gap: 8px; font-size: .98rem; font-weight: 600; letter-spacing: -.01em; }
.rev-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border: 1px solid var(--success-line);
  border-radius: 999px;
  background: var(--success-soft);
  font-size: .7rem;
  font-weight: 500;
  color: var(--success);
}
.rev-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.rev-role { font-size: .86rem; color: var(--muted); }
.rev-sign { position: relative; align-items: center; }
.rev-sign::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .25s var(--ease);
}
.rev.is-open .rev-sign::before { transform: translateY(2px) rotate(-135deg); }

.rev-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.rev.is-open .rev-panel { grid-template-rows: 1fr; }
html:not(.js) .rev-panel { grid-template-rows: 1fr; }
.rev-inner { min-height: 0; overflow: hidden; padding-inline: 268px 24px; }
.rev-inner > :first-child { margin-top: 0; }
.rev-inner > :last-child { margin-bottom: 20px; }

.job-summary { font-size: .92rem; color: var(--text-2); }
.job-points { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.job-points li { position: relative; padding-left: 16px; font-size: .88rem; line-height: 1.55; color: var(--text-2); }
.job-points li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.job-projects { margin-top: 12px; font-size: .86rem; color: var(--text-2); }
.job-projects span { display: block; margin-bottom: 2px; font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.tags { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: .76rem; color: var(--text-2); }
.tags li.is-btn { padding: 0; border: 0; background: none; }
.tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .76rem;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color .15s, background-color .15s, color .15s;
}
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.tag-btn:hover { border-color: var(--line-2); background: var(--hover); color: var(--text); }
.tag-btn.is-traced { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: var(--text); }

/* ---------- Credentials ---------- */
.certs { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cert {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), opacity .4s, translate .5s var(--ease);
}
.cert:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cert-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  padding: 7px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.cert-code { font-family: var(--f-mono); font-size: .76rem; font-weight: 500; color: var(--accent-text); }
.cert-name { font-size: .9rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.cert-issuer { margin-top: auto; padding-top: 6px; font-size: .76rem; color: var(--muted); }
.js .certs:not(.is-visible) .cert { opacity: 0; translate: 0 10px; }
.certs .cert:nth-child(2) { transition-delay: 0s, 0s, .06s, .06s; }
.certs .cert:nth-child(3) { transition-delay: 0s, 0s, .12s, .12s; }
.certs .cert:nth-child(4) { transition-delay: 0s, 0s, .18s, .18s; }

.facts { margin: 14px 0 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.facts > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); }
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { padding: 14px 16px; font-size: .82rem; color: var(--muted); }
.facts dd { margin: 0; padding: 14px 16px 14px 0; font-size: .9rem; }
.facts .muted { display: block; margin-top: 2px; font-size: .84rem; color: var(--muted); }
.lvl {
  margin: 0 16px 0 6px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--hover);
  font-family: var(--f-mono);
  font-size: .72rem;
  color: var(--text-2);
}

/* Static list for no-JS and print */
.skills-static { display: none; }
html:not(.js) .skills-static { display: block; }
.skills { margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.skills > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); }
.skills > div + div { border-top: 1px solid var(--line); }
.skills dt { padding: 10px 14px; font-size: .86rem; font-weight: 600; }
.skills dd { margin: 0; padding: 10px 14px 10px 0; font-size: .86rem; color: var(--text-2); }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 72px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
}
.footer-links { display: flex; gap: 18px; }
.footer a:hover { color: var(--text); }

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .3s, visibility .3s, transform .3s var(--ease), color .15s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--text); }

/* ---------- Technology drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; transition: visibility 0s linear .45s; }
.drawer.is-open { visibility: visible; transition-delay: 0s; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(540px, 100%);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 28px 36px;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -24px 0 48px -24px rgba(0, 0, 0, .3);
  transform: translateX(104%);
  transition: transform .45s var(--ease);
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-handle { display: none; }
.drawer-close {
  position: absolute;
  top: 20px; right: 20px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  transition: background-color .15s, color .15s;
}
.drawer-close:hover { background: var(--hover); color: var(--text); }

.drawer-content > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  transition-delay: calc(var(--d, 0) * 45ms + 90ms);
}
.drawer-content.is-in > * { opacity: 1; transform: none; }

.d-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--hover);
  font-size: .76rem;
  font-weight: 500;
  color: var(--text-2);
}
.d-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.d-head { margin-top: 12px; padding-right: 44px; }
.d-title { font-size: 1.55rem; font-weight: 650; letter-spacing: -.035em; line-height: 1.15; }
.d-title:focus { outline: none; }

.d-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 0 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.d-stats > div { padding: 12px 14px; }
.d-stats > div + div { border-left: 1px solid var(--line); }
.d-stats dt { font-size: .74rem; color: var(--muted); }
.d-stats dt::first-letter { text-transform: uppercase; }
.d-stats dd { margin: 2px 0 0; font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.d-sub { margin: 26px 0 10px; font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.d-timeline { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.dt-row { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 12px; }
.dt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; color: var(--faint); }
.dt-row.is-used .dt-label { color: var(--text); font-weight: 500; }
.dt-track { position: relative; height: 10px; border-radius: 5px; background: var(--hover); }
.dt-bar {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 5px;
  background: var(--line-2);
  opacity: .5;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
  transition-delay: calc(var(--k, 0) * 90ms + 320ms);
}
.dt-row.is-used .dt-bar { background: var(--c); opacity: 1; }
.drawer-content.is-in .dt-bar { transform: scaleX(1); }
.dt-axis { position: relative; height: 16px; margin: 4px 0 0 112px; }
.dt-axis span { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--f-mono); font-size: .64rem; color: var(--faint); }

.d-roles { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.d-role { position: relative; padding: 14px 16px 14px 18px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.d-role::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.d-role-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.d-org { font-weight: 600; }
.d-dates { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.d-role-title { margin-top: 2px; font-size: .84rem; color: var(--muted); }
.d-points { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.d-points li { position: relative; padding-left: 14px; font-size: .86rem; line-height: 1.55; color: var(--text-2); }
.d-points li::before { content: ""; position: absolute; left: 1px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.d-points mark { padding: 0 3px; border-radius: 4px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--text); }
.d-note { margin-top: 8px; font-size: .84rem; color: var(--muted); }

.d-links { display: flex; flex-wrap: wrap; gap: 6px; }
.d-links button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-2);
  transition: background-color .15s, border-color .15s, color .15s;
}
.d-links button:hover { background: var(--hover); border-color: var(--line-2); color: var(--text); }
.d-links b { font-family: var(--f-mono); font-size: .72rem; font-weight: 500; color: var(--accent-text); }
.d-link-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-link, var(--accent)); }

/* ---------- Search palette ---------- */
.palette { position: fixed; inset: 0; z-index: 250; visibility: hidden; transition: visibility 0s linear .2s; }
.palette.is-open { visibility: visible; transition-delay: 0s; }
.palette-backdrop { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .2s; }
.palette.is-open .palette-backdrop { opacity: 1; }
.palette-panel {
  position: absolute;
  top: 12vh;
  left: 50%;
  width: min(620px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg), 0 30px 60px -20px rgba(0, 0, 0, .3);
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -8px) scale(.98);
  transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.palette.is-open .palette-panel { opacity: 1; transform: translate(-50%, 0) scale(1); }
.palette-input-wrap { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input {
  flex: 1;
  min-width: 0;
  height: 54px;
  border: 0;
  background: none;
  font-family: var(--f-sans);
  font-size: 1rem;
  color: var(--text);
  outline: none;
}
.palette-input::placeholder { color: var(--faint); }
.palette-list { max-height: min(52vh, 440px); margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.pl-group { padding: 10px 10px 4px; font-size: .72rem; font-weight: 500; color: var(--muted); }
.pl-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.pl-item[aria-selected="true"] { background: var(--hover); }
.pl-dot { justify-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
.pl-code {
  display: grid;
  place-items: center;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: .64rem;
  color: var(--muted);
}
.pl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.pl-label mark { background: none; color: var(--accent-text); font-weight: 600; }
.pl-meta { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.pl-empty { padding: 24px 10px; font-size: .86rem; color: var(--muted); text-align: center; }
.palette-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: .74rem; color: var(--muted); }
.palette-foot kbd { margin-right: 3px; }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.notfound h1 { font-size: clamp(4rem, 14vw, 7rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--text); }
.notfound p { margin: 14px 0 26px; font-size: .95rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .tblock { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tb-tools { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; border-left: 0; border-top: 1px solid var(--line); padding: 12px 20px; }
  .tb-tools-row { flex: none; }
  .tb-tools > .btn[data-palette] { flex: 1; }
  .shell { grid-template-columns: 236px minmax(0, 1fr); gap: 28px; }
  .tb-role { display: none; }
  .rev-inner { padding-inline: 88px 24px; }
}

@media (max-width: 900px) {
  .shell { display: block; padding-top: 20px; }
  .rail { position: static; max-height: none; overflow: visible; margin-bottom: 36px; }
  .tblock { grid-template-columns: auto minmax(0, 1fr); }
  .tb-contact { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 14px 20px; }
  .tb-nav { display: none; }
  .tbar-tools { margin-left: auto; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats > div:nth-child(4) { border-left: 0; }
  .stats > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .rev-cols, .rev-head { grid-template-columns: 64px 160px minmax(0, 1fr) 44px; }
  .rev-inner { padding-inline: 80px 20px; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .tb-cell { padding: 16px; }
  .tb-photo img { width: 60px; height: 60px; }
  .tb-main { padding-left: 14px; }
  .tb-contact > div { grid-template-columns: 64px minmax(0, 1fr); }
  .tb-contact dd { white-space: normal; word-break: break-word; }
  .tb-tools > .btn[data-palette] { flex: 1 1 100%; min-width: 0; }
  .tb-tools-row { flex: 1 1 100%; }
  .tb-name { font-size: .88rem; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(n) { border-left: 0; border-top: 0; }
  .stats > div:nth-child(even) { border-left: 1px solid var(--line); }
  .stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stats > div:last-child { grid-column: 1 / -1; border-left: 0; }

  .bp-card { padding: 18px 16px 18px; }
  .flow { flex-direction: column; padding: 18px 14px; }
  .link { flex: 0 0 26px; align-self: center; width: 10px; height: auto; }
  .link::before { left: 4px; right: auto; top: 2px; bottom: 6px; width: 1.5px; height: auto; transform-origin: top; }
  .link::after { left: 1px; right: auto; top: auto; bottom: 1px; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 6px solid var(--faint); border-bottom: 0; }
  .packet { left: 2px; top: 2px; animation-name: packet-v; }
  @keyframes packet-v {
    0% { transform: translateY(0); opacity: 0; }
    20%, 75% { opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
  }
  .bp-card.is-drawing .link::before { animation-name: link-in-v; }
  @keyframes link-in-v { from { transform: scaleY(0); } }
  .bp-foot { grid-template-columns: 1fr; gap: 16px; }
  .bp-used { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .bp-cat { margin-left: 0; }

  .rev-cols { display: none; }
  .rev-head { grid-template-columns: 62px minmax(0, 1fr) 36px; grid-template-areas: "no what sign" "no when sign"; }
  .rev-no { grid-area: no; padding-right: 0 !important; }
  .rev-what { grid-area: what; padding-bottom: 2px !important; }
  .rev-when { grid-area: when; flex-direction: row !important; justify-content: flex-start !important; gap: 8px !important; padding-top: 0 !important; }
  .rev-sign { grid-area: sign; }
  .rev-inner { padding-inline: 16px; }

  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div { grid-template-columns: 1fr; }
  .facts dt { padding: 12px 16px 0; }
  .facts dd { padding: 4px 16px 12px; }

  .drawer-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: 88vh;
    max-height: 88dvh;
    padding: 24px 18px 30px;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -20px 48px -20px rgba(0, 0, 0, .35);
    transform: translateY(104%);
  }
  .drawer-handle { display: block; width: 40px; height: 4px; margin: -10px auto 16px; border-radius: 2px; background: var(--line-2); }
  .drawer-close { top: 14px; right: 14px; }
  .dt-row { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .dt-axis { margin-left: 98px; }
  .dt-axis span:nth-child(even) { display: none; }
  .palette-panel { top: 8vh; }
  .footer { flex-direction: column; align-items: flex-start; }
  .footer-hint { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .packet { display: none; }
}

/* ---------- Print / Save as PDF ---------- */
@media print {
  @page { size: A4; margin: 13mm 13mm 15mm; }
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #fff; --bg-2: #f6f6f7; --surface: #fff; --surface-2: #fafafa; --hover: #f4f4f5;
    --text: #09090b; --text-2: #27272a; --muted: #52525b; --faint: #71717a;
    --line: #e4e4e7; --line-2: #d4d4d8; --dot: #ececee;
    --accent: #2563eb; --accent-text: #1d4ed8; --accent-soft: #eff6ff; --accent-line: #bfdbfe;
    --success: #15803d; --success-soft: #f0fdf4; --success-line: #bbf7d0;
    --shadow-sm: none; --shadow: none; --shadow-lg: none;
    --c-sp: #0e7490; --c-pp: #7c3aed; --c-wf: #c2410c; --c-az: #1d4ed8; --c-dev: #be185d; --c-ops: #15803d;
    --t-k: #cf222e; --t-p: #0550ae; --t-s: #0a3069; --t-c: #6e7781; --t-pu: #57606a; --t-v: #8250df;
  }
  html { font-size: 9.6pt; scroll-behavior: auto; }
  body { background: #fff; font-size: 9.6pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .skip-link, .progress, .topbar, .rail, .tb-tools, .bp-tabs, .to-top, .drawer, .palette, .footer, .caret, .packet { display: none !important; }
  .js .reveal, .js .code .line, .js .certs .cert { opacity: 1 !important; translate: none !important; }
  .anim-in { animation: none !important; }
  .shell { display: block; padding-top: 14pt; }
  .masthead { padding-top: 0; }
  .tblock { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tb-photo img { width: 64px; height: 64px; }
  .section { padding-top: 16pt; }
  .sec-head { margin-bottom: 8pt; break-after: avoid; }
  .code { font-size: 8.4pt; line-height: 1.6; }
  .bp-card, .bp-card[hidden] { display: block !important; margin-bottom: 10pt; break-inside: avoid; }
  .bp-card.is-drawing * { animation: none !important; }
  .rev-panel { grid-template-rows: 1fr !important; }
  .rev-sign { visibility: hidden; }
  .rev-head, .job-points li { break-inside: avoid; }
  .rev-inner { padding-inline: 88px 16px; }
  .cert { transform: none !important; }
  .skills-static { display: block !important; }
  .skills > div { break-inside: avoid; }
}
