/* 1. CSS Variables for Theming */
:root {
  /* Light mode colors - Purple & Pink palette */
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-header: rgba(250, 250, 250, 0.95);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6e;
  --text-muted: #8a8a9e;
  --text-light: #6a6a7e;
  --border-color: rgba(124, 58, 237, 0.15);
  --shadow-sm: rgba(124, 58, 237, 0.12);
  --shadow-md: rgba(124, 58, 237, 0.25);
  --accent-primary: #7c3aed;
  --accent-secondary: #8b5cf6;
  --accent-light: #f3e8ff;
  --accent-dark: #6d28d9;
  --chip-bg: #f3e8ff;
  --chip-text: #7c3aed;
  --search-bg: transparent;
  --search-border: rgba(124, 58, 237, 0.25);
  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --pink-400: #f472b6;
  --pink-500: #ec4899;
  --pink-600: #db2777;
}

[data-theme="dark"] {
  /* Dark mode colors - Purple & Pink palette */
  --bg-primary: #0f0f1e;
  --bg-secondary: #1a1a2e;
  --bg-header: rgba(15, 15, 30, 0.95);
  --text-primary: #f5f3ff;
  --text-secondary: #e9d5ff;
  --text-muted: #a78bfa;
  --text-light: #c4b5fd;
  --border-color: rgba(167, 139, 250, 0.25);
  --shadow-sm: rgba(167, 139, 250, 0.2);
  --shadow-md: rgba(167, 139, 250, 0.35);
  --accent-primary: #a78bfa;
  --accent-secondary: #c4b5fd;
  --accent-light: #2d1b4e;
  --accent-dark: #a78bfa;
  --chip-bg: #2d1b4e;
  --chip-text: #c4b5fd;
  --search-bg: rgba(139, 92, 246, 0.1);
  --search-border: rgba(167, 139, 250, 0.35);
}

/* 2. Reset and base styles */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  animation: fadeIn 0.5s ease-in;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 3. Layout helpers */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 4. Header and navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(250, 250, 250, 0.8);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  animation: slideDown 0.4s ease-out;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.1);
}

[data-theme="dark"] .site-header {
  background: rgba(15, 15, 30, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
  gap: 0.55rem;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  background: #fff;
}

.logo-text {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary) 85%, rgba(236, 72, 153, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem; /* +2px breathing room */
  border-radius: 999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary) 90%, rgba(236, 72, 153, 0.3) 100%);
  backdrop-filter: blur(10px);
  opacity: 0;
  border-radius: 999px;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.nav-link span {
  position: relative;
  z-index: 1;
}

.nav-link.active {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary) 90%, rgba(236, 72, 153, 0.3) 100%);
  backdrop-filter: blur(10px);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.4);
  position: relative;
  z-index: 1;
}

.nav-link.active::before {
  opacity: 1;
}

.search-wrapper {
  margin-left: auto;
}

.search-input {
  padding: 0.5rem 1rem;
  border: 1px solid var(--search-border);
  border-radius: 999px;
  font-size: 0.9rem;
  width: 200px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Inter", system-ui, sans-serif;
}

[data-theme="dark"] .search-input {
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(10px);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  width: 250px;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

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

.theme-toggle {
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 0.5rem;
}

[data-theme="dark"] .theme-toggle {
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary) 90%, rgba(236, 72, 153, 0.3) 100%);
}

.theme-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(-15deg);
}

/* 5. Hero Banner */

.hero-banner {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 3rem;
  animation: fadeIn 0.8s ease-out;
  background-image: url('../img/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.5) 0%, 
    rgba(0, 0, 0, 0.4) 30%, 
    rgba(0, 0, 0, 0.45) 60%, 
    rgba(0, 0, 0, 0.4) 85%, 
    rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(135deg, 
    rgba(109, 40, 217, 0.3) 0%, 
    rgba(124, 58, 237, 0.25) 30%, 
    rgba(139, 92, 246, 0.2) 60%, 
    rgba(167, 139, 250, 0.15) 85%, 
    rgba(147, 51, 234, 0.25) 100%);
  background-size: 400% 400%, 400% 400%;
  animation: gradientShift 15s ease infinite;
  opacity: 1;
}

[data-theme="dark"] .hero-gradient {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.6) 0%, 
    rgba(0, 0, 0, 0.5) 25%, 
    rgba(0, 0, 0, 0.55) 50%, 
    rgba(0, 0, 0, 0.5) 75%, 
    rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(135deg, 
    rgba(76, 29, 149, 0.4) 0%, 
    rgba(91, 33, 182, 0.35) 25%, 
    rgba(109, 40, 217, 0.3) 50%, 
    rgba(124, 58, 237, 0.35) 75%, 
    rgba(139, 92, 246, 0.3) 100%);
  background-size: 400% 400%, 400% 400%;
  opacity: 1;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 800px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-title {
  font-family: "Inter", sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  padding: 2px 4px; /* small padding for clarity */
  text-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.8),
    0 0 8px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(0, 0, 0, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-description {
  font-size: 1.25rem;
  color: #ffffff;
  margin: 0;
  line-height: 1.6;
  text-shadow: 
    1px 1px 3px rgba(0, 0, 0, 0.8),
    0 0 6px rgba(0, 0, 0, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 6. Filters */

.filters {
  padding-bottom: 1rem;
}

.filters-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary) 90%, rgba(236, 72, 153, 0.3) 100%);
  backdrop-filter: blur(10px);
  opacity: 0;
  border-radius: 999px;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.chip:hover::before {
  opacity: 1;
}

.chip:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px var(--shadow-sm);
  color: #ffffff;
}

.chip-active {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary) 90%, rgba(236, 72, 153, 0.3) 100%);
  backdrop-filter: blur(10px);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.4);
  position: relative;
  z-index: 1;
}

