/* ==========================================================================
   Exponential Tech — Modern Editorial Magazine Stylesheet
   Design Philosophy: Lighter, Crisp, Ultra-High Readability (Quanta / MIT Tech Review / Stripe Press)
   Curator & Editor: Aleksandar Luković
   ========================================================================== */

:root {
  /* Ultra-Clean Light Palette */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;

  --border-hairline: #e2e8f0;
  --border-light: #cbd5e1;
  --border-focus: #0284c7;

  /* Editorial Category Accents (Optimized for Light Backgrounds) */
  --color-ai: #0284c7;
  --color-ai-bg: #e0f2fe;
  --color-ai-border: rgba(2, 132, 199, 0.25);

  --color-robotics: #d97706;
  --color-robotics-bg: #fef3c7;
  --color-robotics-border: rgba(217, 119, 6, 0.25);

  --color-cs: #7c3aed;
  --color-cs-bg: #ede9fe;
  --color-cs-border: rgba(124, 58, 237, 0.25);

  --color-biotech: #059669;
  --color-biotech-bg: #d1fae5;
  --color-biotech-border: rgba(5, 150, 105, 0.25);

  --color-accent: #0284c7;

  /* Typography Colors */
  --text-pure: #0f172a;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --ease: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-main: #0a0e17;
  --bg-surface: #111726;
  --bg-surface-elevated: #182032;
  --bg-card: #131b2c;
  --bg-card-hover: #19243b;

  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  --border-focus: #38bdf8;

  --color-ai: #38bdf8;
  --color-ai-bg: rgba(56, 189, 248, 0.12);
  --color-ai-border: rgba(56, 189, 248, 0.3);

  --color-robotics: #fbbf24;
  --color-robotics-bg: rgba(251, 191, 36, 0.12);
  --color-robotics-border: rgba(251, 191, 36, 0.3);

  --color-cs: #a78bfa;
  --color-cs-bg: rgba(167, 139, 250, 0.12);
  --color-cs-border: rgba(167, 139, 250, 0.3);

  --color-biotech: #34d399;
  --color-biotech-bg: rgba(52, 211, 153, 0.12);
  --color-biotech-border: rgba(52, 211, 153, 0.3);

  --color-accent: #38bdf8;

  --text-pure: #ffffff;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .top-bar {
  background: #060910;
}

[data-theme="dark"] .site-header {
  background: rgba(10, 14, 23, 0.94);
}

[data-theme="dark"] .hero-section {
  background: var(--bg-main);
}

[data-theme="dark"] .lead-story-card,
[data-theme="dark"] .top-stories-sidebar,
[data-theme="dark"] .story-card,
[data-theme="dark"] .about-section,
[data-theme="dark"] .reader-modal-content {
  background: var(--bg-card);
}

[data-theme="dark"] .about-card {
  background: var(--bg-surface);
}

[data-theme="dark"] .about-author-box,
[data-theme="dark"] .topic-pill {
  background: var(--bg-card);
}

[data-theme="dark"] .filter-tab {
  background: var(--bg-surface);
}

[data-theme="dark"] .filter-tab.active {
  background: var(--color-ai);
  color: #000000;
}

[data-theme="dark"] .read-btn,
[data-theme="dark"] .submit-btn {
  background: var(--bg-surface-elevated);
  border-color: var(--border-light);
  color: var(--text-pure);
}

[data-theme="dark"] .read-btn:hover,
[data-theme="dark"] .submit-btn:hover {
  background: var(--color-ai);
  color: #030712;
  border-color: var(--color-ai);
}

[data-theme="dark"] .newsletter-box {
  background: var(--bg-surface);
  border-color: var(--border-hairline);
}

[data-theme="dark"] .newsletter-form input {
  background: var(--bg-main);
}

[data-theme="dark"] .lang-switch-wrap,
[data-theme="dark"] .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .lang-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-prose {
  color: #cbd5e1;
}

[data-theme="dark"] .modal-callout {
  background: var(--bg-card);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  color: var(--text-pure);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.theme-icon {
  font-size: 0.85rem;
}

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

html {
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg-main);
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   1. Top Utilities Bar
   ========================================================================== */
.top-bar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-hairline);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 8px 0;
}

.top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-edition {
  color: var(--color-ai);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.top-divider {
  color: var(--border-light);
}

.top-curator strong {
  color: var(--text-pure);
}

.top-dispatch-link {
  color: var(--color-ai);
  text-decoration: none;
  font-weight: 600;
}

.top-dispatch-link:hover {
  text-decoration: underline;
}

/* Language Switcher */
.lang-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  box-shadow: var(--shadow-sm);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--ease);
}

