/* Personal CV: ASCII name, terminal navigation, dashed rules and 88x31
 * badges. Rosé Pine accents and compact square credential panels borrow
 * lightly from Rose-chan; Gruvpine is the warmer alternative palette. Logos
 * remain local and theme transitions sweep from the pressed button. Fonts are self-hosted. */

@font-face { font-family: "DM Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/dm-mono-400.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/dm-mono-500.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/dm-mono-400i.woff2) format("woff2"); }
@font-face { font-family: "Noto Wordmark"; font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap; src: url(../fonts/noto-wordmark.woff2) format("woff2"); }

/* ── palettes ─────────────────────────────────────────────────────────── */
:root, [data-theme="rose-pine-dark"] {
  --bg: #191724; --panel: #1f1d2e; --overlay: #26233a; --line: #403d52; --muted: #6e6a86; --subtle: #908caa;
  --fg: #e0def4; --link: #9ccfd8; --title: #c4a7e7; --accent: #ebbcba;
  --add: #a2c08a; --del: #eb6f92; --warn: #f6c177; --pine: #31748f;
  --l1: #eb6f92; --l2: #ebbcba; --l3: #f6c177; --l4: #31748f; --l5: #9ccfd8; --l6: #c4a7e7; --l7: #c4a7e7;
  color-scheme: dark;
}
[data-theme="rose-pine-light"] {
  --bg: #faf4ed; --panel: #fffaf3; --overlay: #f2e9e1; --line: #dfdad9; --muted: #9893a5; --subtle: #797593;
  --fg: #575279; --link: #286983; --title: #907aa9; --accent: #b4637a;
  --add: #487344; --del: #b4637a; --warn: #9a6a16; --pine: #286983;
  --l1: #b4637a; --l2: #d7827e; --l3: #9a6a16; --l4: #286983; --l5: #56949f; --l6: #907aa9; --l7: #907aa9;
  color-scheme: light;
}
/* Gruvpine: Gruvbox's warm ground and ink, Rosé Pine's accents (the site's
   original palette, from the 2026-10-10 recovery). Same roles as above. */
[data-theme="gruvpine-dark"] {
  --bg: #1d2021; --panel: #282828; --overlay: #32302f; --line: #3c3836; --muted: #7c6f64; --subtle: #a89984;
  --fg: #ebdbb2; --link: #9ccfd8; --title: #c4a7e7; --accent: #ebbcba;
  --add: #b8bb26; --del: #eb6f92; --warn: #fabd2f; --pine: #83a598;
  --l1: #eb6f92; --l2: #ebbcba; --l3: #fabd2f; --l4: #b8bb26; --l5: #9ccfd8; --l6: #c4a7e7; --l7: #c4a7e7;
  color-scheme: dark;
}
[data-theme="gruvpine-light"] {
  --bg: #fbf1c7; --panel: #f2e5bc; --overlay: #ebdbb2; --line: #d5c4a1; --muted: #928374; --subtle: #7c6f64;
  --fg: #3c3836; --link: #286983; --title: #907aa9; --accent: #b4637a;
  --add: #79740e; --del: #b4637a; --warn: #b57614; --pine: #286983;
  --l1: #b4637a; --l2: #d7827e; --l3: #b57614; --l4: #79740e; --l5: #286983; --l6: #907aa9; --l7: #907aa9;
  color-scheme: light;
}

/* ── base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 16px; }
body {
  margin: 0 auto; max-width: 940px; padding: 22px 24px 40px;
  background: var(--bg); color: var(--fg);
  font: 14.5px/1.65 "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--line); color: var(--accent); }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 1px dashed var(--accent); outline-offset: 2px; }
b, strong { font-weight: 500; }
p { margin: 0 0 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 9; padding: 4px 10px; background: var(--accent); color: var(--bg); }

/* ── top bar: brand on the left, theme.js puts the mode switch on the right ── */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 38px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--title); font-weight: 500; }
.tilde { color: var(--muted); }
.brand:hover { color: var(--accent); text-decoration: none; }