.chip-active::before {
  opacity: 1;
}

/* 6. Featured Article Section */

.featured-section {
  padding: 2rem 0 3rem;
}

.featured-card {
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 10px 25px var(--shadow-sm);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.8s ease-out;
}

[data-theme="dark"] .featured-card {
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(10px);
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow-md), 0 0 0 1px rgba(124, 58, 237, 0.25);
  border-color: var(--accent-primary);
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 15, 25, 0.14);
}

.featured-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.featured-image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.featured-image {
  width: 100%;
  display: block;
  height: 500px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.featured-content {
  padding: 2.5rem 3rem 3rem;
}

.featured-date {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.featured-title {
  font-size: 2.2rem;
  margin: 0 0 1rem;
  line-height: 1.2;
  font-weight: 700;
  transition: color 0.3s ease;
}

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

.featured-excerpt {
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.7;
  max-width: 800px;
  transition: color 0.3s ease;
}

/* 7. Cards grid - Mobile First */

.cards-section {
  padding-bottom: 3rem;
}

/* Loading placeholders */
.loading-placeholder {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 6px 16px var(--shadow-sm);
}

.loading-bar {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.12), rgba(124, 58, 237, 0.25), rgba(124, 58, 237, 0.12));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.loading-bar.short { width: 40%; }
.loading-bar.med { width: 65%; }
.loading-bar.long { width: 90%; }
.loading-bar.full { width: 100%; height: 180px; border-radius: 12px; }

.loading-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mobile: 1 column by default */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.card {
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 10px 25px var(--shadow-sm);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .card {
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(10px);
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }
.card:nth-child(9) { animation-delay: 0.9s; }

.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow-md), 0 0 0 1px rgba(124, 58, 237, 0.25);
  border-color: var(--accent-primary);
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
}

.card-image {
  width: 100%;
  display: block;
  height: 280px;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image {
  transform: scale(1.1);
}

.language-pill {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85) 0%, rgba(124, 58, 237, 0.85) 90%, rgba(236, 72, 153, 0.3) 100%);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-content {
  padding: 1.5rem 1.75rem 1.75rem;
}

.card-date {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.card-title {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
  line-height: 1.25;
  word-break: break-word;
  hyphens: auto;
  transition: color 0.3s ease;
}

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

.card-excerpt {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.5;
  transition: color 0.3s ease;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .card-image {
    height: 320px;
  }

  .card-content {
    padding: 1.75rem 2rem 2rem;
  }

  .featured-image {
    height: 600px;
  }

  .featured-content {
    padding: 3rem 4rem 4rem;
  }

  .featured-title {
    font-size: 2.5rem;
  }
}

/* Desktop: Keep 2 columns */
@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* 8. Post page */

.post {
  padding-bottom: 3rem;
}

.post-header {
  padding-top: 2rem;
}

.post-date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  transition: color 0.3s ease;
}

.post-title-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.4rem;
}

.post-title {
  font-size: 2rem;
  margin: 0 0 0.4rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.language-pill-small {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85) 0%, rgba(124, 58, 237, 0.85) 90%, rgba(236, 72, 153, 0.3) 100%);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  transition: color 0.3s ease;
  margin: 0;
}

.post-hero {
  margin-top: 1.5rem;
}

.post-hero-image {
  width: 100%;
  border-radius: 18px;
}

.post-body {
  margin-top: 2rem;
  max-width: 780px;
}

