/* ============================================================
   webe.my.id · "Blueprint SOC"
   Shared styles for index.html and wazuh-lab.html.
   Palette "signal": deep green ground, highlighter yellow accent.
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #0c1410;
  --panel: #101b15;
  --panel-2: #0e1813;
  --raise: #14221a;
  --deep: #13291c;
  --line: rgba(183, 226, 196, 0.11);
  --line-2: rgba(183, 226, 196, 0.22);
  --grid: rgba(183, 226, 196, 0.05);
  --fg: #ecf2ea;
  --muted: #9fb5a6;
  --accent: #efe07a;
  --on-accent: #0c1410;
  --ok: #7ed3a0;
  --spot: rgba(239, 224, 122, 0.09);

  /* Wazuh rule levels used in the lab */
  --sev-5: #b9cbbf;
  --sev-8: #f0c75e;
  --sev-10: #f59a52;
  --sev-12: #ff7a6b;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-display: "Martian Mono", "Geist Mono", ui-monospace, Menlo, Consolas, monospace;

  --container: 1240px;
  --gutter: 24px;
  --r-lg: 22px;
  --r-md: 18px;
  --r-sm: 12px;
}

/* The other two palettes from the design. To switch, add
   data-palette="violet" or data-palette="cobalt" to <html>. */
[data-palette="violet"] {
  --bg: #07080f; --panel: #0c0f1d; --panel-2: #0a0c17; --raise: #11152a; --deep: #151236;
  --line: rgba(167, 155, 255, 0.13); --line-2: rgba(167, 155, 255, 0.26); --grid: rgba(167, 155, 255, 0.05);
  --fg: #f3f4fb; --muted: #a7acc7; --accent: #a78bfa; --on-accent: #0d0a1f; --ok: #6ee7b7;
  --spot: rgba(167, 139, 250, 0.12);
}
[data-palette="cobalt"] {
  --bg: #0b1524; --panel: #0f1b2d; --panel-2: #0d1828; --raise: #14243a; --deep: #10264a;
  --line: rgba(148, 175, 214, 0.14); --line-2: rgba(148, 175, 214, 0.28); --grid: rgba(148, 175, 214, 0.05);
  --fg: #e8eef6; --muted: #9fb0c6; --accent: #5b9bff; --on-accent: #08111f; --ok: #4ade80;
  --spot: rgba(91, 155, 255, 0.12);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: 600; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.no-js [data-js-only] { display: none !important; }

.muted { color: var(--muted); }
.dollar { color: var(--accent); }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--raise);
  overflow-wrap: anywhere;
}

mark {
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--on-accent);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.icon {
  flex: none;
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon--sm { width: 15px; height: 15px; stroke-width: 2; }

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.grid-bg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: -1px -1px;
}
.grid-bg--md { background-size: 32px 32px; }
.grid-bg--sm { background-size: 28px 28px; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-top: 112px; }
.section > .container { display: flex; flex-direction: column; gap: 40px; }
.section--tight > .container { gap: 28px; }

.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head--split {
  flex-direction: row; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between; gap: 16px;
}
.section-head--split > div { display: flex; flex-direction: column; gap: 10px; }

