:root {
  --bg: #0A0B0D;
  --surface: #111317;
  --surface-2: #16191E;
  --line: #1C1F24;
  --line-2: #2A2E35;
  --text: #F2F2EE;
  --text-2: #C9CCD1;
  --muted: #A3A7AE;
  --faint: #7C818A;
  --accent: #5AA9FF;
  --on-accent: #0A0B0D;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.03em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { 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: 16px; z-index: 20; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; }
.dots { background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 24px 24px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 16px; padding: 15px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; font-family: var(--body); transition: transform .15s, filter .15s; }
.btn:hover { color: var(--on-accent); filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); font-weight: 500; }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); filter: none; }
.btn-sm { font-size: 15px; padding: 11px 18px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(10,11,13,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { padding-top: 16px; padding-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--text); }

/* Hero */
.hero { border-bottom: 1px solid var(--line); }
.hero-inner { padding-top: 112px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 28px; }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.eyebrow-muted { color: var(--faint); }
h1 { font-weight: 700; font-size: clamp(44px, 7vw, 92px); line-height: .98; letter-spacing: -0.035em; max-width: 14ch; }
.lead { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 46ch; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* Proof */
.proof { border-bottom: 1px solid var(--line); }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stat { padding: 40px 28px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat-num { font-family: var(--display); font-weight: 700; font-size: 52px; letter-spacing: -0.03em; }
.stat-num span { color: var(--accent); }
.stat p { color: var(--muted); font-size: 15px; }

/* Sections */
.section { padding: 104px 0; }
.bordered { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(34px, 4.5vw, 52px); line-height: 1.05; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head > div { display: flex; flex-direction: column; gap: 12px; }
.link-muted { color: var(--muted); font-size: 15px; border-bottom: 1px solid var(--line-2); padding-bottom: 3px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; align-items: center; }
.split-top { align-items: start; }
.body-muted { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 42ch; }
.inline-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; margin-top: 6px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 18px; min-height: 320px; transition: transform .2s, border-color .2s; }
.card:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.card-meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--faint); text-transform: uppercase; }
.card-stat { height: 120px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: clamp(32px, 3.4vw, 44px); color: var(--accent); letter-spacing: -0.03em; overflow: hidden; }
.card-stat img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { font-size: 23px; line-height: 1.2; letter-spacing: -0.015em; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.tags span { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px; }

.more { margin-top: 56px; display: flex; flex-direction: column; gap: 12px; }
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.post-list time { font-family: var(--mono); font-size: 13px; color: var(--faint); white-space: nowrap; }

/* Video */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line-2); overflow: hidden; }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s; box-shadow: 0 8px 40px rgba(90,169,255,.35); }
.play:hover { transform: translate(-50%, -50%) scale(1.08); }

/* Photo */
.hero-id { display: flex; align-items: center; gap: 14px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); box-shadow: 0 0 0 4px rgba(90,169,255,.15); }
.portrait { width: 100%; max-width: 420px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 24px; height: auto; border: 1px solid var(--line-2); filter: saturate(.9); justify-self: center; }

