/* ============================================
   Clipboard AI Blog — Modern Design System
   ============================================ */

/* CSS Custom Properties */
:root {
  /* Colors */
  --primary: #007AFF;
  --primary-dark: #0A84FF;
  --accent: #5856D6;
  --accent-light: #BF5AF2;
  --gradient-pro: linear-gradient(135deg, #5856D6, #BF5AF2, #007AFF);

  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-muted: #8e8ea0;
  --text-inverse: #ffffff;

  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fc;
  --bg-tertiary: #f0f1f5;
  --bg-card: #ffffff;
  --bg-code: #f6f8fa;

  --border: #e2e4ea;
  --border-light: #f0f1f5;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Category Colors */
  --cat-links: #007AFF;
  --cat-phone: #34C759;
  --cat-address: #FF9F0A;
  --cat-codes: #AF52DE;
  --cat-email: #FF2D55;
  --cat-text: #8E8E93;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Layout */
  --content-width: 720px;
  --page-width: 1200px;
  --header-height: 72px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f0f0f5;
    --text-secondary: #b0b0c0;
    --text-muted: #6e6e80;
    --bg-primary: #0d0d1a;
    --bg-secondary: #14142b;
    --bg-tertiary: #1c1c3a;
    --bg-card: #1a1a30;
    --bg-code: #16162e;
    --border: #2a2a45;
    --border-light: #22223a;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.35);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.4);
  }
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

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

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; letter-spacing: -0.03em; }
h2 { font-size: 1.875rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.5em;
  color: var(--text-secondary);
}

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  height: var(--header-height);
  transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(13,13,26,0.85);
  }
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-pro);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.nav-cta {
  background: var(--gradient-pro);
  color: var(--text-inverse) !important;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(88,86,214,0.4);
  color: var(--text-inverse) !important;
}

/* Mobile Navigation */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--text-primary);
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open { display: flex; }
}

/* ============================================
   Hero Section (Blog Index)
   ============================================ */
.blog-hero {
  background: var(--bg-secondary);
  padding: var(--space-4xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(88,86,214,0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(0,122,255,0.06) 0%, transparent 50%);
  animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, 2%) rotate(3deg); }
}

.blog-hero .container {
  position: relative;
  z-index: 1;
}

.blog-hero h1 {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  background: var(--gradient-pro);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

@media (max-width: 768px) {
  .blog-hero { padding: var(--space-3xl) var(--space-md); }
  .blog-hero h1 { font-size: 2rem; }
  .blog-hero p { font-size: 1.0625rem; }
}

/* ============================================
   Category Pills / Filters
   ============================================ */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-lg);
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.category-pill:hover,
.category-pill.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,122,255,0.06);
}

.category-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ============================================
   Blog Grid
   ============================================ */
.blog-grid {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
    padding: var(--space-xl) var(--space-md);
  }
}

/* ============================================
   Article Cards
   ============================================ */
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.card-image {
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .card-image img {
  transform: scale(1.05);
}

.card-image .category-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
}

.card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.card-meta .reading-time::before {
  content: '·';
  margin-right: var(--space-sm);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--primary);
}

.card-excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-pro);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
}

.author-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============================================
   Featured Article
   ============================================ */
.featured-article {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-xl);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.3s ease;
}

.featured-card:hover {
  box-shadow: var(--shadow-xl);
}

.featured-card .card-image {
  aspect-ratio: auto;
  min-height: 360px;
}

.featured-card .card-body {
  padding: var(--space-2xl);
  justify-content: center;
}

.featured-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.featured-card .card-title {
  font-size: 1.75rem;
  -webkit-line-clamp: 3;
}

.featured-card .card-excerpt {
  -webkit-line-clamp: 4;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-card .card-image {
    min-height: 220px;
    aspect-ratio: 16/9;
  }
  .featured-card .card-body {
    padding: var(--space-lg);
  }
  .featured-card .card-title {
    font-size: 1.375rem;
  }
}

/* ============================================
   Article Page
   ============================================ */
.article-header {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
  text-align: center;
}

.article-header .category-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  margin-bottom: var(--space-lg);
}