.prompt { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.section-title--md { font-size: clamp(24px, 2.8vw, 38px); line-height: 1.12; }

.section-intro { max-width: 66ch; margin-top: 6px; font-size: 17px; color: var(--muted); }
.section-note { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.block { display: flex; flex-direction: column; gap: 14px; }
.block-head {
  display: flex; flex-wrap: wrap;
  align-items: baseline; justify-content: space-between; gap: 12px;
}
.h3 { font-size: 17px; font-weight: 600; line-height: 1.4; }
.h3--lg { font-size: 18px; }
.hint { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
  gap: 16px;
  align-items: start;
}
.split--480 { grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); }
.split--440 { grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(12, 20, 16, 0.9);
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  padding: 10px var(--gutter);
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 8px 24px;
}

.brand-group { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand {
  display: flex; align-items: center; gap: 12px;
  min-width: 0; min-height: 44px;
  color: var(--fg); text-decoration: none;
}
.brand-mark {
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent);
}
.brand-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crumb-sep { font-family: var(--font-mono); color: var(--line-2); }
.crumb { font-family: var(--font-mono); font-size: 14px; color: var(--muted); white-space: nowrap; }

.nav-links { display: flex; flex-wrap: wrap; gap: 2px; }
.nav-links a:not(.btn) {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 12px;
  font-size: 14px; color: var(--muted); text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="true"] { color: var(--fg); }
.nav-links-cv { display: none; }

.nav-actions { flex: none; display: flex; align-items: center; gap: 10px; }

.search-btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 8px 0 12px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: transparent; color: var(--muted);
  font-size: 14px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.search-btn:hover { border-color: var(--muted); color: var(--fg); }

.nav-actions .menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 960px) {
  .js .nav { flex-wrap: nowrap; }
  .js .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; flex-wrap: nowrap; gap: 0;
    padding: 8px 16px 18px;
    background: var(--panel);
    border-bottom: 1px solid var(--line-2);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  }
  .js .site-header.is-open .nav-links { display: flex; }
  .js .nav-links a:not(.btn) {
    display: flex;
    justify-content: space-between;
    min-height: 52px; padding: 0 8px;
    border-bottom: 1px solid var(--line);
    font-size: 17px; color: var(--fg);
  }
  .js .nav-links a:not(.btn)::after {
    content: attr(data-cmd);
    font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  }
  .js .nav-links-cv { display: block; padding-top: 14px; }
  .js .nav-links-cv .btn { width: 100%; }
  .js .nav-actions .menu-toggle { display: grid; }
  .nav-actions .nav-cv { display: none; }
  .search-btn { width: 44px; padding: 0; justify-content: center; }
  .search-btn .search-label,
  .search-btn .kbd { display: none; }
  .crumb, .crumb-sep { display: none; }
}

/* ---------- Buttons, chips, tags ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 10px;
  font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: color-mix(in oklab, var(--accent) 86%, white); }
.btn--ghost { border-color: var(--line-2); background: transparent; color: var(--fg); font-weight: 500; }
.btn--ghost:hover { border-color: var(--muted); }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn--kbd { padding-right: 10px; }
.btn--mono { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }

.kbd {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 26px; padding: 0 7px;
  border: 1px solid var(--line-2); border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--muted); white-space: nowrap;
}
.btn--primary .kbd { background: rgba(0, 0, 0, 0.12); border-color: rgba(0, 0, 0, 0.2); color: inherit; }
.btn--sm .kbd,
.search-btn .kbd { min-width: 24px; height: 24px; font-size: 11.5px; }

@media (hover: none) {
  .btn .kbd, .search-btn .kbd, .footer-keys { display: none; }
  .btn--kbd { padding-right: 18px; }
}

.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: transparent; color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.icon-btn:hover { border-color: var(--muted); }

.link-accent {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px;
  color: var(--accent); text-decoration: none;
}
.link-accent:hover { text-decoration: underline; text-underline-offset: 3px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.chip--strong { color: var(--fg); }
.chip--ok { color: var(--ok); border-color: rgba(126, 211, 160, 0.45); }

.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.dot--pulse { width: 8px; height: 8px; animation: pulse 2.4s ease-out infinite; }

.tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.tags li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.tags--raise li { background: var(--raise); }

.sev {
  display: inline-flex; align-items: center;
  padding: 1px 8px;
  border: 1px solid; border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
  white-space: nowrap;
}
.sev--5 { color: var(--sev-5); background: rgba(185, 203, 191, 0.1); border-color: rgba(185, 203, 191, 0.3); }
.sev--8 { color: var(--sev-8); background: rgba(240, 199, 94, 0.12); border-color: rgba(240, 199, 94, 0.38); }
.sev--10 { color: var(--sev-10); background: rgba(245, 154, 82, 0.13); border-color: rgba(245, 154, 82, 0.42); }
.sev--12 { color: var(--sev-12); background: rgba(255, 122, 107, 0.14); border-color: rgba(255, 122, 107, 0.46); }
.sev-row { display: flex; flex-wrap: wrap; gap: 8px; }

.tile {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--accent);
}
.tile--lg { width: 44px; height: 44px; }
.tile--solid { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

.bullets { display: flex; flex-direction: column; gap: 12px; max-width: 64ch; }
.bullets li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; font-size: 15.5px; }
.bullets li::before { content: "\203A"; font-family: var(--font-mono); color: var(--accent); }

/* ---------- Home: hero ---------- */