.post-body h2 {
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.post-body p {
  margin-bottom: 0.9rem;
  color: var(--text-primary);
  line-height: 1.7;
}

/* Related Articles Section */
.related-articles {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.related-articles-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  transition: color 0.3s ease;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 100%;
}

.related-article-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
}

.related-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-md);
  border-color: var(--accent-primary);
}

.related-article-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.related-article-image-wrapper {
  width: 100%;
  height: 140px;
  overflow: hidden;
  position: relative;
}

.related-article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.related-article-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  padding: 1rem 1rem 1.25rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

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

/* Responsive: Related Articles */
@media (min-width: 768px) {
  .related-articles-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .related-article-image-wrapper {
    height: 160px;
  }
}

@media (max-width: 767px) {
  .related-articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .related-article-image-wrapper {
    height: 120px;
  }

  .related-article-title {
    font-size: 0.9rem;
    padding: 0.875rem;
  }
}

@media (max-width: 480px) {
  .related-articles-grid {
    grid-template-columns: 1fr;
  }
}
  transition: color 0.3s ease;
}

.post-body a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary) 85%, rgba(236, 72, 153, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.post-body a:hover {
  border-bottom-color: var(--accent-primary);
  transform: translateX(2px);
  -webkit-text-fill-color: var(--accent-primary);
}

/* Video responsive wrapper */

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1rem 0 1.5rem;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 9. Main content area - flex grow to push footer down */
.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 9. About page */

.about {
  padding: 2.5rem 0 3rem;
  max-width: 780px;
}

.about-signature {
  text-align: right;
  margin-top: 2rem;
  margin-bottom: 0;
}

.about-signature b {
  font-weight: 700;
  color: var(--text-primary);
}

/* 10. Footer */

.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0 2.5rem;
  background: var(--bg-primary);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
  margin: 0;
}

.footer-contacts {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary) 90%, rgba(236, 72, 153, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.contact-link:hover::before {
  opacity: 1;
}

.contact-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  border-color: var(--accent-primary);
}

.contact-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.contact-link:hover .contact-icon {
  transform: scale(1.1);
}

.contact-text {
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .contact-link {
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(10px);
}

/* 11. Responsive tweaks - Mobile First */

/* Mobile styles (default, no media query needed) */
.header-inner {
  height: auto;
  padding: 0.6rem 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

/* Hide theme toggle on mobile */
.theme-toggle {
  display: none;
}

/* Mobile nav/search hidden by default (shown only on mobile) */
.mobile-nav-search {
  display: none;
}

/* Slightly wider gutters on mobile (+2px each side) */
@media (max-width: 767px) {
  /* Hide top header (logo + desktop nav) on mobile */
  .site-header {
    display: none;
  }

  .container {
    padding: 0 1.62rem;
  }

  /* Hide desktop nav/search on mobile */
  .main-nav {
    display: none;
  }

  /* Mobile nav & search layout under hero */
  .mobile-nav-search {
    display: block;
    padding: 0.75rem 0 1rem;
  }

  .mobile-nav-search-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .mobile-nav {
    display: flex;
    gap: 0.5rem;
  }

  .mobile-search-wrapper {
    width: 100%;
  }

  .mobile-search-input {
    width: 100%;
  }
}

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1.1rem;
  }

  .hero-banner {
    min-height: 300px;
  }

.post-title {
  font-size: 1.6rem;
}

.featured-image {
  height: 400px;
}

.featured-content {
  padding: 2rem 1.5rem 2.5rem;
}

.featured-title {
  font-size: 1.8rem;
}

.featured-excerpt {
  font-size: 1rem;
}

/* Tablet and up */
@media (min-width: 768px) {
  .header-inner {
    height: 64px;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 0;
  }

  /* Show theme toggle on tablet and up */
  .theme-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-description {
    font-size: 1.2rem;
  }

  .hero-banner {
    min-height: 450px;
  }

  .post-title {
    font-size: 2rem;
  }

  .search-input {
    width: 180px;
  }

  .search-input:focus {
    width: 220px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .hero-title {
    font-size: 4rem;
  }

  .hero-description {
    font-size: 1.3rem;
  }

  .hero-banner {
    min-height: 500px;
  }
}

/* Mobile: Stack search below nav */
@media (max-width: 767px) {
  .main-nav {
    flex-wrap: wrap;
    width: 100%;
  }

  .search-wrapper {
    margin-left: 0;
    width: 100%;
    order: 3;
  }

  .search-input {
    width: 100%;
  }

  .search-input:focus {
    width: 100%;
  }

  .theme-toggle {
    order: 4;
    margin-top: 0.5rem;
    margin-left: 0;
  }

  .footer-contacts {
    flex-direction: column;
    gap: 1rem;
  }

  .contact-link {
    width: 100%;
    justify-content: center;
  }
}

