/* cv.daniel.tools - single page CV. No framework, no build step. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-var.woff2?v=20261027") format("woff2");
}
/* Static instances for print: Chrome embeds the variable font as Type 3 in PDFs. Only fetched when printing. */
@font-face { font-family: "Archivo Print"; font-weight: 400; font-stretch: 100%; src: url("/assets/fonts/print/archivo-400-100.woff2?v=20261028") format("woff2"); }
@font-face { font-family: "Archivo Print"; font-weight: 500; font-stretch: 100%; src: url("/assets/fonts/print/archivo-500-100.woff2?v=20261028") format("woff2"); }
@font-face { font-family: "Archivo Print"; font-weight: 600; font-stretch: 100%; src: url("/assets/fonts/print/archivo-600-100.woff2?v=20261028") format("woff2"); }
@font-face { font-family: "Archivo Print"; font-weight: 700; font-stretch: 100%; src: url("/assets/fonts/print/archivo-700-100.woff2?v=20261028") format("woff2"); }
@font-face { font-family: "Archivo Print"; font-weight: 600; font-stretch: 110%; src: url("/assets/fonts/print/archivo-600-110.woff2?v=20261028") format("woff2"); }
@font-face { font-family: "Archivo Print"; font-weight: 700; font-stretch: 112%; src: url("/assets/fonts/print/archivo-700-112.woff2?v=20261028") format("woff2"); }
@font-face { font-family: "Archivo Print"; font-weight: 800; font-stretch: 118%; src: url("/assets/fonts/print/archivo-800-118.woff2?v=20261028") format("woff2"); }
@font-face { font-family: "Archivo Print"; font-weight: 800; font-stretch: 120%; src: url("/assets/fonts/print/archivo-800-120.woff2?v=20261028") format("woff2"); }
@font-face { font-family: "Archivo Print"; font-weight: 800; font-stretch: 125%; src: url("/assets/fonts/print/archivo-800-125.woff2?v=20261028") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --paper: #f6f7f9;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-2: #454b59;
  --muted: #646b7a;
  --line: #e3e6eb;
  --line-2: #cfd4dc;
  --soft: #eceef2;
  --sans: Archivo, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shell: 74rem;
  --nav-h: 68px;
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --on-ink: #ffffff;
  --ink-hover: #2b2e37;
  --nav-bg: rgba(246, 247, 249, .88);
  color-scheme: light;
}
/* Dark theme: follows the system unless the visitor picks one with the toggle (theme.js sets data-theme). */
:root[data-theme="dark"] {
  --paper: #0e1013; --surface: #16191e; --ink: #eceef2; --ink-2: #b9bfca; --muted: #8f97a5;
  --line: #252932; --line-2: #363c47; --soft: #1f232a;
  --on-ink: #0e1013; --ink-hover: #d3d7de; --nav-bg: rgba(14, 16, 19, .86);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1013; --surface: #16191e; --ink: #eceef2; --ink-2: #b9bfca; --muted: #8f97a5;
    --line: #252932; --line-2: #363c47; --soft: #1f232a;
    --on-ink: #0e1013; --ink-hover: #d3d7de; --nav-bg: rgba(14, 16, 19, .86);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
strong { font-weight: 600; color: var(--ink); }
::selection { background: var(--soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.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; }
.ic { width: 1em; height: 1em; flex-shrink: 0; }
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.3rem; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn .ic { font-size: 17px; }
.btn-ink { background: var(--ink); color: var(--on-ink); border: 1px solid transparent; }
.btn-ink:hover { background: var(--ink-hover); }
.btn-line { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { padding: .6rem 1rem; font-size: 14px; }
.btn-sm .ic { font-size: 14px; }

/* Content links: fixed underline, hover changes colour only. */
.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s, color .2s;
}
.link:hover { text-decoration-color: var(--ink); }
.link-icon { display: inline-flex; align-items: center; gap: .3rem; }
.link-icon .ic { font-size: .85em; color: var(--muted); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}
.nav.is-scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-color: var(--line);
}
.nav-row { height: var(--nav-h); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-photo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(22, 24, 29, .08); }
.brand-name { font-weight: 600; font-size: 15px; font-stretch: 110%; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; font-size: 14.5px; line-height: 1.7; }
.nav-links a { position: relative; color: var(--ink-2); text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--ink); }
.nav-links a[aria-current="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; border-radius: 2px; background: var(--ink);
}
.nav-menu { display: none; margin-left: auto; position: relative; }
.nav-menu summary {
  list-style: none; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary .ic { font-size: 20px; }
.nav-menu nav {
  position: absolute; right: 0; top: calc(100% + 8px);
  display: flex; flex-direction: column; min-width: 13rem;
  max-height: calc(100vh - var(--nav-h) - 1rem);
  max-height: calc(100dvh - var(--nav-h) - 1rem);
  overflow-y: auto; overscroll-behavior: contain;
  padding: .5rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 12px 32px -12px rgba(22, 24, 29, .25);
}
.nav-menu nav a { padding: .65rem .8rem; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: 15px; }
.nav-menu nav a:hover { background: var(--paper); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.eyebrow { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 1rem; }
.hero-name {
  font-size: clamp(2.9rem, 8.4vw, 6.4rem);
  font-weight: 800; font-stretch: 125%;
  line-height: .92; letter-spacing: -.035em; text-transform: uppercase;
}
.hero-sub { margin-top: 1.4rem; font-weight: 600; font-size: clamp(1rem, 1.6vw, 1.15rem); font-stretch: 110%; }
.hero-sub .sep { color: var(--line-2); margin: 0 .2rem; }
.nowrap { white-space: nowrap; }
.hero-lead { margin-top: 1rem; max-width: 44ch; font-size: clamp(1.08rem, 1.55vw, 1.22rem); line-height: 1.5; letter-spacing: -.005em; color: var(--ink-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.print-contact { display: none; }

.facts {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .5rem 1.25rem;
  box-shadow: 0 1px 2px rgba(22, 24, 29, .04);
}
.facts > div {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem;
  padding: .95rem 0; border-bottom: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-size: 13.5px; color: var(--muted); }
.facts dd strong { display: block; font-size: 14.5px; line-height: 1.35; }
.facts dd span { display: block; margin-top: .15rem; font-size: 13px; line-height: 1.4; color: var(--muted); }

/* ---------- Career strip ---------- */
.career { border-top: 1px solid var(--line); padding: 1.6rem 0 0; }
.career-label { font-size: 13px; color: var(--muted); margin-bottom: .8rem; }
.career-list { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 0; }
.career-list li { display: flex; align-items: center; }
.career-list li + li::before { content: ""; width: 1px; height: 1.15em; margin: 0 1.1rem; background: var(--line-2); }
.career-list a {
  font-weight: 700; font-stretch: 112%; font-size: clamp(.95rem, 1.3vw, 1.06rem);
  letter-spacing: -.01em; text-decoration: none; color: var(--ink-2);
  transition: color .2s;
}
.career-list a:hover { color: var(--ink); }

/* ---------- Logo tiles ---------- */
.logo {
  display: block; flex-shrink: 0; object-fit: cover;
  border-radius: 8px; background: #fff;
  box-shadow: 0 0 0 1px rgba(22, 24, 29, .1);
}
.career-list a { display: inline-flex; align-items: center; gap: .55rem; }
.career-list .logo { width: 24px; height: 24px; border-radius: 6px; }
.org { display: flex; align-items: center; gap: .75rem; }
.org .logo { width: 34px; height: 34px; border-radius: 9px; }
.org-sm .logo { width: 30px; height: 30px; border-radius: 8px; }
.tool-pick { display: inline-flex; align-items: center; gap: .65rem; }
.logo-tool { width: 30px; height: 30px; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-alt + .section { border-top: 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; font-stretch: 125%; letter-spacing: -.035em; line-height: 1; }
.section-intro { margin-top: 1rem; max-width: 46rem; color: var(--ink-2); }
.section-intro strong { color: var(--ink); }

/* ---------- Timeline (experience and education) ---------- */
.timeline { position: relative; }
.role {
  position: relative;
  --rail: -.625rem;
  display: grid; grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 0 2.75rem;
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
.role:last-child { padding-bottom: 0; }
/* vertical rail + dot, drawn on the date column */
.role-when { position: relative; padding-right: 1.5rem; text-align: right; }
.role-when::before {
  content: ""; position: absolute; right: var(--rail); top: .55rem; bottom: calc(-1 * clamp(3rem, 6vw, 4.5rem));
  width: 1px; background: var(--line-2);
}
.role:last-child .role-when::before { bottom: 0; }
.role-when::after {
  content: ""; position: absolute; right: calc(var(--rail) - 4px); top: .4rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--muted);
}
.role:first-child .role-when::after { background: var(--ink); border-color: var(--ink); }
.role-dates { font-size: 14px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.role-dur { font-size: 13px; color: var(--muted); }
.pill {
  display: inline-block; margin-bottom: .6rem;
  padding: .25rem .65rem; border-radius: 999px;
  background: var(--soft); font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.org { font-size: clamp(1.6rem, 2.2vw, 1.75rem); font-weight: 800; font-stretch: 120%; letter-spacing: -.03em; line-height: 1.1; }
.org-sm { font-size: clamp(1.35rem, 2.4vw, 1.6rem); }
.role-title { margin-top: .45rem; font-weight: 600; font-size: 16.5px; }
.role-meta { margin-top: .15rem; font-size: 14px; color: var(--muted); }
.role-meta .link { color: var(--muted); }
.role-desc { margin-top: 1rem; color: var(--ink-2); }
.role-side { padding-top: .35rem; }
.role-note { color: var(--ink-2); margin-bottom: .8rem; }
.bullets li {
  position: relative; padding-left: 1.1rem; color: var(--ink-2);
}
.bullets li + li { margin-top: .7rem; }
.bullets li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--line-2);
}
.timeline-compact .role { grid-template-columns: 11rem minmax(0, 1fr); padding-bottom: 2.5rem; }
.timeline-compact .role:last-child { padding-bottom: 0; }
.timeline-compact .role-when::before { bottom: -2.5rem; }
.timeline-compact .role:last-child .role-when::before { bottom: 0; }
.role-wide { max-width: 44rem; }

/* ---------- Tools ---------- */
.tools {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.device { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.device-label { font-size: 13px; color: var(--muted); margin-bottom: 1rem; }
.device-label strong { margin-left: .35rem; }
.laptop { width: 100%; }
.laptop-screen {
  position: relative;
  padding: 3.2% 3.2% 3.6%;
  background: #1b1d22; border-radius: 18px 18px 6px 6px;
  box-shadow: 0 0 0 1px #2c2f36 inset, 0 30px 60px -30px rgba(22, 24, 29, .45);
}
.laptop-cam {
  position: absolute; top: 1.3%; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: #3a3d45;
}
.laptop-display { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: #fff; }
.laptop-display img, .laptop-display video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Switching tools crossfades; visibility keeps the hidden screenshot out of the accessibility tree */
.laptop-display img { transition: opacity .35s ease, visibility 0s; }
.laptop-display img[hidden] { display: block; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s .35s; }
/* Tour of the selected tool, played on hover (or while in view on touch screens) */
.laptop-display video { opacity: 0; transition: opacity .4s ease; }
.laptop-display video.is-playing { opacity: 1; }
/* The tour draws its own cursor: hide the real one so there are not two */
.laptop:has(video.is-playing) { cursor: none; }
.laptop-base {
  position: relative; width: calc(100% + 24px); margin-left: -12px; height: 14px;
  background: linear-gradient(#d9dce2, #b9bec7);
  border-radius: 0 0 14px 14px;
}
.laptop-base::before {
  content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 16%; height: 6px; border-radius: 0 0 8px 8px; background: #aab0ba;
}

.tool-list { border-top: 1px solid var(--line); }
.tool {
  position: relative; padding: 1.5rem 1.4rem 1.5rem 1.6rem;
  border-bottom: 1px solid var(--line);
  transition: background-color .2s;
}
.tool::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: transparent; transition: background-color .2s;
}
.tool.is-active { background: var(--paper); }
.tool.is-active::before { background: var(--ink); }
.tool-name { font-size: 1.45rem; font-weight: 800; font-stretch: 118%; letter-spacing: -.02em; line-height: 1.15; }
.tool-pick { text-align: left; border-radius: 6px; }
.tool-pick::after { content: ""; position: absolute; inset: 0; }
.tool-links, .tool-links a { position: relative; z-index: 1; }
.tool-kind { margin-top: .2rem; font-size: 13.5px; color: var(--muted); }
.tool-quote { margin-top: .8rem; font-weight: 600; }
.tool-desc { margin-top: .4rem; color: var(--ink-2); font-size: 15.5px; }
.tool-stat { margin-top: .9rem; font-size: 14px; color: var(--muted); }
.stat-num { font-size: 1.25rem; font-weight: 800; font-stretch: 118%; color: var(--ink); margin-right: .25rem; font-variant-numeric: tabular-nums; }
.tool-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: .8rem; font-size: 14.5px; }

/* ---------- Research ---------- */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.post {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.post:hover { border-color: var(--line-2); box-shadow: 0 10px 30px -18px rgba(22, 24, 29, .35); }
.post-media { overflow: hidden; aspect-ratio: 40 / 21; background: var(--soft); border-bottom: 1px solid var(--line); }
.post-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post:hover .post-media img { transform: scale(1.03); }
.post-body { display: flex; flex-direction: column; padding: 1.2rem 1.4rem 1.5rem; }
.post-date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-title { margin-top: .55rem; font-size: 1.08rem; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.post-title a { text-decoration: none; }
.post-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-desc { margin-top: .6rem; font-size: 14.5px; color: var(--ink-2); }

/* ---------- Open source ---------- */
.oss-stats { display: flex; gap: 2rem; flex-shrink: 0; }
.oss-stats p { font-size: 14px; color: var(--muted); }
.oss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.oss-card {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.4rem 1.5rem; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.oss-head { display: flex; align-items: center; gap: .85rem; }
.oss-head .logo { width: 40px; height: 40px; border-radius: 10px; }
.oss-name { font-size: 1.15rem; font-weight: 700; font-stretch: 112%; line-height: 1.2; }
.oss-repo { margin-top: .1rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); }
.oss-desc { flex: 1; color: var(--ink-2); }
.oss-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1rem;
  padding-top: 1rem; border-top: 1px solid var(--line);
}
.oss-for { display: flex; align-items: center; gap: .55rem; font-size: 13px; color: var(--muted); }
.oss-for span { display: flex; }
.oss-for .logo { width: 24px; height: 24px; border-radius: 7px; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line); }
.oss-for .logo + .logo { margin-left: -5px; }
.oss-prs { display: flex; flex-wrap: wrap; gap: .5rem; }
.pr {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 32px;
  padding: .25rem .75rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums;
  transition: border-color .2s;
}
.pr:hover { border-color: var(--ink); }
.pr .ic { font-size: 14px; color: var(--muted); }

/* ---------- Cards (certs, about) ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.card-title { font-size: 1.15rem; font-weight: 700; font-stretch: 112%; margin-bottom: 1rem; }
.certs { margin-top: clamp(3rem, 6vw, 4rem); }
.cert-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
.cert-list li {
  display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  padding: .8rem 0; border-top: 1px solid var(--line);
}
.cert-logo { width: 24px; height: 24px; border-radius: 6px; align-self: center; }
.cert-name { flex: 1; font-weight: 500; }
/* Archivo draws a stylised ampersand that reads as "ATTƐCK" */
.amp { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-weight: inherit; }
.cert-list .link { font-size: 14px; flex-shrink: 0; }

/* ---------- News ---------- */
.tv-feature {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.tv { position: relative; }
/* TV set, same family as the laptop: dark bezel, light foot */
.tvset { margin: 0; }
.tvset-screen {
  position: relative; padding: 2.4% 2.4% 4.6%;
  background: #1b1d22; border-radius: 14px;
  box-shadow: 0 0 0 1px #2c2f36 inset, 0 30px 60px -30px rgba(22, 24, 29, .45);
}
.tvset-display { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 3px; background: #050607; }
.tvset-display img, .tvset-display video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tvset-video { opacity: 0; transition: opacity .4s ease; }
.tvset.is-playing .tvset-video { opacity: 1; }
.tvset-noise {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: url("/images/news/tv-noise.png") 0 0 / 160px;
}
.tvset.is-static .tvset-noise { opacity: .9; animation: tv-noise .3s steps(6) infinite; }
@keyframes tv-noise {
  0% { background-position: 0 0; } 20% { background-position: -60px 40px; } 40% { background-position: 30px -70px; }
  60% { background-position: -90px -20px; } 80% { background-position: 50px 80px; } 100% { background-position: 0 0; }
}
.tvset-led {
  position: absolute; right: 3.2%; bottom: 1.7%; width: 6px; height: 6px; border-radius: 50%;
  background: #d1342f; box-shadow: 0 0 6px rgba(209, 52, 47, .8);
}
.tvset-stand { position: relative; height: 26px; }
.tvset-stand::before {
  content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 9%; height: 18px; background: linear-gradient(#2a2d34, #1b1d22);
}
.tvset-stand::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 36%; height: 9px; border-radius: 6px 6px 3px 3px; background: linear-gradient(#d9dce2, #b9bec7);
}
.tv-channels { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1rem; }
.tv-channels[hidden] { display: none; }
.tv-channels button {
  padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.tv-channels button:hover { border-color: var(--ink); }
.tv-channels button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.tvset.is-playing .tv-badge::before { animation: tv-live 1.2s ease-in-out infinite; }
@keyframes tv-live { 50% { opacity: .25; } }
.tv-badge {
  position: absolute; right: 1rem; top: 1rem; display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .94);
  font-size: 12.5px; font-weight: 600; color: #16181d;
}
.tv-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d1342f; }
.tv-eyebrow { display: flex; align-items: center; gap: .6rem; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.tv-eyebrow .logo { width: 28px; height: 28px; border-radius: 7px; }
.tv-title { margin-top: .9rem; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; font-stretch: 120%; letter-spacing: -.03em; line-height: 1.1; }
.tv-text { margin-top: .7rem; color: var(--ink-2); }
.tv-notes { display: grid; gap: .8rem; margin-top: 1.1rem; }
.tv-notes dt { font-size: 13.5px; font-weight: 600; }
.tv-notes dd { margin: .15rem 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.tv-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.news li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 .9rem; align-items: start;
  padding: 1rem 0; border-top: 1px solid var(--line);
}
.news-logo { width: 28px; height: 28px; border-radius: 7px; margin-top: .1rem; }
.news-body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.news-title { font-weight: 500; line-height: 1.45; }
.news-desc { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.news-src { font-size: 14px; color: var(--muted); align-self: flex-start; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.contact-h { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; font-stretch: 125%; letter-spacing: -.04em; line-height: .98; }
.contact-text { margin-top: 1.2rem; color: var(--ink-2); max-width: 32rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 1.6rem 0 2rem; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer nav { display: flex; gap: 1.4rem; line-height: 1.75; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-menu { display: block; margin-left: 0; }
}
@media (max-width: 900px) and (min-width: 641px) {
  /* bullets move under the text: let the date column span both rows so the rail reaches the next dot */
  .role-when { grid-row: 1 / span 2; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .role { --rail: -.375rem; grid-template-columns: 10rem minmax(0, 1fr); gap: 0 2.25rem; }
  .timeline-compact .role { grid-template-columns: 10rem minmax(0, 1fr); }
  .role-side { grid-column: 2; padding-top: 1.2rem; }
  .tools { grid-template-columns: 1fr; }
  .device { position: static; }
  .tv-feature { grid-template-columns: 1fr; }
  .cert-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-sub .sep { display: none; }
  .hero-sub .nowrap { display: block; }
  .nav-cta { display: none; }
  .nav-menu { margin-left: auto; }
  .facts > div { grid-template-columns: 6.2rem minmax(0, 1fr); gap: .8rem; }
  .role, .timeline-compact .role { grid-template-columns: 1fr; padding-left: 1.4rem; }
  .role-when { text-align: left; padding-right: 0; margin-bottom: .8rem; display: flex; gap: .6rem; align-items: baseline; }
  /* mobile: the rail runs down the left edge of each role */
  .role-when::before { display: none; }
  .role::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
  .role:first-child::before { top: .55rem; }
  .role:last-child::before { bottom: auto; height: .55rem; }
  .role:only-child::before { display: none; }
  .role-when::after { right: auto; left: calc(-1.4rem - 4px); }
  .role-side { grid-column: 1; }
  .posts, .news, .oss { grid-template-columns: 1fr; }
  .oss-stats { gap: 1.5rem; }
  .laptop-screen { border-radius: 12px 12px 4px 4px; }
  .laptop-base { height: 10px; }
  .cert-list li { flex-wrap: wrap; gap: .3rem .8rem; }
}
@media (max-width: 519px) {
  .hero-cta .btn-ink { flex: 1 1 100%; justify-content: center; }
  .hero-cta .btn-line { flex: 1 1 0; justify-content: center; }
  .hero-cta .btn-dl { flex-basis: 100%; }
}

@media (pointer: coarse) {
  .nav-menu summary { width: 44px; height: 44px; }
  .brand { min-height: 44px; }
  .btn-sm, .tv-channels button { min-height: 44px; }
  /* Bigger hit area, same layout: padding grows the target, the negative margin gives the space back. */
  .career-list a, .tool-links a, .cert-list .link, .news-src, .footer nav a {
    padding-block: .6rem; margin-block: -.6rem;
  }
  .footer nav a { padding-inline: .6rem; margin-inline: -.6rem; }
  .pr { min-height: 40px; }
}

@media (forced-colors: active) {
  .btn, .pill { border: 1px solid ButtonText; }
  .tool.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
  .nav-links a[aria-current="true"] { text-decoration: underline; }
  .role-when::before, .role::before, .bullets li::before, .role-when::after { forced-color-adjust: none; background: CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .tvset.is-static .tvset-noise, .tvset.is-playing .tv-badge::before { animation: none; }
}

/* ---------- Print ---------- */
@media print {
  @page { margin: 12mm 14mm; }
  :root:not(#_) {
    --paper: #fff; --surface: #fff; --ink: #16181d; --ink-2: #454b59; --muted: #646b7a;
    --line: #e3e6eb; --line-2: #cfd4dc; --soft: #eceef2; --on-ink: #fff; color-scheme: light;
  }
  html, body, .section-alt { background: #fff; }
  .theme-toggle { display: none !important; }
  .nav, .skip-link, .device, .hero-cta, .section-head .btn, .footer nav { display: none !important; }
  .hero { padding: 0 0 1.2rem; grid-template-columns: 1fr; gap: 1.2rem; }
  .section { padding: 1.3rem 0; }
  .post, .card, .oss-card, .news li, .tool, .facts, .contact-grid, .tv-feature, .bullets li, .role-desc { break-inside: avoid; }
  .section-head { display: block; }
  .org, .role-title, .role-meta { break-after: avoid; }
  .h2, .contact-h, .card-title, .tool-name, .section-head { break-after: avoid; }
  .tools { grid-template-columns: 1fr; }
  .tool.is-active { background: none; }
  .tool.is-active::before { background: transparent; }
  .post:hover { box-shadow: none; }
  .print-contact { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; margin-top: .7rem; font-size: 12.5px; font-weight: 600; }
  .contact-grid > div:first-child { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  body { font-family: "Archivo Print", var(--sans); font-size: 12.5px; line-height: 1.5; }
  .hero-name { font-size: 2.8rem; }
  .hero-sub { margin-top: .7rem; font-size: 1rem; }
  .hero-lead { margin-top: .6rem; font-size: 1.1rem; max-width: none; }
  .facts { box-shadow: none; padding: .2rem 1rem; }
  .facts > div { padding: .45rem 0; }
  .section-head { margin-bottom: .9rem; }
  .h2 { font-size: 1.8rem; }
  .section-intro { margin-top: .5rem; }
  .role, .timeline-compact .role { grid-template-columns: 10rem minmax(0, 1fr); gap: 0 1.8rem; padding-bottom: 1.3rem; }
  .role-when::before, .timeline-compact .role-when::before { bottom: -1.3rem; }
  .role:last-child .role-when::before, .timeline-compact .role:last-child .role-when::before { bottom: 0; }
  .org { font-size: 1.35rem; }
  .org .logo { width: 28px; height: 28px; }
  .role-desc { margin-top: .6rem; }
  .role-side { padding-top: .7rem; }
  .bullets li + li { margin-top: .35rem; }
  .tool { padding: .8rem 0; }
  .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .post-media, .tv { display: none; }
  .post-body { padding: .7rem .8rem; }
  .tv-feature { display: block; margin-bottom: .6rem; }
  .tv-title { margin-top: .4rem; font-size: 1.35rem; }
  .post-desc { font-size: 12px; margin-top: .35rem; }
  .oss { gap: .6rem; }
  .oss-card { padding: .7rem .9rem; gap: .5rem; }
  .oss-foot { padding-top: .5rem; }
  .card { padding: .8rem 1.1rem; }
  .certs { margin-top: 1.3rem; }
  .cert-list li { padding: .4rem 0; }
  .cert-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.8rem; }
  .cert-list li { flex-direction: row; }
  .news { gap: 0 1.8rem; }
  .news li { padding: .5rem 0; }
  .news-desc, .tv-notes dd { font-size: 11.5px; }
  .tv-notes { gap: .4rem; margin-top: .5rem; }
  .tv-notes dt { font-size: 11.5px; }
  :root { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .role-when::before, .bullets li::before { background: var(--muted); }
  .role-when::after { border-color: var(--ink); }
  .link { text-decoration-color: var(--ink-2); }
  /* The career strip is web navigation; without it the Okta role fits on page 1 */
  .career, .footer { display: none; }
  .role-main, .section-head, .timeline-compact { break-inside: avoid; }
  /* One left edge for every block */
  .shell { padding-inline: 0; }
  .tool-list .tool:last-child { border-bottom: 0; }
  /* Text stream in reading order (copy/paste, parsers): no positioned overlays */
  .section, .certs, .role-main, .role-side { position: relative; }
  .tool, .post { position: static; overflow: visible; }
  .tool::before, .tool-pick::after, .post-title a::after { display: none; }
  .tool-kind, .tool-desc, .tool-stat, .tool-links, .cert-list .link, .news-src { font-size: 12.5px; }
  .post-title { font-size: 1rem; }
  /* TV3 watch links as plain links */
  .tv-links { gap: .2rem 1.4rem; margin-top: .5rem; }
  .tv-links .btn { display: inline-flex; gap: .3rem; padding: 0; border: 0; border-radius: 0; background: none; font-size: 12.5px; font-weight: 400; color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-2); text-underline-offset: 4px; }
  .tv-links .btn .ic { font-size: .85em; color: var(--muted); }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle .ic { font-size: 18px; }
.theme-toggle .i-sun, :root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .logo, :root[data-theme="dark"] .brand-photo { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
@media (max-width: 960px) {
  .theme-toggle { margin-left: auto; }
  .nav-cta { margin-left: 0; }
}
@media (max-width: 900px) {
  .career-list { gap: .7rem 1.6rem; }
  .career-list li + li::before { display: none; }
}
@media (max-width: 640px) {
  .nav-menu { margin-left: 0; }
}
@media (pointer: coarse) {
  .theme-toggle { width: 44px; height: 44px; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