#theme { font-size: 12px; color: var(--muted); letter-spacing: .5px; user-select: none; }
#theme button {
  font: inherit; color: var(--subtle); background: none; border: 0; padding: 2px 6px; margin-left: 2px; cursor: pointer;
}
#theme button[aria-pressed="true"] { color: var(--bg); background: var(--accent); }
#theme button:hover { color: var(--accent); }
#theme button[aria-pressed="true"]:hover { color: var(--bg); }
#theme .grp { display: inline-block; white-space: nowrap; }
#theme .sep { color: var(--line); margin: 0 6px 0 8px; }
@media (max-width: 520px) { #theme .sep { display: none; } #theme .grp { display: block; text-align: right; } }

/* ── banner ──────────────────────────────────────────────────────────── */
.banner-wrap { margin: 26px 0 18px; display: flex; justify-content: center; container-type: inline-size; }
/* 71 columns. DM Mono advances exactly 0.6em, so this is the size at which
   the widest line fills the column, capped for wide screens. cqi rather
   than vw: vw counts the scrollbar and clipped the banner's last columns. */
.banner {
  margin: 0; overflow: hidden; user-select: none;
  font: 500 min(15px, calc(100cqi / 71 / 0.6))/1.18 "DM Mono", ui-monospace, monospace;
}
.ln { display: inline-block; white-space: pre; transition: transform .45s ease; }
.ln:nth-child(1) { color: var(--l1); } .ln:nth-child(2) { color: var(--l2); }
.ln:nth-child(3) { color: var(--l3); } .ln:nth-child(4) { color: var(--l4); }
.ln:nth-child(5) { color: var(--l5); } .ln:nth-child(6) { color: var(--l6); }
.ln:nth-child(7) { color: var(--l7); }
/* poz.pet's letters hop on hover; here the whole banner ripples, line by line. */
.banner:hover .ln { transform: translateX(6px); }
.banner:hover .ln:nth-child(2) { transition-delay: .03s; } .banner:hover .ln:nth-child(3) { transition-delay: .06s; }
.banner:hover .ln:nth-child(4) { transition-delay: .09s; } .banner:hover .ln:nth-child(5) { transition-delay: .12s; }
.banner:hover .ln:nth-child(6) { transition-delay: .15s; } .banner:hover .ln:nth-child(7) { transition-delay: .18s; }

/* ── whoami ──────────────────────────────────────────────────────────── */
.whoami { margin: 0 0 18px; padding: 10px 14px 6px; border: 1px solid var(--line); background: var(--panel); }
.whoami p { margin: 0 0 4px; }
.cmd { color: var(--subtle); }
.ps { color: var(--accent); margin-right: 4px; }
.out b { color: var(--title); }
.out.sub { color: var(--subtle); }
.sep { color: var(--muted); }
.cursor::after { content: "█"; margin-left: 4px; color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── nav: poz.pet's ~/ row, split by short vertical rules ────────────── */
.nav, .ring { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 4px; margin: 0 0 22px; }
.nav hr, .ring hr { width: 0; height: 1em; margin: 0 12px; border: 0; border-left: 1px solid var(--line); }
.nav a[aria-current="true"] { color: var(--accent); }

/* ── facts ───────────────────────────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 14px; border: 1px solid var(--line); }
.facts div { padding: 8px 12px; border-left: 1px dashed var(--line); }
.facts div:first-child { border-left: 0; }
.facts dt, .contact dt, .skills dt, thead td {
  color: var(--subtle); font-size: 11px; text-transform: uppercase; letter-spacing: 1.6px; font-weight: 500;
}
.facts dd { margin: 2px 0 0; color: var(--warn); }

/* ── file bar (git.daemon-sec.xyz's, above the download) ─────────────── */
.filebar {
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline;
  margin: 0 0 8px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px;
}
.filebar .path { color: var(--fg); font-size: 13px; }
.filebar .size { color: var(--muted); }
.filebar .acts { margin-left: auto; display: flex; gap: 14px; }
.filebar .acts a::before { color: var(--muted); }
.a-dl::before { content: "↓ "; } .a-raw::before { content: "◇ "; } .a-mail::before { content: "@ "; }

/* ── sections ────────────────────────────────────────────────────────── */
.sec { margin: 34px 0 0; }
h2 {
  margin: 0 0 14px; padding-bottom: 4px; border-bottom: 1px dashed var(--line);
  font-size: 17px; font-weight: 500; color: var(--title);
}
h2::before { content: "## "; color: var(--muted); }
h3 { margin: 0; font-size: 14.5px; font-weight: 500; color: var(--fg); }
.lead { color: var(--subtle); }

.about { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: start; }
.portrait { margin: 0; border: 1px solid var(--line); background: var(--panel); padding: 6px; }
.portrait img { display: block; width: 100%; height: auto; filter: saturate(.85) contrast(1.02); }
.portrait figcaption { margin-top: 5px; font-size: 11.5px; color: var(--subtle); display: flex; justify-content: space-between; }
.portrait figcaption span { color: var(--muted); }
.prose p { color: var(--fg); }

.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; margin: 14px 0 8px; padding: 10px 14px; border: 1px dashed var(--line); }
.contact div { display: flex; gap: 12px; align-items: baseline; min-width: 0; }
.contact dt { flex: 0 0 52px; }
.contact dd { margin: 0; overflow-wrap: anywhere; }
.avail { color: var(--add); font-size: 13px; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--add); animation: blink 2.2s steps(1) infinite; }

