/*
Theme Name: Joel Editorial
Theme URI: https://joeltan.me
Description: A bespoke editorial child theme for Joel Tan's engineering writing.
Author: Joel Tan
Template: colordive
Version: 2.3.1
Text Domain: joel-editorial
*/

:root {
  --navy-950: #03101b;
  --navy-900: #071826;
  --navy-850: #0b2031;
  --navy-800: #10283b;
  --blue: #1488e8;
  --blue-dark: #006fc9;
  --blue-soft: #eaf4ff;
  --ink: #101725;
  --ink-soft: #3d4858;
  --muted: #6c7787;
  --line: #d8dee7;
  --paper: #ffffff;
  --paper-soft: #f6f8fb;
  --success: #18a46f;
  --warning: #f3aa18;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(17, 35, 55, .1);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.menu-open, body.search-open { overflow: hidden; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue); }
img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
.site-frame { min-height: 100vh; background: var(--paper); }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto; margin: 0;
  top: 10px; left: 10px; padding: 10px 14px;
  background: #fff; color: var(--ink); z-index: 9999;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 76px;
  background: rgba(3, 16, 27, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.admin-bar .site-header { top: 32px; }
.nav-shell {
  width: min(1160px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  color: #fff !important;
  line-height: 1;
  margin-right: auto;
}
.brand-mark { font-size: 23px; font-weight: 820; letter-spacing: -.055em; }
.brand-note {
  margin: 8px 0 0 27px;
  color: #a6d9ff;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
  letter-spacing: .03em;
}
.desktop-nav { display: flex; align-items: stretch; height: 100%; }
.desktop-nav a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.desktop-nav a:hover, .desktop-nav a.is-current { color: #40aaf7; }
.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 18px; bottom: 15px; left: 18px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.desktop-nav a:hover::after, .desktop-nav a.is-current::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 5px; }
.icon-button {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.icon-button:hover { background: rgba(255, 255, 255, .08); color: #55b8ff; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.menu-toggle { display: none; }
.mobile-nav {
  display: none;
  position: fixed;
  inset: 76px 0 auto 0;
  padding: 20px 24px 28px;
  background: var(--navy-950);
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 60px rgba(0,0,0,.3);
}
.mobile-nav a {
  display: block; padding: 13px 0;
  color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 14px; font-weight: 700; text-transform: uppercase;
}
.menu-open .mobile-nav { display: block; }
.search-panel {
  display: none;
  position: fixed;
  inset: 76px 0 0;
  z-index: 90;
  padding: 84px 24px;
  background: rgba(3, 16, 27, .97);
}
.search-open .search-panel { display: block; }
.search-panel form { width: min(760px, 100%); margin: 0 auto; }
.search-panel label { display: block; margin-bottom: 18px; color: #9fb0bf; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.search-panel input {
  width: 100%; padding: 18px 0;
  border: 0; border-bottom: 2px solid #29455c;
  outline: 0; background: transparent; color: #fff;
  font-size: clamp(25px, 4vw, 46px); font-weight: 700;
}
.search-panel input:focus { border-color: var(--blue); }

/* Single post hero */
.post-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: var(--navy-900);
  color: #fff;
}
.post-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, rgba(3,16,27,.96) 0%, rgba(3,16,27,.84) 48%, rgba(3,16,27,.55) 100%),
    radial-gradient(circle at 74% 30%, rgba(0, 150, 220, .28), transparent 27%),
    repeating-linear-gradient(116deg, transparent 0 83px, rgba(80,180,255,.06) 84px 85px),
    repeating-linear-gradient(24deg, transparent 0 120px, rgba(80,180,255,.045) 121px 122px);
  z-index: 1;
}
.post-hero::after {
  content: "";
  position: absolute;
  right: 5%; top: 28%;
  width: 460px; height: 190px;
  opacity: .22;
  background:
    linear-gradient(90deg, transparent 9%, #2fb7ff 9% 9.4%, transparent 9.4% 33%, #2fb7ff 33% 33.4%, transparent 33.4% 66%, #2fb7ff 66% 66.4%, transparent 66.4%),
    linear-gradient(transparent 49%, #2fb7ff 49% 50%, transparent 50%);
  border: 1px solid rgba(66,177,245,.6);
  border-radius: 9px;
  transform: perspective(600px) rotateY(-8deg);
}
.post-hero.has-image { background-position: center; background-size: cover; }
.post-hero.has-image::before { background: linear-gradient(90deg, rgba(3,16,27,.98) 0%, rgba(3,16,27,.87) 48%, rgba(3,16,27,.54) 100%), linear-gradient(rgba(3,16,27,.15), rgba(3,16,27,.4)); }
.post-hero-inner {
  position: relative;
  z-index: 3;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 45px;
}
.post-kicker {
  display: block;
  margin-bottom: 14px;
  color: #2ca9ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.post-hero h1 {
  max-width: 910px;
  margin: 0;
  color: #fff;
  font-size: clamp(39px, 5.2vw, 66px);
  font-weight: 820;
  letter-spacing: -.045em;
  line-height: 1.06;
  text-wrap: balance;
}
.post-deck {
  max-width: 820px;
  margin: 18px 0 0;
  color: #d1dae3;
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.45;
  text-wrap: balance;
}
.post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  color: #d8e0e7;
  font-size: 13px;
  font-weight: 600;
}
.post-byline .avatar { width: 48px; height: 48px; border: 2px solid rgba(255,255,255,.75); border-radius: 50%; }
.byline-dot { color: #6d8192; }

/* Article layout */
.article-surface { background: var(--paper); }
.article-shell {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.article-main { min-width: 0; }
.toc-panel, .side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.toc-panel { margin: 0 0 32px; padding: 18px 20px 16px; }
.toc-panel h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}
.toc-list { margin: 0; padding-left: 21px; }
.toc-list li { margin: 3px 0; padding-left: 2px; color: var(--blue-dark); font-size: 13px; line-height: 1.5; }
.toc-list li.is-sub { margin-left: 18px; font-size: 12px; }
.toc-list a { color: #065fc6; }
.toc-list a:hover { color: #0096f3; text-decoration: underline; }
.article-content { min-width: 0; color: #222b37; font-size: 15px; line-height: 1.72; }
.article-content > *:first-child { margin-top: 0; }
.article-content p { margin: 0 0 13px; }
.article-content h2, .article-content h3, .article-content h4 {
  scroll-margin-top: 98px;
  color: #101720;
  font-weight: 820;
  letter-spacing: -.024em;
  line-height: 1.25;
}
.article-content h2 { margin: 38px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 23px; }
.article-content h2:first-child { border-top: 0; padding-top: 0; }
.article-content h3 { margin: 27px 0 10px; font-size: 18px; }
.article-content h4 { margin: 22px 0 8px; font-size: 15px; }
.article-content a { color: #0068ce; text-decoration: underline; text-decoration-color: #a9d1f6; text-underline-offset: 2px; }
.article-content strong { color: #111923; font-weight: 780; }
.article-content ul, .article-content ol { margin: 10px 0 18px 24px; padding: 0; }
.article-content li { margin: 4px 0; }
.article-content img { border-radius: 6px; }
.article-content figure { margin: 22px 0; }
.article-content figcaption { color: var(--muted); font-size: 12px; text-align: center; }
.article-content .wp-block-image, .article-content .wp-block-gallery { margin: 24px 0; }
.article-content blockquote {
  margin: 24px 0;
  padding: 15px 18px;
  border-left: 4px solid var(--blue);
  background: #f0f7ff;
  color: #24374a;
}
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content code {
  padding: 2px 5px;
  border: 1px solid #d8dee7;
  border-radius: 4px;
  background: #f6f8fa;
  color: #172438;
  font-family: var(--mono);
  font-size: .88em;
}
.article-content pre {
  overflow: auto;
  margin: 18px 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f8fa;
  color: #1d2733;
  font: 12px/1.6 var(--mono);
}
.article-content pre code { padding: 0; border: 0; background: none; }
.article-content table { width: 100%; margin: 20px 0; border-collapse: collapse; font-size: 13px; }
.article-content th, .article-content td { padding: 9px 11px; border: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--paper-soft); font-weight: 750; }
.article-content .has-background {
  padding: 14px 16px !important;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.article-content hr { height: 1px; margin: 36px 0; border: 0; background: var(--line); }
.article-content .wp-block-button__link { border-radius: 5px; background: var(--blue-dark); color: #fff; text-decoration: none; }

/* Architecture article visuals */
.post-hero:not(.has-image) {
  background-image: url("assets/fabric-hero.svg");
  background-position: center;
  background-size: cover;
}
.fabric-architecture-figure {
  margin: 24px 0 12px !important;
}
.fabric-architecture-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(20, 42, 65, .07);
}
.fabric-architecture-figure figcaption {
  margin-top: 9px;
  color: #647183;
  font-size: 11px;
}
.architecture-principles {
  margin: 12px 0 30px;
  padding: 0;
  list-style: none;
}
.architecture-principles > li,
.icon-list > li {
  position: relative;
  margin: 5px 0;
  padding-left: 25px;
  list-style: none;
}
.architecture-principles > li::before,
.icon-list--success > li::before {
  content: "✓";
  position: absolute;
  top: .15em;
  left: 0;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25a965;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.icon-list--warning > li::before {
  content: "!";
  position: absolute;
  top: .1em;
  left: 0;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0,100% 100%,0 100%);
  background: #f2ad19;
  color: #402800;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  padding-top: 4px;
}
.icon-list--info > li::before {
  content: "→";
  position: absolute;
  top: .12em;
  left: 0;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #247bd4;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.icon-list { margin: 8px 0 0 !important; padding: 0 !important; }
.cue-card {
  margin: 17px 0;
  padding: 14px 16px;
  border: 1px solid #cfd8e3;
  border-radius: 7px;
  background: #f8fafc;
  color: #243142;
}
.cue-card > strong,
.cue-card > p:first-child strong {
  display: block;
  margin-bottom: 5px;
  color: #162130;
}
.cue-card p:last-child { margin-bottom: 0; }
.cue-card--success { border-color: #9ed8bd; background: #f0fbf5; }
.cue-card--warning { border-color: #ead59b; background: #fff9e9; }
.cue-card--info { border-left: 4px solid var(--blue); background: #eef7ff; }
.decision-strip {
  margin: 15px 0 8px;
  padding: 10px 13px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f8fa;
  color: #273343;
  font: 12px/1.45 var(--mono);
  white-space: nowrap;
}
body.dark-mode .fabric-architecture-figure img { border-color: #33495c; }
body.dark-mode .cue-card { border-color: #35495a; background: #152331; color: #c7d2dd; }
body.dark-mode .cue-card > strong,
body.dark-mode .cue-card > p:first-child strong { color: #eef4f8; }
body.dark-mode .cue-card--success { border-color: #2e7658; background: #112a21; }
body.dark-mode .cue-card--warning { border-color: #725d29; background: #2a2311; }
body.dark-mode .decision-strip { border-color: #33495c; background: #111d29; color: #c8d3dd; }

/* Shared field-note language across the archive */
.article-content .article-visual {
  overflow: hidden;
  margin: 24px 0 !important;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(20, 42, 65, .07);
}
.article-content .article-visual img {
  display: block;
  width: 100%;
  border-radius: 6px;
}
.article-content .article-visual figcaption { margin: 9px 5px 2px; }
.article-content .decision-table {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(20, 42, 65, .05);
}
.article-content .decision-table table { min-width: 620px; margin: 0; }
.article-content table.field-note-table {
  overflow-x: auto;
  border-radius: 7px;
  box-shadow: 0 5px 18px rgba(20, 42, 65, .04);
}
.article-content .field-note-callout {
  position: relative;
  margin: 22px 0;
  padding: 16px 18px 16px 46px;
  border: 1px solid #b9d8f4;
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: #eef7ff;
  color: #24374a;
}
.article-content .field-note-callout::before {
  content: "i";
  position: absolute;
  top: 17px;
  left: 16px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font: 800 12px/1 var(--sans);
}
.article-content .field-note-list {
  margin: 17px 0 22px !important;
  border: 1px solid #cfd8e3;
  border-radius: 7px;
  background: #f8fafc;
}
.article-content ul.field-note-list { padding: 12px 16px !important; }
.article-content ol.field-note-list { padding: 12px 18px 12px 42px !important; }
.article-content ol.field-note-list li::marker { font-weight: 800; }
.article-content .field-note-list--success { border-color: #9ed8bd; background: #f0fbf5; }
.article-content .field-note-list--success li::marker { color: #168a55; }
.article-content .field-note-list--warning { border-color: #ead59b; background: #fff9e9; }
.article-content .field-note-list--warning li::marker { color: #a36a00; }
.article-content .field-note-list--info { border-color: #b9d8f4; background: #eef7ff; }
.article-content .field-note-list--info li::marker { color: #176dbb; }
.article-content pre.architecture-flow {
  padding: 18px 20px;
  border-color: #a9cbea;
  border-left: 4px solid var(--blue);
  background: linear-gradient(135deg, #f5faff 0%, #eef6fd 100%);
  color: #15324f;
  box-shadow: 0 6px 20px rgba(20, 72, 122, .06);
}
body.dark-mode .article-content .article-visual,
body.dark-mode .article-content .decision-table { border-color: #33495c; background: #111e2b; }
body.dark-mode .article-content .field-note-callout { border-color: #285b82; background: #12283a; color: #c7d5e1; }
body.dark-mode .article-content .field-note-list { border-color: #35495a; background: #152331; }
body.dark-mode .article-content .field-note-list--success { border-color: #2e7658; background: #112a21; }
body.dark-mode .article-content .field-note-list--warning { border-color: #725d29; background: #2a2311; }
body.dark-mode .article-content .field-note-list--info { border-color: #285b82; background: #12283a; }
body.dark-mode .article-content pre.architecture-flow { border-color: #285b82; background: #101f2d; color: #c7d5e1; }

/* Sidebar */
.article-sidebar { position: sticky; top: 100px; display: grid; gap: 18px; }
.side-card { padding: 20px; }
.side-card h2 {
  margin: 0 0 16px;
  color: #202838;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li { display: grid; grid-template-columns: 21px 1fr; gap: 10px; align-items: start; margin: 0 0 12px; color: #263246; font-size: 13px; line-height: 1.45; }
.detail-list li:last-child { margin-bottom: 0; }
.detail-list svg { width: 17px; height: 17px; margin-top: 1px; fill: none; stroke: #334054; stroke-width: 1.7; }
.detail-list a { color: #075fbd; }
.tag-inline { line-height: 1.65; }
.share-row { display: flex; gap: 9px; }
.share-button {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: #152235; color: #fff;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.share-button:hover { transform: translateY(-2px); background: var(--blue); color: #fff; }
.share-button svg { width: 19px; height: 19px; fill: currentColor; }
.share-button.linkedin { background: #087bb5; }
.share-button.twitter { background: #12a8e0; }
.share-button.email { background: #303744; }
.share-button.copy { background: #788393; }
.related-list { display: grid; gap: 15px; }
.related-item { display: grid; grid-template-columns: 82px 1fr; gap: 12px; color: var(--ink); }
.related-item img, .related-placeholder { width: 82px; height: 66px; border-radius: 5px; object-fit: cover; background: linear-gradient(135deg,#10283b,#168aca); }
.related-item h3 { margin: 1px 0 5px; color: #121b27; font-size: 12px; font-weight: 780; line-height: 1.35; }
.related-item time { color: #737e8e; font-size: 10px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a { padding: 3px 9px; border-radius: 5px; background: #edf3f9; color: #075eb8; font-size: 10px; }
.about-copy { margin: 0 0 14px; color: #344052; font-size: 12px; line-height: 1.6; }
.about-link { color: #075eb8; font-size: 12px; font-weight: 700; }
.post-comments { margin-top: 45px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-comments input:not([type=submit]), .post-comments textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); }
.post-comments input[type=submit] { padding: 10px 18px; border: 0; border-radius: 5px; background: var(--blue-dark); color: #fff; cursor: pointer; }

/* Home and listings */
.home-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: #fff;
}
.home-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 76% 32%, rgba(24,147,224,.28), transparent 24%), repeating-linear-gradient(115deg,transparent 0 92px,rgba(80,180,255,.04) 93px 94px);
}
.home-hero-inner {
  position: relative; z-index: 2;
  width: min(1160px,calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0 82px;
}
.home-eyebrow { display: block; margin-bottom: 13px; color: #36aaff; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.home-hero h1 { max-width: 820px; margin: 0; color: #fff; font-size: clamp(45px,7vw,78px); font-weight: 820; letter-spacing: -.06em; line-height: .99; }
.home-hero p { max-width: 680px; margin: 24px 0 0; color: #cad6df; font-size: 20px; line-height: 1.55; }
.listing-surface { background: var(--paper); }
.listing-shell { width: min(1160px,calc(100% - 48px)); margin: 0 auto; padding: 50px 0 80px; }
.listing-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.listing-heading h1, .listing-heading h2 { margin: 0; color: var(--ink); font-size: 30px; letter-spacing: -.04em; }
.listing-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.post-card { overflow: hidden; display: flex; flex-direction: column; min-height: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 7px 25px rgba(17,35,55,.045); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.post-card:hover { transform: translateY(-5px); border-color: #a7c9e8; box-shadow: var(--shadow); }
.post-card-image, .post-card-placeholder { display: block; height: 190px; overflow: hidden; background: linear-gradient(135deg,#0d2638,#0b6ea7); }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-card:hover .post-card-image img { transform: scale(1.035); }
.post-card-placeholder { position: relative; }
.post-card-placeholder::before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 70% 30%,rgba(45,180,255,.4),transparent 30%),repeating-linear-gradient(120deg,transparent 0 42px,rgba(255,255,255,.05) 43px 44px); }
.post-card-body { flex: 1; padding: 20px 20px 13px; }
.card-kicker { display: block; margin-bottom: 9px; color: #0879cf; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.post-card h2 { margin: 0 0 10px; color: #111a26; font-size: 20px; font-weight: 820; letter-spacing: -.025em; line-height: 1.25; }
.post-card p { margin: 0; color: #657183; font-size: 13px; line-height: 1.55; }
.post-card-meta { display: flex; justify-content: space-between; gap: 12px; padding: 13px 20px 18px; color: #778292; font-size: 10px; }
.pagination { margin-top: 38px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 38px; height: 38px; margin-right: 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); }
.pagination .current, .pagination a:hover { border-color: var(--blue-dark); background: var(--blue-dark); color: #fff; }
.empty-state { padding: 60px 0; text-align: center; }
.empty-state h1 { color: var(--ink); }

/* Pages */
.page-hero { background: var(--navy-900); color: #fff; }
.page-hero-inner { width:min(860px,calc(100% - 48px)); margin:0 auto; padding:70px 0; }
.page-hero h1 { margin:0; color:#fff; font-size:clamp(42px,6vw,68px); letter-spacing:-.05em; line-height:1.05; }
.page-surface { width:min(860px,calc(100% - 48px)); margin:0 auto; padding:55px 0 80px; }

/* Footer */
.site-footer { background: var(--navy-950); color: #9aabba; }
.footer-shell { width:min(1160px,calc(100% - 48px)); margin:0 auto; min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:20px; font-size:11px; }
.footer-shell a { color:#dbe8f2; }

/* Dark reading mode */
body.dark-mode .article-surface, body.dark-mode .listing-surface, body.dark-mode .site-frame { background:#0d1620; }
body.dark-mode .article-content, body.dark-mode .article-content p { color:#c5d0da; }
body.dark-mode .article-content h2, body.dark-mode .article-content h3, body.dark-mode .article-content h4, body.dark-mode .article-content strong, body.dark-mode .listing-heading h1, body.dark-mode .listing-heading h2 { color:#f2f6fa; }
body.dark-mode .toc-panel, body.dark-mode .side-card, body.dark-mode .post-card { background:#111e2b; border-color:#263747; }
body.dark-mode .toc-panel h2, body.dark-mode .side-card h2, body.dark-mode .post-card h2, body.dark-mode .related-item h3 { color:#eef4f9; }
body.dark-mode .detail-list li, body.dark-mode .about-copy, body.dark-mode .post-card p { color:#aebbc8; }
body.dark-mode .article-content h2, body.dark-mode .post-comments { border-color:#263747; }
body.dark-mode .article-content code { border-color:#34495b; background:#142230; color:#d7e4ef; }
body.dark-mode .article-content pre { border-color:#34495b; background:#111e2b; color:#d7e4ef; }
body.dark-mode .article-content blockquote { background:#12283a; color:#c7d5e1; }
body.dark-mode .article-content th { background:#172635; color:#eef4f8; }
body.dark-mode .article-content td, body.dark-mode .article-content th { border-color:#34495b; }
body.dark-mode .article-content figcaption { color:#9dabb9; }
body.dark-mode .article-content .has-background { border-color:#34495b; background:#111e2b !important; }

@media (max-width: 980px) {
  .desktop-nav a { padding: 0 11px; }
  .article-shell { grid-template-columns: minmax(0,1fr) 270px; }
  .post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .admin-bar .site-header { top: 46px; }
  .site-header { height: 68px; }
  .nav-shell, .post-hero-inner, .article-shell, .home-hero-inner, .listing-shell, .footer-shell { width: min(100% - 30px,620px); }
  .desktop-nav { display: none; }
  .menu-toggle { display: grid; }
  .mobile-nav { inset: 68px 0 auto; }
  .search-panel { inset: 68px 0 0; }
  .post-hero { min-height: 0; }
  .post-hero-inner { padding: 44px 0 38px; }
  .post-hero h1 { font-size: clamp(36px,10vw,51px); }
  .post-deck { font-size: 17px; }
  .post-hero::after { display: none; }
  .article-shell { display: block; padding-top: 22px; }
  .article-sidebar { position: static; margin-top: 38px; }
  .toc-panel { padding: 16px; }
  .article-content { font-size: 15px; }
  .article-content .decision-table table { min-width: 560px; }
  .article-content .field-note-callout { padding: 15px 15px 15px 43px; }
  .article-content pre.architecture-flow { padding: 15px; font-size: 11px; }
  .home-hero-inner { padding: 62px 0; }
  .home-hero h1 { font-size: 50px; }
  .home-hero p { font-size: 17px; }
  .post-grid { grid-template-columns: 1fr; }
  .footer-shell { min-height:96px; flex-direction:column; justify-content:center; text-align:center; }
}
@media (max-width: 480px) {
  .brand-mark { font-size:21px; }
  .brand-note { margin-left:21px; }
  .header-actions { gap:0; }
  .icon-button { width:36px; height:36px; }
  .post-hero h1 { font-size:36px; }
  .post-byline { gap:9px; }
  .byline-dot { display:none; }
  .post-byline time { width:calc(100% - 60px); }
  .listing-heading { display:block; }
  .listing-heading p { margin-top:8px; }
}
