@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

/* ============================================================
   MABRIKADO DIGITAL GARDEN
   Developer research notebook / personal knowledge garden
   ============================================================ */

:root {
  /* ------------------------------------------------- ---------
     Surfaces
     ---------------------------------------------------------- */

  --bg: #f3f7fb;
  --bg-deep: #eaf1f7;

  --paper: #ffffff;
  --paper-soft: #edf3f8;
  --paper-blue: #e8f2fa;

  /* ----------------------------------------------------------
     Navy
     ---------------------------------------------------------- */

  --navy-950: #071525;
  --navy-900: #0b1f33;
  --navy-850: #0e263e;
  --navy-800: #102d49;
  --navy-700: #17466d;
  --navy-600: #1d567f;

  /* ----------------------------------------------------------
     Blue
     ---------------------------------------------------------- */

  --blue-700: #175d8c;
  --blue-600: #256da8;
  --blue-500: #3688c5;
  --blue-400: #67a9d9;
  --blue-300: #91c3e4;
  --blue-200: #b9d8ee;
  --blue-100: #dcebf6;
  --blue-50: #edf6fc;

  /* ----------------------------------------------------------
     Text
     ---------------------------------------------------------- */

  --ink: #102538;
  --ink-strong: #081a2a;

  --muted: #63798b;
  --soft: #8ca0af;

  /* ----------------------------------------------------------
     Borders
     ---------------------------------------------------------- */

  --border: #d5e1eb;
  --border-strong: #bfd1df;
  --navy-border: #244967;

  /* ----------------------------------------------------------
     Status
     ---------------------------------------------------------- */

  --seedling-bg: #edf8f0;
  --seedling-text: #346947;

  --growing-bg: #e7f5ec;
  --growing-text: #25613c;

  --evergreen-bg: #e4f2eb;
  --evergreen-text: #1f5636;

  --archived-bg: #f0f2f4;
  --archived-text: #66717a;

  /* ----------------------------------------------------------
     Layout
     ---------------------------------------------------------- */

  --container: 1180px;
  --reading-width: 900px;

  --radius: 12px;
  --radius-small: 7px;

  /* ----------------------------------------------------------
     Typography
     ---------------------------------------------------------- */

  --font-ui:
    "IBM Plex Sans",
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  --font-code:
    "JetBrains Mono",
    "IBM Plex Mono",
    "SFMono-Regular",
    Consolas,
    monospace;

  font-family: var(--font-ui);

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

/* =========================================================
   ABOUT PAGE
   ========================================================= */

.about-page .reading-shell {
  width: 100%;
}

.about-page .reading-container {
  width: min(
    var(--container),
    calc(100% - 48px)
  );

  max-width: none;

  margin-inline: auto;
}

.about-page .article-body {
  width: 100%;
  max-width: none;
}

@media (max-width: 1100px) {
  .about-page .reading-container {
    width: calc(100% - 32px);
  }
}

@media (max-width: 560px) {
  .about-page .reading-container {
    width: calc(100% - 22px);
  }
}

/* =========================================================
   ABOUT PAGE — FIRST IMAGE ONLY
   ========================================================= */

.about-page .article-body > .media-block:first-of-type {
  width: 100%;
  margin: 36px 0;
}

.about-page .article-body > .media-block:first-of-type img {
  display: block;

  width: 100%;
  height: clamp(320px, 42vw, 520px);

  object-fit: cover;

  border-radius: var(--radius);
}

@media (max-width: 850px) {
  .about-page .article-body > .media-block:first-of-type img {
    height: clamp(260px, 55vw, 400px);
  }
}

@media (max-width: 560px) {
  .about-page .article-body > .media-block:first-of-type {
    margin: 28px 0;
  }

  .about-page .article-body > .media-block:first-of-type img {
    height: 280px;
  }
}


/* ============================================================
   RESET / BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--bg);
  color: var(--ink);

  font-family: var(--font-ui);

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection,
body *::selection {
  background: var(--blue-200);
  color: var(--navy-950);
}

a {
  color: var(--blue-700);
}

button,
input,
textarea,
select {
  font: inherit;
}

img,
video,
svg,
canvas {
  max-width: 100%;
}

img {
  height: auto;
}


/* ============================================================
   GLOBAL CONTAINER
   ============================================================ */

.site-container {
  width: min(
    calc(100% - 48px),
    var(--container)
  );

  margin-inline: auto;
}



/* ============================================================
   SITE HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;

  background: rgba(7, 21, 37, 0.97);

  border-bottom:
    1px solid rgba(103, 169, 217, 0.16);

  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;

  display: flex;
  align-items: center;

  gap: 32px;
}


/* ============================================================
   BRAND
   ============================================================ */

.brand {
  flex: none;

  color: #ffffff;

  text-decoration: none;

  font-family: var(--font-code);
  font-size: 0.92rem;
  font-weight: 700;

  letter-spacing: -0.04em;
}

.brand::before {
  content: "> ";

  color: var(--blue-400);
}

.brand::after {
  content: "_";
  color: var(--blue-400);
  animation:    mabrikado-cursor 1.3s step-end infinite;
  -webkit-animation:    mabrikado-cursor 1.3s step-end infinite;
}

@keyframes mabrikado-cursor {
  50% {
    opacity: 0;
  }
}


/* ============================================================
   MAIN NAVIGATION
   ============================================================ */

.main-nav {
  display: flex;
  align-items: center;

  gap: 22px;

  margin-left: auto;

  font-family: var(--font-code);
}

.main-nav > a {
  position: relative;

  color: #b9c7d3;

  text-decoration: none;

  font-family: var(--font-code);
  font-size: 0.69rem;
  font-weight: 500;

  letter-spacing: 0.02em;

  transition:
    color 150ms ease;
}

.main-nav > a::after {
  content: "";

  position: absolute;

  left: 0;
  right: 100%;
  bottom: -8px;

  height: 1px;

  background: var(--blue-400);

  transition:
    right 160ms ease;
}

.main-nav > a:hover {
  color: #ffffff;
}

.main-nav > a:hover::after {
  right: 0;
}

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-trigger {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 9px 12px;

  color: var(--blue-100);
  background: transparent;

  border: 1px solid var(--navy-border);
  border-radius: var(--radius-small);

  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;

  cursor: pointer;
}

.mobile-nav-trigger:hover {
  color: #ffffff;
  border-color: var(--blue-400);
}

.mobile-nav-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;

  width: 15px;
}