/* entries read like a git log: the date on the left in the hash colour */
.entry { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px dashed var(--line); }
.entry:first-of-type { border-top: 0; padding-top: 2px; }
.lead + .entry { border-top: 0; padding-top: 2px; }
.when { margin: 0; color: var(--warn); white-space: nowrap; font-size: 13px; }
.org { margin: 1px 0 6px; color: var(--subtle); font-size: 13px; }
.tag { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.org a { margin-left: 6px; }
.entry ul { margin: 0; padding: 0; list-style: none; }
.entry li { position: relative; padding-left: 18px; margin: 3px 0; }
.entry li::before { content: "▸"; position: absolute; left: 0; color: var(--muted); }

.skills { margin: 0; }
.skills div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; padding: 6px 0; border-top: 1px dashed var(--line); }
.skills div:first-child { border-top: 0; }
.skills dt { padding-top: 3px; }
.skills dd { margin: 0; }

.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
td { padding: 5px 16px 5px 0; vertical-align: top; text-align: left; }
thead tr { border-bottom: 1px dashed var(--line); }
tbody tr:hover td { background: var(--panel); }
td.d { color: var(--warn); white-space: nowrap; }
td.id { color: var(--subtle); white-space: nowrap; font-size: 13px; }
tr.next td { color: var(--subtle); }
tr.next td.d { color: var(--add); }

.refs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.box { border: 1px solid var(--line); padding: 10px 14px; }
.box p:last-child { margin: 0; }

/* ── footer ──────────────────────────────────────────────────────────── */
footer.site { margin-top: 44px; padding-top: 16px; border-top: 1px dashed var(--line); text-align: center; font-size: 12.5px; color: var(--subtle); }
footer.site p { margin: 0 0 6px; }
.muted { color: var(--muted); }
.ring { margin-bottom: 16px; }

/* 88x31, the old web's badge size. Bevelled, two lines, one accent each. */
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.b88 {
  width: 88px; height: 31px; display: flex; flex-direction: column; justify-content: center; align-items: center;
  border: 2px outset var(--line); background: var(--panel); line-height: 1.05; overflow: hidden;
}
.b88 span { font-size: 10.5px; font-weight: 500; }
.b88 small { font-size: 8.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.b-nix span { color: var(--link); } .b-mono span { color: var(--title); } .b-gp span { color: var(--warn); }
.b-js span { color: var(--add); } .b-hand span { color: var(--del); }

.wm { margin: 6px 0 8px !important; font: 800 30px/1 "Noto Wordmark", sans-serif; font-stretch: 62.5%; letter-spacing: 2px; color: var(--fg); }
.wm span { color: var(--del); }

/* ── motion ──────────────────────────────────────────────────────────── */
/* Mode swap: the new palette spreads as a circle from the button pressed
   (theme.js sets --vt-x/--vt-y). Old snapshot stays put underneath. */
::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: sweep .55s cubic-bezier(.4, 0, .2, 1); mix-blend-mode: normal; }
@keyframes sweep {
  from { clip-path: circle(0% at var(--vt-x, 92%) var(--vt-y, 3%)); }
  to   { clip-path: circle(150% at var(--vt-x, 92%) var(--vt-y, 3%)); }
}