.hero { padding-top: 28px; }

.hero-panel {
  display: flex; flex-wrap: wrap; gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--line);
}

.hero-main {
  flex: 1 1 560px; min-width: 0;
  display: flex; flex-direction: column; gap: 24px;
  padding: clamp(24px, 4.4vw, 64px);
  background-color: var(--panel);
}

.status-chip {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--bg);
  font-family: var(--font-mono); font-size: 12.5px;
}

.hero-heading { display: flex; flex-direction: column; gap: 12px; }
.prompt--lg { font-size: 14px; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.typing { min-height: 1.6em; font-family: var(--font-mono); font-size: 15.5px; color: var(--muted); }
.typing-text { color: var(--fg); }
.caret {
  display: inline-block;
  width: 9px; height: 18px;
  margin-left: 3px;
  vertical-align: -3px;
  background: var(--accent);
  animation: blink 1.05s steps(1) infinite;
}

.hero-lede { max-width: 54ch; font-size: 17px; line-height: 1.7; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.socials { display: flex; gap: 10px; }

.hero-side {
  flex: 1 1 440px; min-width: 0;
  display: flex; flex-direction: column;
  background-color: var(--panel-2);
}

/* Alert feed */
.feed { flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.feed-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.feed-title { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-mono); font-size: 13.5px; }
.feed-title .muted { font-size: 12px; }

.feed-box { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.feed-cols,
.feed-row {
  display: grid;
  grid-template-columns: 66px 50px 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.feed-cols {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.feed-list { display: flex; flex-direction: column; gap: 2px; min-height: 292px; padding: 6px; }
.feed-row { padding: 7px 8px; border-radius: 8px; font-family: var(--font-mono); font-size: 12.5px; }
.feed-row--10 { background: rgba(245, 154, 82, 0.07); }
.feed-row--12 { background: rgba(255, 122, 107, 0.08); }
.feed-row .time { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-row .sev { justify-self: start; padding: 0 7px; font-size: 11.5px; }
.feed-row .desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-row.is-new { animation: row-in 0.4s ease-out; }

.feed-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
}

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.facts > div { display: flex; flex-direction: column; gap: 3px; padding: 16px 20px; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dd { font-size: 14px; }

/* At a glance */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--line);
}
.stats > div {
  display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px;
  padding: 24px 26px;
  background: var(--bg);
}
.stats dt { font-size: 14px; color: var(--muted); }
.stats dd {
  font-family: var(--font-display); font-weight: 300;
  font-size: 36px; line-height: 1.1; letter-spacing: -0.04em;
}

/* ---------- Home: about ---------- */

.about { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 64px; }
.about-text {
  flex: 1 1 520px; min-width: 0; max-width: 64ch;
  display: flex; flex-direction: column; gap: 18px;
  font-size: 17px; line-height: 1.75;
}
.about-text p + p { color: var(--muted); }

.focus { flex: 1 1 380px; min-width: 0; overflow: hidden; }
.focus-head { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.focus-list li { display: flex; gap: 16px; padding: 18px 22px; }
.focus-list li + li { border-top: 1px solid var(--line); }
.focus-list strong { display: block; }
.focus-list p { font-size: 14.5px; color: var(--muted); }

/* ---------- Home: projects ---------- */

.featured {
  display: flex; flex-wrap: wrap; gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--line);
}
.featured-body {
  flex: 1 1 560px; min-width: 0;
  display: flex; flex-direction: column; gap: 20px;
  padding: clamp(24px, 3.8vw, 52px);
  background: var(--panel);
}
.featured-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -0.04em;
}
.featured-desc { max-width: 60ch; font-size: 16.5px; color: var(--muted); }
.featured-flow {
  flex: 1 1 380px; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(24px, 3.2vw, 44px);
  background-color: var(--deep);
}
.featured-flow > .label { margin-bottom: 16px; }

.pipe { display: flex; flex-direction: column; }
.pipe-node {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--bg);
}
.pipe-node--end { border-color: var(--accent); }
.pipe-node .tile { width: 36px; height: 36px; border-color: var(--line); border-radius: 8px; }
.pipe-node .tile--solid { border-color: var(--accent); }
.pipe-text { display: flex; flex-direction: column; min-width: 0; }
.pipe-name { font-family: var(--font-mono); font-size: 13px; }
.pipe-detail { font-size: 13px; color: var(--muted); }
.pipe-link {
  position: relative;
  width: 2px; height: 30px;
  margin-left: 31px;
  background: repeating-linear-gradient(180deg, var(--line-2) 0 4px, transparent 4px 8px);
}
.pipe-link::after {
  content: "";
  position: absolute; left: -2px; top: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: drop 1.8s linear infinite;
  animation-delay: var(--delay, 0s);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 16px;
}

.card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background-color: var(--raise);
  background-image: radial-gradient(440px circle at var(--mx, -999px) var(--my, -999px), var(--spot), transparent 65%);
  transition: border-color 0.2s ease;
}
.card:hover { border-color: var(--line-2); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-align: right; }
.card-title { font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.card-desc { font-size: 15px; color: var(--muted); }
.card .bullets { gap: 10px; }
.card .bullets li { grid-template-columns: 14px minmax(0, 1fr); font-size: 15px; }
.card-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

/* Project card with a diagram beside the text (Klinik Sehat ERD) */
.card--erd {
  flex-direction: row; flex-wrap: wrap; align-items: stretch;
  gap: 24px 40px;
  background-image: radial-gradient(560px circle at var(--mx, -999px) var(--my, -999px), var(--spot), transparent 65%);
}
.card-erd-body { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card-erd-shot { flex: 0 1 340px; min-width: 0; }
.card-erd-shot .shot-link { padding: 12px; }
.card-erd-shot .shot-link img { height: 300px; object-fit: contain; }

/* ---------- Home: skills ---------- */

.skills { overflow: hidden; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1px;
  background: var(--line);
}
.skill-group { display: flex; flex-direction: column; gap: 16px; padding: 28px; background: var(--panel); }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent;
  font-size: 14px; color: var(--muted);
}
button.skill {
  border-color: var(--line-2);
  color: var(--fg);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
button.skill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
button.skill:hover { border-color: var(--muted); }
button.skill[aria-pressed="true"] { border-color: var(--accent); background: var(--spot); }

.grep {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 32px;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-mono); font-size: 13px;
}
.grep-out { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; min-width: 0; }
.grep-hits { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ok); }
.grep-legend { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.grep-legend::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Home: education ---------- */

.edu { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 56px; padding: clamp(22px, 2.6vw, 36px); }
.edu-main { flex: 1 1 420px; min-width: 0; display: flex; align-items: flex-start; gap: 18px; }
.edu-main > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.edu-title { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.edu-meta { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.edu-side { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.progress {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
}
.progress li { display: flex; flex-direction: column; gap: 8px; }
.progress-bar { height: 6px; border-radius: 999px; background: var(--line-2); }
.progress .is-done .progress-bar { background: var(--accent); }
.progress .is-now .progress-bar { background: linear-gradient(90deg, var(--accent) 0 40%, var(--line-2) 40% 100%); }
.progress .is-now .progress-year { color: var(--accent); }

.course { display: flex; flex-direction: column; gap: 10px; }
.course-list { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.course-list li { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; }

/* ---------- Home: contact ---------- */

.contact {
  display: flex; flex-wrap: wrap; gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--line);
}
.contact-main {
  flex: 1 1 520px; min-width: 0;
  display: flex; flex-direction: column; gap: 28px;
  padding: clamp(24px, 3.8vw, 52px);
  background-color: var(--panel);
}
.contact-lead {
  max-width: 22ch;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -0.045em;
  text-wrap: balance;
}
.contact-tabs { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.contact-tab {
  width: 100%;
  display: grid; grid-template-columns: 16px 84px minmax(0, 1fr); align-items: center; gap: 14px;
  min-height: 56px; padding: 0 12px;
  border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--fg);
  font-size: 15px; text-align: left;
  transition: background-color 0.15s ease;
}
.contact-tab::before { content: "\203A"; font-family: var(--font-mono); color: var(--line-2); }
.contact-tab:hover,
.contact-tab[aria-selected="true"] { background: var(--spot); }
.contact-tab[aria-selected="true"]::before { color: var(--accent); }
.contact-tab .k {
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.contact-tab .v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.terminal {
  flex: 1 1 420px; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px;
  background: var(--bg);
  font-family: var(--font-mono); font-size: 14px;
}
.terminal-out { display: flex; flex-direction: column; gap: 14px; }
.no-js .terminal-out[hidden] { display: flex !important; }
.terminal-cmd { color: var(--muted); }
.terminal-value { font-size: 17px; overflow-wrap: anywhere; user-select: all; }
.terminal-meta { font-size: 12.5px; color: var(--muted); }
.terminal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.terminal-cursor { margin-top: auto; color: var(--muted); }
.terminal-cursor .caret { height: 17px; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 112px; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
}
.footer-keys { display: inline-flex; align-items: center; gap: 6px; }
.footer-keys .kbd { min-width: 22px; height: 22px; padding: 0 6px; font-size: 11px; }

/* ---------- Command menu ---------- */

.cmdk {
  width: min(580px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 120px);
  margin: 88px auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--panel);
  color: var(--fg);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}
.cmdk[open] { display: flex; flex-direction: column; }
.cmdk::backdrop { background: rgba(3, 6, 5, 0.66); }
.cmdk-search {
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.cmdk-input {
  flex: 1 1 auto; min-width: 0;
  height: 58px;
  border: 0; outline: 0;
  background: transparent; color: var(--fg);
  font-size: 16px;
}
.cmdk-input::placeholder { color: var(--muted); }
.cmdk-esc {
  min-height: 32px; padding: 0 8px;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: transparent; color: var(--muted);
  font-family: var(--font-mono); font-size: 11.5px;
}
.cmdk-list { flex: 1 1 auto; max-height: 390px; overflow-y: auto; padding: 8px; }
.cmdk-group { padding: 4px 0; }
.cmdk-group-label { padding: 8px 12px 6px; }
.cmdk-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 0 12px;
  border-radius: 8px;
  color: var(--fg); font-size: 15px; text-decoration: none;
}
.cmdk-item .icon { color: var(--muted); opacity: 0; }
.cmdk-item.is-active { background: var(--spot); }
.cmdk-item.is-active .icon { opacity: 1; }
.cmdk-empty { padding: 18px 12px; color: var(--muted); }
.cmdk-foot {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 80;
  padding: 10px 16px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--panel); color: var(--fg);
  font-family: var(--font-mono); font-size: 13px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Case study ---------- */

.cs-hero { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background-color: var(--panel); }
.cs-hero-body { display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 4.4vw, 64px); }
.cs-title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(34px, 4.6vw, 64px); line-height: 1.05; letter-spacing: -0.05em;
  text-wrap: balance;
}
.cs-lede { max-width: 62ch; font-size: 18px; line-height: 1.7; color: var(--muted); }
.cs-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.cs-facts > div { display: flex; flex-direction: column; gap: 4px; padding: 18px 24px; background: var(--panel); }
.cs-facts dd { font-size: 15px; }

/* Log flow diagram */
.flow-panel {
  display: flex; flex-direction: column; gap: 20px;
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background-color: var(--deep);
}
.flow { display: flex; align-items: stretch; }
.flow-node {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--bg);
}
.flow-node--end { border-color: var(--accent); }
.flow-node-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flow-node .tile { width: 38px; height: 38px; border-radius: 9px; }
.flow-ip { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.flow-name { font-family: var(--font-mono); font-size: 15px; }
.flow-detail { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.flow-link {
  flex: 0 0 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 0 6px;
}
.flow-link::after { content: ""; height: 16px; }
.flow-link-label {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.flow-line {
  position: relative;
  width: 100%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px);
}
.flow-line::after {
  content: "";
  position: absolute; top: -2px; left: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: flow 1.8s linear infinite;
  animation-delay: var(--delay, 0s);
}

@media (max-width: 860px) {
  .flow { flex-direction: column; }
  .flow-link {
    flex: 0 0 auto;
    flex-direction: row; justify-content: flex-start; gap: 14px;
    height: 52px;
    padding: 0 0 0 36px;
  }
  .flow-link::after { display: none; }
  .flow-line {
    order: -1;
    width: 2px; height: 100%;
    background: repeating-linear-gradient(180deg, var(--line-2) 0 6px, transparent 6px 12px);
  }
  .flow-line::after { top: 0; left: -2px; animation-name: drop; }
}

/* Scenarios at a glance */
.glance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 16px; }
.glance-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--raise); color: var(--fg); text-decoration: none;
  transition: border-color 0.2s ease;
}
.glance-card:hover { border-color: var(--line-2); }
.glance-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.glance-title { font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.glance-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--accent); }