.mobile-nav-icon span {
  display: block;

  width: 100%;
  height: 1.5px;

  background: currentColor;
}

.mobile-nav-panel {
  position: absolute;
  z-index: 100;

  top: calc(100% + 12px);
  right: 0;

  width: min(320px, calc(100vw - 28px));

  padding: 8px;

  color: var(--ink);
  background: var(--paper);

  border: 1px solid var(--border-strong);
  border-radius: var(--radius);

  box-shadow:
    0 20px 50px rgba(7, 21, 37, 0.22);
}

.mobile-nav-panel-header {
  padding: 10px 12px;

  color: var(--blue-600);

  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;

  letter-spacing: 0.09em;
}

.mobile-nav-group {
  display: grid;

  padding-bottom: 7px;
  margin-bottom: 7px;

  border-bottom: 1px solid var(--border);
}

.mobile-nav-label {
  padding: 8px 12px 5px;

  color: var(--muted);

  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mobile-nav-link {
  display: block;

  padding: 10px 12px;

  color: var(--ink);

  border-radius: var(--radius-small);

  font-size: 0.88rem;
  font-weight: 500;

  text-decoration: none;
}

.mobile-nav-link:hover {
  color: var(--navy-900);
  background: var(--blue-50);
}

.mobile-nav-primary {
  font-weight: 600;
}


/* ============================================================
   GARDEN DROPDOWN
   ============================================================ */

.nav-dropdown {
  position: relative;

  display: flex;
  align-items: center;
}


/* Trigger */

.nav-dropdown-trigger {
  display: flex;
  align-items: center;

  gap: 6px;

  padding: 10px 0;

  color: #b9c7d3;
  background: transparent;

  border: 0;

  font-family: var(--font-code);
  font-size: 0.69rem;
  font-weight: 500;

  letter-spacing: 0.02em;

  cursor: pointer;

  transition:
    color 150ms ease;
}

.nav-dropdown-trigger:hover,
.nav-dropdown:hover .nav-dropdown-trigger {
  color: #ffffff;
}


/* Chevron */

.nav-chevron {
  display: inline-block;

  color: var(--blue-400);

  font-size: 0.78rem;

  transform: translateY(-1px);

  transition:
    transform 160ms ease;
}

.nav-dropdown:hover .nav-chevron {
  transform:
    translateY(-1px)
    rotate(180deg);
}


/* ============================================================
   DROPDOWN MENU
   ============================================================ */

.nav-dropdown-menu {
  position: absolute;

  top: calc(100% + 14px);
  left: -18px;

  width: 245px;

  padding: 9px;

  background: var(--navy-900);

  border: 1px solid var(--navy-700);
  border-radius: 9px;

  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.28);

  opacity: 0;

  visibility: hidden;

  transform:
    translateY(-5px);

  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;

  pointer-events: none;
}


/* Invisible hover bridge */

.nav-dropdown-menu::before {
  content: "";

  position: absolute;

  top: -18px;
  left: 0;
  right: 0;

  height: 18px;
}


/* Show */

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;

  visibility: visible;

  transform:
    translateY(0);

  pointer-events: auto;
}


/* ============================================================
   DROPDOWN TITLE
   ============================================================ */

.nav-dropdown-label {
  padding:
    9px 10px 10px;

  color: #67869c;

  font-family: var(--font-code);
  font-size: 0.56rem;
  font-weight: 600;

  letter-spacing: 0.1em;

  border-bottom:
    1px solid rgba(103, 169, 217, 0.1);

  margin-bottom: 5px;
}


/* ============================================================
   DROPDOWN ITEMS
   ============================================================ */

.nav-dropdown-item {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding:
    10px 11px;

  color: #b9cbd8;

  border-radius: 6px;

  text-decoration: none;

  font-family: var(--font-code);
  font-size: 0.68rem;

  transition:
    color 130ms ease,
    background 130ms ease,
    padding-left 130ms ease;
}

.nav-dropdown-item:hover {
  padding-left: 14px;

  color: #ffffff;

  background: var(--navy-800);
}


/* Small arrow */

.dropdown-arrow {
  color: #527b98;

  font-size: 0.65rem;

  transition:
    color 130ms ease,
    transform 130ms ease;
}

.nav-dropdown-item:hover
.dropdown-arrow {
  color: var(--blue-300);

  transform:
    translate(
      2px,
      -2px
    );
}


/* ============================================================
   HEADER SEARCH BUTTON
   ============================================================ */

.search-button {
  min-width: 175px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 9px 11px;

  color: #a9bac8;
  background: var(--navy-800);

  border: 1px solid var(--navy-border);
  border-radius: 8px;

  font-family: var(--font-code);

  cursor: pointer;

  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.search-button:hover {
  background: #143957;

  border-color: var(--blue-400);

  transform: translateY(-1px);
}

.search-button span {
  font-size: 0.7rem;
}

.search-button kbd,
.hero-search kbd {
  padding: 2px 6px;

  color: #9eb5c7;
  background: var(--navy-950);

  border: 1px solid #294b66;
  border-radius: 4px;

  font-family: var(--font-code);
  font-size: 0.6rem;
}


/* ============================================================
   HOME HERO
   ============================================================ */

.home-hero {
  position: relative;

  padding: 110px 0 94px;

  overflow: hidden;

  background:
    linear-gradient(
      180deg,
      rgba(232, 242, 250, 0.42),
      rgba(243, 247, 251, 0)
    );
}

.home-hero::before {
  content: "";

  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(
      rgba(23, 70, 109, 0.045) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(23, 70, 109, 0.045) 1px,
      transparent 1px
    );

  background-size: 32px 32px;

  mask-image:
    linear-gradient(
      to bottom,
      black,
      rgba(0, 0, 0, 0.45) 45%,
      transparent 92%
    );

  pointer-events: none;
}

.home-hero::after {
  content: "";

  position: absolute;

  width: 520px;
  height: 520px;

  top: -260px;
  right: -150px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(54, 136, 197, 0.14),
      transparent 68%
    );

  pointer-events: none;
}

