/* ==========================================================================
   SANDEEP TOMAR - PERSONAL BLOG & ESSAYS PUBLICATION
   Editorial Design System & Styling
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Root Variables & Color Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, Cambria, 'Times New Roman', serif;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Layout */
  --max-width: 1140px;
  --reading-width: 740px;
  --header-height: 74px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  /* Transitions */
  --tr-fast: 0.16s ease-out;
  --tr-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --tr-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --bg-primary: #090d16;
  --bg-secondary: #0f1524;
  --bg-card: rgba(18, 25, 43, 0.75);
  --bg-card-hover: rgba(25, 34, 58, 0.9);
  --bg-glass: rgba(15, 21, 36, 0.7);
  --bg-reader: #0d121f;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(56, 189, 248, 0.45);
  --border-highlight: rgba(99, 102, 241, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-amber: #fbbf24;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  --gradient-brand: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #ec4899 100%);
  --gradient-featured: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.22) 0%, rgba(15, 21, 36, 0.95) 75%);
  --shadow-card: 0 16px 36px -10px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 35px -5px rgba(56, 189, 248, 0.25);
  
  --nav-backdrop: rgba(9, 13, 22, 0.85);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #faf8f5;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-reader: #ffffff;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-focus: rgba(2, 132, 199, 0.45);
  --border-highlight: rgba(79, 70, 229, 0.25);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #8c9ba5;

  --accent-cyan: #0284c7;
  --accent-indigo: #4f46e5;
  --accent-amber: #d97706;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;

  --gradient-brand: linear-gradient(135deg, #0284c7 0%, #4f46e5 50%, #d946ef 100%);
  --gradient-featured: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.08) 0%, rgba(255, 255, 255, 0.95) 75%);
  --shadow-card: 0 12px 30px -8px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 30px -5px rgba(2, 132, 199, 0.15);

  --nav-backdrop: rgba(250, 248, 245, 0.88);
}

/* --------------------------------------------------------------------------
   2. Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--tr-smooth), color var(--tr-smooth);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--tr-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --------------------------------------------------------------------------
   3. Ambient Decorative Glows
   -------------------------------------------------------------------------- */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transition: opacity var(--tr-smooth);
}

.glow-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #38bdf8 0%, #6366f1 70%);
  top: -120px;
  right: -100px;
}

.glow-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #ec4899 0%, #6366f1 70%);
  top: 900px;
  left: -120px;
}

[data-theme="light"] .ambient-glow {
  opacity: 0.15;
}

/* --------------------------------------------------------------------------
   4. Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--nav-backdrop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: background-color var(--tr-smooth), border-color var(--tr-smooth);
}

.nav-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-avatar-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 2px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
  transition: transform var(--tr-fast), box-shadow var(--tr-fast);
}

.brand-logo:hover .logo-avatar-wrap {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.45);
}

.logo-avatar-wrap.sm {
  width: 32px;
  height: 32px;
  padding: 1.5px;
}

.logo-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1.5px solid var(--bg-primary);
  display: block;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: -0.5px;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-badge.sm {
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}

.logo-details {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--tr-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-link:hover, [data-theme="light"] .nav-link.active {
  background: rgba(15, 23, 42, 0.05);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  transition: all var(--tr-fast);
}

.icon-btn.sm {
  width: 32px;
  height: 32px;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
}

[data-theme="light"] .icon-btn {
  background: rgba(15, 23, 42, 0.04);
}

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

.mobile-menu-toggle {
  display: none;
}

/* --------------------------------------------------------------------------
   5. Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--tr-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-focus);
}

[data-theme="light"] .btn-secondary {
  background: rgba(15, 23, 42, 0.05);
}

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

.btn-glass:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.sub-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: var(--space-xs);
}

.sec-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1.25;
}

.sec-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: var(--space-sm) auto 0;
}

/* Category Tags */
.tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
}

.data-tag {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.ai-tag {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.rail-tag {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.leadership-tag {
  background: rgba(251, 191, 36, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

/* --------------------------------------------------------------------------
   6. Hero Section (Editorial Intro)
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  z-index: 1;
  padding: calc(var(--space-2xl) * 1.2) 0 var(--space-xl);
}

.hero-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: center;
  gap: var(--space-2xl);
}

.hero-author-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.avatar-ring {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  padding: 5px;
  background: var(--gradient-brand);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25);
}

.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-primary);
}

.online-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-editorial {
  display: flex;
  flex-direction: column;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: var(--space-xs);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.hero-lead {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.hero-lead strong {
  color: var(--text-primary);
  font-family: var(--font-body);
}

.hero-meta-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-item i {
  color: var(--accent-cyan);
  width: 16px;
  height: 16px;
}

.meta-dot {
  color: var(--border-subtle);
}

.hero-action-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   7. Topic Filter Tabs Bar
   -------------------------------------------------------------------------- */
.topics-section {
  position: relative;
  z-index: 2;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xl);
}

.topic-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  max-width: fit-content;
}

.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--tr-fast);
}

.topic-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.topic-pill.active {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.topic-count {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
}

.topic-pill.active .topic-count {
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   8. Featured Essay Section
   -------------------------------------------------------------------------- */
.featured-essay-section {
  position: relative;
  z-index: 1;
  margin-bottom: var(--space-2xl);
}

.featured-card {
  position: relative;
  background: var(--gradient-featured);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all var(--tr-normal);
  overflow: hidden;
}

.featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
}

.featured-badge i {
  width: 14px;
  height: 14px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.article-cat {
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
}

.read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.featured-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  letter-spacing: -0.4px;
}

.featured-summary {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 900px;
  margin-bottom: var(--space-xl);
}

.featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
}

.author-micro {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.micro-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   9. Articles Feed Grid
   -------------------------------------------------------------------------- */
.articles-section {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) 0 var(--space-3xl);
}

.section-title-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.results-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.article-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  transition: all var(--tr-normal);
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card);
}

