/*
Theme Name: octetstack.com
Theme URI: https://octetstack.com
Author: octetstack.com
Author URI: https://octetstack.com
Description: The custom theme powering octetstack.com. Ultra-deep black canvas, lavender-blue accent, dense negative-tracked typography, a glowing hero grid, smooth card micro-interactions, and a fully working dark/light toggle. Distraction-free and 100% ad-free.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: substrate
Tags: blog, one-column, two-columns, custom-menu, featured-images, threaded-comments, translation-ready, dark-mode, technology
*/

/* ==========================================================================
   Design tokens — Linear Dark (default) + Light overrides
   ========================================================================== */
:root {
  /* Linear Dark — default theme */
  --canvas: #010102;
  --surface-1: #0f1011;
  --surface-2: #141516;
  --surface-3: #18191a;
  --hairline: #23252a;
  --hairline-strong: #34343a;

  --ink: #f7f8f8;
  --ink-muted: #8a8f98;
  --ink-faint: #62666d;

  --accent: #5e6ad2;
  --accent-hover: #6e7ae2;
  --accent-glow: rgba(94, 106, 210, 0.35);
  --accent-soft: rgba(94, 106, 210, 0.12);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);

  /* Hero grid + glow */
  --grid-line: rgba(255, 255, 255, 0.028);
  --hero-glow: rgba(94, 106, 210, 0.22);

  --container: 1200px;
  --prose: 720px;
  --radius: 12px;
  --radius-sm: 8px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

/* Light mode — high-contrast alternative. Applied when <html data-theme="light"> */
:root[data-theme="light"] {
  --canvas: #ffffff;
  --surface-1: #f7f8f9;
  --surface-2: #f0f1f3;
  --surface-3: #e8eaed;
  --hairline: #e2e4e8;
  --hairline-strong: #cfd2d8;

  --ink: #08090a;
  --ink-muted: #52555c;
  --ink-faint: #82868d;

  --accent: #4f5bd5;
  --accent-hover: #414db8;
  --accent-glow: rgba(79, 91, 213, 0.28);
  --accent-soft: rgba(79, 91, 213, 0.08);

  --shadow-card: 0 1px 2px rgba(9, 10, 12, 0.06), 0 10px 30px rgba(9, 10, 12, 0.06);

  --grid-line: rgba(9, 10, 12, 0.045);
  --hero-glow: rgba(79, 91, 213, 0.14);

  color-scheme: light;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  background-color: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  overflow-x: hidden;
  /* Smooth transition when toggling themes */
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

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

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.section-head { margin-bottom: 28px; }
.section-head h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin-top: 8px;
}

.hairline { height: 1px; background: var(--hairline); border: 0; }

/* ==========================================================================
   Buttons & chips
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding-inline: 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-ghost {
  background: var(--surface-1);
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.btn-ghost:hover { border-color: var(--ink-faint); transform: translateY(-1px); }

.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding-inline: 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
a.chip:hover { color: var(--ink); border-color: var(--hairline-strong); }
.chip-accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* ==========================================================================
   Header / sticky navbar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--canvas) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

/* Logo signature */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  flex-shrink: 0;
}
.brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #8b93e8);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 4px 12px var(--accent-glow);
}
.brand__mark svg { width: 15px; height: 15px; }
.brand__dot { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav__links a {
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--ink-muted);
  transition: color 0.16s ease, background-color 0.16s ease;
  white-space: nowrap;
}
.nav__links a:hover { color: var(--ink); background: var(--surface-1); }
.nav__links .current-menu-item > a,
.nav__links .current_page_item > a { color: var(--ink); }

.nav__spacer { flex: 1; }

.nav__actions { display: flex; align-items: center; gap: 10px; }

/* Search (inline, desktop) */
.nav__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding-inline: 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s ease;
}
.nav__search:focus-within { border-color: var(--accent); }
.nav__search svg { width: 15px; height: 15px; color: var(--ink-faint); flex-shrink: 0; }
.nav__search input {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  width: 150px;
  outline: none;
}
.nav__search input::placeholder { color: var(--ink-faint); }