/* Summary strip */
.summary {
  display: flex; flex-wrap: wrap; gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--line);
}
.summary > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; background: var(--bg); }
.summary > .summary-wide { flex: 2 1 440px; gap: 8px; }
.summary dd { font-size: 15px; }
.summary .verdict { color: var(--ok); }
.alert-line { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 10px; }
.alert-line .sev { justify-self: start; }

/* Failed-logon attempts (scenario 1) */
.attempts { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.attempts-scroll { overflow-x: auto; padding: 2px 4px 4px; }
.attempts-grid {
  display: grid;
  grid-template-columns: repeat(10, 44px);
  column-gap: 8px; row-gap: 10px;
  min-width: 512px;
}
.attempts-threshold {
  grid-column: 1 / 9; grid-row: 1;
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}
.attempts-threshold::after {
  content: "";
  height: 8px;
  border: 1px dashed var(--line-2); border-bottom: 0;
  border-radius: 4px 4px 0 0;
}
.attempt {
  grid-row: 2;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid; border-radius: 8px;
  font-family: var(--font-mono); font-size: 13px;
  transition: box-shadow 0.15s ease;
}
.attempt--5 { color: var(--sev-5); background: rgba(185, 203, 191, 0.1); border-color: rgba(185, 203, 191, 0.3); }
.attempt--10 { color: var(--sev-10); background: rgba(245, 154, 82, 0.16); border-color: rgba(245, 154, 82, 0.55); }
.attempt[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.attempts-axis { grid-row: 3; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.attempts-axis--start { grid-column: 1 / 4; justify-self: start; }
.attempts-axis--mid { grid-column: 7 / 10; justify-self: center; color: var(--sev-10); }
.attempts-axis--end { grid-column: 9 / 11; justify-self: end; }
.attempt-detail { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.attempt-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-family: var(--font-mono); font-size: 13px; }
.attempt-detail p { font-size: 15px; color: var(--muted); }
.attempts-note { font-size: 14px; color: var(--muted); }

/* Screenshots */
.shot { display: flex; flex-direction: column; gap: 10px; }
.shot-link {
  position: relative; display: block;
  overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: #ffffff;
  cursor: zoom-in;
}
.shot-link img { width: 100%; }
.shot-badge {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(12, 20, 16, 0.88); color: #ecf2ea;
  font-family: var(--font-mono); font-size: 12px;
}
.shot figcaption { font-size: 13.5px; color: var(--muted); }

/* Evidence explorer */
.evidence {
  display: flex; flex-wrap: wrap; gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--line);
}
.evidence-list { flex: 1 1 560px; min-width: 0; background: var(--bg); }
.evidence-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
}
.evidence-head .accent { color: var(--accent); }
.evidence-rows { padding: 8px; }
.ev-row {
  width: 100%;
  display: grid; grid-template-columns: 14px minmax(0, 200px) minmax(0, 1fr);
  align-items: center; gap: 4px 12px;
  min-height: 42px; padding: 8px 12px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--fg);
  font-family: var(--font-mono); font-size: 13.5px; text-align: left;
  transition: background-color 0.15s ease;
}
.evidence--wide .ev-row { grid-template-columns: 14px minmax(0, 250px) minmax(0, 1fr); }
.ev-row::before { content: "\203A"; color: var(--line-2); }
.ev-row:hover,
.ev-row[aria-pressed="true"] { background: var(--spot); }
.ev-row[aria-pressed="true"]::before,
.ev-row[aria-pressed="true"] .ev-v { color: var(--accent); }
.ev-k { color: var(--muted); overflow-wrap: anywhere; }
.ev-v { overflow-wrap: anywhere; }
.ev-m,
.ev-n { grid-column: 2 / -1; font-family: var(--font-sans); font-size: 14px; color: var(--muted); }
.js .ev-m,
.js .ev-n,
.no-js .evidence-detail { display: none; }

