@font-face {
  font-family: "Geist Pixel";
  src: url("https://cdn.jsdelivr.net/gh/vercel/geist-pixel-font@main/fonts/webfonts/GeistPixel-Square.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --ink: #0a0a0a;
  --text: #525252;
  --muted: #737373;
  --faint: #a3a3a3;
  --line: #e9e9e9;
  --line-strong: #d4d4d4;
  --success: #238636;
  --selection-bg: #0a0a0a;
  --selection-ink: #ffffff;
  --halftone: rgba(10, 10, 10, 0.9);
  --sidebar-width: 224px;
  --content-width: 672px;
  --font-sans: "Geist", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --font-pixel: "Geist Pixel", "Geist Mono", monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c0c0f;
  --surface: #111114;
  --surface-soft: #18181b;
  --ink: #f4f4f5;
  --text: #b8b8c0;
  --muted: #a0a0a8;
  --faint: #73737d;
  --line: #2a2a30;
  --line-strong: #3a3a42;
  --success: #45b867;
  --selection-bg: #f4f4f5;
  --selection-ink: #0c0c0f;
  --halftone: rgba(244, 244, 245, 0.82);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

::selection { background: var(--selection-bg); color: var(--selection-ink); }

button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p, h1, h2, h3, h4, figure, blockquote, dl, dd { margin: 0; }
button { border: 0; background: none; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 10px;
  left: 10px;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.page-progress {
  position: fixed;
  z-index: 1200;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ink);
  transform-origin: left;
}

main { min-height: 100vh; margin-left: var(--sidebar-width); }
.section-shell, .site-footer { width: min(calc(100% - 48px), var(--content-width)); margin-inline: auto; }

/* Fixed editorial rail */
.side-rail {
  position: fixed;
  z-index: 900;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 25px 24px 22px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  font-family: var(--font-pixel);
  font-size: 16px;
  line-height: 1;
}

.wordmark-mark { display: none; }

.rail-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 13px;
  margin-top: 35px;
}

.rail-link {
  min-height: 28px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  transition: color 180ms ease, transform 180ms ease;
}

.rail-link:hover, .rail-link.is-active { color: var(--ink); transform: translateX(2px); }

.rail-tools {
  display: grid;
  gap: 3px;
  margin-top: 23px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.rail-tools button, .mobile-menu-tools button {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: left;
  transition: color 180ms ease;
}

.rail-tools button:hover { color: var(--ink); }
kbd { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-soft); font-family: var(--font-mono); font-size: 9px; font-weight: 400; }

.rail-footer { margin-top: auto; font-family: var(--font-mono); }
.rail-presence { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.rail-presence > span:last-child { display: grid; }
.rail-presence strong { font-size: 9px; font-weight: 500; }
.rail-presence small { color: var(--faint); font-size: 8px; }
.presence-avatars { display: flex; }
.presence-avatars i { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--bg); border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 8px; font-style: normal; }
.presence-avatars i + i { margin-left: -7px; background: var(--line-strong); color: var(--ink); }
.rail-chat { min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 9px; transition: background 180ms ease, border-color 180ms ease; }
.rail-chat:hover { border-color: var(--ink); background: var(--surface-soft); }
.rail-email-label { margin: 18px 0 5px; color: var(--faint); font-size: 8px; line-height: 1.45; }
.rail-email { font-size: 9px; text-decoration: underline; text-underline-offset: 3px; }
.theme-label { min-height: 32px; display: flex; align-items: center; gap: 7px; margin-top: 13px; padding: 0; color: var(--faint); font-family: var(--font-mono); font-size: 8px; }
.theme-swatch { width: 7px; height: 7px; border: 1px solid var(--ink); border-radius: 50%; background: var(--ink); }

.mobile-bar, .mobile-menu { display: none; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; transition: border-color 180ms ease, background 180ms ease; }
.icon-button:hover { border-color: var(--ink); background: var(--surface-soft); }
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.status-dot { width: 7px; height: 7px; display: inline-block; flex: none; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 14%, transparent); }