/* Theme toggle switch */
.theme-toggle {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--hairline-strong);
  padding: 0;
  flex-shrink: 0;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.theme-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.theme-toggle__thumb svg { width: 13px; height: 13px; }
:root[data-theme="light"] .theme-toggle__thumb { transform: translateX(22px); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Hamburger */
.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  color: var(--ink);
  align-items: center;
  justify-content: center;
}
.nav__toggle svg { width: 18px; height: 18px; }

/* ==========================================================================
   Mobile drawer
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  width: min(86vw, 340px);
  height: 100%;
  background: var(--surface-1);
  border-left: 1px solid var(--hairline);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.drawer__close {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink);
  display: grid; place-items: center;
}
.drawer__close svg { width: 16px; height: 16px; }
.drawer__search {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding-inline: 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.drawer__search svg { width: 16px; height: 16px; color: var(--ink-faint); }
.drawer__search input {
  border: 0; background: transparent; color: var(--ink);
  font-size: 15px; width: 100%; outline: none;
}
.drawer__links { display: flex; flex-direction: column; margin-top: 8px; }
.drawer__links a {
  padding: 13px 12px;
  border-radius: 8px;
  font-size: 15.5px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--hairline);
}
.drawer__links a:hover { color: var(--ink); background: var(--surface-2); }

/* ==========================================================================
   Hero — glowing grid + gradient blur
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
  isolation: isolate;
}
.hero__grid {
  position: absolute;
  inset: -2px;
  z-index: -2;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 78%);
}
.hero__glow {
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center, var(--hero-glow), transparent 62%);
  filter: blur(36px);
  pointer-events: none;
}
.hero__inner {
  padding-block: clamp(64px, 11vw, 128px);
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding-inline: 14px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: 26px;
}
.hero__badge .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero h1 {
  font-size: clamp(38px, 7vw, 76px);
  letter-spacing: -0.045em;
  line-height: 0.98;
  background: linear-gradient(180deg, var(--ink) 60%, color-mix(in srgb, var(--ink) 55%, var(--canvas)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  margin-top: 22px;
  font-size: clamp(15px, 2.2vw, 19px);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 560px;
  margin-inline: auto;
}
.hero__cta { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Post grid & cards
   ========================================================================== */
.section { padding-block: clamp(48px, 7vw, 80px); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* Narrower grid used inside the two-column sidebar layout, where the main
   content column has less room than a full-width section. */
.grid--with-sidebar { grid-template-columns: repeat(2, 1fr); }

/* ==========================================================================
   Two-column content + sidebar layout (homepage, archives, single posts)
   ========================================================================== */
.content-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.content-layout__main { min-width: 0; }

@media (min-width: 992px) {
  .content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    align-items: start;
    gap: 44px;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.sidebar-card__title {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 16px;
}

/* Author card */
.author-card { text-align: left; }
.author-card .avatar { margin-bottom: 14px; }
.author-card__name { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }
.author-card__bio { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--ink-muted); }

/* Categories list */
.categories-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.categories-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 4px;
  font-size: 13.5px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--hairline);
  transition: color 0.16s ease;
}
.categories-list li:last-child a { border-bottom: 0; }
.categories-list a:hover { color: var(--ink); }
.categories-list__count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 2px 8px;
}

/* Recent Tech Deep-Dives list */
.recent-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.recent-list__item { display: flex; gap: 12px; align-items: flex-start; }
.recent-list__thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}
.recent-list__thumb--placeholder {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 60%), var(--surface-2);
}
.recent-list__img { width: 100%; height: 100%; object-fit: cover; }
.recent-list__body { min-width: 0; }
.recent-list__title {
  display: block;
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.recent-list__meta { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-faint); }

/* Newsletter card */
.newsletter-card { border-color: var(--hairline-strong); }
.newsletter-card__glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.newsletter-card__copy { font-size: 13px; line-height: 1.6; color: var(--ink-muted); margin-bottom: 16px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.newsletter-form input[type="email"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.16s ease;
}
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--accent); }
.newsletter-form .btn { width: 100%; justify-content: center; }
.newsletter-card__success {
	display: none;
	margin-top: 12px;
	font-size: 12.5px;
	color: var(--accent);
	position: relative;
	z-index: 1;
}
.newsletter-card.is-submitted .newsletter-form { display: none; }
.newsletter-card.is-submitted .newsletter-card__success { display: block; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
/* Card hover: border glow using accent */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-glow), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--accent-glow), 0 12px 32px -8px var(--accent-glow);
}
.card:hover::after { opacity: 1; }

