/* Aviatory — base: fonts, tokens, nav, buttons, layout, footer, drawer. Loaded last. */

/* ── Inter · --font-sans ── */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* ── JetBrains Mono · --font-mono, the body default ── */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* ── Space Grotesk · page and section titles ── */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("/fonts/big-shoulders-display-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("/fonts/big-shoulders-display-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* ───────── Design tokens ───────── */
:root {
  --bg: #0e263b;
  --bg-2: #102c42;
  --bg-deep: #0c2031;
  --panel: #132c41;
  --inset: #0a1d2f;

  --line: rgba(255, 255, 255, 0.065);
  --line-2: rgba(255, 255, 255, 0.11);
  --line-3: rgba(255, 255, 255, 0.19);

  --text-bright: #eef3f8;
  --text: #b8c8d6;
  --text-mute: #7090a4;
  --text-dim: #4f6880;
  --text-dimmer: #384f63;

  --brand: #be3a34;
  --brand-2: #962a25;
  --brand-ring: rgba(190, 58, 52, 0.3);

  --orange: #cf9a4a;
  --blue: #5f93bf;
  --green: #5fa88c;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;

  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-sans: "Inter", -apple-system, system-ui, sans-serif;

  --container: 1280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ───────── Project line drawings (partials/art): home strip, projects showcase ───────── */
.ha-art .ha-screen,
.ha-art .ha-screen line {
  stroke: #7cbaf2;
  stroke-width: 1.2;
  opacity: 0.5;
}
.ha-art .ha-mast line,
.ha-art .ha-mast path {
  stroke: #7cbaf2;
  stroke-width: 1.2;
  opacity: 0.58;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.ha-art .ha-whip {
  stroke: #7cbaf2;
  stroke-width: 2;
  opacity: 0.7;
  stroke-linecap: round;
}
.ha-art .ha-ground line {
  stroke: #7cbaf2;
  stroke-width: 1.5;
  opacity: 0.6;
}
.ha-art .ha-hatch line {
  stroke: #7cbaf2;
  stroke-width: 1;
  opacity: 0.3;
}
.ha-art .ha-arc circle {
  stroke: #6fb0ec;
  stroke-width: 1;
  opacity: 0.26;
}
.ha-art .ha-airspace {
  stroke: #6fb0ec;
  stroke-width: 1;
  opacity: 0.3;
  fill: rgba(111, 176, 236, 0.04);
}
.ha-art .ha-beam {
  stroke: #6fb0ec;
  stroke-width: 0.9;
  opacity: 0.32;
}
.ha-art .ha-box rect {
  stroke: #7cbaf2;
  stroke-width: 1.1;
  opacity: 0.44;
  fill: rgba(10, 32, 52, 0.55);
}
.ha-art .ha-route {
  stroke: var(--brand);
  stroke-width: 1.3;
  opacity: 0.65;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ha-art .ha-target circle {
  stroke: var(--brand);
  stroke-width: 1.3;
  opacity: 0.6;
  fill: rgba(198, 60, 46, 0.12);
}
.ha-art .ha-bar rect {
  fill: var(--brand);
  stroke: none;
  opacity: 0.75;
}
.ha-art .ha-led {
  fill: var(--brand);
  stroke: none;
  opacity: 0.75;
}
.ha-art text {
  font-family: var(--font-mono);
  fill: #8fb6d6;
}
.ha-art .ha-label {
  font-size: 8px;
  letter-spacing: 0.16em;
  opacity: 0.45;
}
.ha-art .ha-read {
  font-size: 8px;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

/* The logbook drawing is mostly text: set it finer than the others. */
.ha-art .ha-log text {
  font-size: 6.5px;
}

/* The shared arrow icon (components/icon/arrow). */
.lib-arrow {
  transition: transform 0.16s;
}

/* ───────── Writing card (components/writing-card): home, library, under articles ───────── */
.w-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 24px 20px;
  border: 1px solid var(--line-2);
  border-top: 2px solid var(--accent);
  background: rgba(13, 34, 52, 0.6);
  transition:
    background 0.18s,
    border-color 0.18s;
}
.w-card:hover {
  border-color: var(--line-3);
  border-top-color: var(--accent);
  background: rgba(19, 44, 65, 0.75);
}
/* The article's photo runs to the card's edges (the padding is 24px). Cards without one are untouched. */
.w-card-photo {
  display: block;
  margin: -24px -24px 20px;
  aspect-ratio: 16 / 7.5;
  overflow: hidden;
  background: #050d16;
}
.w-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.w-card:hover .w-card-photo img {
  transform: scale(1.04);
}
.w-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}
.w-card-topic {
  color: var(--accent);
}
.w-card-title {
  margin: 18px 0 10px;
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  text-wrap: balance;
}
.w-card-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0 0 22px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-mute);
}
.w-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.w-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.18em;
  color: var(--text);
  transition: color 0.18s;
}
.w-card-cta svg {
  transition: transform 0.18s;
}
.w-card:hover .w-card-cta {
  color: var(--accent);
}
.w-card:hover .w-card-cta svg {
  transform: translateX(3px);
}