/* Boot: the banner types itself in, one line after another, in steps like
   a slow terminal, then the prompt types `whoami` and answers. Everything
   below is gated on .js so a page without scripts is never left blank. */
.js .ln { clip-path: inset(0 100% 0 0); animation: type-line .6s steps(36, end) forwards; }
.js .ln:nth-child(1) { animation-delay: .05s; } .js .ln:nth-child(2) { animation-delay: .17s; }
.js .ln:nth-child(3) { animation-delay: .29s; } .js .ln:nth-child(4) { animation-delay: .41s; }
.js .ln:nth-child(5) { animation-delay: .53s; } .js .ln:nth-child(6) { animation-delay: .65s; }
.js .ln:nth-child(7) { animation-delay: .77s; }
@keyframes type-line { to { clip-path: inset(0 0 0 0); } }

.js .type { display: inline-block; overflow: hidden; vertical-align: bottom; white-space: nowrap; width: 0;
  animation: type-cmd .5s steps(6, end) 1.35s forwards; }
@keyframes type-cmd { to { width: 6ch; } }
.js .whoami .out { opacity: 0; animation: appear .01s linear forwards; }
.js .whoami .out:nth-of-type(2) { animation-delay: 2s; }
.js .whoami .out:nth-of-type(3) { animation-delay: 2.15s; }
@keyframes appear { to { opacity: 1; } }

/* CRT: faint scanlines over the banner, and the whole thing flickers once
   as it finishes, the way an old monitor settles. */
.banner { position: relative; }
.banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, color-mix(in srgb, var(--bg) 35%, transparent) 2px 3px);
}
.js .banner { animation: settle .5s steps(5) 1.2s; }
@keyframes settle { 0%, 40%, 80% { opacity: 1; } 20%, 60% { opacity: .55; } }

/* Once typed in (cv.js marks it .booted), the banner stops replaying its
   entrance, so hovering it and leaving does not retype it. */
.js .banner.booted .ln { clip-path: none; animation: none; }
/* Hovering the banner cycles the colours down the lines, poz.pet-style. */
.banner:hover .ln, .js .banner.booted:hover .ln { animation: hue 1.4s steps(7) infinite; clip-path: none; }
.banner:hover .ln:nth-child(2) { animation-delay: -.2s; } .banner:hover .ln:nth-child(3) { animation-delay: -.4s; }
.banner:hover .ln:nth-child(4) { animation-delay: -.6s; } .banner:hover .ln:nth-child(5) { animation-delay: -.8s; }
.banner:hover .ln:nth-child(6) { animation-delay: -1s; }  .banner:hover .ln:nth-child(7) { animation-delay: -1.2s; }
@keyframes hue {
  0% { color: var(--l1); } 14% { color: var(--l2); } 28% { color: var(--l3); } 42% { color: var(--l4); }
  57% { color: var(--l5); } 71% { color: var(--l6); } 85% { color: var(--l1); }
}

/* Sections rise in as they scroll into view (cv.js adds .in); the entries
   inside follow one after another. */