/* About */
.about-copy { font-size: 18px; line-height: 1.65; color: var(--text-2); gap: 22px; }
.about-copy h2 { color: var(--text); margin-bottom: 4px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips span { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 12px; color: var(--text); }

/* CTA */
.cta { background: var(--accent); color: var(--on-accent); border-radius: 28px; padding: clamp(32px, 5vw, 64px); display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-copy { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.cta h2 { font-size: clamp(30px, 4vw, 46px); }
.cta-copy p { font-size: 17px; line-height: 1.55; color: #0B2340; }
.cta-form { display: flex; gap: 10px; flex-wrap: wrap; flex: 1 1 360px; max-width: 480px; }
.cta-form input { flex: 1 1 220px; min-height: 52px; border-radius: 999px; border: 1.5px solid var(--on-accent); background: transparent; padding: 0 22px; font-size: 16px; font-family: var(--body); color: var(--on-accent); }
.cta-form input::placeholder { color: #1E3A5F; }
.cta-form input:focus-visible { outline-color: var(--on-accent); }
.cta-form button { min-height: 52px; border-radius: 999px; border: 0; background: var(--on-accent); color: var(--text); padding: 0 26px; font-weight: 600; font-size: 16px; font-family: var(--body); cursor: pointer; }
.cta-form button[disabled] { opacity: .6; cursor: default; }
.form-msg { flex-basis: 100%; font-size: 15px; font-weight: 500; min-height: 1em; }

/* Footer */
.footer { border-top: 1px solid var(--line); }
.footer-inner { padding-top: 36px; padding-bottom: 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--faint); font-size: 14px; }
.footer-inner a { color: var(--faint); }
.footer-inner a:hover { color: var(--text); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--faint); cursor: pointer; }
.linkish:hover { color: var(--text); }
.socials { display: flex; gap: 8px; }
.socials a { width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text); }
.socials a:hover { border-color: var(--accent); color: var(--accent); }

/* Consent */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; box-shadow: 0 20px 60px rgba(0,0,0,.5); font-size: 15px; color: var(--text-2); line-height: 1.5; }
.consent[hidden] { display: none; }
.consent p { flex: 1 1 260px; }
.consent a { text-decoration: underline; }
.consent-actions { display: flex; gap: 8px; }

/* Simple content pages */
.page { padding: 96px 0; }
.page .wrap { max-width: 720px; }
.page h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 32px; max-width: none; }
.page h2 { font-size: 24px; margin: 36px 0 12px; }
.page p, .page li { color: var(--text-2); font-size: 17px; line-height: 1.7; }
.page a { color: var(--accent); }

@media (max-width: 640px) {
  .hero-inner { padding-top: 72px; padding-bottom: 64px; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); padding-left: 0; }
  .stat:last-child { border-bottom: 0; }
  .section { padding: 72px 0; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.btn) { display: none; }
  .post-list a { flex-direction: column; gap: 6px; }
}

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

/* Follow CTA */
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-dark { background: var(--on-accent); color: var(--text); }
.btn-dark:hover { color: var(--text); }
.btn-outline-dark { background: transparent; color: var(--on-accent); border-color: var(--on-accent); }
.btn-outline-dark:hover { color: var(--on-accent); background: rgba(10,11,13,.08); filter: none; }

