/* ============================================================
   iOS AI Articles — Main Stylesheet v2
   Concept: Noir Editorial
   Display: Fraunces (optical serif)
   Body:    DM Sans
   Code:    JetBrains Mono
   Accent:  Amber #f0b840 (dark) · #a87c00 (light)
   ============================================================ */

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Dark-mode tokens (default) ────────────────────────── */
:root {
  --bg:            #08090d;
  --bg-elevated:   #0c0e16;
  --bg-card:       #0e1019;
  --bg-card-hover: #131621;

  --border:        rgba(255, 255, 255, 0.055);
  --border-mid:    rgba(255, 255, 255, 0.10);
  --border-hover:  rgba(240, 184, 64, 0.36);

  --text-1:        #f0ece5;
  --text-2:        #7c8099;
  --text-3:        #626880;

  --accent:        #f0b840;
  --accent-dim:    rgba(240, 184, 64, 0.55);
  --accent-soft:   rgba(240, 184, 64, 0.08);
  --accent-glow:   rgba(240, 184, 64, 0.16);
  --accent-2:      #38c2b8;
  --accent-2-soft: rgba(56, 194, 184, 0.09);

  --gradient:      linear-gradient(135deg, #f0b840 0%, #38c2b8 100%);
  --gradient-text: linear-gradient(120deg, #f8d870 0%, #38c2b8 100%);

  --shadow:        0 1px 0 var(--border), 0 8px 40px rgba(0,0,0,0.55);
  --shadow-hover:  0 1px 0 rgba(240,184,64,0.16), 0 20px 60px rgba(0,0,0,0.5),
                   0 0 0 1px rgba(240,184,64,0.10);

  --font:          'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:  'Fraunces', Georgia, 'Times New Roman', serif;
  --mono:          'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --radius:        10px;
  --radius-sm:     6px;
  --radius-pill:   100px;

  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --dur:           0.20s;

  --max-w:         1100px;
  --max-w-post:    720px;

  color-scheme: dark;
}

/* ─── Light-mode tokens ──────────────────────────────────── */
html[data-theme="light"] {
  --bg:            #f6f4ee;
  --bg-elevated:   #edeae0;
  --bg-card:       #f1ede6;
  --bg-card-hover: #e9e4d8;

  --border:        rgba(0, 0, 0, 0.07);
  --border-mid:    rgba(0, 0, 0, 0.12);
  --border-hover:  rgba(168, 124, 0, 0.30);

  --text-1:        #0c0c14;
  --text-2:        #5c5a6e;
  --text-3:        #9896a4;

  --accent:        #a87c00;
  --accent-dim:    rgba(168, 124, 0, 0.55);
  --accent-soft:   rgba(168, 124, 0, 0.07);
  --accent-glow:   rgba(168, 124, 0, 0.12);
  --accent-2:      #1a8f88;
  --accent-2-soft: rgba(26, 143, 136, 0.07);

  --gradient:      linear-gradient(135deg, #a87c00 0%, #1a8f88 100%);
  --gradient-text: linear-gradient(120deg, #8a6400 0%, #1a8f88 100%);

  --shadow:        0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.07);
  --shadow-hover:  0 1px 0 rgba(168,124,0,0.14), 0 12px 40px rgba(0,0,0,0.10);

  color-scheme: light;
}

/* ─── Focus ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.theme-toggle:focus-visible { outline-offset: 4px; border-radius: var(--radius-pill); }
.feed-action-btn:focus-visible { border-radius: 50%; }

/* ─── Base ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.30s ease, color 0.30s ease;
  padding-top: 60px;
}

/* ─── Layout ─────────────────────────────────────────────── */
.container       { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.main            { flex: 1; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar          { width: 5px; height: 5px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: var(--text-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ─── Navigation ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), -webkit-backdrop-filter 0.3s var(--ease), backdrop-filter 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav--scrolled {
  background: rgba(8, 9, 13, 0.90);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom-color: var(--border);
}

html[data-theme="light"] .nav--scrolled {
  background: rgba(246, 244, 238, 0.92);
  border-color: rgba(0,0,0,0.07);
}

html[data-theme="light"] .nav {
  background: transparent;
  border-color: transparent;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
  text-decoration: none;
  transition: opacity var(--dur);
}
.nav-brand:hover { opacity: 0.75; }

/* Brand name uses monospace for terminal/code identity */
.nav-brand span {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-1);
}

.nav-logo { flex-shrink: 0; }

/* Apple icon inherits nav-brand color; slightly dimmed */
.nav-logo { opacity: 0.85; }
.nav-brand:hover .nav-logo { opacity: 1; }

.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  transition: color var(--dur), background var(--dur);
}
.nav-link:hover { color: var(--text-1); background: rgba(255,255,255,0.06); }
html[data-theme="light"] .nav-link:hover { background: rgba(0,0,0,0.05); }

.nav-link-gh {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  margin-left: 6px;
}
.nav-link-gh:hover {
  border-color: var(--border-mid);
  background: rgba(255,255,255,0.06);
}
html[data-theme="light"] .nav-link-gh  { border-color: rgba(0,0,0,0.10); background: transparent; }
html[data-theme="light"] .nav-link-gh:hover { border-color: rgba(0,0,0,0.16); background: rgba(0,0,0,0.04); }

/* ─── Reading Progress Bar ───────────────────────────────── */
.reading-progress-bar {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 99;
  pointer-events: none;
  will-change: transform;
}

/* ─── Theme Toggle ───────────────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 10px;
  -webkit-tap-highlight-color: transparent;
}

.toggle-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 52px;
  height: 26px;
  border-radius: 100px;
  background: rgba(240, 184, 64, 0.10);
  border: 1px solid rgba(240, 184, 64, 0.22);
  padding: 0 6px;
  box-sizing: border-box;
  transition: background 0.3s, border-color 0.3s;
  cursor: pointer;
}
.toggle-track:hover {
  border-color: rgba(240, 184, 64, 0.42);
  background: rgba(240, 184, 64, 0.16);
}

.toggle-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 13px; height: 13px;
  flex-shrink: 0;
  transition: opacity 0.3s, color 0.3s;
  pointer-events: none;
}
.toggle-icon-sun  { color: var(--text-3); opacity: 0.45; }
.toggle-icon-moon { color: var(--accent); opacity: 1; }

[data-theme="light"] .toggle-icon-sun  { color: #f59e0b; opacity: 1; }
[data-theme="light"] .toggle-icon-moon { color: var(--text-3); opacity: 0.4; }

.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 2px 8px rgba(240, 184, 64, 0.42);
  transform: translateX(26px);
  transition: transform 0.35s var(--ease), box-shadow 0.3s;
}
[data-theme="light"] .toggle-thumb {
  transform: translateX(0);
  box-shadow: 0 2px 8px rgba(168, 124, 0, 0.36);
}
[data-theme="light"] .toggle-track {
  background: rgba(168, 124, 0, 0.08);
  border-color: rgba(168, 124, 0, 0.22);
}
[data-theme="light"] .toggle-track:hover {
  border-color: rgba(168, 124, 0, 0.40);
  background: rgba(168, 124, 0, 0.14);
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 96px 0 88px;
  position: relative;
  overflow: hidden;
}

/* Ambient glow — amber left, teal right */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 500px at 15% 50%, rgba(240,184,64,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 500px 400px at 85% 80%, rgba(56,194,184,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ─── Hero Background Image (Homepage only) ─────────────── */
.hero--home {
  background-image: none; /* Remove dot-grid texture */
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-img {
  width: 100%;
  height: 120%; /* Extra height for parallax travel room */
  object-fit: cover;
  object-position: center 30%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  display: block;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(8, 9, 13, 0.72) 0%,
      rgba(8, 9, 13, 0.58) 40%,
      rgba(8, 9, 13, 0.88) 100%
    );
  z-index: 1;
}

html[data-theme="light"] .hero-bg-overlay {
  background:
    linear-gradient(to bottom,
      rgba(246, 244, 238, 0.78) 0%,
      rgba(246, 244, 238, 0.60) 40%,
      rgba(246, 244, 238, 0.90) 100%
    );
}

/* Hide galaxy bg in light mode — overlay clash looks muddy */
html[data-theme="light"] .hero-bg {
  display: none;
}

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

.hero--home::before {
  z-index: 2; /* Keep ambient glow above image */
}

/* Live badge — monospace terminal prompt style */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(240, 184, 64, 0.18);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 36px;
}

.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(240, 184, 64, 0.65);
  animation: pulse-dot 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px rgba(240,184,64,0.65); }
  50%       { opacity: 0.4; transform: scale(0.72); box-shadow: 0 0 4px rgba(240,184,64,0.3); }
}

/* Large editorial serif headline */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.8vw, 84px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--text-1);
  margin-bottom: 26px;
}

/* Italic gradient span — Fraunces italic is beautiful */
.gradient-text {
  display: inline;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.80;
  margin-bottom: 44px;
  font-weight: 400;
}

/* Stats row */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 36px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 32px;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.025em;
  line-height: 1;
}