.card__media {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__media--placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 55%),
    var(--surface-2);
}
.card__media--placeholder span {
  font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint);
}
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-faint); }
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }
.card__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.card:hover .card__title { color: var(--ink); }
.card__excerpt {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-3);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 600; color: var(--ink);
  flex-shrink: 0;
}

/* Featured card (spans wider) */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.featured:hover {
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--accent-glow), 0 16px 40px -10px var(--accent-glow);
}
.featured__media {
  background:
    radial-gradient(circle at 70% 30%, var(--accent-soft), transparent 60%),
    var(--surface-2);
  min-height: 320px;
  border-right: 1px solid var(--hairline);
  overflow: hidden;
}
.featured__media img { width: 100%; height: 100%; object-fit: cover; }
.featured__body { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.featured__body h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; line-height: 1.08; }
.featured__body p { font-size: 15px; color: var(--ink-muted); line-height: 1.6; }

/* ==========================================================================
   Single post
   ========================================================================== */
.article-header { border-bottom: 1px solid var(--hairline); }
.article-header__inner { max-width: var(--prose); margin-inline: auto; padding-block: 56px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-faint); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--ink); }
.article-title {
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-top: 18px;
}
.article-lead { margin-top: 18px; font-size: 18px; color: var(--ink-muted); line-height: 1.55; }
.article-byline { margin-top: 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.article-byline .avatar { width: 38px; height: 38px; font-size: 13px; }
.byline__name { font-size: 13px; font-weight: 500; color: var(--ink); }
.byline__meta { font-size: 12px; color: var(--ink-faint); }
.byline__sep { width: 1px; height: 30px; background: var(--hairline); }

.article-featured-media {
  max-width: var(--container);
  margin: 40px auto 0;
  padding-inline: 24px;
}
.article-featured-media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--hairline); }

/* Long-form prose */
.prose {
  max-width: var(--prose);
  margin-inline: auto;
  padding-block: 48px;
  font-size: 17px;
  line-height: 1.75;
  color: color-mix(in srgb, var(--ink) 86%, var(--canvas));
}
.prose > * + * { margin-top: 26px; }
.prose h2 {
  font-size: 26px;
  letter-spacing: -0.03em;
  margin-top: 48px;
  padding-top: 4px;
  scroll-margin-top: 90px;
}
.prose h3 { font-size: 20px; letter-spacing: -0.02em; margin-top: 36px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--accent-hover); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { padding-left: 4px; list-style: none; }
.prose ul li, .prose ol li { position: relative; padding-left: 26px; margin-top: 12px; }
.prose ul li::before {
  content: "";
  position: absolute; left: 4px; top: 11px;
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--accent);
}
.prose ol { counter-reset: li; }
.prose ol li::before {
  counter-increment: li;
  content: counter(li);
  position: absolute; left: 0; top: 2px;
  font-size: 12px; font-weight: 600; color: var(--accent);
  width: 18px; height: 18px;
  background: var(--accent-soft);
  border-radius: 5px;
  display: grid; place-items: center;
}
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 22px;
  color: var(--ink-muted);
  font-size: 18px;
}
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--ink);
}
.prose pre {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose img { border-radius: var(--radius); border: 1px solid var(--hairline); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--hairline); }
.prose th { background: var(--surface-2); font-weight: 600; color: var(--ink); font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; }

