/* ==========================================================================
   Make This Work — theme
   Dark, editorial, engineering-first. One accent, lots of restraint.
   ========================================================================== */

:root {
  --bg:           #08090b;
  --bg-elevated:  #0d0f13;
  --bg-hover:     #12151a;
  --line:         #1b1f26;
  --line-strong:  #2a3038;
  --text:         #e9ebee;
  --text-soft:    #b6bcc6;
  --muted:        #868d99;
  --faint:        #5b626d;
  --accent:       #3ddc84;
  --accent-dim:   #1f8f52;
  --accent-glow:  rgba(61, 220, 132, 0.14);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Layout width.
     --container   how wide the page chrome runs. 100% = full bleed.
                   Set it to 1140px to go back to the centred/boxed look.
     --gutter      breathing room at the screen edges.
     --measure     the reading column. Never let this grow — ~75 characters
                   is the readability ceiling no matter how wide the screen.
     --reading     centred wrapper for article pages. */
  --container: 100%;
  --gutter: clamp(20px, 4.5vw, 76px);
  --measure: 46rem;
  --reading: 1240px;
  --radius: 14px;
  --radius-lg: 20px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -18px rgba(0,0,0,.9);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}

/* ambient light — keeps the black from looking flat */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(61,220,132,.07), transparent 70%),
    radial-gradient(45% 45% at 85% 10%, rgba(90,120,255,.05), transparent 70%);
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #04140a; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--accent); color: #04140a; padding: 10px 16px;
  border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 24px; }

/* --------------------------------------------------------------- typography */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 640;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { color: var(--muted); font-size: 17px; margin: 16px 0 0; }

/* -------------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(8, 9, 11, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 9, 11, .9);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand img, .brand svg { height: 30px; width: auto; }
.brand__text {
  font-weight: 620;
  font-size: 15.5px;
  letter-spacing: -0.02em;
}
.brand__text span { color: var(--muted); font-weight: 450; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--text-soft);
  transition: color .18s, background .18s;
}
.nav a:hover { color: var(--text); background: var(--bg-hover); }
.nav a[aria-current="page"] { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: all .18s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--bg-elevated); }
.icon-btn svg { width: 17px; height: 17px; }

.nav-toggle { display: none; }

/* -------------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: var(--accent);
  color: #04140a;
  box-shadow: 0 0 0 1px rgba(61,220,132,.4), 0 10px 30px -12px var(--accent-glow);
}
.btn--primary:hover { background: #55e895; transform: translateY(-1px); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { background: var(--bg-elevated); border-color: var(--faint); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* ----------------------------------------------------------------------- hero */

.hero { position: relative; padding: clamp(72px, 11vw, 132px) 0 clamp(60px, 8vw, 96px); }
.hero__banner {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
}
.hero__banner img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .17;
  filter: grayscale(.35) contrast(1.1);
}
/* This div is both .container and .hero__inner. .container sets
   margin-inline:auto, so a max-width here would centre the hero while every
   other section sits left. Pin it left and cap the text instead. */
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: calc(940px + var(--gutter) * 2);
  margin-inline: 0 auto;
}
.hero h1 {
  font-size: clamp(38px, 6.2vw, 66px);
  letter-spacing: -0.038em;
  line-height: 1.04;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), #9ff5c4 60%, #cfe9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  color: var(--text-soft);
  font-size: clamp(16.5px, 1.7vw, 19.5px);
  line-height: 1.6;
  margin: 26px 0 0;
  max-width: 620px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  margin-top: clamp(56px, 7vw, 86px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stats > div { background: var(--bg); padding: 24px 26px; }
.stats dt {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
}
.stats dd { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }

/* -------------------------------------------------------------------- section */

.section { padding: clamp(64px, 8vw, 108px) 0; }
.section--line { border-top: 1px solid var(--line); }
.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.section__header .section-head { margin-bottom: 0; }

/* ----------------------------------------------------------------- post cards */

/* Fills the width but never past 4 columns — 6 skinny cards on an ultrawide
   reads as a directory, not an editorial page. */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(320px, (100% - 3 * 24px) / 4), 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  position: relative;
  height: 100%;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}