.stat-key {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 500;
}

.hero-stat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
  margin-right: 32px;
}

/* Editor attribution pill */
.hero-editor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.editor-label {
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 400;
}

.editor-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: background var(--dur), border-color var(--dur), transform var(--dur) var(--ease);
}
.editor-link:hover {
  background: var(--accent-soft);
  border-color: rgba(240, 184, 64, 0.26);
  transform: translateY(-1px);
}
html[data-theme="light"] .editor-link { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.09); }
html[data-theme="light"] .editor-link:hover { background: var(--accent-soft); border-color: rgba(168,124,0,0.22); }

.editor-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.editor-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
}
html[data-theme="light"] .editor-name { color: var(--text-1); }

.editor-li-icon { color: var(--text-3); flex-shrink: 0; transition: color var(--dur); }
.editor-link:hover .editor-li-icon { color: var(--accent); }
html[data-theme="light"] .editor-label { color: var(--text-3); }

/* RSS line */
.hero-rss {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(240, 184, 64, 0.20);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background var(--dur), border-color var(--dur), transform var(--dur) var(--ease);
}
.rss-link:hover {
  background: rgba(240, 184, 64, 0.14);
  border-color: rgba(240, 184, 64, 0.36);
  transform: translateY(-1px);
}
.rss-link svg { flex-shrink: 0; }

