/* ============================================================
   IT ARCHITECTURE TIMES — Enhanced Newspaper Style v3
   Mobile-first · Readable · Tech-site Quality
   ============================================================ */

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --ink:        #0d0d0d;
  --ink-soft:   #2c2c2c;
  --ink-muted:  #555;
  --rule:       #1a1a1a;
  --rule-light: #c8c0b0;
  --cream:      #faf8f3;
  --cream-dark: #f0ece3;
  --accent:     #8b1a1a;
  --accent-alt: #1a3a6b;
  --tag-bg:     #0d0d0d;
  --tag-text:   #faf8f3;
  --warn:       #7a3f00;
  --warn-bg:    #fff8f0;
  --code-bg:    #1e1e1e;
  --code-text:  #d4d4d4;
  --nav-bg:     rgba(250, 248, 243, 0.97);
  --nav-border: rgba(200, 192, 176, 0.7);
  --progress:   #8b1a1a;
  --shadow:     0 2px 20px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.14);

  --ff-head:  'Playfair Display', 'Noto Sans KR', sans-serif;
  --ff-body:  'Noto Sans KR', 'Inter', system-ui, sans-serif;
  --ff-ui:    'Inter', 'Noto Sans KR', system-ui, sans-serif;
  --ff-mono:  'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --gutter: 24px;
  --max-w:  1280px;
  --nav-h:  56px;
  --radius: 2px;

  --transition: 0.25s ease;
}

/* Dark Mode */
html.dark {
  --ink:        #e0dbd0;
  --ink-soft:   #b8b0a2;
  --ink-muted:  #7a7068;
  --rule-light: #2e2b25;
  --cream:      #0f0e0c;
  --cream-dark: #18170f;
  --accent:     #c0443a;
  --accent-alt: #4a78ba;
  --tag-bg:     #e0dbd0;
  --tag-text:   #0f0e0c;
  --warn-bg:    #1f1505;
  --nav-bg:     rgba(15, 14, 12, 0.97);
  --nav-border: rgba(46, 43, 37, 0.9);
  --shadow:     0 2px 20px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.5);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.8;
  transition: background var(--transition), color var(--transition);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── Reading Progress ───────────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 999;
  transition: width 0.1s linear;
}