.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #101419, #0a0c0f);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease), opacity .3s;
  opacity: .92;
}
.card:hover .card__media img { transform: scale(1.035); opacity: 1; }
.card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card__title {
  font-size: 19.5px;
  line-height: 1.28;
  margin: 12px 0 0;
  letter-spacing: -0.024em;
}
.card:hover .card__title { color: #fff; }
.card__excerpt {
  color: var(--muted);
  font-size: 14.6px;
  line-height: 1.62;
  margin: 12px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12.5px;
  font-family: var(--font-mono);
}
.card__link { position: absolute; inset: 0; z-index: 2; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(61,220,132,.09);
  border: 1px solid rgba(61,220,132,.18);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--muted {
  background: var(--bg-hover);
  border-color: var(--line);
  color: var(--muted);
}

/* featured (first post on blog index) */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.featured:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.featured__media { position: relative; min-height: 320px; background: #0a0c0f; overflow: hidden; }
.featured__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.featured:hover .featured__media img { transform: scale(1.03); }
.featured__body { padding: clamp(28px, 3.2vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.featured__body h2 { font-size: clamp(24px, 2.7vw, 34px); margin: 14px 0 0; }
.featured__body p { color: var(--muted); margin: 16px 0 0; font-size: 15.5px; }

/* ------------------------------------------------------------------- about */

.about {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.about__photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}
.about__photo img { width: 100%; aspect-ratio: 1/1.08; object-fit: cover; }
.about__photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8,9,11,.65));
  pointer-events: none;
}
.about { max-width: 1180px; }
.about h2 { font-size: clamp(28px, 3.2vw, 38px); }
.about__role {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 14px 0 0;
}
.about p.about__text { color: var(--text-soft); font-size: 16.5px; margin: 20px 0 0; }
.about__actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- courses */

.course-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.course-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.course-card__media { aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--line); background: #0a0c0f; position: relative; }
.course-card__media img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.course-card__badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(8,9,11,.8);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
}
.course-card__body { padding: 22px 24px 26px; }
.course-card__body h3 { font-size: 18px; }
.course-card__body p { color: var(--muted); font-size: 14.5px; margin: 12px 0 0; }

/* -------------------------------------------------------------------- CTA band */

.cta-band {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(61,220,132,.09), transparent 60%),
    var(--bg-elevated);
  padding: clamp(32px, 4.5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(24px, 2.8vw, 33px); }
.cta-band p { color: var(--muted); margin: 12px 0 0; max-width: 46ch; }

/* ----------------------------------------------------------------- page head */

.page-head { padding: clamp(56px, 7vw, 92px) 0 clamp(36px, 4vw, 52px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); }
.page-head p { color: var(--muted); font-size: 17.5px; margin: 18px 0 0; max-width: 56ch; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.filter {
  height: 32px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #04140a; font-weight: 500; }

/* ------------------------------------------------------------------- article */

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  z-index: 60;
  transition: width .1s linear;
}

/* Articles stay a centred reading layout even when the rest of the site runs
   full width — a 46rem column pinned to the far left of a 2000px screen looks
   broken, not spacious. */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 64px;
  align-items: start;
  max-width: var(--reading);
  margin-inline: auto;
  padding: clamp(40px, 5vw, 64px) 0 clamp(64px, 8vw, 104px);
}

.post-header { max-width: var(--measure); }
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
  margin-bottom: 26px;
}
.breadcrumb a:hover { color: var(--accent); }
.post-header h1 {
  font-size: clamp(31px, 4.4vw, 50px);
  letter-spacing: -0.032em;
  margin-top: 16px;
}
.post-header__lede { color: var(--text-soft); font-size: 19px; line-height: 1.6; margin: 22px 0 0; }
.byline {
  display: flex; align-items: center; gap: 14px;
  margin-top: 30px; padding-top: 26px;
  border-top: 1px solid var(--line);
}
.byline img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); object-fit: cover; }
.byline__name { font-size: 14.5px; font-weight: 550; }
.byline__meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); margin-top: 2px; }

.post-cover {
  margin: clamp(32px, 4vw, 48px) 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}

/* prose */
.prose {
  max-width: var(--measure);
  font-size: 17.2px;
  line-height: 1.78;
  color: var(--text-soft);
}
.prose > * + * { margin-top: 1.35em; }
.prose h2 {
  font-size: clamp(23px, 2.5vw, 30px);
  color: var(--text);
  margin-top: 2.4em;
  scroll-margin-top: 96px;
}
.prose h3 {
  font-size: 20px;
  color: var(--text);
  margin-top: 2em;
  scroll-margin-top: 96px;
}
.prose h2 .anchor, .prose h3 .anchor {
  color: var(--faint);
  opacity: 0;
  margin-left: 10px;
  font-weight: 400;
  transition: opacity .18s;
}
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose h2:hover .anchor:hover, .prose h3:hover .anchor:hover { color: var(--accent); }
.prose strong { color: var(--text); font-weight: 620; }
.prose a:not(.anchor) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(61,220,132,.35);
  text-underline-offset: 3px;
  transition: text-decoration-color .18s;
}
.prose a:not(.anchor):hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .55em; }
.prose li::marker { color: var(--faint); }
.prose img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-inline: auto;
}
.prose figure { margin: 2.2em 0; }
.prose figure figcaption {
  color: var(--faint);
  font-size: 13.5px;
  text-align: center;
  margin-top: 12px;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }

.prose blockquote {
  margin: 2em 0;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(90deg, rgba(61,220,132,.05), transparent 70%);
  color: var(--text);
  font-size: 17.5px;
  line-height: 1.62;
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .8em; }