.article-header h1 {
  font-size: 2.75rem;
  max-width: 800px;
  margin: 0 auto var(--space-lg);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.article-meta-bar .separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.article-hero-image {
  max-width: 900px;
  margin: var(--space-xl) auto var(--space-3xl);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.article-hero-image img {
  width: 100%;
  aspect-ratio: 2/1;
  object-fit: cover;
}

@media (max-width: 768px) {
  .article-header h1 { font-size: 1.875rem; }
  .article-header { padding: var(--space-2xl) var(--space-md) var(--space-lg); }
}

/* ============================================
   Article Content
   ============================================ */
.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-4xl);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  padding-top: 0.5em;
}

.article-content h3 {
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.article-content p {
  margin-bottom: 1.5em;
  color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 2em 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-content code {
  background: var(--bg-code);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--accent);
}

.article-content pre {
  background: var(--bg-code);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 2em 0;
  border: 1px solid var(--border-light);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 2em 0;
  box-shadow: var(--shadow-sm);
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(0,122,255,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.article-content a:hover {
  text-decoration-color: var(--primary);
}

/* Key Takeaway / Callout Boxes */
.callout {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: 2em 0;
}

.callout.tip {
  border-left: 4px solid var(--cat-phone);
  background: rgba(52,199,89,0.05);
}

.callout.info {
  border-left: 4px solid var(--primary);
  background: rgba(0,122,255,0.05);
}

.callout.warning {
  border-left: 4px solid var(--cat-address);
  background: rgba(255,159,10,0.05);
}

.callout-title {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

/* ============================================
   Table of Contents (Sidebar)
   ============================================ */
.article-layout {
  max-width: var(--page-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: var(--space-3xl);
  padding: 0 var(--space-lg);
  align-items: start;
}

.toc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
  padding: var(--space-lg);
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-list li {
  margin-bottom: var(--space-sm);
}

.toc-list a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--primary);
  border-left-color: var(--primary);
}

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .toc-sidebar { display: none; }
}

/* ============================================
   Newsletter / CTA Section
   ============================================ */
.newsletter-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl);
  text-align: center;
  max-width: var(--page-width);
  margin: var(--space-3xl) auto;
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-pro);
}

.newsletter-section h2 {
  margin-bottom: var(--space-sm);
}

.newsletter-section p {
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto var(--space-xl);
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.newsletter-form button {
  padding: 14px 28px;
  background: var(--gradient-pro);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(88,86,214,0.4);
}

@media (max-width: 640px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* ============================================
   App Download CTA
   ============================================ */
.app-cta {
  background: var(--gradient-pro);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl);
  max-width: var(--content-width);
  margin: var(--space-3xl) auto;
  text-align: center;
  color: white;
}

.app-cta h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.app-cta p {
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-lg);
}

.app-cta .btn-download {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: white;
  color: var(--accent);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-cta .btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  color: var(--accent);
}

/* ============================================
   Related Articles
   ============================================ */
.related-articles {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
  border-top: 1px solid var(--border-light);
}

.related-articles h2 {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Tags
   ============================================ */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-xl) 0;
}

.tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,122,255,0.05);
}

/* ============================================
   Share Buttons
   ============================================ */
.share-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.share-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}

.share-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* ============================================
   Author Bio
   ============================================ */
.author-bio {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin: var(--space-3xl) 0;
}

.author-bio-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-pro);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.author-bio-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.author-bio-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
}

.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: var(--space-md);
  max-width: 280px;
}

.footer-column h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: var(--space-sm);
}

.footer-column a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: var(--page-width);
  margin: var(--space-2xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

.social-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: span 2;
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-2xl) 0;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   Search
   ============================================ */
.search-box {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0,122,255,0.1);
}

.search-box .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ============================================
   Loading / Skeleton
   ============================================ */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ============================================
   Breadcrumbs (SEO)
   ============================================ */
.breadcrumbs {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs .separator {
  margin: 0 var(--space-sm);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .site-header,
  .toc-sidebar,
  .share-bar,
  .newsletter-section,
  .app-cta,
  .related-articles,
  .site-footer {
    display: none;
  }

  .article-content {
    max-width: 100%;
    font-size: 12pt;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.container {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-gradient {
  background: var(--gradient-pro);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