.article-card.hidden {
  display: none;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.read-len {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: var(--space-sm);
  transition: color var(--tr-fast);
}

.article-card:hover .card-title {
  color: var(--accent-cyan);
}

.card-blurb {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.text-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.85rem;
}

.text-link-btn:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   10. About the Author Narrative
   -------------------------------------------------------------------------- */
.about-section {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
}

.about-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.author-portrait-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
}

.portrait-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-sm);
  background: var(--bg-secondary);
}

.author-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity var(--tr-fast), transform var(--tr-normal);
}

.author-portrait:hover {
  transform: scale(1.02);
}

.photo-selector-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: var(--space-md);
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}

[data-theme="light"] .photo-selector-pills {
  background: rgba(15, 23, 42, 0.04);
}

.photo-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--tr-fast);
}

.photo-pill i {
  width: 13px;
  height: 13px;
}

.photo-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.photo-pill.active {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.author-badge-card h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.author-badge-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.social-links-mini {
  display: flex;
  gap: var(--space-xs);
}

.social-links-mini a {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--tr-fast);
}

.social-links-mini a:hover {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.15);
}

.about-narrative .sec-heading {
  margin-bottom: var(--space-lg);
}

.narrative-prose {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.narrative-prose strong {
  color: var(--text-primary);
  font-family: var(--font-body);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-xl);
}

.value-item {
  display: flex;
  gap: var(--space-md);
}

.value-item i {
  color: var(--accent-cyan);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 3px;
}

.value-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.value-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   11. Toolkit Section
   -------------------------------------------------------------------------- */
.toolkit-section {
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
}

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

.toolkit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all var(--tr-normal);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-info h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tool-info p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   12. Newsletter Section
   -------------------------------------------------------------------------- */
.newsletter-section {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) 0 var(--space-3xl);
}

.newsletter-box {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.newsletter-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 250px;
  background: var(--gradient-brand);
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
}

.newsletter-content {
  position: relative;
  z-index: 1;
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: var(--space-xs) 0 var(--space-sm);
}

.newsletter-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto var(--space-xl);
}

.newsletter-form {
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-input-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px;
  transition: all var(--tr-fast);
}

[data-theme="light"] .newsletter-input-group {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}

.newsletter-input-group:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.newsletter-input-group i {
  margin-left: 10px;
  color: var(--text-muted);
}

.newsletter-input-group input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 0.5rem;
}

.form-fineprint {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* --------------------------------------------------------------------------
   13. Connect Section
   -------------------------------------------------------------------------- */
.connect-section {
  padding: var(--space-2xl) 0 var(--space-3xl);
  border-top: 1px solid var(--border-subtle);
}

.connect-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

.connect-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  transition: all var(--tr-fast);
}

.connect-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.copy-chip {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.footer-nav {
  display: flex;
  gap: var(--space-md);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-nav a:hover {
  color: var(--accent-cyan);
}

.footer-right {
  display: flex;
  gap: var(--space-xs);
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--tr-fast);
}

.social-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-lg);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   15. Interactive Article Reader Modal
   -------------------------------------------------------------------------- */
.article-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  transition: opacity var(--tr-normal);
}

.article-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.article-modal-container {
  background: var(--bg-reader);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  animation: modal-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modal-enter {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-top-bar {
  padding: 14px var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
}

.modal-meta-tag {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-modal-body {
  padding: var(--space-2xl) var(--space-xl);
  overflow-y: auto;
  max-width: var(--reading-width);
  margin: 0 auto;
  width: 100%;
}

.modal-article-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: var(--space-md);
}

.modal-author-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-author-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.modal-author-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.modal-pub-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Editorial Content Styling */
.modal-prose-content {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text-primary);
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.modal-prose-content p {
  color: var(--text-primary);
}

.modal-prose-content h3 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--space-md);
  line-height: 1.3;
}

.modal-prose-content blockquote {
  border-left: 3px solid var(--accent-cyan);
  padding: var(--space-sm) var(--space-lg);
  font-style: italic;
  background: rgba(56, 189, 248, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.modal-prose-content ul {
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-prose-content li strong {
  font-family: var(--font-body);
}

.article-end-box {
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.end-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.article-end-box h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-primary);
}

.article-end-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.end-contact-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.end-contact-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   16. Search Overlay Dialog
   -------------------------------------------------------------------------- */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 4500;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.search-overlay.active {
  display: flex;
}

.search-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 620px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  gap: 10px;
}

.search-input-wrap i {
  color: var(--accent-cyan);
}

.search-input-wrap input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
}

.search-results-list {
  max-height: 380px;
  overflow-y: auto;
  padding: var(--space-sm);
}

.search-hint {
  padding: var(--space-md);
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

.search-item {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--tr-fast);
}

.search-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.search-item-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.search-item-cat {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   17. Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-focus);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast-info { border-left: 4px solid var(--accent-cyan); }

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* --------------------------------------------------------------------------
   18. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-xl);
  }

  .hero-editorial {
    align-items: center;
  }

  .hero-action-row {
    justify-content: center;
  }

  .about-container {
    grid-template-columns: 1fr;
  }

  .author-portrait-box {
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-xs);
    transform: translateY(-150%);
    transition: transform var(--tr-smooth);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 999;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .topic-filter-bar {
    max-width: 100%;
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}