.js .sec, .js .facts, .js .filebar { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .in { opacity: 1 !important; transform: none !important; }
.js .sec .entry, .js .sec .skills > div, .js .certs tbody tr, .js .refs .box {
  opacity: 0; transform: translateX(-8px); transition: opacity .4s ease, transform .4s ease;
}
.js .sec.in .entry, .js .sec.in .skills > div, .js .sec.in .certs tbody tr, .js .sec.in .refs .box { opacity: 1; transform: none; }
.js .sec.in :is(.entry, .skills > div, tr, .box):nth-child(2) { transition-delay: .08s; }
.js .sec.in :is(.entry, .skills > div, tr, .box):nth-child(3) { transition-delay: .16s; }
.js .sec.in :is(.entry, .skills > div, tr, .box):nth-child(4) { transition-delay: .24s; }
.js .sec.in :is(.entry, .skills > div, tr, .box):nth-child(5) { transition-delay: .32s; }
.js .sec.in :is(.entry, .skills > div, tr, .box):nth-child(n+6) { transition-delay: .4s; }

/* Nav: a caret slides in ahead of the link under the pointer, and the
   section in view keeps it. */
.nav a { position: relative; transition: color .15s; }
.nav a::before {
  content: ">"; position: absolute; left: -1.1ch; color: var(--accent);
  opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s;
}
.nav a:hover::before, .nav a[aria-current="true"]::before { opacity: 1; transform: none; }

/* An entry under the pointer gets a bar down its left edge, like a
   selected line in a log. */
.entry { position: relative; }
.entry::before {
  content: ""; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 2px;
  background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .25s ease;
}
.entry:hover::before { transform: scaleY(1); }
.entry li::before { transition: transform .2s, color .2s; display: inline-block; }
.entry li:hover::before { color: var(--accent); transform: translateX(3px); }

/* Portrait: a scan bar runs down it once when it appears, and scanlines
   come up over it on hover. */
.portrait { position: relative; overflow: hidden; }
.portrait::after {
  content: ""; position: absolute; inset: 6px 6px 26px; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, color-mix(in srgb, var(--bg) 45%, transparent) 2px 4px);
}
.portrait:hover::after { opacity: 1; }
.portrait::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 3px; z-index: 1; pointer-events: none;
  background: var(--link); box-shadow: 0 0 12px var(--link); opacity: 0;
}
.sec.in .portrait::before { animation: scan 1.1s ease-in-out .3s 1; }
@keyframes scan { 0% { opacity: .9; top: 6px; } 90% { opacity: .9; } 100% { opacity: 0; top: calc(100% - 26px); } }

/* Facts flicker on like a status display. */
.facts.in dd { animation: flick .45s steps(3) 1; }
.facts.in div:nth-child(2) dd { animation-delay: .08s; } .facts.in div:nth-child(3) dd { animation-delay: .16s; }
.facts.in div:nth-child(4) dd { animation-delay: .24s; }
@keyframes flick { 0% { opacity: 0; } 33% { opacity: 1; } 66% { opacity: .3; } 100% { opacity: 1; } }

/* The download pulses once, so the one action on the page is found. */
.filebar.in .a-dl { animation: nudge .9s ease .4s 2; display: inline-block; }
@keyframes nudge { 0%, 100% { transform: none; } 40% { transform: translateY(2px); } 60% { transform: translateY(-1px); } }