.evidence-detail {
  flex: 1 1 360px; min-width: 0;
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px;
  background: var(--panel);
}
.ev-d-key { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.ev-d-value {
  font-family: var(--font-display); font-weight: 300;
  font-size: 28px; line-height: 1.15; letter-spacing: -0.04em;
  color: var(--accent); overflow-wrap: anywhere;
}
.ev-d-meaning { font-size: 17px; }
.ev-d-note { padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.ev-d-note:empty { display: none; }
.ev-d-pos { margin-top: auto; padding-top: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* Analysis */
.analysis-text { display: flex; flex-direction: column; gap: 12px; }
.analysis-text p { font-size: 16.5px; line-height: 1.75; color: var(--muted); }

.findings { columns: 440px 2; column-gap: 16px; }
.findings li {
  break-inside: avoid;
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--raise);
}
.findings-num { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.findings p { font-size: 15px; color: var(--muted); }

/* MITRE and escalation */
.mitre,
.escalate { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.mitre-item {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg);
}
.mitre-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.mitre-event { font-family: var(--font-mono); font-size: 12.5px; }
.mitre-status { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); }
.mitre-status--kept { color: var(--ok); }
.mitre-was,
.mitre-why,
.mitre-note { font-size: 14.5px; color: var(--muted); }
.mitre-tech { font-size: 16px; }
.mitre-tech span { color: var(--muted); }

.escalate-list { display: flex; flex-direction: column; gap: 12px; }
.escalate-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; font-size: 15px; }
.escalate-list .icon { margin-top: 3px; color: var(--sev-10); }
.escalate-foot {
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--muted);
}
.escalate-foot strong { color: var(--fg); }

