/* ==========================================================================
   Self-hosted fonts — latin-subset variable woff2 in /fonts, no third-party
   requests (re-established 2026-08-07 after the redesign briefly reintroduced
   Google Fonts). unicode-range is Google's latin subset: includes general
   punctuation (em-dash U+2014).
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/plus-jakarta-sans-var.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/plus-jakarta-sans-italic-var.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-var.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Design System & Theme Tokens
   ========================================================================== */

:root[data-theme="dark"] {
  --bg-main: #14110f;
  --bg-alt: #1a1714;
  --bg-card: rgba(32, 28, 24, 0.65);
  --bg-card-hover: rgba(45, 39, 34, 0.85);
  --border-color: rgba(220, 180, 140, 0.12);
  --border-highlight: rgba(224, 130, 75, 0.35);

  --text-primary: #f5eedc;
  --text-secondary: #c5baa8;
  --text-muted: #8d8374;

  --accent-copper: #e0824b;
  --accent-copper-glow: rgba(224, 130, 75, 0.25);
  --accent-amber: #d99a36;
  --accent-green: #4ade80;
  --accent-blue: #60a5fa;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --glass-backdrop: blur(16px);
}

:root[data-theme="light"] {
  --bg-main: #faf6ef;
  --bg-alt: #f1ebd9;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(140, 100, 60, 0.15);
  --border-highlight: rgba(190, 90, 40, 0.4);

  --text-primary: #211a14;
  --text-secondary: #594d41;
  --text-muted: #8c7d6e;

  --accent-copper: #c86326;
  --accent-copper-glow: rgba(200, 99, 38, 0.2);
  --accent-amber: #b87a1d;
  --accent-green: #16a34a;
  --accent-blue: #2563eb;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 4px 16px rgba(60, 40, 20, 0.06);
  --shadow-lg: 0 12px 32px rgba(60, 40, 20, 0.12);
  --glass-backdrop: blur(16px);
}

/* ==========================================================================
   Global Reset & Base Layout
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Background Ambient Lighting & Atmospheric Sunrise FX (Craig's og-ranch.jpg)
   ========================================================================== */

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 700px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* Centered vertically & horizontally */
  opacity: 0.92; /* High visibility */
  filter: contrast(1.1) saturate(1.15) brightness(0.98);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 65%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 65%, rgba(0, 0, 0, 0) 100%);
  transition: opacity 0.4s ease;
}

:root[data-theme="light"] .hero-bg-image img {
  opacity: 0.85;
  filter: contrast(1.05) saturate(1.1) brightness(1.02);
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to bottom, rgba(20, 17, 15, 0.15) 0%, rgba(20, 17, 15, 0.35) 60%, var(--bg-main) 100%),
    radial-gradient(ellipse at 50% 40%, transparent 55%, var(--bg-main) 98%);
}

:root[data-theme="light"] .hero-bg-overlay {
  background: 
    linear-gradient(to bottom, rgba(250, 246, 239, 0.15) 0%, rgba(250, 246, 239, 0.35) 60%, var(--bg-main) 100%),
    radial-gradient(ellipse at 50% 40%, transparent 55%, var(--bg-main) 98%);
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-copper-glow);
  top: -150px;
  right: -100px;
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: rgba(217, 154, 54, 0.12);
  bottom: 10%;
  left: -200px;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

a {
  color: var(--accent-copper);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-amber);
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-copper) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--accent-copper);
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.618rem;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

/* ==========================================================================
   Components & Glassmorphism
   ========================================================================== */

.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.pulse-dot.green {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.pulse-dot.amber {
  background-color: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.7;
  animation: pulse 2s infinite ease-out;
}

@keyframes pulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-primary {
  background: var(--accent-copper);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--accent-copper-glow);
}

.btn-primary:hover {
  background: var(--accent-amber);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-rss {
  background: rgba(217, 154, 54, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(217, 154, 54, 0.3);
  white-space: nowrap;
}

.btn-rss:hover {
  background: var(--accent-amber);
  color: #ffffff;
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  border-color: var(--border-highlight);
  transform: scale(1.05);
}

/* Theme Icons */
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(20, 17, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

:root[data-theme="light"] .navbar {
  background: rgba(250, 246, 239, 0.8);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-mark {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  background: var(--accent-copper);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent-copper);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 80px 0 50px 0;
  position: relative;
  z-index: 1;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

/* Type scale: golden-ratio half-steps from the 16px body —
   1rem · 1.272 · 1.618 · 2.058 · 2.618 · 3.33 */

.hero-title {
  font-size: 3.33rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 850px;
}

.hero-subtitle {
  font-size: 1.272rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 32px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Telemetry Section
   ========================================================================== */

.section-telemetry {
  padding: 20px 0 60px 0;
}

.telemetry-card {
  padding: 24px;
}

.telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.telemetry-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background-color: #ff5f56; }
.terminal-dot.yellow { background-color: #ffbd2e; }
.terminal-dot.green { background-color: #27c93f; }

.telemetry-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-left: 8px;
}

.telemetry-updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-copper);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.item-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
}

.highlight-copper {
  color: var(--accent-copper);
}

/* ==========================================================================
   Sections Layout
   ========================================================================== */

.section {
  padding: 96px 0;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: var(--bg-alt);
}

/* Golden section: text is the major division, imagery the minor */
.grid-2col {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  gap: 60px;
  align-items: center;
}

.lead-paragraph {
  font-size: 1.272rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.6;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.radio-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(224, 130, 75, 0.1);
  border-left: 3px solid var(--accent-copper);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  margin-top: 24px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* ==========================================================================
   About Visual (Craig & Porsche Photo Soft Blending)
   ========================================================================== */

.about-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.image-frame {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  position: relative;
  max-width: 440px;
  width: 100%;
}

.photo-placeholder {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: none;
  border: none;
  background: transparent;
}

.photo-placeholder img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  opacity: 0.88;
  filter: contrast(1.0) saturate(0.96) brightness(0.96);
  transition: opacity 0.4s ease, filter 0.4s ease, transform 0.4s ease;
  border-radius: 24px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0.85) 80%, rgba(0, 0, 0, 0.25) 100%);
  mask-image: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0.85) 80%, rgba(0, 0, 0, 0.25) 100%);
}