/* 88x31s press in under the pointer; one carries a tiny marquee. */
.b88 { transition: transform .1s, border-style 0s; }
.b88:hover { border-style: inset; transform: translateY(1px); }
.marquee { display: flex; width: 100%; overflow: hidden; white-space: nowrap; }
.marquee i { flex: none; font-style: normal; padding-right: 0; animation: marquee 7s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* The wordmark's Ө blinks now and then, a status light. */
.wm span { animation: lamp 4s steps(1) infinite; }
@keyframes lamp { 0%, 92% { opacity: 1; } 94% { opacity: .2; } 96% { opacity: 1; } 98% { opacity: .2; } }

/* Original issuer artwork sits on fixed plates so every palette is legible. */
.logo-plate { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid #334155; background: #111827; }
.logo-plate img { display: block; object-fit: contain; }
.logo-plate.lab { width: 106px; height: 106px; padding: 8px; }
.logo-plate.university { width: 136px; min-height: 58px; padding: 7px 4px; background: #fff; border-color: #d7d7df; }
.logo-plate.htb { width: 152px; height: 68px; padding: 10px; }
.logo-plate.cisco { width: 152px; height: 68px; background: #fff; border-color: #d7d7df; }
.credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.credential { border: 1px solid var(--line); background: var(--bg); padding: 14px; min-width: 0; }
.credential-heading { display: flex; align-items: center; gap: 14px; }
.credential-heading > div { min-width: 0; }
.credential .lab { width: 92px; height: 92px; }
.credential h3 { font-size: 18px; line-height: 1.4; }
.issuer { margin: 0 0 3px; color: var(--subtle); font-size: 10px; }
.credential-detail { margin: 5px 0; font-size: 11px; color: var(--subtle); }
.credential-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 9px; font-size: 10px; color: var(--subtle); }
.cert-id { font-size: 9px; color: var(--subtle); overflow-wrap: anywhere; margin: 6px 0 0; }
.credential-wide { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; padding: 12px 14px; }
.credential-wide h3 { font-size: 13px; }
.credential-wide .credential-detail { margin-bottom: 0; }
.progress { color: var(--title); }
.licence-mark { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 152px; height: 60px; flex-shrink: 0; background: var(--overlay); border: 1px solid var(--line); font-size: 22px; color: var(--title); letter-spacing: 2px; }
.licence-mark span { font-size: 9px; color: var(--subtle); letter-spacing: 1px; }

/* New logos and credentials, inside the original unboxed CV layout. */
img { max-width: 100%; }
.entry-aside { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.facts dt { display: flex; align-items: center; gap: 6px; min-height: 24px; font-size: 10px; letter-spacing: .6px; }
.facts dt img { object-fit: contain; }
.facts dd { font-size: 12.5px; }
.lab-pair { display: flex; gap: 2px; }
.fact-marker { color: var(--warn); font-size: 12px; }
.status { color: var(--add); font-size: 11px; margin-left: 5px; }
.status::before { content: "✓ "; }
.org, .box { overflow-wrap: anywhere; }
.credential { background: var(--panel); }
.footer-brand { display: flex; justify-content: center; margin-bottom: 14px; }
#theme { margin-left: auto; }
#theme button { min-height: 32px; }
.sec h2 { text-transform: lowercase; }
::view-transition-old(root), ::view-transition-new(root) { pointer-events: none; }
@media (max-width: 720px) {
  .entry-aside { flex-direction: row; align-items: center; gap: 12px; margin: 0 0 8px; }
  .entry-aside .logo-plate.lab { width: 72px; height: 72px; padding: 5px; }
  .credentials { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  body { padding-inline: 12px; }
  .credential { padding: 12px; }
  .credential-heading { gap: 10px; }
  .credential-wide { gap: 12px; }
  .credential-wide .logo-plate, .licence-mark { width: 80px; height: 56px; }
  .credential-wide .logo-plate.htb { padding: 7px; }
  .credential-wide .logo-plate.htb img { height: auto; }
  .nav { gap: 5px 16px; }
  .nav hr { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .banner .ln { transform: none !important; }
}
@media print {
  .footer-brand { display: none; }
  .credential { break-inside: avoid; }
}

/* ── small screens ───────────────────────────────────────────────────── */
@media (max-width: 720px) {
  body { padding: 16px 16px 32px; font-size: 13.5px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px dashed var(--line); }
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 220px; }
  .contact { grid-template-columns: 1fr; }
  .entry, .skills div { grid-template-columns: 1fr; gap: 2px; }
  .refs { grid-template-columns: 1fr; }
  .filebar .acts { margin-left: 0; width: 100%; }
  .nav hr { margin: 0 8px; }
  thead { display: none; }
  .certs tr { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 6px 0; border-top: 1px dashed var(--line); }
  .certs td { padding: 0; }
  .certs td:nth-child(2) { grid-column: 2; }
  .certs td:nth-child(3), .certs td:nth-child(4) { grid-column: 2; color: var(--subtle); font-size: 12.5px; }
}

/* Asked for less motion: everything is simply there, nothing moves. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .ln { clip-path: none; }
  .js .type { width: auto; }
  .js .whoami .out, .js .sec, .js .facts, .js .filebar,
  .js .sec .entry, .js .sec .skills > div, .js .certs tbody tr, .js .refs .box { opacity: 1; transform: none; }
  .banner:hover .ln { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* ── print: the CV on paper, light and quiet ─────────────────────────── */
@media print {
  :root, [data-theme] {
    --bg: #fff; --panel: #fff; --line: #bbb; --muted: #666; --subtle: #444; --fg: #111;
    --link: #111; --title: #111; --accent: #111; --warn: #333; --add: #333; --del: #333;
  }
  body { max-width: none; padding: 0; font-size: 10.5pt; }
  .banner-wrap, .nav, #theme, .filebar, footer.site .ring, .buttons, .wm, .skip, .cursor, .dot { display: none !important; }
  .sec, .entry, .box, tr { break-inside: avoid; }
  /* Print can start while an entrance transition is still running. */
  .js .sec, .js .facts, .js .filebar, .js .sec .entry,
  .js .sec .skills > div, .js .refs .box, .js .whoami .out {
    opacity: 1 !important; transform: none !important;
    animation: none !important; transition: none !important;
  }
  .js .type { width: auto; animation: none; }
  a { text-decoration: none; }
}

.dmn-brand {
  --brand-ink: var(--fg);
  --brand-panel: var(--panel);
  --brand-subtle: var(--subtle);
  --brand-love: var(--del);
  --brand-rose: var(--accent);
  --brand-gold: var(--warn);
  --brand-pine: var(--pine);
  --brand-foam: var(--link);
  --brand-iris: var(--title);
  --brand-font: "Noto Wordmark", sans-serif;
}
/* Ported from daemon-sec's BrandLogo; inline SVG follows the active palette. */
.dmn-brand-link { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.dmn-brand-link:hover { text-decoration: none; }
.dmn-brand { display: inline-flex; align-items: center; gap: 8px; }
.dmn-brand__emblem { position: relative; display: grid; place-items: center; width: 34px; height: 38px; flex-shrink: 0; }
.dmn-brand__frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.dmn-brand__frame path { fill: var(--brand-panel); stroke: color-mix(in srgb, var(--brand-ink) 25%, transparent); }
.dmn-brand__mark { position: relative; width: 32px; height: 32px; }
.dmn-brand__type { display: flex; flex-direction: column; gap: 4px; }
.dmn-brand__name { font-family: var(--brand-font); font-weight: 800; font-size: 16px; font-stretch: 85%; letter-spacing: -.015em; line-height: 1; white-space: nowrap; color: var(--brand-ink); }
.dmn-brand__slash { color: var(--brand-love); }
.dmn-brand__caption { font-family: "DM Mono", monospace; font-weight: 400; font-size: 7px; line-height: 1; letter-spacing: .15em; color: var(--brand-subtle); }
.dmn-brand__spectrum { display: flex; gap: 3px; height: 2px; }
.dmn-brand__spectrum i { flex: 1; }
.dmn-brand-link:hover .dmn-brand__frame path { fill: color-mix(in srgb, var(--brand-pine) 12%, var(--brand-panel)); }
.dmn-brand__love { fill: var(--brand-love); background: var(--brand-love); }
.dmn-brand__rose { fill: var(--brand-rose); background: var(--brand-rose); }
.dmn-brand__gold { fill: var(--brand-gold); background: var(--brand-gold); }
.dmn-brand__pine { fill: var(--brand-pine); background: var(--brand-pine); }
.dmn-brand__foam { fill: var(--brand-foam); background: var(--brand-foam); }
.dmn-brand__iris { fill: var(--brand-iris); background: var(--brand-iris); }
@media (max-width: 639px) {
  .dmn-brand { gap: 5px; }
  .dmn-brand__emblem { width: 27px; height: 34px; }
  .dmn-brand__mark { width: 27px; height: 27px; }
  .dmn-brand__name { font-size: 13px; }
  .dmn-brand__caption { font-size: 6px; letter-spacing: .07em; }
}