/* Hero */
.hero { position: relative; padding-top: 112px; padding-bottom: 4px; }
.hero-signature-body { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 40px; align-items: start; }
.hero-signature-photo { position: relative; width: 100%; overflow: hidden; background: var(--surface-soft); }
.hero-signature-photo img { width: 100%; height: 326px; object-fit: cover; object-position: 53% 50%; filter: grayscale(1) contrast(1.18) brightness(1.07); transform: scale(2.45); transform-origin: 50% 60%; }
.photo-halftone {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at center, var(--bg) 1px, transparent 1.5px);
  background-size: 5px 5px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 25%, rgba(0,0,0,.35) 59%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 25%, rgba(0,0,0,.35) 59%, #000 100%);
}
.hero-signature-copy { min-width: 0; padding-top: 31px; }
.hero h1 { font-family: var(--font-pixel); font-size: clamp(31px, 3.4vw, 42px); font-weight: 400; line-height: 1; letter-spacing: -0.025em; }
.hero-signature-copy > p { color: var(--text); font-size: 15px; line-height: 1.62; }
.hero-signature-lead { margin-top: 27px; }
.hero-signature-copy > p + p { margin-top: 20px; }
.hero-signature-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 27px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.hero-signature-links a { min-height: 34px; display: inline-flex; align-items: center; gap: 4px; transition: color 180ms ease; }
.hero-signature-links a:hover { color: var(--ink); }
.hero-signature-meta { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 32px; border-top: 1px solid var(--line); }
.hero-signature-meta.reveal { opacity: 1; transform: none; }
.hero-signature-meta a { position: relative; min-height: 96px; display: grid; align-content: center; padding: 18px 20px; }
.hero-signature-meta a + a { border-left: 1px solid var(--line); }
.hero-signature-meta strong { font-family: var(--font-pixel); font-size: 20px; font-weight: 400; line-height: 1; }
.hero-signature-meta span { margin-top: 8px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.hero-signature-meta i { position: absolute; top: 25px; left: 52px; color: var(--line-strong); font-family: var(--font-mono); font-size: 11px; font-style: normal; transition: color 180ms ease, transform 180ms ease; }
.hero-signature-meta a:hover i { color: var(--ink); transform: translate(2px, -2px); }
.halftone-divider { height: 25px; margin: 8px 0 0; background-image: radial-gradient(circle at center, var(--halftone) 1px, transparent 1.6px); background-size: 13px 13px; opacity: .18; -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }

/* Shared section language */
.ruled-section { position: relative; padding: 56px 0; }
.section-heading { margin-bottom: 31px; }
.section-heading > div { display: flex; align-items: baseline; gap: 5px; }
.section-number, .section-heading .eyebrow, .contact-index { color: var(--faint); font-family: var(--font-pixel); font-size: 14px; }
.section-number::after { content: " —"; }
.section-heading h2 { max-width: 510px; margin-top: 22px; font-family: var(--font-pixel); font-size: clamp(24px, 3vw, 31px); font-weight: 400; line-height: 1.1; letter-spacing: -.02em; }
.section-heading h2 em { font-style: normal; }
.section-heading > p { max-width: 590px; margin-top: 12px; color: var(--text); font-size: 14px; line-height: 1.65; }
.eyebrow { font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.text-link, .text-button { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 0; border-bottom: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 10px; }
.text-button { margin-top: 18px; }

/* Projects */
.carousel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.filter-row, .archive-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-button, .archive-tabs button { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; transition: background 180ms ease, color 180ms ease, border-color 180ms ease; }
.filter-button:hover, .archive-tabs button:hover, .filter-button.is-active, .archive-tabs button[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.carousel-nav { display: flex; align-items: center; gap: 7px; }
.carousel-nav > span { margin-right: 5px; color: var(--faint); font-family: var(--font-mono); font-size: 9px; white-space: nowrap; text-transform: uppercase; }
.carousel-nav .icon-button { width: 36px; height: 36px; }
.carousel-track { scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.project-grid { display: flex; gap: 14px; overflow-x: auto; padding: 5px 3px 19px; scroll-padding-inline: 3px; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; }
.project-card { min-width: min(88%, 480px); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); scroll-snap-align: start; transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease; }
.project-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 12px 34px rgba(0,0,0,.07); }
.project-media { display: block; padding: 9px 9px 0; }
.project-windowbar { min-height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; background: var(--surface-soft); color: var(--faint); font-family: var(--font-mono); font-size: 7px; }
.project-window-controls { display: flex; gap: 3px; }
.project-window-controls i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.project-window-address { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-capture-label { text-transform: uppercase; }
.project-shot { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: var(--surface-soft); }
.project-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 380ms cubic-bezier(.2,.8,.2,1); }
.project-media:hover .project-shot img { transform: scale(1.025); }
.project-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background-image: radial-gradient(circle, var(--line-strong) 1px, transparent 1.5px); background-size: 10px 10px; }
.project-placeholder span { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--ink); border-radius: 14px; background: var(--surface); font-family: var(--font-pixel); font-size: 20px; }
.project-content { padding: 17px 19px 19px; }
.project-topline { display: flex; justify-content: space-between; gap: 12px; color: var(--faint); font-family: var(--font-mono); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.project-card h3 { margin-top: 11px; font-family: var(--font-pixel); font-size: 20px; font-weight: 400; line-height: 1.15; }
.project-card h3 a:hover { color: var(--muted); }
.project-content > p { margin-top: 9px; color: var(--text); font-size: 13px; line-height: 1.6; }
.project-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 13px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.project-tags span { padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; }
.project-action { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 8px; white-space: nowrap; }
.project-action svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.project-action i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.empty-projects { width: 100%; padding: 30px; border: 1px solid var(--line); color: var(--muted); text-align: center; }

/* Profile, experience, stack */
.profile-grid { display: grid; grid-template-columns: 1fr 185px; gap: 26px; }
.profile-statement { min-width: 0; }
.big-copy { font-family: var(--font-pixel); font-size: 25px; line-height: 1.2; }
.profile-statement > p + p { margin-top: 18px; color: var(--text); line-height: 1.68; }
.profile-statement .text-link { margin-top: 18px; }
.profile-photo { overflow: hidden; border-radius: 12px; }
.profile-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1); }
.profile-photo figcaption { padding-top: 7px; color: var(--faint); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; }
.profile-facts { grid-column: 1 / -1; margin-top: 2px; border-top: 1px solid var(--line); }
.profile-facts > .eyebrow { margin: 18px 0 9px; color: var(--faint); }
.profile-facts dl > div { display: grid; grid-template-columns: 145px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.profile-facts dt { color: var(--faint); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; }
.profile-facts dd { font-size: 13px; }
.experience-list { border-block: 1px solid var(--line); }
.experience-item { display: grid; grid-template-columns: 116px 1fr; gap: 18px; padding: 20px 0; }
.experience-item + .experience-item { border-top: 1px solid var(--line); }
.experience-date { color: var(--faint); font-family: var(--font-mono); font-size: 10px; }
.experience-main h3 { font-family: var(--font-pixel); font-size: 16px; font-weight: 400; }
.experience-main p { margin-top: 5px; color: var(--text); font-size: 12px; line-height: 1.55; }
.experience-stack { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; }
.experience-stack span { color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.experience-stack span + span::before { content: "/"; margin-right: 5px; color: var(--line-strong); }
.toolkit-grid { border-block: 1px solid var(--line); }
.tool-card { display: grid; grid-template-columns: 36px 135px 1fr; gap: 15px; padding: 18px 0; }
.tool-card + .tool-card { border-top: 1px solid var(--line); }
.tool-index { color: var(--faint); font-family: var(--font-pixel); }
.tool-card h3 { font-family: var(--font-pixel); font-size: 15px; font-weight: 400; }
.tool-card p { color: var(--text); font-family: var(--font-mono); font-size: 10px; line-height: 1.65; }
.ticker { overflow: hidden; margin-top: 26px; border-block: 1px solid var(--line); }
.ticker > div { width: max-content; display: flex; align-items: center; gap: 18px; padding: 10px 0; color: var(--faint); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; animation: ticker 25s linear infinite; }
.ticker i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Recognition and credential archive */
.achievements-grid { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.achievements-grid::-webkit-scrollbar { display: none; }
.achievement-card { min-width: 280px; display: flex; flex-direction: column; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scroll-snap-align: start; }
.achievement-card-topline { display: flex; justify-content: space-between; color: var(--faint); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; }
.achievement-emblem { min-height: 176px; display: grid; place-items: center; margin: 13px 0; border-radius: 9px; background: var(--surface-soft); }
.achievement-emblem img { width: 100%; height: 176px; object-fit: contain; filter: grayscale(1); }
.achievement-label { color: var(--faint); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.achievement-copy h3 { margin-top: 5px; font-family: var(--font-pixel); font-size: 17px; font-weight: 400; line-height: 1.2; }
.achievement-copy > p:last-child { margin-top: 7px; color: var(--text); font-size: 11px; line-height: 1.55; }
.achievement-meta { margin-top: auto; padding-top: 15px; color: var(--faint); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.credentials-feature { margin-top: 40px; padding-top: 31px; border-top: 1px solid var(--line); }
.credentials-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.credentials-heading h3 { margin-top: 8px; font-family: var(--font-pixel); font-size: 23px; font-weight: 400; line-height: 1.15; }
.credentials-heading h3 em { font-style: normal; }
.credentials-heading > div:first-child > p:last-child { max-width: 500px; margin-top: 8px; color: var(--text); font-size: 12px; }
.credentials-total { display: flex; align-items: center; gap: 8px; }
.credentials-total strong { font-family: var(--font-pixel); font-size: 28px; font-weight: 400; }
.credentials-total span { color: var(--faint); font-family: var(--font-mono); font-size: 7px; line-height: 1.3; text-transform: uppercase; }
.certificate-carousel { min-width: 0; }
.cert-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cert-track::-webkit-scrollbar { display: none; }
.cert-slide { min-width: 100%; display: grid; grid-template-columns: 43% 57%; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scroll-snap-align: start; }
.cert-slide-media { position: relative; display: grid; place-items: center; min-height: 330px; padding: 28px 20px; overflow: hidden; border-right: 1px solid var(--line); border-radius: 14px 0 0 14px; background-color: var(--surface-soft); background-image: radial-gradient(circle, var(--line-strong) 1px, transparent 1.5px); background-size: 12px 12px; }
.cert-slide-media::before { content: attr(data-preview-label); position: absolute; top: 11px; left: 12px; color: var(--faint); font-family: var(--font-mono); font-size: 6px; letter-spacing: .08em; }
.cert-open { width: 100%; padding: 0; }
.cert-document { display: block; overflow: hidden; width: 100%; aspect-ratio: var(--cert-preview-ratio); border: 1px solid var(--line-strong); background: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.1); }
.cert-document img { width: 100%; height: 100%; object-fit: contain; }
.cert-view-hint { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--faint); font-family: var(--font-mono); font-size: 7px; text-align: left; }
.cert-slide-copy { min-width: 0; display: flex; flex-direction: column; padding: 25px; }
.cert-slide-topline { display: flex; justify-content: space-between; gap: 12px; color: var(--faint); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; }
.cert-slide-issuer { margin-top: 38px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.cert-slide-copy h4 { margin-top: 7px; font-family: var(--font-pixel); font-size: 20px; font-weight: 400; line-height: 1.18; }
.cert-slide-notes { margin-top: 10px; color: var(--text); font-size: 11px; line-height: 1.55; }
.cert-details { margin-top: 18px; border-top: 1px solid var(--line); }
.cert-details > div { display: grid; grid-template-columns: 90px 1fr; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 7px; }
.cert-details dt { color: var(--faint); text-transform: uppercase; }
.cert-details dd { overflow-wrap: anywhere; }
.cert-text-link { align-self: flex-start; margin-top: auto; padding: 12px 0 0; border-bottom: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 8px; }
.cert-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 13px; }
.cert-position, .cert-actions { display: flex; align-items: center; gap: 9px; color: var(--faint); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; }
.cert-progress { width: 76px; height: 1px; overflow: hidden; background: var(--line); }
.cert-progress i { display: block; width: 100%; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.certificate-carousel.is-progressing .cert-progress i { animation: cert-progress 6s linear both; }
@keyframes cert-progress { to { transform: scaleX(1); } }
.cert-actions button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; }
.cert-actions svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cert-auto-control[aria-pressed="true"] .cert-play-icon, .cert-auto-control[aria-pressed="false"] .cert-pause-icon { display: none; }

/* GitHub */
.github-dashboard { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.github-profile { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 18px; }
.github-profile > img { width: 52px; height: 52px; border-radius: 50%; filter: grayscale(1); }
.github-profile h3 { font-family: var(--font-pixel); font-size: 17px; font-weight: 400; }
.github-profile a { color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.github-metrics { display: flex; gap: 17px; }
.github-metrics div { text-align: right; }
.github-metrics dt { color: var(--faint); font-family: var(--font-mono); font-size: 6px; text-transform: uppercase; }
.github-metrics dd { margin-top: 2px; font-family: var(--font-pixel); font-size: 17px; }
.github-heatmap-panel { position: relative; padding: 18px; border-top: 1px solid var(--line); }
.github-panel-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.github-panel-heading h3 { margin-top: 3px; font-family: var(--font-pixel); font-size: 15px; font-weight: 400; }
.github-panel-heading > p { color: var(--faint); font-family: var(--font-mono); font-size: 7px; }
.github-heatmap-wrapper { overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
.github-heatmap-inner { width: max-content; min-width: 100%; }
.github-heatmap-months { position: relative; height: 16px; margin-left: 29px; color: var(--faint); font-family: var(--font-mono); font-size: 6px; }
.github-heatmap-body { display: flex; gap: 7px; }
.github-heatmap-days { width: 22px; display: grid; grid-template-rows: repeat(7, 8px); gap: 3px; color: var(--faint); font-family: var(--font-mono); font-size: 5px; line-height: 8px; }
.github-heatmap { display: grid; grid-template-rows: repeat(7, 8px); grid-auto-columns: 8px; grid-auto-flow: column; gap: 3px; width: max-content; }
.heatmap-cell { width: 8px; height: 8px; border-radius: 1px; background: var(--line); }
.heatmap-cell[data-level="1"] { background: color-mix(in srgb, var(--ink) 24%, var(--bg)); }
.heatmap-cell[data-level="2"] { background: color-mix(in srgb, var(--ink) 45%, var(--bg)); }
.heatmap-cell[data-level="3"] { background: color-mix(in srgb, var(--ink) 69%, var(--bg)); }
.heatmap-cell[data-level="4"] { background: var(--ink); }
.heatmap-footer { display: flex; justify-content: flex-end; margin-top: 9px; }
.heatmap-legend { display: flex; align-items: center; gap: 3px; color: var(--faint); font-family: var(--font-mono); font-size: 6px; }
.heatmap-legend i { width: 8px; height: 8px; background: var(--line); }
.heatmap-legend i[data-level="1"] { background: color-mix(in srgb, var(--ink) 24%, var(--bg)); }
.heatmap-legend i[data-level="2"] { background: color-mix(in srgb, var(--ink) 45%, var(--bg)); }
.heatmap-legend i[data-level="3"] { background: color-mix(in srgb, var(--ink) 69%, var(--bg)); }
.heatmap-legend i[data-level="4"] { background: var(--ink); }
.heatmap-tooltip { position: absolute; z-index: 5; padding: 5px 7px; border-radius: 4px; background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-size: 7px; opacity: 0; pointer-events: none; }
.heatmap-tooltip.is-visible { opacity: 1; }
.github-contribution-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border-top: 1px solid var(--line); }
.github-contribution-stats div { padding: 13px 10px 0; }
.github-contribution-stats div + div { border-left: 1px solid var(--line); }
.github-contribution-stats strong { display: block; font-family: var(--font-pixel); font-size: 18px; font-weight: 400; }
.github-contribution-stats span { color: var(--faint); font-family: var(--font-mono); font-size: 6px; text-transform: uppercase; }
.github-columns { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.github-feed-panel, .github-repos-panel { min-width: 0; padding: 18px; }
.github-repos-panel { border-left: 1px solid var(--line); }
.github-feed, .github-repos { border-top: 1px solid var(--line); }
.github-feed li, .github-repo { min-height: 47px; display: flex; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.github-event-dot { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--success); }
.github-feed p { min-width: 0; display: grid; font-size: 9px; }
.github-feed a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.github-feed time { color: var(--faint); font-family: var(--font-mono); font-size: 7px; }
.github-repo { justify-content: space-between; gap: 12px; font-size: 9px; }
.github-repo > span { min-width: 0; display: grid; }
.github-repo > span:last-child { flex: none; text-align: right; }
.github-repo strong { overflow: hidden; text-overflow: ellipsis; font-weight: 500; white-space: nowrap; }
.github-repo small { color: var(--faint); font-family: var(--font-mono); font-size: 7px; }
.github-repo b { font-weight: 400; }

/* Archive and recommendations */
.archive-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; }
.archive-item { position: relative; min-width: 210px; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; scroll-snap-align: start; }
.archive-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(.15); transition: transform 260ms ease, filter 260ms ease; }
.archive-item.is-contain img { object-fit: contain; padding: 12px; background: var(--surface-soft); }
.archive-item:hover img { filter: grayscale(0); transform: scale(1.025); }
.archive-item > span { display: grid; padding: 10px; }
.archive-item b { overflow: hidden; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.archive-item i { color: var(--faint); font-family: var(--font-mono); font-size: 7px; font-style: normal; text-transform: uppercase; }
.quote-stage { position: relative; padding: 31px 0 0; border-top: 1px solid var(--line); }
.quote-mark { position: absolute; top: 10px; right: 0; color: var(--line); font-family: var(--font-pixel); font-size: 78px; line-height: 1; }
.quote-stage blockquote { position: relative; z-index: 1; max-width: 600px; font-family: var(--font-pixel); font-size: clamp(21px, 3vw, 28px); line-height: 1.35; }
.quote-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 26px; padding-top: 15px; border-top: 1px solid var(--line); }
.quote-footer p { display: grid; }
.quote-footer strong { font-size: 12px; font-weight: 500; }
.quote-footer p span { color: var(--faint); font-family: var(--font-mono); font-size: 8px; }
.quote-controls { display: flex; align-items: center; gap: 8px; color: var(--faint); font-family: var(--font-mono); font-size: 8px; }
.quote-controls .icon-button { width: 34px; height: 34px; }

/* Contact */
.contact-section { margin-top: 20px; padding: 56px 0 28px; border-top: 1px solid var(--line); }
.contact-header { display: flex; justify-content: space-between; gap: 18px; }
.contact-index { display: flex; gap: 5px; }
.contact-index span::after { content: " —"; }
.contact-availability { display: flex; align-items: center; gap: 9px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.contact-pitch { margin-top: 43px; }
.contact-pitch h2 { font-family: var(--font-pixel); font-size: clamp(31px, 5vw, 48px); font-weight: 400; line-height: 1.03; letter-spacing: -.03em; }
.contact-pitch h2 em { font-style: normal; }
.contact-pitch p { max-width: 500px; margin-top: 13px; color: var(--text); font-size: 14px; }
.contact-direct { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; margin-top: 35px; padding: 18px 0; border-block: 1px solid var(--line); }
.contact-direct-label { color: var(--faint); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.contact-direct > a { overflow-wrap: anywhere; font-family: var(--font-pixel); font-size: 20px; }
.contact-copy-button { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-mono); font-size: 8px; }
.contact-copy-button svg { width: 12px; fill: none; stroke: currentColor; }
.contact-form { margin-top: 28px; border-top: 1px solid var(--line); }
.field-row { display: grid; grid-template-columns: 176px 1fr; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.field-row label { display: flex; justify-content: space-between; color: var(--faint); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; }
.field-title { display: flex; gap: 8px; color: var(--ink); }
.field-title b { color: var(--faint); font-weight: 400; }
.field-row input, .field-row textarea { width: 100%; min-height: 36px; padding: 5px 0; border: 0; border-bottom: 1px solid var(--line); outline: 0; background: transparent; font-size: 13px; resize: vertical; }
.field-row input:focus, .field-row textarea:focus { border-color: var(--ink); }
.field-row [aria-invalid="true"] { border-color: #b42318; }
.field-error { grid-column: 2; min-height: 0; color: #b42318; font-family: var(--font-mono); font-size: 8px; }
.form-submit { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 18px; }
.contact-send { min-height: 44px; display: inline-flex; align-items: center; gap: 20px; padding: 0 17px; border-radius: 999px; background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-size: 9px; }
.contact-send:disabled { cursor: wait; opacity: .55; }
.form-submit p { color: var(--muted); font-size: 10px; }
.contact-footnote { display: flex; justify-content: space-between; gap: 20px; margin-top: 55px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--faint); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; }
.site-footer { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; min-height: 92px; color: var(--faint); font-family: var(--font-mono); font-size: 7px; }
.site-footer .wordmark { color: var(--ink); font-size: 13px; }

/* Dialogs and lightbox */
dialog { padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.58); backdrop-filter: blur(3px); }
.command-dialog, .typing-dialog { width: min(calc(100% - 32px), 620px); max-height: min(760px, calc(100dvh - 32px)); overflow: auto; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.dialog-topline { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--faint); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.dialog-close { min-height: 30px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.command-body, .typing-body { padding: 32px; }
.dialog-kicker { color: var(--faint); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; }
.command-body h2, .typing-body h2 { margin-top: 7px; font-family: var(--font-pixel); font-size: 29px; font-weight: 400; }
.command-input-row { display: grid; grid-template-columns: 1fr auto; margin-top: 27px; border-bottom: 1px solid var(--ink); }
.command-input-row input { min-width: 0; min-height: 52px; padding: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.command-input-row button { min-width: 72px; font-family: var(--font-mono); font-size: 9px; }
.command-input-row button:disabled { cursor: progress; opacity: .55; }
.command-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.command-suggestions button { min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.command-answer { min-height: 100px; display: grid; grid-template-columns: 8px 1fr; gap: 10px; align-content: start; margin-top: 24px; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--text); font-size: 13px; white-space: pre-line; }
.command-answer.is-loading .status-dot { animation: pulse 800ms ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .25; } }
.typing-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.typing-restart { min-height: 35px; font-family: var(--font-mono); font-size: 9px; }
.typing-prompt { margin-top: 28px; padding: 18px 0; border-block: 1px solid var(--line); font-family: var(--font-pixel); font-size: 23px; line-height: 1.45; }
#typingInput { width: 100%; min-height: 94px; margin-top: 17px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: var(--surface-soft); resize: none; }
#typingInput:focus { border-color: var(--ink); }
.typing-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 17px; border-block: 1px solid var(--line); }
.typing-stats p { display: grid; padding: 14px; }
.typing-stats p + p { border-left: 1px solid var(--line); }
.typing-stats strong { font-family: var(--font-pixel); font-size: 23px; font-weight: 400; }
.typing-stats span { color: var(--faint); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; }
.typing-hint { margin-top: 13px; color: var(--faint); font-family: var(--font-mono); font-size: 8px; text-align: right; }
.typing-hint span { margin: 0 5px; }
.lightbox { width: min(calc(100% - 32px), 1100px); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.lightbox-bar { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 9px; }
.lightbox-bar .icon-button { width: 32px; height: 32px; }
.lightbox > img { width: 100%; max-height: calc(100dvh - 78px); object-fit: contain; background: var(--surface-soft); }

.reveal { opacity: 0; transform: translateY(10px); transition: opacity 420ms ease, transform 420ms cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 50ms; }
.reveal[data-delay="2"] { transition-delay: 100ms; }
.reveal[data-delay="3"] { transition-delay: 150ms; }

@media (max-width: 1100px) {
  html { scroll-padding-top: 72px; }
  main { margin-left: 0; padding-top: 54px; }
  .side-rail { display: none; }
  .mobile-bar {
    position: fixed;
    z-index: 1000;
    inset: 0 0 auto;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(12px);
  }
  .mobile-actions { display: flex; align-items: center; gap: 2px; }
  .mobile-bar .wordmark { font-size: 14px; }
  .mobile-bar .icon-button { width: 44px; height: 44px; border: 0; border-radius: 0; }
  .mobile-bar .theme-toggle { display: none; }
  .mobile-menu {
    position: fixed;
    z-index: 950;
    inset: 54px 0 0;
    display: block;
    overflow-y: auto;
    background: var(--bg);
  }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu-inner { width: min(calc(100% - 48px), 530px); margin: 0 auto; padding: 38px 0; }
  .mobile-menu-inner > .eyebrow { color: var(--faint); }
  .mobile-menu nav { margin-top: 21px; border-top: 1px solid var(--line); }
  .mobile-menu nav a { min-height: 52px; display: grid; grid-template-columns: 34px 1fr; align-items: center; border-bottom: 1px solid var(--line); font-family: var(--font-pixel); font-size: 18px; }
  .mobile-menu nav span { color: var(--faint); font-family: var(--font-mono); font-size: 8px; }
  .mobile-menu-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 23px; }
  .mobile-menu-tools button { min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; }
  .menu-email { display: inline-block; margin-top: 30px; font-family: var(--font-mono); font-size: 10px; text-decoration: underline; text-underline-offset: 4px; }
}

@media (max-width: 720px) {
  .section-shell, .site-footer { width: calc(100% - 48px); }
  .hero-signature-links a { min-height: 44px; }
  .hero { padding-top: 80px; }
  .hero-signature-body { display: block; }
  .hero-signature-photo { width: min(100%, 315px); margin-inline: auto; }
  .hero-signature-photo img { height: 360px; }
  .hero-signature-copy { padding-top: 33px; }
  .hero h1 { font-size: 31px; }
  .hero-signature-copy > p { font-size: 15px; }
  .hero-signature-meta { grid-template-columns: 1fr 1fr; margin-top: 44px; }
  .hero-signature-meta a { min-height: 92px; padding-left: 0; }
  .hero-signature-meta a:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
  .hero-signature-meta a:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero-signature-meta a:nth-child(3) { border-left: 0; }
  .hero-signature-meta i { left: 48px; }
  .ruled-section { padding: 52px 0; }
  .section-heading h2 { font-size: 25px; }
  .carousel-toolbar { align-items: flex-end; }
  .filter-button, .archive-tabs button { min-height: 44px; }
  .cert-actions button, .contact-copy-button { min-height: 44px; }
  .carousel-nav > span { display: none; }
  .project-card { min-width: calc(100% - 18px); }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-photo { width: min(100%, 280px); }
  .profile-facts { grid-column: auto; }
  .profile-facts dl > div { grid-template-columns: 118px 1fr; }
  .tool-card { grid-template-columns: 28px 105px 1fr; }
  .cert-slide { display: block; }
  .cert-slide-media { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
  .cert-slide-copy { min-height: 340px; }
  .cert-position > span:last-child { display: none; }
  .github-profile { grid-template-columns: 46px 1fr; }
  .github-profile > img { width: 46px; height: 46px; }
  .github-metrics { grid-column: 1 / -1; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); }
  .github-metrics div { text-align: left; }
  .github-columns { grid-template-columns: 1fr; }
  .github-repos-panel { border-top: 1px solid var(--line); border-left: 0; }
  .contact-header { display: grid; }
  .contact-pitch { margin-top: 34px; }
  .contact-direct { grid-template-columns: 1fr auto; }
  .contact-direct-label { grid-column: 1 / -1; }
  .contact-direct > a { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; gap: 8px; }
  .field-error { grid-column: auto; }
  .site-footer { grid-template-columns: 1fr; gap: 5px; padding: 28px 0; }
  .site-footer p:last-child { margin-top: 8px; }
}

@media (max-width: 460px) {
  .mobile-bar { padding-inline: 24px; }
  .hero-signature-photo { width: 100%; }
  .hero-signature-photo img { height: 300px; }
  .carousel-toolbar { display: grid; }
  .carousel-nav { display: none; }
  .filter-row, .archive-tabs { gap: 5px; }
  .filter-button, .archive-tabs button { padding-inline: 10px; }
  .project-card { min-width: 100%; }
  .project-card-footer { display: grid; }
  .project-action { margin-top: 5px; }
  .experience-item { grid-template-columns: 1fr; gap: 8px; }
  .experience-stack { grid-column: auto; }
  .tool-card { grid-template-columns: 28px 1fr; }
  .tool-card p { grid-column: 2; }
  .achievement-card { min-width: 260px; }
  .credentials-heading { display: block; }
  .credentials-total { margin-top: 18px; }
  .cert-controls { align-items: flex-start; }
  .cert-actions { gap: 4px; }
  .cert-auto-control span { display: none; }
  .github-contribution-stats span { line-height: 1.3; }
  .quote-footer { align-items: flex-start; flex-direction: column; }
  .contact-direct { grid-template-columns: 1fr; }
  .contact-copy-button { justify-self: start; }
  .form-submit { align-items: flex-start; flex-direction: column; }
  .contact-footnote { display: grid; }
  .command-body, .typing-body { padding: 24px 19px; }
  .command-suggestions { display: grid; }
  .command-suggestions button { text-align: left; }
  .typing-prompt { font-size: 19px; }
  .typing-stats p { padding-inline: 8px; }
  .typing-stats strong { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