.home-hero .site-container {
  position: relative;
  z-index: 1;
}


/* ============================================================
   DEVELOPER LABELS
   ============================================================ */

.hero-kicker,
.eyebrow,
.mini-heading {
  color: var(--blue-600);

  font-family: var(--font-code);
  font-size: 0.64rem;
  font-weight: 600;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}

.eyebrow::before {
  content: "[ ";
}

.eyebrow::after {
  content: " ]";
}


/* ============================================================
   HERO TYPOGRAPHY
   ============================================================ */

.home-hero h1 {
  max-width: 880px;

  margin: 20px 0 28px;

  color: var(--navy-950);

  font-size:
    clamp(4rem, 8vw, 7rem);

  font-weight: 700;

  line-height: 0.92;
  letter-spacing: -0.058em;
}

.hero-intro {
  max-width: 650px;

  margin: 0;

  color: var(--muted);

  font-size: 1.2rem;
  line-height: 1.65;
}


/* ============================================================
   HERO SEARCH
   ============================================================ */

.hero-search {
  max-width: 720px;

  display: grid;

  grid-template-columns:
    auto 1fr auto;

  align-items: center;

  gap: 14px;

  margin-top: 42px;
  padding: 14px 16px;

  color: #ffffff;
  background: var(--navy-900);

  border: 1px solid var(--navy-700);
  border-radius: 10px;

  box-shadow:
    0 18px 50px rgba(7, 21, 37, 0.13);

  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.hero-search:focus-within {
  border-color: var(--blue-400);

  box-shadow:
    0 18px 50px rgba(7, 21, 37, 0.15),
    0 0 0 4px rgba(103, 169, 217, 0.11);
}

.hero-search > span {
  color: var(--blue-400);

  font-family: var(--font-code);
  font-size: 1.35rem;
}

.hero-search > span::after {
  content: ">";
}

.hero-search input {
  width: 100%;

  padding: 6px 0;

  color: #ffffff;
  background: transparent;

  border: 0;
  outline: 0;

  font-family: var(--font-code);
  font-size: 0.86rem;
}

.hero-search input::placeholder {
  color: #8fa9bb;
}

.home-search-results {
  max-width: 720px;

  margin-top: 8px;
}


/* ============================================================
   HOME SECTIONS
   ============================================================ */

.home-section {
  padding: 72px 0;

  border-top: 1px solid var(--border);
}

.section-heading {
  display: grid;

  grid-template-columns:
    48px 1fr;

  gap: 14px;

  margin-bottom: 30px;
}

.section-heading > span {
  padding-top: 7px;

  color: var(--blue-500);

  font-family: var(--font-code);
  font-size: 0.66rem;
  font-weight: 600;
}

.section-heading > span::after {
  content: " /";
}

.section-heading h2 {
  margin: 0;

  color: var(--navy-950);

  font-size: 1.8rem;
  font-weight: 700;

  letter-spacing: -0.035em;
}

.section-heading p {
  margin: 6px 0 0;

  color: var(--muted);

  font-size: 0.92rem;
}


/* ============================================================
   CONTENT / RECENT CARDS
   ============================================================ */

.recent-grid,
.listing-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 14px;
}

.content-card {
  position: relative;

  min-height: 210px;

  display: flex;
  flex-direction: column;

  padding: 25px;

  color: inherit;
  background: var(--paper);

  border: 1px solid var(--border);
  border-radius: var(--radius);

  text-decoration: none;

  overflow: hidden;

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.content-card::before {
  content: "";

  position: absolute;

  top: 0;
  left: 0;
  right: 0;

  height: 3px;

  background:
    linear-gradient(
      90deg,
      var(--navy-800),
      var(--blue-400)
    );
}

.content-card:hover {
  transform: translateY(-4px);

  border-color: var(--blue-300);

  box-shadow:
    0 18px 45px rgba(41, 93, 122, 0.09);
}

.content-card-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 12px;
}

.content-card h3 {
  margin: 28px 0 8px;

  color: var(--navy-950);

  font-size: 1.25rem;
  font-weight: 700;

  letter-spacing: -0.025em;
}

.content-card p {
  margin: 0;

  color: var(--muted);

  font-size: 0.9rem;
  line-height: 1.6;
}

.content-card-footer {
  display: flex;
  justify-content: space-between;

  margin-top: auto;
  padding-top: 26px;

  color: var(--soft);

  font-family: var(--font-code);
  font-size: 0.66rem;
}


/* ============================================================
   STATUS BADGES
   ============================================================ */

.status-badge {
  padding: 5px 8px;

  border-radius: 5px;

  font-family: var(--font-code);
  font-size: 0.62rem;

  letter-spacing: -0.01em;
}

.status-seedling {
  color: var(--seedling-text);
  background: var(--seedling-bg);
}

.status-growing {
  color: var(--growing-text);
  background: var(--growing-bg);
}

.status-evergreen {
  color: var(--evergreen-text);
  background: var(--evergreen-bg);
}

.status-archived {
  color: var(--archived-text);
  background: var(--archived-bg);
}


/* ============================================================
   TOPIC CLOUD
   ============================================================ */