/* Blog */
.h1-page { font-size: clamp(40px, 6vw, 72px); line-height: 1; max-width: 16ch; }
.post-head { max-width: 800px; padding-top: 72px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.post-head h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.04; max-width: none; }
.post-head .lead { font-size: 20px; }
.back { align-self: flex-start; }
.byline { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.avatar-sm { width: 40px; height: 40px; }
.prose { max-width: 800px; padding-bottom: 48px; font-size: 18px; line-height: 1.75; color: var(--text-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; color: var(--text); margin-top: 2em; letter-spacing: -0.02em; }
.prose h3 { font-size: 22px; color: var(--text); margin-top: 1.6em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--accent); }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--faint); line-height: 1.5; }
.prose blockquote { margin: 2em 0; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; }
.prose blockquote p { font-family: var(--display); font-size: 22px; line-height: 1.4; color: var(--text); letter-spacing: -0.01em; }
.prose blockquote cite { display: block; margin-top: 12px; font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.prose .video { margin: 1.5em 0 2em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 14px; margin: 1.8em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.more-posts { border-top: 1px solid var(--line); }

/* Hero link, projects, videos */
.lead-link { color: var(--text); border-bottom: 1px solid var(--accent); }
.project { min-height: 0; }
.card-text { color: var(--muted); font-size: 16px; line-height: 1.6; }
.card-link { margin-top: auto; font-size: 15px; font-weight: 600; color: var(--accent); }
.project .tags { margin-top: 0; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.vcard { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.vcard .video { border-radius: 16px; }
.vcard figcaption { display: flex; flex-direction: column; gap: 4px; }
.vtitle { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; color: var(--text); }
.vmeta { font-family: var(--mono); font-size: 12px; color: var(--faint); text-transform: uppercase; }
.play-sm { width: 60px; height: 60px; }
.eyebrow-dark { color: #0B2340; }
.post-list-wrap { margin-top: 56px; display: flex; flex-direction: column; gap: 12px; }

/* Post cards with cover */
.card-post { padding: 0; overflow: hidden; gap: 0; min-height: 0; }
.card-post .card-meta { padding: 22px 24px 0; }
.card-post h3 { padding: 12px 24px 0; }
.card-post .tags { padding: 18px 24px 24px; }
.card-cover { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-post:hover .card-cover img { transform: scale(1.03); }
.card-badge { position: absolute; left: 14px; bottom: 14px; background: rgba(10,11,13,.85); backdrop-filter: blur(6px); color: var(--accent); font-family: var(--display); font-weight: 700; font-size: 18px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); }

/* Readability pass for posts */
.post-cover { max-width: 960px; padding-bottom: 56px; }
.post-cover img { width: 100%; border-radius: 20px; border: 1px solid var(--line-2); }
.post-head { max-width: 760px; padding-top: 80px; padding-bottom: 48px; gap: 22px; }
.post-head .lead { font-size: 21px; line-height: 1.55; }
.prose { max-width: 720px; font-size: 19px; line-height: 1.8; color: #D3D6DB; padding-bottom: 80px; }
.prose > * + * { margin-top: 1.5em; }
.prose h2 { font-size: clamp(28px, 3.2vw, 36px); margin-top: 2.6em; margin-bottom: -0.3em; padding-top: 0.2em; }
.prose h2 + p, .prose h2 + ul, .prose h2 + ol { margin-top: 1em; }
.prose p strong:first-child { display: inline; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { padding-left: .3em; }
.prose li + li { margin-top: .8em; }
.prose figure { margin: 2.8em 0; }
.prose figcaption { margin-top: 14px; font-size: 15px; text-align: center; }
.prose blockquote { margin: 2.8em 0; padding: 32px 36px; }
.prose blockquote p { font-size: 24px; line-height: 1.45; }
.prose .table-wrap { margin: 2.4em 0; }
.prose table { font-size: 16px; }
.prose th, .prose td { padding: 14px 18px; }
@media (max-width: 640px) {
  .prose { font-size: 18px; line-height: 1.75; }
  .prose blockquote { padding: 22px; }
  .prose blockquote p { font-size: 20px; }
  .post-head { padding-top: 48px; }
}

/* Stack list (About) */
.stack-list { margin: 8px 0 0; border-top: 1px solid var(--line-2); }
.stack-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stack-list dt { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); padding-top: 3px; }
.stack-list dd { margin: 0; font-size: 17px; color: var(--text); }
@media (max-width: 640px) { .stack-list > div { grid-template-columns: 1fr; gap: 4px; } }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card-text code { font-family: var(--mono); font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.card-links { margin-top: auto; display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap; }
.card-links .card-link { margin-top: 0; }
.card-link-2 { font-size: 15px; color: var(--muted); }
.card-link-2:hover { color: var(--text); }
.project h3 a { color: var(--text); }

.stack-list dd span { display: block; margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .02em; }
.stack-list dd { line-height: 1.5; }
/* Whole sprint-review card opens the website; the small links stay clickable on top */
.project { position: relative; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: 20px; z-index: 1; }
.card-links a { position: relative; z-index: 2; }
div.card.project { cursor: pointer; }
div.card.project:hover { transform: translateY(-3px); border-color: var(--accent); }

/* Case study cards with video */
.card-video { position: relative; }
.card-video:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-video .card-cover { display: block; }
.card-video .card-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,11,13,.55), transparent 55%); pointer-events: none; }
.cover-play { position: absolute; right: 14px; bottom: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 14px; padding: 8px 14px 8px 11px; border-radius: 999px; box-shadow: 0 6px 24px rgba(90,169,255,.35); transition: transform .2s; }
.card-video .card-badge { z-index: 1; }
.card-video .card-cover:hover .cover-play { transform: scale(1.06); }
.card-video:hover .card-cover img { transform: scale(1.03); }
.card-video h3 a { color: var(--text); }
.card-video h3 a:hover { color: var(--accent); }
.card-video .tags { padding-bottom: 0; }
.read-link { padding: 16px 24px 24px; margin-top: auto; font-size: 15px; font-weight: 600; color: var(--accent); }
.head-links { display: flex; gap: 22px; flex-wrap: wrap; }