/* ── Site Navigation ────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), background var(--transition), border-color var(--transition);
}
.site-nav.visible { transform: translateY(0); }
.site-nav.nav--hidden { transform: translateY(-100%); }

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-brand {
  font-family: var(--ff-head);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-links li a {
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 7px 10px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.nav-links li a:hover,
.nav-links li a.active {
  color: var(--ink);
  background: var(--cream-dark);
}

/* Nav dark toggle */
.dark-toggle {
  background: none;
  border: 1px solid var(--rule-light);
  color: var(--ink-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.dark-toggle:hover { border-color: var(--ink); color: var(--ink); }
.dark-toggle svg { width: 15px; height: 15px; }

/* Nav hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Back To Top ────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background var(--transition);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover { background: var(--accent); }

/* ── Scroll Animations ──────────────────────────────────────── */
.anim-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-ready.in-view {
  opacity: 1;
  transform: translateY(0);
}
.col-article.anim-ready { transition-delay: calc(var(--col-index, 0) * 0.1s); }
.tech-card.anim-ready   { transition-delay: calc(var(--card-index, 0) * 0.08s); }

/* ── Top Bar ────────────────────────────────────────────────── */
.topbar {
  background: var(--ink);
  color: #b8b0a0;
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  border-bottom: 1px solid #333;
  transition: background var(--transition);
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 7px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.topbar-center { color: #d4c9b8; font-weight: 500; letter-spacing: 0.1em; }

/* ── Masthead ───────────────────────────────────────────────── */
.masthead {
  background: var(--cream);
  padding: 48px var(--gutter) 24px;
  text-align: center;
  border-bottom: 4px double var(--ink);
  transition: background var(--transition), border-color var(--transition);
}
.masthead-inner { max-width: var(--max-w); margin: 0 auto; }
.masthead-kicker {
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 18px;
}
.masthead-title {
  font-family: var(--ff-head);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.masthead-times { color: var(--accent); font-style: italic; }
.masthead-tagline {
  margin-top: 16px;
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ── Breaking Banner ────────────────────────────────────────── */
.breaking-banner {
  display: flex;
  align-items: stretch;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  overflow: hidden;
  transition: background var(--transition);
}
.breaking-label {
  background: var(--accent);
  color: #fff;
  padding: 9px 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-size: 0.72rem;
}
.breaking-scroll {
  flex: 1;
  overflow: hidden;
  padding: 9px 20px;
  display: flex;
  align-items: center;
}
.breaking-scroll span {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 35s linear infinite;
  letter-spacing: 0.04em;
  color: #d4c9b8;
}
@keyframes ticker {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* ── Layout ─────────────────────────────────────────────────── */
.main-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Main Hero: 3 Personal Experience Cards ─────────────────── */
.main-hero { padding: 40px 0 44px; }

.main-hero-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.main-hero-header-line { flex: 1; height: 2px; background: var(--ink); }
.main-hero-header-label {
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.main-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--rule-light);
  gap: 1px;
  border: 1px solid var(--rule-light);
}

.exp-card {
  background: var(--cream);
  padding: 28px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: background 0.2s;
}
.exp-card:hover { background: var(--cream-dark); }

.exp-card-cat {
  font-family: var(--ff-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.exp-card-cat::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.exp-card--nas .exp-card-cat   { color: var(--accent-alt); }
.exp-card--multi .exp-card-cat { color: var(--ink); }
.exp-card--ai .exp-card-cat    { color: var(--accent); }

.exp-card-title {
  font-family: var(--ff-head);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.32;
  color: var(--ink);
  margin-bottom: 10px;
}
.exp-card-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

/* Visual box */
.exp-visual {
  background: var(--cream-dark);
  border: 1px solid var(--rule-light);
  padding: 14px 14px 12px;
  margin-bottom: 18px;
  flex: 1;
  transition: background var(--transition);
}
.exp-visual-label {
  font-family: var(--ff-ui);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.exp-visual-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule-light);
}

/* Flow diagram — NAS */
.flow-diagram { display: flex; flex-direction: column; gap: 5px; }
.flow-row     { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow-node {
  font-family: var(--ff-ui);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 9px;
  background: var(--cream);
  border: 1px solid var(--rule-light);
  color: var(--ink);
  white-space: nowrap;
}
.flow-node--accent { background: var(--accent-alt); color: #fff; border-color: var(--accent-alt); }
.flow-arrow  { font-size: 0.75rem; color: var(--rule-light); flex-shrink: 0; }
.flow-branch {
  margin-left: 18px;
  padding-left: 12px;
  border-left: 1px dashed var(--rule-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}
.flow-branch-item {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.5;
}
.flow-branch-item::before { content: '└'; color: var(--rule-light); }

/* Process stack — Multitask */
.process-stack { display: flex; flex-direction: column; gap: 6px; }
.process-item  { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--cream); border: 1px solid var(--rule-light); border-left: 3px solid var(--ink); }
.process-name  { font-family: var(--ff-ui); font-size: 0.73rem; font-weight: 600; color: var(--ink); flex: 1; }
.process-bar-wrap { width: 52px; height: 4px; background: var(--rule-light); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.process-bar   { height: 100%; background: var(--ink); border-radius: 2px; transition: background var(--transition); }
.process-status { font-family: var(--ff-ui); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.05em; color: #1a6b2b; white-space: nowrap; }
html.dark .process-status { color: #4caf50; }

/* Pipeline — AI */
.pipeline-diagram { display: flex; flex-direction: column; gap: 4px; }
.pipeline-step    { display: flex; align-items: stretch; gap: 8px; }
.pipeline-num     { font-family: var(--ff-head); font-size: 1rem; font-weight: 900; color: var(--rule-light); min-width: 22px; display: flex; align-items: center; line-height: 1; }
.pipeline-content { flex: 1; padding: 6px 10px; background: var(--cream); border: 1px solid var(--rule-light); }
.pipeline-step--accent .pipeline-content { background: var(--accent); border-color: var(--accent); }
.pipeline-step--accent .pipeline-num { color: rgba(255,255,255,0.3); }
.pipeline-step-name { font-family: var(--ff-ui); font-size: 0.73rem; font-weight: 600; color: var(--ink); }
.pipeline-step--accent .pipeline-step-name { color: #fff; }
.pipeline-step-sub  { font-family: var(--ff-ui); font-size: 0.62rem; color: var(--ink-muted); margin-top: 1px; }
.pipeline-step--accent .pipeline-step-sub { color: rgba(255,255,255,0.65); }
.pipeline-badge { font-family: var(--ff-ui); font-size: 0.6rem; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); padding: 2px 7px; white-space: nowrap; align-self: center; flex-shrink: 0; }

.exp-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; margin-top: auto; padding-top: 4px; }
.exp-card-tags span { font-family: var(--ff-ui); font-size: 0.6rem; font-weight: 600; color: var(--ink-muted); border: 1px solid var(--rule-light); padding: 2px 7px; }
.exp-card-link {
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  display: inline-flex;
  align-items: center;
  padding: 8px 0 4px;
  min-height: 44px;
}
.exp-card-link:hover { border-color: var(--accent); }

@media (max-width: 900px) {
  .main-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main-hero { padding: 24px 0 28px; }
  .exp-card  { padding: 22px 16px 18px; }
}

.section-rule {
  border: none;
  border-top: 1px solid var(--rule-light);
  margin: 28px 0;
  transition: border-color var(--transition);
}
.section-rule--thick {
  border-top: 3px solid var(--ink);
  margin: 40px 0;
}
.ornament {
  text-align: center;
  color: var(--rule-light);
  font-size: 1.2rem;
  margin: 8px 0;
  letter-spacing: 0.5em;
  user-select: none;
}

/* ── Section Header ─────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.section-header-line { flex: 1; height: 2px; background: var(--ink); }
.section-header-title {
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

/* ── Article Tags ───────────────────────────────────────────── */
.article-tag {
  display: inline-block;
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 4px 10px;
  margin-bottom: 10px;
  transition: background var(--transition), color var(--transition);
}
.article-tag--accent { background: var(--accent); color: #fff; }
.article-tag--dark   { background: var(--accent-alt); color: #fff; }

/* ── Byline ─────────────────────────────────────────────────── */
.hero-byline, .byline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.byline-author { font-weight: 600; color: var(--ink); }
.byline-sep    { color: var(--rule-light); }

/* ── Read More ──────────────────────────────────────────────── */
.read-more {
  display: inline-flex;
  align-items: center;
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 14px;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color var(--transition);
  min-height: 44px;
}
.read-more:hover { border-color: var(--accent); }

/* ── Pull Quote ─────────────────────────────────────────────── */
.pull-quote {
  position: relative;
  font-family: var(--ff-head);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--accent);
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  padding: 18px 40px;
  margin: 24px 0;
}
.pull-quote::before {
  content: '\201C';
  position: absolute;
  top: -2px;
  left: 8px;
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.3;
  font-style: normal;
}
.pull-quote--small { font-size: 0.95rem; }

/* ── Hero Section ───────────────────────────────────────────── */
.hero-section { padding: 36px 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
}
.hero-feature {
  padding-right: 44px;
  border-right: 1px solid var(--rule-light);
}
.hero-headline {
  font-family: var(--ff-head);
  font-size: clamp(1.9rem, 3.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 18px;
}
.hero-deck {
  font-family: var(--ff-body);
  font-size: 1.08rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 16px;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

/* Drop cap on first article paragraph */
.hero-body > p:first-child::first-letter,
.article-body > p.article-lead::first-letter {
  float: left;
  font-family: var(--ff-head);
  font-size: 4.2rem;
  line-height: 0.82;
  margin: 4px 8px 0 0;
  color: var(--ink);
  font-weight: 900;
}

.hero-body p {
  margin-bottom: 16px;
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.8;
}
.hero-body p:first-child { font-size: 1.06rem; color: var(--ink); }

/* Hero Sidebar */
.hero-sidebar { padding-left: 32px; }
.side-article { margin-bottom: 22px; }
.side-article--top { padding-bottom: 20px; }
.side-headline {
  font-family: var(--ff-head);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}
.side-body {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 8px;
}

/* Stats Box */
.stats-box {
  background: var(--ink);
  color: var(--cream);
  padding: 22px;
  margin-top: 10px;
  transition: background var(--transition);
}
.stats-title {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 18px;
}
html.dark .stats-title { color: rgba(0,0,0,0.45); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat-item { text-align: center; }
.stat-number {
  display: block;
  font-family: var(--ff-head);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 5px;
}
.stat-label {
  display: block;
  font-family: var(--ff-ui);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
}
html.dark .stat-label { color: rgba(0,0,0,0.5); }

/* ── Three Column ───────────────────────────────────────────── */
.three-col-section {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin-bottom: 8px;
}

/* Two-column variant */
.two-col-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 8px;
}

.col-article {
  padding: 0 28px;
  border-right: 1px solid var(--rule-light);
}
.col-article:first-child { padding-left: 0; }
.col-article:last-child,
.col-article--last  { padding-right: 0; border-right: none; }
.col-divider { border-top: 1px solid var(--rule-light); margin: 14px 0 18px; }
.col-headline {
  font-family: var(--ff-head);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.28;
  margin-bottom: 14px;
}
.col-article p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 12px;
  line-height: 1.8;
}

/* Inline Box */
.inline-box {
  background: var(--cream-dark);
  border-left: 3px solid var(--accent-alt);
  padding: 14px 16px;
  margin: 16px 0;
  transition: background var(--transition);
}
.inline-box-title {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-alt);
  margin-bottom: 10px;
}
.inline-box-list { display: flex; flex-direction: column; gap: 6px; }
.inline-box-list li { font-family: var(--ff-ui); font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5; }

/* ── Feature Wide Section ───────────────────────────────────── */
.feature-wide-section { padding: 4px 0 8px; }
.feature-wide-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
}
.feature-wide-main {
  padding-right: 44px;
  border-right: 1px solid var(--rule-light);
}
.feature-wide-headline {
  font-family: var(--ff-head);
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.feature-wide-body { margin-top: 18px; }
.feature-wide-body p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
  line-height: 1.75;
}
.feature-wide-body .lead-paragraph { font-size: 1.06rem; color: var(--ink); }
.feature-wide-body h4 {
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule-light);
}
.feature-wide-aside { padding-left: 32px; }

/* Workflow Box */
.workflow-box {
  background: var(--cream-dark);
  border: 1px solid var(--rule-light);
  padding: 22px;
  margin-bottom: 20px;
  transition: background var(--transition), border-color var(--transition);
}
.workflow-title {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.workflow-steps { display: flex; flex-direction: column; gap: 14px; }
.workflow-step  { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  font-family: var(--ff-head);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--rule-light);
  line-height: 1;
  min-width: 30px;
}
.step-content strong {
  display: block;
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
.step-content p {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
}

/* Warning Box */
.warning-box {
  background: var(--warn-bg);
  border: 1px solid #d4a054;
  border-left: 4px solid var(--warn);
  padding: 16px 18px;
  transition: background var(--transition);
}
.warning-title { font-family: var(--ff-ui); font-size: 0.75rem; font-weight: 700; color: var(--warn); letter-spacing: 0.06em; margin-bottom: 10px; }
.warning-list  { display: flex; flex-direction: column; gap: 7px; }
.warning-list li { font-size: 0.8rem; color: var(--warn); line-height: 1.45; }

/* ── Tech Section ───────────────────────────────────────────── */
.tech-section { padding: 4px 0; }
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.tech-card {
  padding: 0 24px 28px;
  border-right: 1px solid var(--rule-light);
  transition: background 0.2s;
}
.tech-card:first-child { padding-left: 0; }
.tech-card:last-child  { border-right: none; padding-right: 0; }
.tech-card:hover       { background: var(--cream-dark); }
.tech-card-icon  { font-size: 2rem; margin-bottom: 12px; display: block; }
.tech-card-headline {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  transition: color var(--transition);
}
.tech-card:hover .tech-card-headline { color: var(--accent); }
.tech-card p { font-size: 0.85rem; color: var(--ink-muted); line-height: 1.65; margin-bottom: 14px; }
.tech-tags   { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0 10px; }
.tech-tag {
  font-family: var(--ff-ui);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--accent-alt);
  border: 1px solid var(--accent-alt);
  padding: 3px 8px;
}

/* ── Bottom Section ─────────────────────────────────────────── */
.bottom-section { padding: 4px 0 48px; }
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.bottom-article {
  padding: 0 36px;
  border-right: 1px solid var(--rule-light);
}
.bottom-article:first-child { padding-left: 0; }
.bottom-article:last-child  { border-right: none; padding-right: 0; }
.section-mini-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.section-mini-line   { flex: 1; height: 1px; background: var(--ink); }
.section-mini-title  { font-family: var(--ff-ui); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; }
.bottom-headline {
  font-family: var(--ff-head);
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
}
.bottom-article p { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 12px; line-height: 1.7; }

/* ── Code Blocks ────────────────────────────────────────────── */
.code-block {
  background: var(--code-bg);
  border-radius: 4px;
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid #2d2d2d;
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #161616;
  border-bottom: 1px solid #2d2d2d;
}
.code-lang {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: #666;
  text-transform: uppercase;
}
.code-copy {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #888;
  background: none;
  border: 1px solid #333;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 2px;
  transition: color 0.2s, border-color 0.2s;
  min-height: 32px;
}
.code-copy:hover { color: #aaa; border-color: #555; }
.code-block pre {
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--ff-mono);
  font-size: 0.83rem;
  line-height: 1.7;
  color: var(--code-text);
  margin: 0;
  -webkit-overflow-scrolling: touch;
}
.code-block code { font-family: inherit; }

/* Inline code */
code:not(.code-block code) {
  font-family: var(--ff-mono);
  font-size: 0.83em;
  background: var(--cream-dark);
  color: var(--accent);
  padding: 2px 5px;
  border-radius: 2px;
}
html.dark code:not(.code-block code) {
  background: #1e1e1e;
  color: #c97050;
}

/* ── Benchmark Table ────────────────────────────────────────── */
.bench-table-wrap { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; }
.bench-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ff-ui);
  font-size: 0.85rem;
}
.bench-table th {
  background: var(--ink);
  color: var(--cream);
  text-align: left;
  padding: 11px 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.bench-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule-light);
  color: var(--ink-soft);
}
.bench-table tr:hover td { background: var(--cream-dark); }
.bench-table tr.highlight td {
  background: rgba(139, 26, 26, 0.07);
  font-weight: 600;
  color: var(--ink);
}
.bench-table .num { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.bench-table .good { color: #1a6b2b; }
.bench-table .best { color: var(--accent); font-weight: 700; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  transition: background var(--transition);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 44px var(--gutter) 28px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 28px;
}
.footer-title {
  font-family: var(--ff-head);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.footer-tagline {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  color: rgba(255,255,255,0.4);
  margin-top: 6px;
}
html.dark .footer-tagline { color: rgba(0,0,0,0.4); }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: flex-end;
  max-width: 500px;
}
.footer-nav a {
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  transition: color 0.2s;
  padding: 4px 0;
  min-height: 36px;
  display: flex;
  align-items: center;
}
html.dark .footer-nav a { color: rgba(0,0,0,0.55); }
.footer-nav a:hover { color: var(--cream); }
html.dark .footer-nav a:hover { color: var(--ink); }
.footer-rule { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin-bottom: 22px; }
html.dark .footer-rule { border-color: rgba(0,0,0,0.08); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--ff-ui);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
}
html.dark .footer-bottom { color: rgba(0,0,0,0.3); }

/* ── Hover on article headlines ─────────────────────────────── */
article:hover .hero-headline,
article:hover .side-headline,
article:hover .col-headline,
article:hover .tech-card-headline,
article:hover .bottom-headline { color: var(--accent); }

/* ── Responsive: Tablet ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .tech-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .tech-card:nth-child(2) { border-right: none; padding-right: 0; }
  .tech-card:nth-child(3) { padding-left: 0; }
  .tech-card:nth-child(3),
  .tech-card:nth-child(4) { border-top: 1px solid var(--rule-light); padding-top: 24px; }
}

@media (max-width: 900px) {
  .hero-grid,
  .feature-wide-grid { grid-template-columns: 1fr; }
  .hero-feature { padding-right: 0; border-right: none; border-bottom: 1px solid var(--rule-light); padding-bottom: 32px; margin-bottom: 32px; }
  .hero-sidebar { padding-left: 0; }
  .feature-wide-main { padding-right: 0; border-right: none; border-bottom: 1px solid var(--rule-light); padding-bottom: 32px; margin-bottom: 32px; }
  .feature-wide-aside { padding-left: 0; }
  .three-col-section { grid-template-columns: 1fr; gap: 0; }
  .two-col-section { grid-template-columns: 1fr; gap: 0; }
  .col-article { padding: 0; border-right: none; border-bottom: 1px solid var(--rule-light); padding-bottom: 28px; margin-bottom: 28px; }
  .col-article:last-child,
  .col-article--last { border-bottom: none; margin-bottom: 0; }
  .bottom-grid { grid-template-columns: 1fr; gap: 32px; }
  .bottom-article { padding: 0; border-right: none; }
  .bottom-article:first-child { border-bottom: 1px solid var(--rule-light); padding-bottom: 32px; }
}

/* ── Responsive: Mobile Nav (hamburger) ─────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--nav-bg);
    border-bottom: 2px solid var(--nav-border);
    padding: 12px var(--gutter) 16px;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    font-size: 0.85rem;
    padding: 10px 12px;
    min-height: 44px;
    border-radius: 4px;
  }
  .nav-toggle { display: flex; margin-left: auto; }
  .site-nav { position: fixed; }
}

/* ── Responsive: Mobile ─────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --gutter: 16px; }

  /* Hide topbar — nav takes over as primary header */
  .topbar { display: none; }

  /* Nav always visible on mobile */
  .site-nav {
    transform: translateY(0) !important;
  }
  .site-nav.nav--hidden {
    transform: translateY(-100%) !important;
  }

  /* Masthead: shift down to clear the always-visible nav */
  .masthead {
    padding: calc(var(--nav-h) + 20px) var(--gutter) 20px;
    border-bottom-width: 3px;
  }
  .masthead-title {
    font-size: clamp(2.4rem, 10vw, 3.6rem);
  }
  .masthead-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    margin-bottom: 14px;
  }
  .masthead-tagline {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  /* Hide breaking banner on mobile — ticker animation is janky */
  .breaking-banner { display: none; }

  /* Hero section */
  .hero-section { padding: 24px 0; }
  .hero-headline {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
    margin-bottom: 14px;
  }
  .hero-deck {
    font-size: 1rem;
  }

  /* Disable drop cap on mobile (looks bad on narrow screens) */
  .hero-body > p:first-child::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    font-weight: inherit;
    color: inherit;
  }

  /* Section rules */
  .section-rule--thick { margin: 28px 0; }
  .section-header { margin-bottom: 20px; }

  /* Stats box */
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Tech cards */
  .tech-grid { grid-template-columns: 1fr; }
  .tech-card {
    border-right: none;
    border-bottom: 1px solid var(--rule-light);
    padding: 20px 0;
  }
  .tech-card:nth-child(n) {
    border-right: none;
    border-top: none;
    padding-left: 0;
    padding-right: 0;
  }
  .tech-card:last-child { border-bottom: none; }

  /* Pull quote */
  .pull-quote {
    padding: 14px 20px;
    font-size: 0.95rem;
  }
  .pull-quote::before { font-size: 2.4rem; }

  /* Bottom section */
  .bottom-section { padding: 4px 0 32px; }

  /* Footer */
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-nav {
    justify-content: flex-start;
    max-width: 100%;
  }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .footer-title { font-size: 1.5rem; }

  /* Back to top */
  .back-to-top { bottom: 20px; right: 16px; }

  /* Read more touch target */
  .read-more { min-height: 44px; }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .breaking-banner, .topbar, .site-nav, .reading-progress, .back-to-top { display: none; }
  body { background: #fff; color: #000; }
}