.hero-rss-note {
  font-size: 12px;
  color: var(--text-3);
}

html[data-theme="light"] .rss-link {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(168,124,0,0.20);
}
html[data-theme="light"] .rss-link:hover {
  background: rgba(168,124,0,0.13);
  border-color: rgba(168,124,0,0.34);
}

/* ─── Section header ────────────────��────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

/* Monospace label with amber dash */
.section-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  position: relative;
  padding-left: 16px;
}

.section-count {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
}

/* ─── Category tag ───────────────────────────────────────── */
.cat-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(240, 184, 64, 0.14);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  line-height: 1.6;
}
html[data-theme="light"] .cat-tag { color: var(--accent); background: var(--accent-soft); border-color: rgba(168,124,0,0.14); }

/* ─── Featured section ───────────────────────────────────── */
.featured-section { padding: 52px 0 56px; }

.featured-card {
  display: block;
  padding: 44px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur);
  position: relative;
  overflow: hidden;
}

/* Left amber accent — slides in on hover */
.featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--gradient);
  opacity: 0;
  transform: scaleY(0.5);
  transform-origin: top;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.featured-card:hover {
  border-color: rgba(240, 184, 64, 0.16);
  box-shadow: var(--shadow-hover);
  background: var(--bg-card-hover);
}
.featured-card:hover::before { opacity: 1; transform: scaleY(1); }

html[data-theme="light"] .featured-card { background: var(--bg-card); border-color: var(--border); }
html[data-theme="light"] .featured-card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }

.featured-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.post-date {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-dot { color: var(--text-3); font-size: 13px; }

/* Large editorial serif headline for featured */
.featured-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.8vw, 46px);
  font-weight: 700;
  letter-spacing: -0.020em;
  line-height: 1.18;
  color: var(--text-1);
  margin-bottom: 20px;
  max-width: 700px;
}
html[data-theme="light"] .featured-title { color: var(--text-1); }

.featured-excerpt {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.80;
  margin-bottom: 30px;
  max-width: 660px;
}
html[data-theme="light"] .featured-excerpt { color: var(--text-2); }

.read-more {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  gap: 6px;
  transition: gap var(--dur) var(--ease);
}
.featured-card:hover .read-more { gap: 14px; }

/* ─── Articles grid ──────────────────────────────────────── */
.articles-section { padding: 0 0 100px; }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 16px;
}

.article-card {
  display: flex;
  flex-direction: column;
  padding: 26px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur),
    transform 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}

/* Left accent — scales up from top on hover */
.article-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background: var(--gradient);
  opacity: 0;
  transform: scaleY(0.35);
  transform-origin: top;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.article-card:hover {
  border-color: rgba(240, 184, 64, 0.14);
  box-shadow: var(--shadow-hover);
  background: var(--bg-card-hover);
}
.article-card:hover::before { opacity: 1; transform: scaleY(1); }

html[data-theme="light"] .article-card { background: var(--bg-card); border-color: var(--border); }
html[data-theme="light"] .article-card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }

.card-meta { margin-bottom: 10px; }

/* Card titles — serif */
.card-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.010em;
  line-height: 1.38;
  color: var(--text-1);
  margin-bottom: 10px;
}
html[data-theme="light"] .card-title { color: var(--text-1); }

.card-excerpt {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.72;
  margin-bottom: 18px;
  flex: 1;
}
html[data-theme="light"] .card-excerpt { color: var(--text-2); }

.card-footer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* ─── Empty state ────────────────────────────────────────── */
.empty-section { padding: 120px 0; }
.empty-state { text-align: center; max-width: 380px; margin: 0 auto; }
.empty-icon { margin-bottom: 24px; display: flex; justify-content: center; }
.empty-state h2 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700;
  color: var(--text-1); margin-bottom: 12px; letter-spacing: -0.02em;
}
.empty-state p { font-size: 16px; color: var(--text-2); line-height: 1.72; }

/* ─── Post layout ────────────────────────────────────────── */
.post-article { padding: 60px 0 100px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-3);
  padding: 8px 0;
  margin-bottom: 52px;
  transition: color var(--dur);
}
.back-link:hover { color: var(--accent); }
.back-link svg { flex-shrink: 0; }