/* Scenario 2 timeline */
.tl { overflow: hidden; }
.tl-top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.tl-head,
.tl-row {
  display: grid;
  grid-template-columns: 116px 72px 72px minmax(0, 1fr) 150px;
  gap: 16px;
  padding: 13px 24px;
}
.tl-head { padding-block: 10px; border-bottom: 1px solid var(--line); }
.tl-row { align-items: start; border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-row--muted { opacity: 0.75; }
.tl-row--hot { background: rgba(255, 122, 107, 0.07); }
.tl-time,
.tl-id,
.tl-rec { font-family: var(--font-mono); font-size: 13px; }
.tl-time,
.tl-rec { color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-event { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 15px; }
.tl-tag {
  padding: 0 7px;
  border: 1px solid var(--line-2); border-radius: 5px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}
.tl-rule { justify-self: start; }
.tl-rule .link-accent { min-height: 0; font-family: var(--font-mono); font-size: 12px; }

/* Creation-to-admin duration */
.duration {
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background-color: var(--deep);
}
.duration-value {
  font-family: var(--font-display); font-weight: 300;
  font-size: 56px; line-height: 1; letter-spacing: -0.05em;
  color: var(--accent);
}
.duration-bar { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--sev-8), var(--sev-12)); }
.duration-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-family: var(--font-mono); font-size: 12px; }
.duration-ends span:last-child { text-align: right; }
.duration > p:last-child { font-size: 15px; color: var(--muted); }