.topic-cloud {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;
}

.topic-cloud a {
  padding: 9px 12px;

  color: var(--navy-800);
  background: transparent;

  border: 1px solid var(--border);
  border-radius: 6px;

  font-family: var(--font-code);
  font-size: 0.69rem;
  font-weight: 500;

  text-decoration: none;

  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.topic-cloud a::before {
  content: "#";

  margin-right: 3px;

  color: var(--blue-500);
}

.topic-cloud a:hover {
  color: #ffffff;
  background: var(--navy-800);

  border-color: var(--navy-800);

  transform: translateY(-2px);
}


/* ============================================================
   FEATURED PIECE
   ============================================================ */

.featured-piece {
  position: relative;

  min-height: 330px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  padding: 42px;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      var(--navy-900),
      var(--navy-800) 58%,
      var(--blue-700)
    );

  border: 1px solid var(--navy-700);
  border-radius: 14px;

  text-decoration: none;

  overflow: hidden;
}

.featured-piece::before {
  content: "";

  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px
    );

  background-size: 30px 30px;

  pointer-events: none;
}

.featured-piece > * {
  position: relative;
  z-index: 1;
}

.featured-piece .eyebrow {
  color: var(--blue-300);
}

.featured-piece h2 {
  max-width: 720px;

  margin: 16px 0 10px;

  color: #ffffff;

  font-size:
    clamp(2rem, 4vw, 3.5rem);

  line-height: 1.02;
  letter-spacing: -0.045em;
}

.featured-piece p {
  max-width: 620px;

  margin: 0;

  color: #bed0dd;

  line-height: 1.65;
}

.featured-arrow {
  margin-top: 26px;

  color: var(--blue-300);

  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 600;
}


/* ============================================================
   CONTENT TYPE BLOCKS
   ============================================================ */

.type-blocks {
  display: grid;

  grid-template-columns:
    1.3fr 0.7fr;

  gap: 14px;
}

.type-blocks a {
  position: relative;

  min-height: 220px;

  display: flex;
  flex-direction: column;

  padding: 28px;

  color: var(--ink);
  background: var(--paper);

  border: 1px solid var(--border);
  border-radius: var(--radius);

  text-decoration: none;

  overflow: hidden;

  transition:
    border-color 150ms ease,
    transform 150ms ease;
}

.type-blocks a:hover {
  border-color: var(--blue-300);

  transform: translateY(-3px);
}

.type-blocks a:nth-child(2),
.type-blocks a:nth-child(3) {
  background: var(--paper-blue);
}

.type-blocks span {
  color: var(--blue-600);

  font-family: var(--font-code);
  font-size: 0.62rem;
  font-weight: 600;

  letter-spacing: 0.08em;
}

.type-blocks span::before {
  content: "[ ";
}

.type-blocks span::after {
  content: " ]";
}

.type-blocks h3 {
  margin: auto 0 8px;

  color: var(--navy-950);

  font-size: 1.6rem;

  letter-spacing: -0.035em;
}

.type-blocks p {
  max-width: 430px;

  margin: 0;

  color: var(--muted);

  font-size: 0.9rem;
  line-height: 1.55;
}


/* ============================================================
   LISTING PAGES
   ============================================================ */

.listing-hero {
  position: relative;

  padding: 82px 0 58px;

  overflow: hidden;
}