.post-header {
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
html[data-theme="light"] .post-header { border-color: rgba(0,0,0,0.08); }

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

/* Post page title — large editorial serif */
.post-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.8vw, 58px);
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.09;
  color: var(--text-1);
  max-width: var(--max-w-post);
}
html[data-theme="light"] .post-title { color: var(--text-1); }

/* ─── Post body typography ───────────────────────────────── */
.post-body {
  max-width: var(--max-w-post);
  font-size: 17px;
  line-height: 1.86;
  color: #bcc0d0;
}
html[data-theme="light"] .post-body { color: var(--text-2); }

.post-body h1, .post-body h2, .post-body h3,
.post-body h4, .post-body h5 {
  font-family: var(--font-display);
  color: var(--text-1);
  letter-spacing: -0.020em;
  margin-top: 2.8em;
  margin-bottom: 0.75em;
  line-height: 1.25;
  font-weight: 700;
}
html[data-theme="light"] .post-body h1,
html[data-theme="light"] .post-body h2,
html[data-theme="light"] .post-body h3,
html[data-theme="light"] .post-body h4 { color: var(--text-1); }

.post-body h2 { font-size: 27px; }
.post-body h3 { font-size: 22px; }
.post-body h4 { font-size: 18.5px; }
.post-body h5 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-3);
  font-style: normal;
}
html[data-theme="light"] .post-body h5 { color: var(--text-3); }

.post-body p { margin-bottom: 1.5em; }
.post-body ul, .post-body ol { margin-bottom: 1.5em; padding-left: 1.6em; }
.post-body li { margin-bottom: 0.5em; }