/* Open item */
.callout {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line-2); border-radius: 16px;
  background: var(--panel);
}
.callout > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.callout mark { font-weight: 600; }
.callout p + p { max-width: 80ch; font-size: 15.5px; color: var(--muted); }

/* Next steps */
.todo { overflow: hidden; }
.todo li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px;
  padding: 18px 24px;
}
.todo li + li { border-top: 1px solid var(--line); }
.todo-text { display: flex; align-items: center; gap: 14px; font-size: 16px; }
.todo-text::before {
  content: "";
  flex: none;
  width: 18px; height: 18px;
  border: 1.5px dashed var(--line-2); border-radius: 5px;
}
.todo-status { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

/* Lightbox */
.lightbox {
  width: min(1280px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #ecf2ea;
}
.lightbox::backdrop { background: rgba(3, 6, 5, 0.86); }
.lightbox figure { display: flex; flex-direction: column; gap: 12px; }
.lightbox img {
  width: auto; max-width: 100%;
  max-height: calc(100vh - 140px);
  margin-inline: auto;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: #ffffff;
}
.lightbox figcaption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 16px;
  font-size: 14px;
}
.lightbox .btn { border-color: rgba(236, 242, 234, 0.3); color: #ecf2ea; }

/* ---------- Animation ---------- */

@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(126, 211, 160, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(126, 211, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 211, 160, 0); }
}
@keyframes drop {
  0% { top: 0; opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { top: calc(100% - 6px); opacity: 0; }
}
@keyframes flow {
  0% { left: 0; opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}
@keyframes row-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .tl-head { display: none; }
  .tl-row { grid-template-columns: auto auto minmax(0, 1fr); gap: 6px 14px; padding: 14px 18px; }
  .tl-event,
  .tl-rule { grid-column: 1 / -1; }
  .tl-id::before { content: "ID "; color: var(--muted); }
  .tl-rec::before { content: "rec "; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .nav { column-gap: 12px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 13px; }
  .section { padding-top: 80px; }
  .site-footer { margin-top: 80px; }
  .hero { padding-top: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .typing { min-height: 3.2em; font-size: 14px; }
  .hero-lede { font-size: 16px; }

  .feed { padding: 16px; }
  .feed-cols,
  .feed-row { grid-template-columns: 60px 44px 52px minmax(0, 1fr); gap: 8px; }
  .feed-cols { padding: 8px 10px; }
  .feed-row { padding: 7px 6px; font-size: 11.5px; }
  .feed-list { min-height: 268px; padding: 4px; }
  .facts { grid-template-columns: 1fr; }
  .facts > div { flex-direction: row; justify-content: space-between; gap: 12px; padding: 12px 16px; }
  .facts > div + div { border-left: 0; border-top: 1px solid var(--line); }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div { padding: 18px; }
  .stats dt { font-size: 13px; line-height: 1.45; }
  .stats dd { font-size: 28px; }

  .card { padding: 22px; }
  .skill-group { padding: 22px; }
  .grep { padding: 16px 22px; }
  .terminal { padding: 22px; }
  .contact-tab { grid-template-columns: 14px 64px minmax(0, 1fr); gap: 10px; padding: 0 8px; }
  .progress { font-size: 11px; }

  .attempts { padding: 18px; }
  .evidence-detail { padding: 22px; }
  .ev-row,
  .evidence--wide .ev-row { grid-template-columns: 14px minmax(0, 1fr); }
  .ev-v { grid-column: 2; }
  .duration { padding: 22px; }
  .duration-value { font-size: 44px; }
  .mitre,
  .escalate { padding: 20px; }
  .callout { padding: 20px; }
  .todo li { padding: 16px 18px; }

  .back-btn .back-label { display: none; }
  .back-btn { width: 44px; padding: 0; }
}