:root[data-theme="light"] .photo-placeholder img {
  opacity: 0.92;
  filter: contrast(1.0) saturate(0.98) brightness(1.0);
}

.photo-placeholder:hover img {
  opacity: 1;
  filter: contrast(1.02) saturate(1.0) brightness(0.99);
  transform: scale(1.01);
}

.photo-caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  padding: 14px 0 4px;
}

/* ==========================================================================
   Notes Listing Page Styles
   ========================================================================== */

.nav-links a.active {
  color: var(--accent-copper);
  font-weight: 600;
}

.notes-post-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 840px;
  margin: 0 auto;
}

.note-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.note-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-copper);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.note-title {
  font-size: 1.618rem;
  line-height: 1.3;
}

.note-title a {
  color: var(--text-primary);
}

.note-title a:hover {
  color: var(--accent-copper);
}

.note-excerpt {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.65;
}

.note-link-row {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   Projects Cards
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 48px;
}

.project-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-copper-glow);
  color: var(--accent-copper);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(224, 130, 75, 0.2);
}

.project-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.pill-alpha {
  color: var(--accent-amber);
  border-color: rgba(217, 154, 54, 0.3);
}

.pill-green {
  color: var(--accent-green);
  border-color: rgba(74, 222, 128, 0.3);
}

.project-title {
  font-size: 1.618rem;
  margin-bottom: 12px;
}

.project-title a {
  color: var(--text-primary);
}

.project-title a:hover {
  color: var(--accent-copper);
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

.project-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.card-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ==========================================================================
   Writing Banner & Elsewhere
   ========================================================================== */

.writing-banner {
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;

}

.writing-info p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 8px;
  max-width: 540px;
}

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

.writing-actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.writing-actions .btn {
  white-space: nowrap;
}

.latest-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.links-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.link-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text-primary);
}

.link-info {
  display: flex;
  flex-direction: column;
}

.link-name {
  font-weight: 600;
  font-size: 1.05rem;
}

.link-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.arrow-icon {
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-card:hover .arrow-icon {
  transform: translateX(4px);
  color: var(--accent-copper);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border-color);
  padding: 32px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.status-now {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Generated pages (notes/404) have no status line — center the identity */
.footer-right:only-child {
  margin-inline: auto;
}

.rss-link {
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Notes Index / Post Pages (non-home pages, built by tools/templates.py)
   ========================================================================== */

.page-header {
  padding: 0 0 8px;
  margin-bottom: 40px;
}

.backlink {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: inline-block;
  margin-bottom: 24px;
}

.backlink:hover {
  color: var(--accent-copper);
}

.article-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 48px;
}

.article-meta {
  margin-bottom: 12px;
}

.article-title {
  font-size: 2.058rem;
  margin-bottom: 28px;
}

.article-body p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.article-body h2 {
  font-size: 1.618rem;
  margin: 36px 0 16px;
}

.article-body h3 {
  font-size: 1.272rem;
  margin: 28px 0 14px;
}

.article-body ul,
.article-body ol {
  color: var(--text-secondary);
  margin: 0 0 20px;
  padding-left: 1.3em;
  line-height: 1.7;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body blockquote {
  border-left: 3px solid var(--accent-copper);
  background: rgba(224, 130, 75, 0.08);
  padding: 4px 20px;
  border-radius: 0 12px 12px 0;
  margin: 0 0 20px;
  color: var(--text-primary);
}

.article-body strong {
  color: var(--text-primary);
}

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

.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.article-body figcaption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  padding-top: 12px;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  .hero-title {
    font-size: 2.618rem;
  }

  .section-title {
    font-size: 2.058rem;
  }

  .grid-2col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .writing-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.058rem;
  }

  .badge-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-card {
    padding: 28px 24px;
  }

  .article-title {
    font-size: 1.6rem;
  }
}