.listing-hero::before {
  content: "";

  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(
      rgba(23, 70, 109, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(23, 70, 109, 0.035) 1px,
      transparent 1px
    );

  background-size: 34px 34px;

  mask-image:
    linear-gradient(
      to bottom,
      black,
      transparent
    );

  pointer-events: none;
}

.listing-hero .site-container {
  position: relative;
  z-index: 1;
}

.listing-hero h1 {
  margin: 14px 0;

  color: var(--navy-950);

  font-size:
    clamp(3rem, 7vw, 6rem);

  font-weight: 700;

  line-height: 0.95;
  letter-spacing: -0.06em;
}

.listing-hero p {
  max-width: 650px;

  color: var(--muted);

  font-size: 1.05rem;
  line-height: 1.65;
}

.listing-body {
  padding: 0 0 80px;
}


/* ============================================================
   READING / NOTE PAGES
   ============================================================ */

.reading-shell {
  padding: 48px 24px 90px;
}

.reading-container {
  width: min(100%, var(--reading-width));

  margin-inline: auto;

  padding: 58px 64px;

  background: var(--paper);

  border: 1px solid var(--border);
  border-radius: 14px;

  box-shadow:
    0 20px 60px rgba(41, 93, 122, 0.05);
}


/* ============================================================
   ARTICLE HEADER
   ============================================================ */

.article-overline {
  display: flex;

  align-items: center;

  gap: 12px;

  color: var(--blue-600);

  font-family: var(--font-code);
  font-size: 0.64rem;
  font-weight: 600;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-header h1 {
  margin: 22px 0 16px;

  color: var(--navy-950);

  font-size:
    clamp(2.5rem, 6vw, 4.8rem);

  font-weight: 700;

  line-height: 1;
  letter-spacing: -0.055em;
}

.article-description {
  max-width: 680px;

  color: var(--muted);

  font-size: 1.1rem;
  line-height: 1.65;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;

  gap: 18px;

  margin: 26px 0;

  color: var(--soft);

  font-family: var(--font-code);
  font-size: 0.64rem;
}


/* ============================================================
   TOPIC / TAG CHIPS
   ============================================================ */

.chip-row {
  display: flex;
  flex-wrap: wrap;

  gap: 7px;

  margin-top: 8px;
}

.chip {
  padding: 5px 8px;

  color: var(--navy-700);
  background: var(--paper-soft);

  border: 1px solid var(--border);
  border-radius: 5px;

  font-family: var(--font-code);
  font-size: 0.64rem;
}

.chip::before {
  content: "#";

  color: var(--blue-500);

  margin-right: 2px;
}


/* ============================================================
   ARTICLE BODY
   ============================================================ */

.article-body {
  margin-top: 48px;

  color: var(--ink);

  font-family: var(--font-ui);
  font-size: 1.03rem;

  line-height: 1.84;
}

.article-body > p:first-child {
  font-size: 1.08rem;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--navy-950);

  font-family: var(--font-ui);

  letter-spacing: -0.03em;
}

.article-body h2 {
  margin-top: 2.6em;

  padding-bottom: 9px;

  border-bottom: 1px solid var(--border);

  font-size: 1.65rem;
}

.article-body h3 {
  margin-top: 2.2em;

  font-size: 1.3rem;
}

.article-body h4 {
  margin-top: 2em;

  font-size: 1.08rem;
}

.article-body p {
  margin-block: 1.2em;
}

.article-body ul,
.article-body ol {
  padding-left: 1.45rem;
}

.article-body li {
  margin: 0.45rem 0;
}

.article-body a {
  color: var(--blue-700);

  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: var(--blue-500);
}


/* ============================================================
   ARTICLE IMAGES / VIDEO
   ============================================================ */

.article-body img,
.article-body video {
  display: block;

  width: auto;
  max-width: 100%;

  margin: 36px auto;

  border: 1px solid var(--border);
  border-radius: 9px;
}

.article-body figure {
  margin: 36px 0;
}

.article-body figure img {
  margin-bottom: 10px;
}

.article-body figcaption {
  color: var(--soft);

  font-family: var(--font-code);
  font-size: 0.68rem;

  line-height: 1.5;
}


/* ============================================================
   BLOCKQUOTES
   ============================================================ */

.article-body blockquote {
  margin: 32px 0;

  padding: 16px 22px;

  color: var(--muted);
  background: var(--paper-soft);

  border-left: 4px solid var(--navy-700);

  border-radius:
    0 var(--radius-small)
    var(--radius-small) 0;
}

.article-body blockquote p:first-child {
  margin-top: 0;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}


/* ============================================================
   INLINE CODE
   ============================================================ */

.article-body :not(pre) > code {
  padding: 2px 6px;

  color: var(--navy-800);
  background: var(--blue-100);

  border: 1px solid var(--blue-200);
  border-radius: 4px;

  font-family: var(--font-code);
  font-size: 0.86em;
}


/* ============================================================
   CODE BLOCKS
   ============================================================ */

.article-body pre {
  overflow-x: auto;

  margin: 30px 0;
  padding: 20px;

  color: #d9e6ef;
  background: var(--navy-950);

  border: 1px solid var(--navy-800);
  border-radius: 9px;

  font-family: var(--font-code);
  font-size: 0.86rem;

  line-height: 1.65;

  tab-size: 4;
}

.article-body pre code {
  color: inherit;
  background: transparent;

  font-family: inherit;
}


/* ============================================================
   TABLES
   ============================================================ */

.article-body table {
  width: 100%;

  margin: 30px 0;

  border-collapse: collapse;

  font-size: 0.9rem;
}

.article-body th,
.article-body td {
  padding: 11px 13px;

  text-align: left;

  border: 1px solid var(--border);
}

.article-body th {
  color: var(--navy-950);
  background: var(--paper-soft);

  font-family: var(--font-code);
  font-size: 0.72rem;
}


/* ============================================================
   HORIZONTAL RULE
   ============================================================ */

.article-body hr {
  margin: 42px 0;

  border: 0;
  border-top: 1px solid var(--border);
}


/* ============================================================
   WIKI LINKS
   ============================================================ */

.wiki-link {
  color: var(--blue-700);

  font-family: var(--font-ui);
  font-weight: 600;

  text-decoration:
    underline dotted;

  text-underline-offset: 3px;
}

.wiki-link::before {
  content: "[[";

  color: var(--blue-400);

  font-family: var(--font-code);
  font-size: 0.75em;
}

.wiki-link::after {
  content: "]]";

  color: var(--blue-400);

  font-family: var(--font-code);
  font-size: 0.75em;
}

.wiki-link.unresolved {
  color: #9a6c4d;

  border-bottom:
    1px dashed #c99a78;

  text-decoration: none;

  cursor: help;
}


/* ============================================================
   CONNECTIONS / BACKLINKS
   ============================================================ */

.connections,
.backlinks {
  margin-top: 56px;
  padding-top: 28px;

  border-top: 1px solid var(--border);
}

.connection-links {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;

  margin-top: 16px;
}

.connection-links a {
  display: flex;

  justify-content: space-between;
  align-items: center;

  padding: 14px 16px;

  color: var(--ink);
  background: var(--paper-soft);

  border: 1px solid transparent;
  border-radius: 7px;

  text-decoration: none;

  font-family: var(--font-code);
  font-size: 0.72rem;

  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.connection-links a:hover {
  background: var(--blue-50);

  border-color: var(--blue-300);
}

.backlink-list {
  display: flex;
  flex-direction: column;

  gap: 8px;

  margin-top: 16px;
}

.backlink-list a {
  padding: 8px 0;

  color: var(--blue-700);

  font-family: var(--font-code);
  font-size: 0.72rem;

  text-decoration: none;
}

.backlink-list a::before {
  content: "← ";

  color: var(--blue-400);
}

.backlink-list a:hover {
  color: var(--navy-950);
}


/* ============================================================
   TOPIC INDEX
   ============================================================ */

.topic-index {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 10px;
}

.topic-index a {
  display: flex;

  align-items: center;
  justify-content: space-between;

  padding: 18px;

  color: var(--ink);
  background: var(--paper);

  border: 1px solid var(--border);
  border-radius: 8px;

  text-decoration: none;

  font-family: var(--font-code);
  font-size: 0.72rem;

  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.topic-index a::before {
  content: "#";

  margin-right: 6px;

  color: var(--blue-500);
}

.topic-index a:hover {
  color: #ffffff;
  background: var(--navy-800);

  border-color: var(--navy-800);
}

.topic-index strong {
  margin-left: auto;

  color: var(--blue-500);

  font-size: 0.68rem;
}

.topic-index a:hover strong {
  color: var(--blue-300);
}


/* ============================================================
   SEARCH OVERLAY
   ============================================================ */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;

  padding: 8vh 20px;

  background:
    rgba(7, 21, 37, 0.72);

  backdrop-filter: blur(12px);

  opacity: 0;

  transition: opacity 150ms ease;
}

.search-overlay.is-open {
  opacity: 1;
}

.search-dialog {
  width: min(100%, 800px);

  margin-inline: auto;

  padding: 12px;

  background: var(--navy-900);

  border: 1px solid var(--navy-700);
  border-radius: 12px;

  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.32);
}

.search-dialog-header {
  display: grid;

  grid-template-columns:
    1fr auto;

  gap: 10px;
}

.search-dialog input {
  padding: 16px;

  color: #ffffff;
  background: var(--navy-950);

  border: 1px solid var(--navy-border);
  border-radius: 8px;

  outline: 0;

  font-family: var(--font-code);
  font-size: 0.86rem;
}

.search-dialog input::placeholder {
  color: #8ea5b6;
}

.search-dialog input:focus {
  border-color: var(--blue-400);
}

.search-dialog button {
  width: 50px;

  color: #b9c7d3;
  background: var(--navy-950);

  border: 1px solid var(--navy-border);
  border-radius: 8px;

  font-size: 1.3rem;

  cursor: pointer;
}

.search-dialog button:hover {
  color: #ffffff;

  border-color: var(--blue-400);
}


/* ============================================================
   SEARCH RESULTS
   ============================================================ */

.search-results,
.home-search-results {
  display: grid;

  gap: 5px;

  margin-top: 8px;
}

.search-result {
  display: flex;

  justify-content: space-between;

  gap: 20px;

  padding: 15px;

  color: #dce8f0;
  background: var(--navy-850);

  border: 1px solid transparent;
  border-radius: 7px;

  text-decoration: none;

  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.search-result:hover {
  background: var(--navy-800);

  border-color: var(--navy-700);
}

.search-result span {
  color: var(--blue-300);

  font-family: var(--font-code);
  font-size: 0.6rem;
  font-weight: 600;

  text-transform: uppercase;
}

.search-result strong {
  display: block;

  margin-top: 4px;

  color: #ffffff;
}

.search-result p {
  margin: 5px 0 0;

  color: #a7bdcc;

  font-size: 0.8rem;
}

.search-result b {
  color: var(--blue-300);
}

.search-empty {
  padding: 16px;

  color: #9eb4c3;

  font-family: var(--font-code);
  font-size: 0.72rem;
}

.home-search-results .search-result {
  color: var(--ink);
  background: var(--paper);

  border: 1px solid var(--border);
}

.home-search-results .search-result:hover {
  background: var(--paper-soft);

  border-color: var(--blue-300);
}

.home-search-results .search-result strong {
  color: var(--navy-950);
}

.home-search-results .search-result p {
  color: var(--muted);
}

.home-search-results .search-result span {
  color: var(--blue-600);
}


/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state {
  color: var(--muted);

  font-family: var(--font-code);
  font-size: 0.72rem;
}


/* ============================================================
   KATEX
   ============================================================ */

.katex-display {
  overflow-x: auto;
  overflow-y: hidden;

  margin: 30px 0;

  padding: 20px;

  background: var(--paper-soft);

  border: 1px solid var(--border);
  border-radius: 8px;
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding: 35px 0;

  color: #8299aa;
  background: var(--navy-950);

  border-top: 1px solid var(--navy-800);

  font-family: var(--font-code);
  font-size: 0.62rem;
}

.site-footer .site-container {
  display: flex;

  justify-content: space-between;

  gap: 20px;
}


/* ============================================================
   LOWER LAPTOPS / ~1366px
   Keep visible outer containers.
   ============================================================ */

@media (max-width: 1366px) {
  .site-container {
    width: min(
      calc(100% - 42px),
      1120px
    );
  }

  .home-hero {
    padding-top: 88px;
    padding-bottom: 78px;
  }

  .home-hero h1 {
    font-size:
      clamp(3.8rem, 7vw, 6rem);
  }

  .home-section {
    padding: 62px 0;
  }

  .reading-shell {
    padding-top: 36px;
  }

  .reading-container {
    width: min(100%, 860px);

    padding: 50px 56px;
  }
}


/* ============================================================
   1100px
   ============================================================ */

@media (max-width: 1100px) {
  .site-container {
    width: calc(100% - 32px);
  }

  .main-nav {
    gap: 14px;
  }

  .search-button {
    min-width: 145px;
  }

  .reading-container {
    width: min(100%, 820px);

    padding: 46px 48px;
  }

  .topic-index {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}


/* ============================================================
   TABLET / SMALL LAPTOP
   ============================================================ */

@media (max-width: 850px) {
  .header-inner {
    position: relative;
    gap: 12px;
  }

  .main-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
    margin-left: auto;
  }

  .search-button {
    margin-left: 0;
  }

  .recent-grid,
  .listing-grid,
  .type-blocks {
    grid-template-columns: 1fr;
  }

  .topic-index {
    grid-template-columns: 1fr;
  }

  .reading-shell {
    padding-inline: 14px;
  }

  .reading-container {
    width: 100%;

    padding: 38px 30px;
  }

  .connection-links {
    grid-template-columns: 1fr;
  }

  .featured-piece {
    min-height: 280px;

    padding: 34px;
  }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 560px) {
  .site-container {
    width: calc(100% - 22px);
  }

  .header-inner {
    min-height: 62px;
    gap: 8px;
  }

  .brand {
    font-size: 0.82rem;
  }

  .mobile-nav-trigger {
    padding: 8px 10px;
  }

  .mobile-nav-trigger > span:last-child {
    display: none;
  }

  .search-button {
    min-width: auto;

    padding: 9px 10px;
  }

  .search-button span,
  .search-button kbd {
    display: none;
  }

  .search-button::before {
    content: "⌕";

    color: var(--blue-300);

    font-family: var(--font-code);
  }

  .home-hero {
    padding: 70px 0 60px;
  }

  .home-hero h1 {
    margin-top: 16px;

    font-size: 3.5rem;

    line-height: 0.94;
  }

  .hero-intro {
    font-size: 1.02rem;
  }

  .hero-search {
    margin-top: 32px;

    padding: 12px 13px;
  }

  .hero-search kbd {
    display: none;
  }

  .section-heading {
    grid-template-columns:
      36px 1fr;
  }

  .home-section {
    padding: 54px 0;
  }

  .content-card {
    min-height: 190px;

    padding: 22px;
  }

  .featured-piece {
    min-height: 260px;

    padding: 28px;
  }

  .featured-piece h2 {
    font-size: 2rem;
  }

  .reading-shell {
    padding: 14px 10px 50px;
  }

  .reading-container {
    padding: 28px 20px;

    border-radius: 10px;
  }

  .article-header h1 {
    font-size: 2.6rem;
  }

  .article-description {
    font-size: 1rem;
  }

  .article-body {
    margin-top: 36px;

    font-size: 1rem;

    line-height: 1.78;
  }

  .article-body h2 {
    font-size: 1.45rem;
  }

  .article-body pre {
    margin-inline: -8px;

    border-radius: 6px;
  }

  .site-footer .site-container {
    flex-direction: column;

    gap: 8px;
  }

  .search-overlay {
    padding:
      12px;
  }

  .search-dialog {
    margin-top: 10px;
  }
}

/* ============================================================
   ABOUT NAV — INVITING ENTRY POINT
   Appended override only. Existing stylesheet remains intact.
   ============================================================ */

/*
 * Desktop About entry.
 * Keeps About in its current first position while making it feel
 * like the natural place for a new visitor to begin.
 */
.main-nav > a[href$="/about/"] {
  position: relative;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 12px;

  color: #ffffff;
  background:
    linear-gradient(
      135deg,
      rgba(54, 136, 197, 0.22),
      rgba(103, 169, 217, 0.08)
    );

  border: 1px solid rgba(103, 169, 217, 0.48);
  border-radius: 7px;

  font-weight: 600;

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);

  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

/*
 * Small glowing marker gives About a subtle identity without
 * making the navigation feel corporate or button-heavy.
 */
.main-nav > a[href$="/about/"]::before {
  content: "●";

  color: var(--blue-400);

  font-size: 0.44rem;

  text-shadow:
    0 0 9px rgba(103, 169, 217, 0.85);
}

/*
 * Remove the normal nav underline specifically for About because
 * the highlighted container already communicates interactivity.
 */
.main-nav > a[href$="/about/"]::after {
  display: none;
}

.main-nav > a[href$="/about/"]:hover,
.main-nav > a[href$="/about/"]:focus-visible {
  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      rgba(54, 136, 197, 0.34),
      rgba(103, 169, 217, 0.16)
    );

  border-color: var(--blue-400);

  box-shadow:
    0 8px 26px rgba(7, 21, 37, 0.22),
    0 0 0 3px rgba(103, 169, 217, 0.06);

  transform: translateY(-1px);
}


/* ------------------------------------------------------------
   MOBILE ABOUT ENTRY
   ------------------------------------------------------------ */

/*
 * The mobile navigation panel remains white and consistent.
 * About is the only item deliberately given stronger treatment.
 */
.mobile-nav-link[href$="/about/"] {
  position: relative;

  display: grid;
  gap: 3px;

  margin: 2px 0 10px;
  padding: 14px 44px 14px 14px;

  color: #ffffff;
  background:
    linear-gradient(
      135deg,
      var(--navy-900),
      var(--blue-700)
    );

  border: 1px solid var(--navy-700);
  border-radius: 8px;

  font-weight: 700;

  box-shadow:
    0 8px 22px rgba(7, 21, 37, 0.13);

  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.mobile-nav-link[href$="/about/"]::before {
  content: "START HERE";

  display: block;

  color: var(--blue-300);

  font-family: var(--font-code);
  font-size: 0.51rem;
  font-weight: 700;

  letter-spacing: 0.10em;
}

.mobile-nav-link[href$="/about/"]::after {
  content: "→";

  position: absolute;

  top: 50%;
  right: 15px;

  color: var(--blue-200);

  font-family: var(--font-code);
  font-size: 0.9rem;

  transform: translateY(-50%);

  transition:
    transform 150ms ease,
    color 150ms ease;
}

.mobile-nav-link[href$="/about/"]:hover,
.mobile-nav-link[href$="/about/"]:focus-visible {
  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      var(--navy-800),
      var(--blue-600)
    );

  border-color: var(--blue-400);

  box-shadow:
    0 10px 28px rgba(7, 21, 37, 0.16);

  transform: translateY(-1px);
}

.mobile-nav-link[href$="/about/"]:hover::after,
.mobile-nav-link[href$="/about/"]:focus-visible::after {
  color: #ffffff;

  transform:
    translate(2px, -50%);
}


/* ------------------------------------------------------------
   SMALL MOBILE
   ------------------------------------------------------------ */

@media (max-width: 560px) {
  .mobile-nav-link[href$="/about/"] {
    padding:
      13px 40px 13px 13px;
  }

  .mobile-nav-link[href$="/about/"]::before {
    font-size: 0.49rem;
  }
}

/* ============================================================
   FINAL RESPONSIVE CENTERING
   Appended override only — no existing CSS removed.
   Keeps equal space on the left and right on every screen size.
   ============================================================ */

:root {
  /*
   * Responsive horizontal breathing room.
   *
   * Small phones: 14px
   * Tablets/laptops: grows naturally
   * Large screens: capped at 48px
   */
  --page-gutter:
    clamp(
      14px,
      3vw,
      48px
    );
}


/* ------------------------------------------------------------
   GLOBAL SITE CONTAINER
   ------------------------------------------------------------ */

.site-container {
  width:
    min(
      calc(
        100%
        -
        (
          var(--page-gutter)
          *
          2
        )
      ),
      var(--container)
    );

  max-width:
    var(--container);

  margin-left:
    auto;

  margin-right:
    auto;
}


/* ------------------------------------------------------------
   HEADER / NAVBAR
   ------------------------------------------------------------ */

/*
 * The navbar inherits the same centered container geometry,
 * so its left and right whitespace always match.
 */
.site-header .site-container,
.header-inner {
  margin-left:
    auto;

  margin-right:
    auto;
}


/* ------------------------------------------------------------
   ABOUT PAGE
   ------------------------------------------------------------ */

/*
 * About may use a wider reading surface than articles,
 * but it must still sit perfectly centered in the viewport.
 */
.about-page .reading-shell {
  width:
    100%;

  padding-left:
    var(--page-gutter);

  padding-right:
    var(--page-gutter);
}

.about-page .reading-container {
  width:
    min(
      100%,
      var(--container)
    );

  max-width:
    var(--container);

  margin-left:
    auto;

  margin-right:
    auto;
}


/* ------------------------------------------------------------
   READING PAGES
   ------------------------------------------------------------ */

.reading-shell {
  width:
    100%;
}

.reading-container {
  margin-left:
    auto;

  margin-right:
    auto;
}


/* ------------------------------------------------------------
   LISTINGS / HOME / TOPICS / FOOTER
   ------------------------------------------------------------ */

.home-hero .site-container,
.home-section .site-container,
.listing-hero .site-container,
.listing-body .site-container,
.site-footer .site-container {
  margin-left:
    auto;

  margin-right:
    auto;
}

/* ============================================================
   CONTENT DATES
   ============================================================ */

.content-dates {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 7px;

  margin: 12px 0 24px;

  color: var(--muted);

  font-family: var(--font-code);
  font-size: 0.67rem;

  line-height: 1.5;
}

.content-date-label {
  margin-right: 3px;

  color: var(--soft);

  text-transform: uppercase;

  font-size: 0.58rem;
  font-weight: 600;

  letter-spacing: 0.06em;
}

.content-date-divider {
  color: var(--border-strong);
}

.card-date {
  color: var(--muted);

  font-family: var(--font-code);
  font-size: 0.61rem;
}


/* Small screens */

@media (max-width: 560px) {
  .content-dates {
    gap: 5px;

    margin-bottom: 20px;

    font-size: 0.63rem;
  }

  .content-date-label {
    font-size: 0.55rem;
  }
}


/* ------------------------------------------------------------
   RESPONSIVE GUTTERS
   ------------------------------------------------------------ */

@media (max-width: 1100px) {
  :root {
    --page-gutter:
      clamp(
        16px,
        2.5vw,
        32px
      );
  }

  .site-container {
    width:
      calc(
        100%
        -
        (
          var(--page-gutter)
          *
          2
        )
      );
  }
}


@media (max-width: 850px) {
  :root {
    --page-gutter:
      clamp(
        14px,
        3vw,
        22px
      );
  }

  .site-container {
    width:
      calc(
        100%
        -
        (
          var(--page-gutter)
          *
          2
        )
      );
  }

  .about-page .reading-shell {
    padding-left:
      var(--page-gutter);

    padding-right:
      var(--page-gutter);
  }
}


@media (max-width: 560px) {
  :root {
    --page-gutter:
      12px;
  }

  .site-container {
    width:
      calc(
        100%
        -
        (
          var(--page-gutter)
          *
          2
        )
      );
  }

  .about-page .reading-shell {
    padding-left:
      var(--page-gutter);

    padding-right:
      var(--page-gutter);
  }
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.site-footer {
  margin-top: auto;
}

/* ============================================================
   MABRIKADO OPTIONAL TABLE OF CONTENTS
   Notes + Articles only; enabled per-document with toc: true
   ============================================================ */

.article-toc {
  margin: 0 0 34px;

  overflow: hidden;

  background: var(--paper-soft);

  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.article-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 13px 16px;

  color: var(--navy-800);

  cursor: pointer;
  list-style: none;

  font-family: var(--font-code);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.article-toc summary::-webkit-details-marker {
  display: none;
}

.article-toc-toggle {
  color: var(--blue-600);

  font-size: .92rem;

  transition: transform 160ms ease;
}

.article-toc[open] .article-toc-toggle {
  transform: rotate(180deg);
}

.article-toc nav {
  padding: 0 16px 16px;

  border-top: 1px solid var(--border);
}

.article-toc-list {
  margin: 0;
  padding: 12px 0 0;

  list-style: none;
}

.article-toc-item + .article-toc-item {
  margin-top: 5px;
}

.article-toc-level-3 {
  padding-left: 20px;
}

.article-toc a {
  display: block;

  padding: 4px 0;

  color: var(--muted);

  font-size: .82rem;
  line-height: 1.45;
  text-decoration: none;
}

.article-toc a:hover {
  color: var(--blue-700);
}

.article-toc-level-3 a {
  font-size: .77rem;
}

.article-body h2,
.article-body h3 {
  scroll-margin-top: 96px;
}

@media (max-width: 620px) {
  .article-toc {
    margin-bottom: 26px;
  }

  .article-toc summary {
    padding: 12px 14px;
  }

  .article-toc nav {
    padding-right: 14px;
    padding-left: 14px;
  }

  .article-toc-level-3 {
    padding-left: 15px;
  }
}