/* Entrance animations hold their first frame until the page is ready (layout head script). */
.js:not(.is-ready) *,
.js:not(.is-ready) *::before,
.js:not(.is-ready) *::after {
  animation-play-state: paused !important;
}
button {
  font: inherit;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}
/* Card accents: --accent comes from a topic or folder (home and library). */
.accent-orange {
  --accent: var(--orange);
}
.accent-blue {
  --accent: var(--blue);
}
.accent-green {
  --accent: var(--green);
}
.accent-brand {
  --accent: var(--brand);
}

/* ───────── Announcement: the next event, above the menu (partials/announce) ───────── */
.announce {
  background: linear-gradient(90deg, #8f2a24 0%, var(--brand) 45%, #a8322c 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  color: #fff;
}
.announce-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 36px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}
.announce-tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
}
.announce-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: announcePulse 1.6s ease-in-out infinite;
}
@keyframes announcePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
.announce-text {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
  color: #fff;
}
.announce-text > span {
  flex: none;
  white-space: nowrap;
}
.announce-text > .announce-title {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: #fff;
}
.announce-text:hover .announce-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.announce-until {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 10px;
  letter-spacing: 0.2em;
}
.announce-cta {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: #fff;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--brand);
  transition: background 0.15s;
}
.announce-cta:hover {
  background: #ffe9e6;
}
@media (max-width: 900px) {
  .announce-route {
    display: none;
  }
}
/* Phones: two lines, the label and the button on top, the date and the event under them. */
@media (max-width: 720px) {
  .announce-inner {
    flex-wrap: wrap;
    gap: 2px 12px;
    padding: 8px 20px 4px;
  }
  .announce-cta {
    order: 2;
    min-height: 28px;
    margin-left: auto;
  }
  .announce-text {
    order: 3;
    flex-basis: 100%;
    gap: 10px;
    min-height: 30px;
  }
  .announce-text > .announce-until {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .announce-dot {
    animation: none;
  }
}

/* ───────── Top nav ───────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #14304a 0%, #102a40 100%);
  border-bottom: 1px solid var(--line);
}
.topnav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--text-bright);
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-left: auto;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.nav-link:hover {
  color: var(--text-bright);
}
.nav-link.is-active {
  color: var(--text-bright);
  border-bottom-color: var(--brand);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  background: var(--brand);
  color: #fff;
  padding: 13px 24px;
  border-radius: var(--r-sm);
  border: 1px solid var(--brand);
  transition: background 0.15s;
}
.nav-cta:hover {
  background: var(--brand-2);
}
/* ───────── Buttons ───────── */
.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 16px 32px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-2);
}
.btn-ghost {
  background: transparent;
  color: var(--text-bright);
  border: 1px solid var(--line-3);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.03);
}
/* Page shell: on short pages the footer still sits at the bottom. */
#site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#site > .site-footer {
  margin-top: auto;
}
#site > * {
  width: 100%;
}

/* Read by screen readers, not shown: a heading the layout implies but does not print. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ───────── Not found (errors/404) ───────── */
.nf-page {
  display: grid;
  place-items: center;
  min-height: 62vh;
  padding: 80px 24px;
}
.nf-inner {
  text-align: center;
}
.nf-code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--brand);
}
.nf-title {
  margin: 10px 0 8px;
  font-family: "Big Shoulders Display", var(--font-sans);
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-bright);
}
.nf-text {
  max-width: 420px;
  margin: 0 auto 26px;
  color: var(--text-mute);
}