.lang-btn:hover {
  color: var(--text-pure);
  background: var(--bg-surface-elevated);
}

.lang-btn.active {
  color: #ffffff;
  background: var(--color-ai);
}

.lang-sep {
  color: var(--border-hairline);
  font-size: 0.7rem;
}

/* Mobile Lang Switch */
.mobile-lang-switch {
  display: none;
  gap: 4px;
}

.lang-btn-mob {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.lang-btn-mob.active {
  color: #ffffff;
  background: var(--color-ai);
  border-color: var(--color-ai);
}

/* ==========================================================================
   2. Main Header & Navigation
   ========================================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-hairline);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-pure);
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-ai);
  letter-spacing: 0.14em;
  font-weight: 700;
}

/* Navigation Links */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--ease);
}

.nav-item:hover {
  color: var(--text-pure);
  background: var(--bg-surface-elevated);
}

.nav-item.active {
  color: var(--color-ai);
  background: var(--color-ai-bg);
}

.nav-link-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
}

.nav-link-item:hover {
  color: var(--text-pure);
  background: var(--bg-surface-elevated);
}

/* Search Box */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  width: 200px;
  transition: all var(--ease);
}

.search-wrap:focus-within {
  border-color: var(--border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  width: 240px;
}

.search-icon {
  color: var(--text-muted);
}

.search-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-pure);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  width: 100%;
}

.search-wrap input::placeholder {
  color: var(--text-muted);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text-pure);
}

/* ==========================================================================
   3. Magazine Hero Layout
   ========================================================================== */
.hero-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-hairline);
  background: #ffffff;
}

.magazine-hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 36px;
  align-items: start;
}

/* Lead Story Card */
.lead-story-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--ease);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.lead-story-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.lead-image-container {
  height: 280px;
  background: #0f172a;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lead-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-story-card:hover .lead-hero-img {
  transform: scale(1.04);
}

.lead-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.5) 100%);
  pointer-events: none;
}

.lead-category-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.cat-ai { background: var(--color-ai-bg); color: var(--color-ai); border: 1px solid var(--color-ai-border); }
.cat-robotics { background: var(--color-robotics-bg); color: var(--color-robotics); border: 1px solid var(--color-robotics-border); }
.cat-cs { background: var(--color-cs-bg); color: var(--color-cs); border: 1px solid var(--color-cs-border); }
.cat-biotech { background: var(--color-biotech-bg); color: var(--color-biotech); border: 1px solid var(--color-biotech-border); }

.lead-details {
  padding: 30px;
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.meta-author {
  color: var(--color-ai);
  font-weight: 700;
}

.meta-sep {
  color: var(--border-light);
}

.lead-headline {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-pure);
  margin-bottom: 14px;
}

.lead-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.read-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #0f172a;
  border: 1px solid #0f172a;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.read-btn:hover {
  background: var(--color-ai);
  border-color: var(--color-ai);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Sidebar Top Stories */
.top-stories-sidebar {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 16px;
}

.sidebar-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-pure);
}

.sidebar-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-ai);
  background: var(--color-ai-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-ai-border);
}

.sidebar-stories-list {
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: all var(--ease);
}

.sidebar-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-item:hover {
  transform: translateX(3px);
}

.sidebar-item:hover .sidebar-story-title {
  color: var(--color-ai);
}

.story-rank {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: #94a3b8;
  line-height: 1;
}

.sidebar-story-body {
  flex: 1;
}

.sidebar-thumb-wrap {
  width: 70px;
  height: 70px;
  min-width: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  background: #0f172a;
}

.sidebar-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.sidebar-item:hover .sidebar-thumb {
  transform: scale(1.08);
}

.story-category-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: inline-block;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 3px;
}

.sidebar-story-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-pure);
  margin-bottom: 4px;
  transition: color var(--ease);
}

.story-submeta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   4. Category Filter Bar & Feed Grid
   ========================================================================== */