.post-body .task-list-item { list-style: none; margin-left: -1.6em; }
.post-body .task-list-item-checkbox { margin-right: 0.5em; vertical-align: middle; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(240, 184, 64, 0.28);
  text-underline-offset: 3px;
  transition: color var(--dur), text-decoration-color var(--dur);
}
.post-body a:hover { color: #f8d870; text-decoration-color: rgba(248,216,112,0.55); }
html[data-theme="light"] .post-body a { color: var(--accent); text-decoration-color: rgba(168,124,0,0.28); }
html[data-theme="light"] .post-body a:hover { color: #7a5800; text-decoration-color: rgba(122,88,0,0.5); }

.post-body strong { color: var(--text-1); font-weight: 600; }
html[data-theme="light"] .post-body strong { color: var(--text-1); }

.post-body em { font-style: italic; }

/* Inline code — amber tinted */
.post-body code {
  font-family: var(--mono);
  font-size: 0.855em;
  background: rgba(240, 184, 64, 0.08);
  border: 1px solid rgba(240, 184, 64, 0.16);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent);
  white-space: nowrap;
  overflow-wrap: break-word;
}
html[data-theme="light"] .post-body code {
  background: rgba(168,124,0,0.08);
  border-color: rgba(168,124,0,0.16);
  color: var(--accent);
}

/* Code block — terminal window chrome */
.post-body pre {
  background: #06070c;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  margin-bottom: 1.8em;
  font-size: 14px;
  line-height: 1.78;
  box-shadow: 0 4px 28px rgba(0,0,0,0.5);
  position: relative;
}

/* Terminal chrome header with traffic-light dots */
.post-body pre::before {
  content: '';
  display: block;
  height: 36px;
  flex-shrink: 0;
  background-color: #0d0f18;
  background-image:
    radial-gradient(circle at 16px 50%, #ef4444 0, #ef4444 5px, transparent 5px),
    radial-gradient(circle at 30px 50%, #f59e0b 0, #f59e0b 5px, transparent 5px),
    radial-gradient(circle at 44px 50%, #22c55e 0, #22c55e 5px, transparent 5px);
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(255,255,255,0.055);
}

/* Amber shimmer below terminal header */
.post-body pre::after {
  content: '';
  position: absolute;
  top: 36px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(240,184,64,0.18), rgba(56,194,184,0.12), transparent);
  pointer-events: none;
}

.post-body pre code {
  display: block;
  padding: 22px 28px;
  background: none;
  border: none;
  color: #c8ccd8;
  font-size: inherit;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Swift / Rouge syntax — dark mode */
.post-body pre code .k,
.post-body pre code .kd,
.post-body pre code .kc  { color: #d4a0f0; }          /* keywords: lavender */
.post-body pre code .kt  { color: #38c2b8; }          /* types: teal */
.post-body pre code .nc,
.post-body pre code .nn  { color: #38c2b8; }          /* class names: teal */
.post-body pre code .nf  { color: #60b8f8; }          /* functions: sky */
.post-body pre code .nb  { color: #67e8f9; }          /* builtins: cyan */
.post-body pre code .nd  { color: var(--accent); }    /* decorators: amber */
.post-body pre code .s,
.post-body pre code .s1,
.post-body pre code .s2,
.post-body pre code .se  { color: #86efac; }          /* strings: green */
.post-body pre code .c,
.post-body pre code .c1,
.post-body pre code .cm  { color: #44485e; font-style: italic; }  /* comments */
.post-body pre code .m,
.post-body pre code .mi,
.post-body pre code .mf,
.post-body pre code .mh  { color: #fb923c; }          /* numbers: orange */
.post-body pre code .o,
.post-body pre code .ow  { color: #c7d2fe; }          /* operators */

/* Code block copy button */
.code-copy-btn {
  position: absolute;
  top: 4px; right: 8px;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: none; border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
  z-index: 2;
}
.post-body pre:hover .code-copy-btn,
.lp-body pre:hover .code-copy-btn { opacity: 1; }
.code-copy-btn:hover { color: var(--accent); background: rgba(255,255,255,0.06); }
.code-copy-btn.copied { color: #4ade80; }

/* Light mode keeps dark code block — same tokens work fine */
html[data-theme="light"] .post-body pre { background: #0a0b12; border-color: rgba(255,255,255,0.07); }
html[data-theme="light"] .post-body pre::before { background-color: #0e1020; }
html[data-theme="light"] .post-body pre code { color: #c8ccd8; }

/* Swift syntax light mode — same as dark (dark bg) */
html[data-theme="light"] .post-body pre code .k,
html[data-theme="light"] .post-body pre code .kd,
html[data-theme="light"] .post-body pre code .kc  { color: #d4a0f0; }
html[data-theme="light"] .post-body pre code .kt  { color: #38c2b8; }
html[data-theme="light"] .post-body pre code .nc,
html[data-theme="light"] .post-body pre code .nn  { color: #38c2b8; }
html[data-theme="light"] .post-body pre code .nf  { color: #60b8f8; }
html[data-theme="light"] .post-body pre code .nb  { color: #67e8f9; }
html[data-theme="light"] .post-body pre code .nd  { color: #f0b840; }
html[data-theme="light"] .post-body pre code .s,
html[data-theme="light"] .post-body pre code .s1,
html[data-theme="light"] .post-body pre code .s2,
html[data-theme="light"] .post-body pre code .se  { color: #86efac; }
html[data-theme="light"] .post-body pre code .c,
html[data-theme="light"] .post-body pre code .c1,
html[data-theme="light"] .post-body pre code .cm  { color: #44485e; font-style: italic; }
html[data-theme="light"] .post-body pre code .m,
html[data-theme="light"] .post-body pre code .mi,
html[data-theme="light"] .post-body pre code .mf,
html[data-theme="light"] .post-body pre code .mh  { color: #fb923c; }
html[data-theme="light"] .post-body pre code .o,
html[data-theme="light"] .post-body pre code .ow  { color: #c7d2fe; }

.post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 24px;
  margin: 2em 0;
  color: var(--text-2);
  font-style: italic;
}
html[data-theme="light"] .post-body blockquote { color: var(--text-2); }

.post-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 3em 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.75em;
  font-size: 14.5px;
}
.post-body th, .post-body td {
  text-align: left;
  padding: 11px 16px;
  border: 1px solid var(--border);
}
.post-body th {
  background: var(--accent-soft);
  color: var(--text-1);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.post-body td { color: var(--text-2); }
html[data-theme="light"] .post-body th { background: var(--accent-soft); color: var(--text-1); border-color: var(--border); }
html[data-theme="light"] .post-body td { color: var(--text-2); border-color: var(--border); }

.post-body img { border-radius: var(--radius); margin: 1.5em 0; border: 1px solid var(--border); }

.post-read-time {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.post-footer {
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
html[data-theme="light"] .post-footer { border-color: rgba(0,0,0,0.08); }

.post-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--dur), background var(--dur), transform 0.22s var(--ease);
  max-width: 48%;
  text-decoration: none;
}
.post-nav-link:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.post-nav-next { text-align: right; margin-left: auto; }

.post-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
}
.post-nav-next .post-nav-label { justify-content: flex-end; }

.post-nav-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

html[data-theme="light"] .post-nav-link { background: var(--bg-card); border-color: var(--border); }
html[data-theme="light"] .post-nav-link:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }

.post-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  padding: 44px 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
html[data-theme="light"] .footer { border-color: rgba(0,0,0,0.07); }

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  text-align: center;
}

.footer-text { font-size: 13.5px; color: var(--text-3); margin-bottom: 6px; }

.footer-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ─── Posts / Feed section ───────────────────────────────── */
.posts-section { padding: 52px 0 100px; }

.posts-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 28px;
}

.feed-header { margin-bottom: 22px; }

.feed-heading {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 6px;
}
html[data-theme="light"] .feed-heading { color: var(--text-1); }

.feed-subheading { font-size: 14.5px; color: var(--text-2); margin-bottom: 20px; }
html[data-theme="light"] .feed-subheading { color: var(--text-2); }

/* Feed tab bar */
.feed-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}
html[data-theme="light"] .feed-tabs { background: var(--bg-card); border-color: var(--border); }

.feed-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: color var(--dur), background var(--dur), border-color var(--dur);
  white-space: nowrap;
}
.feed-tab:hover { color: var(--text-1); background: rgba(255,255,255,0.05); }
html[data-theme="light"] .feed-tab { color: var(--text-2); }
html[data-theme="light"] .feed-tab:hover { color: var(--text-1); background: rgba(0,0,0,0.04); }
.feed-tab.active { background: var(--accent-soft); color: var(--accent); border-color: rgba(240,184,64,0.18); }
html[data-theme="light"] .feed-tab.active { background: var(--accent-soft); color: var(--accent); border-color: rgba(168,124,0,0.18); }

.tab-count {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(240, 184, 64, 0.10);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 100px;
  line-height: 1.6;
}
.feed-tab.active .tab-count { background: rgba(240, 184, 64, 0.20); }
html[data-theme="light"] .tab-count { color: var(--accent); background: rgba(168,124,0,0.10); }

.feed-tab-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}
html[data-theme="light"] .feed-tab-bar { background: var(--bg-card); border-color: var(--border); }

.feed { display: flex; flex-direction: column; gap: 14px; }

/* ─── Feed card ──────────────────────────────────────────── */
.feed-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px 18px;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur);
  position: relative;
  overflow: hidden;
}
.feed-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background: var(--gradient);
  opacity: 0;
  transform: scaleY(0.4);
  transform-origin: top;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.feed-card:hover { border-color: rgba(240,184,64,0.16); box-shadow: var(--shadow-hover); background: var(--bg-card-hover); }
.feed-card:hover::before { opacity: 1; transform: scaleY(1); }

html[data-theme="light"] .feed-card { background: var(--bg-card); border-color: var(--border); }
html[data-theme="light"] .feed-card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }

.feed-card-header { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }

.feed-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--gradient);
  border: 1.5px solid rgba(240, 184, 64, 0.22);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.feed-author-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.feed-author-name { font-size: 14px; font-weight: 600; color: var(--text-1); line-height: 1.3; }
html[data-theme="light"] .feed-author-name { color: var(--text-1); }

.feed-author-meta {
  font-family: var(--mono);
  font-size: 11px; color: var(--text-3); font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html[data-theme="light"] .feed-author-meta { color: var(--text-2); }

.feed-type-badge {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--radius-pill);
}
.feed-type-article    { color: var(--accent);   background: var(--accent-soft);   border: 1px solid rgba(240,184,64,0.16); }
.feed-type-newsletter { color: var(--accent-2); background: var(--accent-2-soft); border: 1px solid rgba(56,194,184,0.16); }
html[data-theme="light"] .feed-type-article    { color: var(--accent); background: var(--accent-soft); border-color: rgba(168,124,0,0.14); }
html[data-theme="light"] .feed-type-newsletter { color: var(--accent-2); background: var(--accent-2-soft); border-color: rgba(26,143,136,0.14); }

.feed-content { margin-bottom: 12px; }

.feed-title {
  font-family: var(--font-display);
  font-size: 17.5px; font-weight: 700;
  color: var(--text-1); letter-spacing: -0.015em; line-height: 1.32;
  margin-bottom: 8px;
}
html[data-theme="light"] .feed-title { color: var(--text-1); }

.feed-excerpt { font-size: 14px; color: var(--text-2); line-height: 1.72; }
html[data-theme="light"] .feed-excerpt { color: var(--text-2); }

.feed-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.feed-tag { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); font-weight: 500; transition: color var(--dur); }
.feed-card:hover .feed-tag { color: var(--accent); }
html[data-theme="light"] .feed-tag { color: var(--text-3); }
html[data-theme="light"] .feed-card:hover .feed-tag { color: var(--accent); }

.feed-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
html[data-theme="light"] .feed-footer { border-color: rgba(0,0,0,0.07); }

.feed-cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.03em; color: var(--accent);
  transition: gap var(--dur) var(--ease);
}
.feed-card:hover .feed-cta { gap: 10px; }

.feed-actions { display: flex; align-items: center; gap: 2px; }

.feed-read-time {
  font-family: var(--mono);
  font-size: 11px; color: var(--text-3); font-weight: 500;
  padding-right: 8px; letter-spacing: 0.03em;
}

.feed-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: transparent;
  color: var(--text-2); cursor: pointer;
  transition: color var(--dur), background var(--dur);
  font-family: var(--font);
}
.feed-action-btn:hover { color: var(--accent); background: var(--accent-soft); }
html[data-theme="light"] .feed-action-btn { color: var(--text-2); }
html[data-theme="light"] .feed-action-btn:hover { color: var(--accent); background: var(--accent-soft); }

/* ─── LinkedIn post detail ───────────────────────────────── */
.lp-article { padding: 52px 0 100px; }

.lp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px 24px;
  box-shadow: var(--shadow);
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}
.lp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--gradient);
}
html[data-theme="light"] .lp-card { background: var(--bg-card); border-color: var(--border); }

.lp-body { margin: 20px 0 0; font-size: 16px; line-height: 1.84; color: var(--text-2); }
html[data-theme="light"] .lp-body { color: var(--text-2); }
.lp-body p { margin-bottom: 1.2em; white-space: pre-line; }
.lp-body ul, .lp-body ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.lp-body li { margin-bottom: 0.4em; }

.lp-hashtags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
html[data-theme="light"] .lp-hashtags { border-color: rgba(0,0,0,0.07); }

.lp-tag {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(240, 184, 64, 0.16);
  padding: 3px 10px; border-radius: var(--radius-pill); line-height: 1.5;
  transition: background var(--dur);
}
.lp-tag:hover { background: rgba(240,184,64,0.14); }
html[data-theme="light"] .lp-tag { color: var(--accent); background: var(--accent-soft); border-color: rgba(168,124,0,0.14); }

.lp-body strong { color: var(--text-1); font-weight: 600; }
html[data-theme="light"] .lp-body strong { color: var(--text-1); }

.lp-body code {
  font-family: var(--mono); font-size: 0.875em;
  background: rgba(240, 184, 64, 0.08);
  border: 1px solid rgba(240, 184, 64, 0.16);
  padding: 2px 7px; border-radius: 4px; color: var(--accent);
}
html[data-theme="light"] .lp-body code { color: var(--accent); background: rgba(168,124,0,0.08); border-color: rgba(168,124,0,0.16); }

.lp-body pre {
  background: #06070c;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 0; overflow: hidden;
  margin-bottom: 1.4em; font-size: 13.5px; line-height: 1.72;
}
.lp-body pre::before {
  content: '';
  display: block; height: 32px;
  background-color: #0d0f18;
  background-image:
    radial-gradient(circle at 14px 50%, #ef4444 0, #ef4444 4.5px, transparent 4.5px),
    radial-gradient(circle at 26px 50%, #f59e0b 0, #f59e0b 4.5px, transparent 4.5px),
    radial-gradient(circle at 38px 50%, #22c55e 0, #22c55e 4.5px, transparent 4.5px);
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(255,255,255,0.055);
}
html[data-theme="light"] .lp-body pre { background: #0a0b12; border-color: rgba(255,255,255,0.07); }
html[data-theme="light"] .lp-body pre::before { background-color: #0e1020; }

.lp-body pre code { display: block; padding: 18px 22px; background: none; border: none; color: #c8ccd8; white-space: pre; overflow-x: auto; }

.lp-footer {
  display: flex; justify-content: flex-end;
  padding-top: 16px; margin-top: 20px;
  border-top: 1px solid var(--border);
}
html[data-theme="light"] .lp-footer { border-color: rgba(0,0,0,0.07); }

/* ─── Share dropdown ─────────────────────────────────────── */
.share-dropdown {
  position: fixed;
  z-index: 200;
  min-width: 188px;
  background: var(--bg-elevated);
  border: 1px solid rgba(240, 184, 64, 0.20);
  border-radius: var(--radius);
  padding: 5px;
  box-shadow: 0 8px 36px rgba(0,0,0,0.52), 0 0 0 1px rgba(240,184,64,0.07);
  opacity: 0;
  transform: scale(0.94) translateY(-6px);
  transform-origin: top right;
  transition: opacity 0.14s var(--ease), transform 0.14s var(--ease);
  pointer-events: none;
}
.share-dropdown.open { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }

html[data-theme="light"] .share-dropdown {
  background: var(--bg-card);
  border-color: rgba(168,124,0,0.18);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

.share-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  font-family: var(--font);
  cursor: pointer; text-decoration: none;
  background: none; border: none;
  width: 100%; text-align: left;
  transition: background var(--dur), color var(--dur);
  -webkit-tap-highlight-color: transparent;
}
.share-option:hover { background: var(--accent-soft); color: var(--accent); }
.share-option svg { flex-shrink: 0; }
.share-option-copied { color: #4ade80 !important; }
html[data-theme="light"] .share-option { color: var(--text-2); }
html[data-theme="light"] .share-option:hover { background: var(--accent-soft); color: var(--accent); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero                 { padding: 72px 0 60px; }
  .nav-link-gh          { display: none; }
  .post-article         { padding: 40px 0 80px; }
  .post-body            { font-size: 16.5px; }
  .post-body pre code   { padding: 18px 20px; }
  .feed-card            { padding: 18px 18px 15px; }
  .feed-author-meta     { font-size: 10.5px; }
  .feed-title           { font-size: 16.5px; }
  .container            { padding: 0 20px; }
  .posts-container      { padding: 0 20px; }
  .featured-card        { padding: 28px 26px; }
  .featured-section     { padding: 36px 0 44px; }
  .back-link            { margin-bottom: 32px; }
  .post-header          { margin-bottom: 44px; padding-bottom: 32px; }
  .post-footer-nav      { flex-direction: column; gap: 12px; }
  .post-nav-link        { max-width: 100%; }
  .post-nav-next        { text-align: left; }
  .post-body table      { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .lp-card              { padding: 20px 20px 16px; }
  .lp-article           { padding: 36px 0 64px; }
  .nav-link             { min-height: 44px; }
  .nav-inner            { padding: 0 20px; }
}

@media (max-width: 480px) {
  .hero-title           { letter-spacing: -0.018em; }
  .hero-stats           { gap: 0; }
  .hero-stat            { padding-right: 20px; }
  .hero-stat-sep        { margin-right: 20px; }
  .feed-tabs            { flex-wrap: wrap; }
  .feed-tab             { flex: none; font-size: 13px; padding: 7px 12px; }
  .nav-link-home        { display: none; }
  .nav-inner            { padding: 0 16px; }
  .nav-links            { gap: 2px; }
  .nav-link             { padding: 5px 8px; font-size: 13px; min-height: 44px; }
  .container            { padding: 0 16px; }
  .posts-container      { padding: 0 16px; }
  .hero                 { padding: 52px 0 48px; }
  .hero-desc            { font-size: 16px; margin-bottom: 32px; }
  .hero-badge           { margin-bottom: 26px; }
  .featured-card        { padding: 20px 18px; }
  .featured-section     { padding: 28px 0 36px; }
  .post-article         { padding: 24px 0 60px; }
  .post-header          { margin-bottom: 28px; padding-bottom: 20px; }
  .back-link            { margin-bottom: 20px; }
  .articles-section     { padding: 0 0 64px; }
  .post-body code       { white-space: pre-wrap; }
  .lp-card              { padding: 16px 16px 14px; }
  .lp-article           { padding: 24px 0 48px; }
}

/* ─── Animations & Icons ─────────────────────────────────── */

/* Hero dot-grid texture */
.hero {
  background-image: radial-gradient(circle, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Entrance keyframes */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes nav-drop {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Nav entrance */
.nav { animation: nav-drop 0.42s var(--ease) both; }

/* Hero content entrance — staggered */
.hero-badge  { animation: fade-up 0.55s var(--ease) 0.05s both; }
.hero-title  { animation: fade-up 0.60s var(--ease) 0.15s both; }
.hero-desc   { animation: fade-up 0.55s var(--ease) 0.24s both; }
.hero-stats  { animation: fade-up 0.55s var(--ease) 0.33s both; }
.hero-editor { animation: fade-up 0.50s var(--ease) 0.42s both; }
.hero-rss    { animation: fade-up 0.50s var(--ease) 0.50s both; }

/* Scroll-reveal */
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-from-left {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes reveal-from-right {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes reveal-scale {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes reveal-code {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.reveal { opacity: 0; }

.reveal.visible {
  animation: reveal-in 0.55s var(--ease) var(--reveal-delay, 0ms) both;
}

.reveal.visible[data-reveal="left"]  { animation-name: reveal-from-left; }
.reveal.visible[data-reveal="right"] { animation-name: reveal-from-right; }
.reveal.visible[data-reveal="scale"] { animation-name: reveal-scale; }
.reveal.visible[data-reveal="code"]  { animation-name: reveal-code; }

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

.featured-card {
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur),
    transform 0.22s var(--ease);
}
.featured-card:hover { transform: translateY(-3px); }

/* Stat icons */
.stat-icon {
  color: var(--accent);
  opacity: 0.65;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: opacity var(--dur);
  margin-bottom: 2px;
}

/* Section tag with inline SVG icon */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 0;
}

.section-icon {
  color: var(--accent);
  opacity: 0.80;
  flex-shrink: 0;
}

/* Card meta icon (calendar) */
.meta-icon {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin-right: 4px;
  color: var(--text-2);
  flex-shrink: 0;
}

/* Read-more arrow */
.read-arrow {
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
}
.featured-card:hover .read-arrow { transform: translateX(5px); }

/* ─── 404 page ──────────────────────────────────────────── */
.error-section { padding: 120px 0; }
.error-state { text-align: center; max-width: 440px; margin: 0 auto; }

.error-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.error-4 {
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 96px);
  font-weight: 800;
  color: var(--text-1);
  line-height: 1;
  letter-spacing: -0.04em;
  opacity: 0.15;
}
.error-icon { flex-shrink: 0; animation: float 3s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.error-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.error-desc { font-size: 16px; color: var(--text-2); line-height: 1.72; margin-bottom: 32px; }

.error-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(240,184,64,0.20);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  transition: background var(--dur), border-color var(--dur), transform var(--dur) var(--ease);
}
.error-cta:hover {
  background: rgba(240,184,64,0.14);
  border-color: rgba(240,184,64,0.36);
  transform: translateY(-2px);
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; }
  .badge-dot { animation: none; }
  .hero-bg-img { will-change: auto; }
  .reading-progress-bar { display: none; }
}