/* ───────── Section primitives ───────── */
section.panel {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 120px 0;
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 36px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-sans);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  margin: 0;
  line-height: 1.05;
}
.bp-header {
  position: relative;
  padding: 56px 0 52px;
  background: #071929;
  border-bottom: 1px solid rgba(64, 140, 220, 0.18);
  overflow: hidden;
}
.bp-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(70, 145, 215, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 145, 215, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(70, 145, 215, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 145, 215, 0.09) 1px, transparent 1px);
  background-size:
    24px 24px,
    24px 24px,
    120px 120px,
    120px 120px;
}
.bp-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 0% 50%, rgba(7, 25, 41, 0.7) 0%, transparent 60%);
}
/* A page header with a photo behind (articles, an article, contact, projects): the photo fills it,
   a dark wash keeps the title readable. */
.bp-header.has-photo,
.proj-hero.has-photo {
  padding: 92px 0 80px;
}
.bp-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
.bp-header.has-photo .bp-grid,
.proj-hero.has-photo .bp-grid {
  opacity: 0.55;
}
.bp-header.has-photo .bp-sub,
.bp-header.has-photo .bp-crumb a,
.proj-hero.has-photo .proj-hero-sub,
.proj-hero.has-photo .proj-crumb a {
  color: var(--text);
}
.bp-header.has-photo .bp-fade,
.proj-hero.has-photo .bp-fade {
  background:
    linear-gradient(to right, rgba(7, 25, 41, 0.86) 0%, rgba(7, 25, 41, 0.5) 50%, rgba(7, 25, 41, 0.08) 100%),
    linear-gradient(to top, rgba(7, 25, 41, 0.7) 0%, rgba(7, 25, 41, 0) 45%);
}
.bp-header-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 36px;
}
.bp-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin-bottom: 26px;
}
.bp-crumb a {
  color: var(--text-dim);
  transition: color 0.15s;
}
.bp-crumb a:hover {
  color: var(--text);
}
.bp-crumb .sep {
  color: var(--text-dimmer);
}
.bp-crumb .here {
  color: var(--brand);
}
.bp-title {
  font-family: "Space Grotesk", var(--font-sans);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin: 0 0 14px;
  text-wrap: balance;
  -webkit-font-smoothing: antialiased;
}
.bp-title .accent {
  color: var(--brand);
}
.bp-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  max-width: 660px;
  margin: 0;
}
@media (max-width: 720px) {
  .bp-header {
    padding: 40px 0 36px;
  }
  .bp-header.has-photo,
  .proj-hero.has-photo {
    padding: 56px 0 48px;
  }
  .bp-header-inner {
    padding: 0 20px;
  }
}
/* ───────── Page header (used by About) ───────── */
.page-header {
  position: relative;
  padding: 96px 0 80px;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(106, 164, 216, 0.06), transparent 60%),
    linear-gradient(180deg, #0f283b 0%, #0a1d2d 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-header .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
}
.page-header-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 36px;
}
.page-title {
  font-family: var(--font-sans);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin: 0;
}
.page-title .accent {
  color: var(--brand);
}
.page-sub {
  margin-top: 22px;
  max-width: 620px;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-mute);
}
.page-crumb {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.page-crumb .sep {
  color: var(--text-dimmer);
}
.page-crumb .here {
  color: var(--brand);
}
/* ───────── Footer ───────── */
.contribute {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  padding: 64px 0;
}
.contribute-row {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.contribute-copy .eyebrow {
  margin-bottom: 18px;
}
.contribute-copy h3 {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 8px;
}
.contribute-copy h3 .sep {
  color: var(--text-dimmer);
  margin: 0 12px;
  font-weight: 400;
}
.contribute-copy .small {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.contribute-actions {
  display: flex;
  gap: 12px;
}

.site-footer {
  background: #08182a;
  border-top: 1px solid var(--line);
}

/* ── Sitemap block ── */
.site-footer-top {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 36px 44px;
  display: grid;
  /* The brand column is wider; the link columns share what's left evenly. */
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
}
.footer-brand {
  min-width: 0;
}
.footer-logo {
  height: 26px;
  width: auto;
  display: block;
  margin-bottom: 16px;
}
.footer-tagline {
  margin: 0 0 22px;
  max-width: 380px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-dim);
}
.footer-col {
  min-width: 0;
}
.footer-col-head {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-dim);
  transition: color 0.15s;
}
.footer-col a:hover {
  color: var(--text-bright);
}

/* ── Bottom bar ── */
.site-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 36px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* ───────── Footer social icon buttons ───────── */
.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}
.social-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s,
    transform 0.15s;
}
.social-btn:hover {
  border-color: var(--line-3);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}