/* callouts:  > **Note:** ... rendered by build as .callout */
.callout {
  display: flex; gap: 14px;
  margin: 2em 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  font-size: 16px;
}
.callout__icon { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.callout p { margin: 0; }

/* inline code */
.prose :not(pre) > code {
  font-family: var(--font-mono);
  font-size: .875em;
  padding: .18em .42em;
  border-radius: 5px;
  background: #14181e;
  border: 1px solid var(--line);
  color: #9ff5c4;
  white-space: nowrap;
}

/* code blocks */
.code-block {
  margin: 2.1em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0d11;
  overflow: hidden;
}
.code-block__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 16px;
  height: 40px;
  background: #0e1116;
  border-bottom: 1px solid var(--line);
}
.code-block__lang {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all .18s;
}
.copy-btn:hover { color: var(--text); border-color: var(--line-strong); background: #14181e; }
.copy-btn.is-done { color: var(--accent); border-color: rgba(61,220,132,.35); }
.copy-btn svg { width: 12px; height: 12px; }

.code-block pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.6px;
  line-height: 1.72;
  tab-size: 4;
}
.code-block pre code { font-family: inherit; background: none; border: 0; padding: 0; }
.code-block pre::-webkit-scrollbar { height: 8px; }
.code-block pre::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.code-block pre::-webkit-scrollbar-track { background: transparent; }

/* highlight.js — tuned to the palette */
.hljs { color: #d7dce4; background: none; }
.hljs-comment, .hljs-quote { color: #5b6270; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-section, .hljs-doctag,
.hljs-name, .hljs-strong { color: #c792ea; }
.hljs-type, .hljs-class .hljs-title, .hljs-title.class_, .hljs-built_in { color: #ffcb6b; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta .hljs-string { color: #a5e88a; }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-link { color: #f78c6c; }
.hljs-title, .hljs-title.function_, .hljs-function .hljs-title { color: #82aaff; }
.hljs-variable, .hljs-template-variable, .hljs-params, .hljs-property { color: #d7dce4; }
.hljs-attr, .hljs-selector-attr, .hljs-selector-class { color: #7fdbca; }
.hljs-meta, .hljs-meta .hljs-keyword { color: #89ddff; }
.hljs-deletion { color: #ff5370; }
.hljs-emphasis { font-style: italic; }

/* table of contents */
.toc { position: sticky; top: 96px; font-size: 13.6px; }
.toc__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
  transition: color .18s, border-color .18s;
}
.toc a:hover { color: var(--text); border-left-color: var(--faint); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); }
.toc li.lvl-3 a { padding-left: 26px; font-size: 13px; }

/* share + post footer */
.post-footer { max-width: var(--measure); margin-top: 56px; }
.share {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.share p { margin: 0; margin-right: auto; color: var(--muted); font-size: 15px; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.post-nav a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--bg-elevated);
  transition: border-color .25s, transform .25s var(--ease);
}
.post-nav a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.post-nav span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.post-nav strong { display: block; margin-top: 8px; font-size: 15.5px; font-weight: 560; letter-spacing: -0.02em; line-height: 1.35; }
.post-nav a.is-next { text-align: right; }
.post-nav a.is-empty { visibility: hidden; }

/* -------------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  margin-top: 40px;
}
.site-footer__grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.site-footer p { color: var(--muted); font-size: 14.5px; margin: 14px 0 0; max-width: 40ch; }
.site-footer__links { display: flex; gap: 48px; flex-wrap: wrap; }
.site-footer__col h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin-bottom: 14px;
}
.site-footer__col a { display: block; color: var(--muted); font-size: 14.5px; padding: 4px 0; transition: color .18s; }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__bottom {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------- empty */

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  text-align: center;
  color: var(--muted);
}

/* ------------------------------------------------------------------ 404 page */

.notfound { padding: clamp(80px, 12vw, 160px) 0; text-align: center; }
.notfound__code {
  font-family: var(--font-mono);
  font-size: clamp(64px, 14vw, 140px);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--line-strong);
  line-height: 1;
}
.notfound h1 { font-size: clamp(26px, 3.4vw, 38px); margin-top: 20px; }
.notfound p { color: var(--muted); margin: 16px auto 32px; max-width: 44ch; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
}

@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; }
  .featured__media { min-height: 220px; aspect-ratio: 16/9; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 260px; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .nav {
    position: fixed;
    inset: 68px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: rgba(8,9,11,.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 14px 20px 22px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 12px 12px; font-size: 16px; }
  .nav-toggle {
    display: grid; place-items: center;
    width: 36px; height: 36px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }
  .nav-toggle svg { width: 18px; height: 18px; }
  .header-actions .icon-btn:not(.nav-toggle) { display: none; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a.is-next { text-align: left; }
  .post-nav a.is-empty { display: none; }
  .prose { font-size: 16.6px; }
  .code-block pre { font-size: 12.8px; padding: 16px; }
  .site-footer__links { gap: 32px; }
}

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

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