/* Post footer: tags + author + share */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.author-box {
  max-width: var(--prose);
  margin: 40px auto 0;
  display: flex;
  gap: 18px;
  padding: 26px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.author-box .avatar { width: 52px; height: 52px; font-size: 17px; flex-shrink: 0; }
.author-box__name { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }
.author-box__bio { margin-top: 6px; font-size: 14px; color: var(--ink-muted); line-height: 1.6; }

/* Related posts */
.related { border-top: 1px solid var(--hairline); }

/* ==========================================================================
   Page template (policy / about / contact)
   ========================================================================== */
.page-hero { border-bottom: 1px solid var(--hairline); }
.page-hero__inner { max-width: var(--prose); margin-inline: auto; padding-block: 56px; }
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -0.035em; margin-top: 12px; }
.page-hero p { margin-top: 16px; font-size: 16px; color: var(--ink-muted); }

/* ==========================================================================
   Comments
   ========================================================================== */
.comments { max-width: var(--prose); margin: 48px auto 0; }
.comments__title { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 24px; }
.comment-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.comment-list .comment-body {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.comment-list .children { list-style: none; margin-top: 20px; padding-left: 28px; display: flex; flex-direction: column; gap: 20px; }
.comment-author { font-size: 14px; font-weight: 600; }
.comment-author .says { display: none; }
.comment-meta { font-size: 12px; color: var(--ink-faint); margin-bottom: 8px; }
.comment-content { font-size: 14.5px; color: var(--ink-muted); line-height: 1.6; }
.comment-content p + p { margin-top: 12px; }
.comment-respond {
  margin-top: 32px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px;
}
.comment-respond .comment-reply-title { font-size: 18px; letter-spacing: -0.02em; margin-bottom: 16px; }
.comment-form label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 16px;
  transition: border-color 0.16s ease;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }

/* ==========================================================================
   Search / archive header
   ========================================================================== */
.archive-header { border-bottom: 1px solid var(--hairline); }
.archive-header__inner { padding-block: 48px; }
.archive-header h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.03em; margin-top: 10px; }
.archive-header p { margin-top: 14px; color: var(--ink-muted); font-size: 15px; max-width: 620px; }
.archive-count { margin-top: 16px; font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* Empty state */
.empty {
  max-width: 520px;
  margin: 80px auto;
  text-align: center;
}
.empty h2 { font-size: 22px; letter-spacing: -0.02em; }
.empty p { margin-top: 12px; color: var(--ink-muted); }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination { margin-top: 48px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pagination .page-numbers {
  min-width: 40px; height: 40px;
  padding-inline: 12px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  font-size: 14px; color: var(--ink-muted);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.pagination a.page-numbers:hover { color: var(--ink); border-color: var(--hairline-strong); }
.pagination .page-numbers.current { color: #fff; background: var(--accent); border-color: transparent; }
.pagination .page-numbers.dots { border: 0; background: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
  margin-top: 40px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  padding-block: 56px;
}
.footer__brand-desc { margin-top: 14px; font-size: 13.5px; color: var(--ink-muted); line-height: 1.6; max-width: 280px; }
.footer__col h4 { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; margin-bottom: 14px; }
.footer__col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 13.5px; color: var(--ink-muted); transition: color 0.16s ease; }
.footer__col a:hover { color: var(--ink); }
.footer__bottom {
  border-top: 1px solid var(--hairline);
  padding-block: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ==========================================================================
   WP core alignment & utility classes
   ========================================================================== */
.alignleft { float: left; margin: 6px 24px 18px 0; }
.alignright { float: right; margin: 6px 0 18px 24px; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--ink-faint); margin-top: 8px; text-align: center; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute;
}
.sticky-badge { display: inline-block; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .featured { grid-template-columns: 1fr; }
  .featured__media { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav__links, .nav__search { display: none; }
  .nav__toggle { display: inline-flex; }
  .grid, .grid--2 { grid-template-columns: 1fr; }
  .container { padding-inline: 18px; }
  .article-featured-media { padding-inline: 18px; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; padding-block: 40px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .prose { font-size: 16px; }
  .article-byline .byline__sep { display: none; }
}

@media (max-width: 420px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}

/* Prevent any wide element (tables, embeds, pre blocks) from causing horizontal scroll on phones */
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose pre { max-width: 100%; }
.prose iframe, .prose embed, .prose object { max-width: 100%; }
img, video, iframe { max-width: 100%; }

/* Lock body scroll while the mobile drawer is open (class toggled by main.js) */
body.drawer-open { overflow: hidden; height: 100%; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