.feed-section {
  padding: 48px 0;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 14px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.filter-tab {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}

.filter-tab:hover {
  color: var(--text-pure);
  border-color: var(--border-light);
  background: var(--bg-surface-elevated);
}

.filter-tab.active {
  background: var(--color-ai);
  color: #ffffff;
  border-color: var(--color-ai);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.feed-count-wrap {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.feed-count-wrap span {
  color: var(--text-pure);
  font-weight: 800;
}

/* Stories Grid */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.story-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}

.story-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.story-card:hover .story-card-title {
  color: var(--color-ai);
}

.story-card-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  position: relative;
  background: #0f172a;
  border: 1px solid var(--border-hairline);
}

.story-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-card:hover .story-card-img {
  transform: scale(1.06);
}

.story-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.story-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-pure);
  margin-bottom: 10px;
  transition: color var(--ease);
}

.story-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.story-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.read-link {
  color: var(--color-ai);
  font-weight: 700;
}

/* ==========================================================================
   5. About Aleksandar Luković Section
   ========================================================================== */
.about-section {
  padding: 56px 0;
  border-top: 1px solid var(--border-hairline);
  background: #ffffff;
}

.about-card {
  background: #f8fafc;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 40px;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.about-author-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 24px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.author-avatar-initials {
  width: 72px;
  height: 72px;
  background: var(--color-ai-bg);
  border: 2px solid var(--color-ai);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-ai);
  margin-bottom: 14px;
}

.about-author-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 4px;
}

.about-author-role {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}

.about-location {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.about-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-ai);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

.about-heading {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 16px;
}

.about-text-box p {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.68;
  margin-bottom: 14px;
}

.about-topics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.topic-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   6. Newsletter Dispatch
   ========================================================================== */
.newsletter-section {
  padding: 56px 0 72px;
}

.newsletter-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 50%, #faf5ff 100%);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 44px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.newsletter-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-ai);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

.newsletter-heading {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 10px;
}

.newsletter-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-input-group {
  display: flex;
  gap: 10px;
}

.form-input-group input {
  flex: 1;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-pure);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  box-shadow: var(--shadow-sm);
}

.form-input-group input:focus {
  border-color: var(--color-ai);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.submit-btn {
  padding: 12px 22px;
  background: #0f172a;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ease);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.submit-btn:hover {
  background: var(--color-ai);
  transform: translateY(-1px);
}

.form-privacy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   7. Reader Modal (Clean Paper Long-Form Reading View)
   ========================================================================== */
.reader-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
}

.reader-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.reader-modal-content {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 800px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 44px;
  box-shadow: var(--shadow-lg);
}

.reader-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
}

.reader-close-btn:hover {
  color: var(--text-pure);
  background: #e2e8f0;
}

.modal-header-meta {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-hairline);
}

.modal-article-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-pure);
  margin: 12px 0;
}

.modal-hero-wrap {
  width: 100%;
  max-height: 380px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 18px 0 26px;
  border: 1px solid var(--border-hairline);
  background: #0f172a;
}

.modal-hero-img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.modal-prose {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.85;
  color: #334155;
}

.modal-prose p {
  margin-bottom: 20px;
}

.modal-callout {
  background: #f8fafc;
  border-left: 4px solid var(--color-ai);
  padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: #1e293b;
  border-top: 1px solid var(--border-hairline);
  border-right: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
}

.modal-callout strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--color-ai);
  margin-bottom: 6px;
  font-weight: 800;
}

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer {
  background: #0f172a;
  color: #e2e8f0;
  border-top: 1px solid #1e293b;
  padding: 60px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
}

.footer-brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  display: block;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #64748b;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a, .footer-cat-btn {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: var(--font-sans);
  transition: color var(--ease);
}

.footer-links a:hover, .footer-cat-btn:hover {
  color: #38bdf8;
}

/* ==========================================================================
   9. Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  border: 1px solid var(--color-ai);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
  transition: all var(--ease);
  z-index: 10000;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   10. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .magazine-hero-grid { grid-template-columns: 1fr; }
  .stories-grid { grid-template-columns: 1fr 1fr; }
  .about-card { grid-template-columns: 1fr; }
  .newsletter-box { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .top-bar-right { display: none; }
  .mobile-lang-switch { display: flex; }
  .main-nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-hairline);
    transform: translateY(-150%);
    transition: transform var(--ease);
    box-shadow: var(--shadow-md);
  }
  .main-nav.active { transform: translateY(0); }
  .mobile-menu-btn { display: flex; }
  .search-wrap { width: 140px; }
  .search-wrap:focus-within { width: 160px; }
  .stories-grid { grid-template-columns: 1fr; }
  .form-input-group { flex-direction: column; }
  .reader-modal-content { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}