.social-btn[aria-label="GitHub"]:hover {
  color: #e6edf3;
}
.social-btn[aria-label="LinkedIn"]:hover {
  color: #0a66c2;
}
.social-btn[aria-label="YouTube"]:hover {
  color: #ff0000;
}
.social-btn[aria-label="Discord"]:hover {
  color: #5865f2;
}
.social-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
@media (max-width: 720px) {
  .footer-social {
    gap: 8px;
  }
}
@media (hover: none) and (pointer: coarse) {
  .social-btn {
    width: 44px;
    height: 44px;
  }
  .footer-col ul {
    gap: 0;
  }
  .footer-col a {
    display: block;
    padding: 14px 0;
  }
}
/* ───────── Mobile drawer nav ───────── */
.mnav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  align-items: center;
}
.mnav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-bright);
  border-radius: 2px;
  transition:
    transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.2s;
}
.mnav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mnav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.mnav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mnav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 16, 28, 0.62);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 90;
}
.mnav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mnav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(82vw, 340px);
  background: linear-gradient(180deg, #14304a 0%, #0d2236 100%);
  border-left: 1px solid var(--line-2);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  /* Closed, it is hidden once it has slid out: otherwise its shadow darkens the
     right edge of every page, and its links can be reached with Tab. */
  visibility: hidden;
  transition:
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.32s;
  z-index: 95;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.mnav-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.mnav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.mnav-drawer-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--text-dim);
}
.mnav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text-mute);
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.mnav-close:hover {
  color: var(--text-bright);
  border-color: var(--line-3);
}
.mnav-list {
  display: flex;
  flex-direction: column;
  padding: 14px 14px 0;
  overflow-y: auto;
  flex: 1;
}
.mnav-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text);
  border-radius: var(--r-sm);
  border-bottom: 1px solid var(--line);
  transition:
    background 0.15s,
    color 0.15s;
}
.mnav-link:last-child {
  border-bottom: none;
}
.mnav-link:hover,
.mnav-link:active {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-bright);
}
.mnav-link.is-active {
  color: var(--brand);
}
.mnav-foot {
  padding: 16px 18px 22px;
  border-top: 1px solid var(--line);
}
.mnav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.mnav-cta:hover {
  background: var(--brand-2);
}
/* ───────── Responsive ───────── */
@media (max-width: 980px) {
  .nav-links {
    gap: 24px;
  }
  .nav-link {
    font-size: 12px;
  }
}
@media (max-width: 720px) {
  .brand {
    position: relative;
  }
  .brand::after {
    content: "";
    position: absolute;
    inset: -9px -8px;
  }
  .bp-crumb a,
  .page-crumb a {
    position: relative;
  }
  .bp-crumb a::after,
  .page-crumb a::after {
    content: "";
    position: absolute;
    inset: -14px 0;
  }
  .social-btn {
    width: 44px;
    height: 44px;
  }
  .topnav-inner {
    padding: 14px 20px;
    gap: 16px;
  }
  .nav-links,
  .topnav-inner > .nav-cta {
    display: none;
  }
  .mnav-toggle {
    display: flex;
  }
  section.panel {
    padding: 72px 0;
  }
  .page-header {
    padding: 64px 0 56px;
  }
  .section-title {
    font-size: 30px;
  }
  .container,
  .page-header-inner {
    padding: 0 20px;
  }
  .contribute-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    flex-wrap: nowrap;
  }
  .contribute-row > * {
    max-width: 100%;
    min-width: 0;
  }
  .contribute-actions {
    flex-wrap: wrap;
  }
  .contribute {
    padding: 48px 0;
  }
  /* Brand on its own line, the three link columns side by side under it. */
  .site-footer-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 20px;
    padding: 40px 20px 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .site-footer-inner {
    padding: 16px 20px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}
@media (max-width: 480px) {
  .topnav-inner {
    padding: 12px 16px;
  }
  .brand-logo {
    height: 26px;
  }
  /* Three columns become unreadably narrow on a phone; two is the floor. */
  .site-footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 34px 16px 28px;
  }
  .site-footer-inner {
    font-size: 10px;
    padding: 14px 16px;
  }
}
