/* ================================================================
   VIPER — CODEKISTE
   Precision Editorial — Heise meets The Verge
   Dark authority, pink venom accent

   IMPROVED VERSION - Changelog:
   - Added prefers-reduced-motion support
   - Improved focus-visible states for accessibility
   - Enhanced touch targets (min 44px)
   - Added color-scheme: dark
   - Improved contrast ratios
   - Added logical properties for RTL support
   - Added will-change for better GPU acceleration
   - Added aspect-ratio fallbacks
   - Fixed various performance issues
   ================================================================ */

/* ── Design Tokens ─────────────────────────────────── */
:root {
  /* Colors */
  --v-black:       #0c0c0e;
  --v-bg:          #141418;
  --v-surface:     #1c1c22;
  --v-raised:      #242430;
  --v-border:      #2a2a38;
  --v-border-sub:  #222230;

  /* Accent */
  --v-venom:       #E8175D;
  --v-venom-hot:   #ff2068;
  --v-venom-deep:  #b81050;
  --v-venom-glow:  rgba(232, 23, 93, 0.25);
  --v-venom-wash:  rgba(232, 23, 93, 0.10);
  --v-venom-ghost: rgba(232, 23, 93, 0.05);

  /* Text - IMPROVED CONTRAST */
  --v-text:        #f0f0f4;
  --v-text-body:   #c8c8d4;  /* Improved from #c0c0cc */
  --v-text-sec:    #9090a8;  /* Improved from #808098 - now 4.6:1 contrast */
  --v-text-mute:   #6a6a80;  /* Improved from #505068 - now 3.2:1 (decorative only) */

  /* Layout */
  --v-radius:      4px;
  --v-radius-lg:   8px;
  --v-ease:        0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --v-shadow:      0 2px 12px rgba(0,0,0,0.5);
  --v-shadow-lg:   0 8px 32px rgba(0,0,0,0.6);

  /* Sizing */
  --container:     1200px;
  --content-width: 700px;
  --sidebar-width: 280px;

  /* Touch target minimum */
  --touch-target:  44px;

  /* Typography */
  --font-headline: 'Instrument Serif', Georgia, serif;
  --font-body:     'Geist', -apple-system, 'Segoe UI', sans-serif;
  --font-mono:     'Geist Mono', 'SF Mono', monospace;

  /* Native dark mode UI elements */
  color-scheme: dark;
}

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

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

/* Smooth scroll only if user hasn't requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-body);
  background: var(--v-bg);
  color: var(--v-text-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Links & Interactive Elements ──────────────────── */
a {
  color: var(--v-venom);
  text-decoration: none;
  transition: color var(--v-ease);
}

a:hover {
  color: var(--v-venom-hot);
}

/* IMPROVED: Consistent focus-visible for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--v-venom);
  outline-offset: 2px;
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  color: var(--v-text);
  font-weight: 400;
  line-height: 1.2;
}

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

::selection {
  background: var(--v-venom);
  color: #fff;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--v-bg); }
::-webkit-scrollbar-thumb {
  background: var(--v-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--v-venom); }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--v-border) var(--v-bg);
}

/* ── Animations ────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* IMPROVED: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================================================
   HEADER — 3 tier: top bar, masthead, nav
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--v-bg);
}

/* Top utility bar */
.header-top-bar {
  background: var(--v-black);
  border-bottom: 1px solid var(--v-border-sub);
  font-size: 0.6875rem;
  color: var(--v-text-mute);
}

.header-top-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.375rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-dateline {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.header-tagline {
  font-style: italic;
  font-family: var(--font-headline);
  color: var(--v-text-sec);
  font-size: 0.75rem;
}

/* Masthead */
.header-main {
  border-bottom: 1px solid var(--v-border-sub);
}

.header-main-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--v-text);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--v-text);
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.logo-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.logo-text {
  font-family: var(--font-headline);
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.1;
}

.logo-desc {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  color: var(--v-text-sec);
  letter-spacing: 0.02em;
}

.logo-sep {
  color: var(--v-venom);
  margin-inline: 0.125rem;
}

/* Search - IMPROVED touch targets */
.header-search form {
  display: flex;
  align-items: center;
  background: var(--v-surface);
  border: 1px solid var(--v-border-sub);
  border-radius: var(--v-radius);
  transition: border-color var(--v-ease);
}

.header-search form:focus-within {
  border-color: var(--v-venom);
}

.header-search input {
  background: transparent;
  border: none;
  color: var(--v-text);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  width: 180px;
  outline: none;
  font-family: var(--font-body);
  min-height: var(--touch-target);
}

.header-search input::placeholder {
  color: var(--v-text-mute);
}

.header-search button {
  background: none;
  border: none;
  color: var(--v-text-mute);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  transition: color var(--v-ease);
}

.header-search button:hover {
  color: var(--v-venom);
}

/* Category nav bar */
.header-nav {
  background: var(--v-surface);
  border-bottom: 2px solid var(--v-venom);
}

.header-nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-list li a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--v-text-sec);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--v-ease), background var(--v-ease);
  position: relative;
  min-height: var(--touch-target);
}

.nav-list li a:hover {
  color: var(--v-text);
  background: rgba(255,255,255,0.04);
}

.nav-list li.active a {
  color: var(--v-venom);
  background: var(--v-venom-ghost);
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--v-border);
  align-self: center;
  margin-inline: 0.25rem;
}

/* Mobile toggle - IMPROVED for accessibility */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: var(--touch-target);
  height: var(--touch-target);
  position: relative;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--v-text-sec);
  border-radius: 1px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 30px; }

/* ================================================================
   HOME — Featured Layout
   ================================================================ */
.home-featured {
  padding: 1.5rem 0;
  background: var(--v-bg);
}

.featured-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  min-height: 420px;
}

/* Main featured article */
.featured-main {
  display: block;
  position: relative;
  border-radius: var(--v-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--v-text);
}

.featured-main:hover {
  color: var(--v-text);
}

.featured-image {
  position: absolute;
  inset: 0;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

@media (prefers-reduced-motion: no-preference) {
  .featured-main:hover .featured-image img {
    transform: scale(1.03);
  }
}

.featured-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,12,14,0.95) 0%, rgba(12,12,14,0.4) 50%, rgba(12,12,14,0.15) 100%);
}

.featured-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 420px;
  padding: 2rem;
}

.featured-category {
  display: inline-block;
  width: fit-content;
  padding: 0.25rem 0.625rem;
  background: var(--v-venom);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.featured-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: #fff;
}

.featured-excerpt {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  max-width: 540px;
}

.featured-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-mono);
}

/* Headline stack */
.headline-stack {
  display: flex;
  flex-direction: column;
}

.headline-stack-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--v-text-mute);
  padding: 0 0 0.625rem;
  border-bottom: 1px solid var(--v-border);
  margin-bottom: 0;
}

.headline-item {
  display: flex;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--v-border-sub);
  text-decoration: none;
  transition: background var(--v-ease);
  align-items: flex-start;
  min-height: var(--touch-target);
}

.headline-item:hover {
  background: var(--v-venom-ghost);
  padding-inline-start: 0.5rem;
  margin-inline-start: -0.5rem;
  margin-inline-end: -0.5rem;
  padding-inline-end: 0.5rem;
}

.headline-item:last-child {
  border-bottom: none;
}

.headline-item-text {
  flex: 1;
  min-width: 0;
}

.headline-category {
  display: inline-block;
  font-size: 0.625rem;
  font-family: var(--font-mono);
  color: var(--v-venom);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.headline-item h4 {
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--v-text);
  margin-bottom: 0.25rem;
  transition: color var(--v-ease);
}

.headline-item:hover h4 {
  color: var(--v-venom);
}

.headline-item time {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--v-text-mute);
}

.headline-thumb {
  width: 88px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--v-radius);
  overflow: hidden;
  background: var(--v-surface);
}

.headline-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Category chips bar ───────────────────────────── */
.home-categories-bar {
  background: var(--v-surface);
  border-top: 1px solid var(--v-border-sub);
  border-bottom: 1px solid var(--v-border-sub);
}

.categories-bar-inner {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  overflow-x: auto;
}

/* IMPROVED: Touch-friendly category chips */
.category-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  min-height: var(--touch-target);
  background: var(--v-raised);
  color: var(--v-text-sec);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--v-border-sub);
  white-space: nowrap;
  transition: color var(--v-ease), border-color var(--v-ease), background var(--v-ease);
}

.category-chip:hover {
  color: var(--v-text);
  border-color: var(--v-venom);
  background: var(--v-venom-wash);
}

/* ── Section headers ──────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--v-venom);
}

.section-title {
  font-size: 1.375rem;
}

.section-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--v-text-sec);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-height: var(--touch-target);
  padding: 0.5rem;
}

.section-link:hover {
  color: var(--v-venom);
}

.section-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--v-ease);
}

@media (prefers-reduced-motion: no-preference) {
  .section-link:hover svg {
    transform: translateX(3px);
  }
}

/* ================================================================
   BLOG GRID
   ================================================================ */
.blog-hero {
  background: var(--v-black);
  padding: 2rem 0 1.5rem;
  border-bottom: 2px solid var(--v-venom);
}

.blog-hero-title {
  font-size: 2rem;
  margin-bottom: 0.375rem;
}

.blog-hero-subtitle {
  color: var(--v-text-sec);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* IMPROVED: Touch-friendly pills */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  min-height: var(--touch-target);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--v-text-sec);
  background: var(--v-surface);
  border: 1px solid var(--v-border-sub);
  border-radius: 100px;
  transition: color var(--v-ease), border-color var(--v-ease);
}

.pill:hover {
  color: var(--v-text);
  border-color: var(--v-border);
}

.pill.active {
  color: #fff;
  background: var(--v-venom);
  border-color: var(--v-venom);
}

.blog-layout {
  padding: 2rem 0 3rem;
}

.blog-grid-wrapper {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 2rem;
  align-items: start;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.blog-grid--home {
  grid-template-columns: repeat(3, 1fr);
}

/* ── Blog Card ─────────────────────────────────────── */
.blog-card {
  background: var(--v-surface);
  border: 1px solid var(--v-border-sub);
  border-radius: var(--v-radius-lg);
  overflow: hidden;
  transition: border-color var(--v-ease), box-shadow var(--v-ease), transform 0.15s ease;
  animation: fadeUp 0.4s ease both;
  will-change: transform;
}

.blog-card:nth-child(1) { animation-delay: 0s; }
.blog-card:nth-child(2) { animation-delay: 0.04s; }
.blog-card:nth-child(3) { animation-delay: 0.08s; }
.blog-card:nth-child(4) { animation-delay: 0.12s; }
.blog-card:nth-child(5) { animation-delay: 0.16s; }
.blog-card:nth-child(6) { animation-delay: 0.20s; }

@media (prefers-reduced-motion: no-preference) {
  .blog-card:hover {
    border-color: var(--v-venom-deep);
    box-shadow: var(--v-shadow);
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card:hover {
    border-color: var(--v-venom-deep);
  }
}

.blog-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--v-black);
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
  .blog-card-image {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
  }
  .blog-card-image img {
    position: absolute;
    top: 0;
    left: 0;
  }
}

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

@media (prefers-reduced-motion: no-preference) {
  .blog-card:hover .blog-card-image img {
    transform: scale(1.04);
  }
}

.blog-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v-text-mute);
  background: var(--v-black);
}

.blog-card-body {
  padding: 1rem 1.125rem 0.875rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
}

.blog-card-meta time {
  color: var(--v-text-mute);
  font-family: var(--font-mono);
}

.blog-card-category {
  display: inline-block;
  padding: 0.125rem 0.4375rem;
  background: var(--v-venom-wash);
  color: var(--v-venom);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog-card-category:hover {
  color: var(--v-venom-hot);
}

.blog-card-title {
  font-size: 1.0625rem;
  line-height: 1.3;
  margin-bottom: 0.375rem;
}

.blog-card-title a {
  color: var(--v-text);
  transition: color var(--v-ease);
}

.blog-card-title a:hover {
  color: var(--v-venom);
}

.blog-card-summary {
  font-size: 0.8125rem;
  color: var(--v-text-sec);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.625rem;
  border-top: 1px solid var(--v-border-sub);
}

.blog-card-author {
  font-size: 0.6875rem;
  color: var(--v-text-mute);
  font-family: var(--font-mono);
}

.blog-card-readmore {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--v-venom);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: var(--touch-target);
  padding: 0.5rem;
  margin: -0.5rem;
}

.blog-card-readmore svg {
  transition: transform var(--v-ease);
}

@media (prefers-reduced-motion: no-preference) {
  .blog-card:hover .blog-card-readmore svg {
    transform: translateX(3px);
  }
}

/* ================================================================
   ARTICLE PAGE
   ================================================================ */
.blog-post-hero {
  position: relative;
  height: 400px;
  background: var(--v-black);
  overflow: hidden;
}

.blog-post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(12,12,14,0.1) 0%, rgba(20,20,24,0.95) 90%);
}

.blog-post-wrapper {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 2rem;
  align-items: start;
  margin-top: -3rem;
  position: relative;
  padding-bottom: 4rem;
}

.blog-post-content {
  min-width: 0;
}

.blog-post-header {
  margin-bottom: 2rem;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
}

.blog-post-meta time {
  color: var(--v-text-mute);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.blog-post-category {
  padding: 0.15rem 0.5rem;
  background: var(--v-venom);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog-post-author {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--v-text-sec);
}

.blog-post-author svg {
  color: var(--v-text-mute);
  width: 14px;
  height: 14px;
}

.blog-post-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
}

/* Article body */
.blog-post-body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--v-text-body);
}

.blog-post-body h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--v-border-sub);
}

.blog-post-body h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.625rem;
}

.blog-post-body p {
  margin-bottom: 1.375rem;
}

.blog-post-body img {
  border-radius: var(--v-radius);
  margin: 2rem 0;
  box-shadow: var(--v-shadow);
}

.blog-post-body blockquote {
  border-inline-start: 3px solid var(--v-venom);
  background: var(--v-surface);
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: 0 var(--v-radius) var(--v-radius) 0;
  color: var(--v-text-sec);
  font-style: italic;
}

.blog-post-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--v-surface);
  padding: 0.125em 0.375em;
  border-radius: 3px;
  border: 1px solid var(--v-border-sub);
  color: var(--v-venom);
}

.blog-post-body pre {
  background: var(--v-black);
  border: 1px solid var(--v-border);
  border-inline-start: 3px solid var(--v-venom);
  border-radius: var(--v-radius);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  overflow-x: auto;
}

.blog-post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--v-text-body);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.blog-post-body ul,
.blog-post-body ol {
  margin: 1rem 0;
  padding-inline-start: 1.5rem;
}

.blog-post-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.blog-post-body li::marker {
  color: var(--v-venom);
}

.blog-post-body a {
  color: var(--v-venom);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.blog-post-body a:hover {
  text-decoration-thickness: 2px;
}

.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.875rem;
}

.blog-post-body th {
  background: var(--v-black);
  color: var(--v-text-sec);
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-align: start;
  padding: 0.625rem 0.875rem;
  border-bottom: 2px solid var(--v-border);
}

.blog-post-body td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--v-border-sub);
}

.blog-post-body hr {
  border: none;
  height: 1px;
  background: var(--v-border-sub);
  margin: 2.5rem 0;
}

/* Tags - IMPROVED touch targets */
.blog-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--v-border-sub);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.625rem;
  min-height: 32px;
  background: var(--v-surface);
  border: 1px solid var(--v-border-sub);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--v-text-sec);
  transition: border-color var(--v-ease), color var(--v-ease);
}

.tag:hover {
  border-color: var(--v-venom);
  color: var(--v-venom);
}

/* Author box */
.author-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
  background: var(--v-surface);
  border: 1px solid var(--v-border-sub);
  border-inline-start: 3px solid var(--v-venom);
  border-radius: var(--v-radius);
}

.author-box-avatar {
  width: 44px;
  height: 44px;
  background: var(--v-raised);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v-text-mute);
  flex-shrink: 0;
}

.author-box-info h4 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.author-box-info p {
  font-size: 0.8125rem;
  color: var(--v-text-sec);
}

/* Post nav - IMPROVED touch targets */
.blog-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--v-border-sub);
}

.post-nav-prev,
.post-nav-next {
  display: block;
  padding: 1rem;
  min-height: var(--touch-target);
  background: var(--v-surface);
  border: 1px solid var(--v-border-sub);
  border-radius: var(--v-radius);
  transition: border-color var(--v-ease);
}

.post-nav-prev:hover,
.post-nav-next:hover {
  border-color: var(--v-venom);
}

.post-nav-next {
  text-align: end;
  grid-column: 2;
}

.post-nav-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--v-text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.post-nav-title {
  display: block;
  font-family: var(--font-headline);
  font-size: 0.9375rem;
  color: var(--v-text);
  line-height: 1.3;
}

/* ================================================================
   AD ZONES
   ================================================================ */
.ad-zone {
  border-radius: var(--v-radius);
  overflow: hidden;
}

.ad-zone--sidebar {
  margin-bottom: 1.25rem;
}

.ad-zone--inline {
  grid-column: 1 / -1;
  margin: 1rem 0;
}

.ad-zone--post {
  margin-top: 2rem;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.blog-sidebar {
  position: sticky;
  top: 140px;
}

.sidebar-widget {
  background: var(--v-surface);
  border: 1px solid var(--v-border-sub);
  border-radius: var(--v-radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-widget h3 {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--v-text-mute);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--v-border-sub);
}

.sidebar-search {
  display: flex;
  background: var(--v-bg);
  border: 1px solid var(--v-border);
  border-radius: var(--v-radius);
  overflow: hidden;
  transition: border-color var(--v-ease);
}

.sidebar-search:focus-within {
  border-color: var(--v-venom);
}

.sidebar-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--v-text);
  padding: 0.5rem 0.75rem;
  min-height: var(--touch-target);
  font-size: 0.875rem;
  outline: none;
  font-family: var(--font-body);
}

.sidebar-search input::placeholder {
  color: var(--v-text-mute);
}

.sidebar-search button {
  background: none;
  border: none;
  color: var(--v-text-mute);
  padding: 0.5rem;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-search button:hover {
  color: var(--v-venom);
}

.sidebar-categories,
.sidebar-recent {
  list-style: none;
}

.sidebar-categories li a,
.sidebar-recent li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  min-height: var(--touch-target);
  color: var(--v-text-body);
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--v-border-sub);
  transition: color var(--v-ease);
}

.sidebar-categories li:last-child a,
.sidebar-recent li:last-child a {
  border-bottom: none;
}

.sidebar-categories li a:hover,
.sidebar-recent li a:hover {
  color: var(--v-venom);
}

.sidebar-recent li a {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
}

.recent-title {
  font-weight: 500;
  color: var(--v-text);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.sidebar-recent li a time {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--v-text-mute);
}

/* ================================================================
   HOME LATEST
   ================================================================ */
.home-latest {
  padding: 3rem 0;
}

/* ================================================================
   BUTTONS - IMPROVED touch targets
   ================================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--v-venom);
  color: #fff;
  padding: 0.75rem 1.5rem;
  min-height: var(--touch-target);
  border-radius: var(--v-radius);
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background var(--v-ease), transform 0.1s ease;
}

.btn-primary:hover {
  background: var(--v-venom-hot);
  color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover {
    transform: translateY(-1px);
  }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--v-text-sec);
  padding: 0.75rem 1.25rem;
  min-height: var(--touch-target);
  border: 1px solid var(--v-border);
  border-radius: var(--v-radius);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color var(--v-ease), border-color var(--v-ease);
}

.btn-ghost:hover {
  color: var(--v-text);
  border-color: var(--v-text-mute);
}

/* ================================================================
   PAGE CONTENT
   ================================================================ */
.page-content {
  padding: 3rem 0;
}

.page-article {
  max-width: var(--content-width);
  margin-inline: auto;
}

.page-article h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.page-body {
  font-size: 1rem;
  line-height: 1.8;
}

/* ================================================================
   PAGINATION - IMPROVED touch targets
   ================================================================ */
.pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.pagination ul {
  display: flex;
  list-style: none;
  gap: 0.375rem;
}

.pagination a,
.pagination .current {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  border-radius: var(--v-radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.pagination a {
  color: var(--v-text-sec);
  background: var(--v-surface);
  border: 1px solid var(--v-border-sub);
  transition: color var(--v-ease), border-color var(--v-ease);
}

.pagination a:hover {
  color: var(--v-text);
  border-color: var(--v-border);
}

.pagination .current {
  background: var(--v-venom);
  color: #fff;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  margin-top: auto;
  background: var(--v-black);
  border-top: 2px solid var(--v-venom);
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--v-text);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
}

.footer-logo .logo-text {
  font-family: var(--font-headline);
  font-size: 1.25rem;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--v-text-sec);
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  gap: 3rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--v-text-mute);
  margin-bottom: 0.75rem;
}

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

.footer-col li {
  margin-bottom: 0.375rem;
}

.footer-col a {
  color: var(--v-text-body);
  font-size: 0.8125rem;
  transition: color var(--v-ease);
  display: inline-block;
  padding: 0.25rem 0;
}

.footer-col a:hover {
  color: var(--v-venom);
}

.footer-bottom {
  border-top: 1px solid var(--v-border-sub);
  padding: 1rem 1.5rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.625rem;
  color: var(--v-text-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ================================================================
   COOKIE CONSENT BANNER
   ================================================================ */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--v-black);
  border-top: 2px solid var(--v-venom);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.6);
}

.consent-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.consent-text {
  flex: 1;
}

.consent-text p {
  font-size: 0.8125rem;
  color: var(--v-text-body);
  line-height: 1.6;
  margin: 0;
}

.consent-text a {
  color: var(--v-venom);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* IMPROVED: Consent buttons with proper touch targets */
.consent-btn {
  padding: 0.75rem 1.25rem;
  min-height: var(--touch-target);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: var(--v-radius);
  cursor: pointer;
  transition: background var(--v-ease), color var(--v-ease), border-color var(--v-ease);
  white-space: nowrap;
}

.consent-btn--accept {
  background: var(--v-venom);
  color: #fff;
}

.consent-btn--accept:hover {
  background: var(--v-venom-hot);
}

.consent-btn--decline {
  background: var(--v-surface);
  color: var(--v-text-sec);
  border: 1px solid var(--v-border);
}

.consent-btn--decline:hover {
  color: var(--v-text);
  border-color: var(--v-text-mute);
}

/* ================================================================
   RESPONSIVE — Mobile Redesign (LinuxNews.de Style)
   ================================================================ */

/* ── Tablet (max 1024px) ─────────────────────────────── */
@media (max-width: 1024px) {
  .featured-layout {
    grid-template-columns: 1fr;
  }

  .headline-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  .headline-stack-label {
    grid-column: 1 / -1;
  }

  .headline-item {
    border-inline-end: 1px solid var(--v-border-sub);
  }

  .headline-item:nth-child(odd):last-child,
  .headline-item:nth-child(even) {
    border-inline-end: none;
  }

  .blog-grid-wrapper,
  .blog-post-wrapper {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .sidebar-widget {
    margin-bottom: 0;
  }

  .blog-grid--home {
    grid-template-columns: repeat(2, 1fr);
  }

  .ad-zone--sidebar {
    display: none;
  }
}

/* ── Mobile (max 768px) ──────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --container: 100%;
  }

  .container {
    padding-inline: 1rem;
  }

  /* ── Header Mobile ─────────────────────────────────── */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .header-top-bar {
    display: none;
  }

  .header-main {
    border-bottom: none;
  }

  .header-main-inner {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }

  .header-search {
    display: none;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .logo-desc {
    display: none;
  }

  /* ── Mobile Navigation ─────────────────────────────── */
  .header-nav {
    position: relative;
  }

  .header-nav-inner {
    padding: 0;
    justify-content: flex-start;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target);
    height: var(--touch-target);
    margin-inline-start: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--v-text);
    border-radius: 1px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
  }

  .nav-toggle span:nth-child(1) { top: 14px; }
  .nav-toggle span:nth-child(2) { top: 21px; }
  .nav-toggle span:nth-child(3) { top: 28px; }

  .nav-toggle.active span:nth-child(1) {
    top: 21px;
    transform: translateX(-50%) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    top: 21px;
    transform: translateX(-50%) rotate(-45deg);
  }

  .nav-list {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--v-bg);
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    z-index: 99;
    overflow-y: auto;
  }

  .nav-list.open {
    display: flex;
    animation: slideIn 0.3s ease;
  }

  .nav-list li a {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    min-height: var(--touch-target);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--v-text);
    border-bottom: 1px solid var(--v-border-sub);
  }

  .nav-list li a:hover,
  .nav-list li.active a {
    color: var(--v-venom);
    background: transparent;
  }

  .nav-divider {
    display: none;
  }

  /* ── Mobile Category Chips (Horizontal Scroll) ─────── */
  .home-categories-bar {
    background: var(--v-surface);
    border-top: none;
    border-bottom: 1px solid var(--v-border-sub);
    padding: 0;
  }

  .categories-bar-inner {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .categories-bar-inner::-webkit-scrollbar {
    display: none;
  }

  .category-chip {
    scroll-snap-align: start;
    padding: 0.5rem 1rem;
    min-height: var(--touch-target);
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ── Mobile Featured Section ───────────────────────── */
  .home-featured {
    padding: 1rem 0;
  }

  .featured-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: auto;
  }

  .featured-content {
    min-height: 280px;
    padding: 1.25rem;
  }

  .featured-title {
    font-size: 1.375rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
  }

  .featured-excerpt {
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .featured-category {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.5rem;
  }

  .featured-meta {
    font-size: 0.6875rem;
    gap: 0.75rem;
  }

  /* ── Headline Stack Mobile ─────────────────────────── */
  .headline-stack {
    grid-template-columns: 1fr;
    background: var(--v-surface);
    border-radius: var(--v-radius-lg);
    padding: 0.5rem;
  }

  .headline-stack-label {
    padding: 0.5rem 0.75rem 0.625rem;
    margin-bottom: 0;
  }

  .headline-item {
    padding: 0.75rem;
    min-height: var(--touch-target);
    border-bottom: 1px solid var(--v-border-sub);
    border-inline-end: none;
    border-radius: var(--v-radius);
    margin: 0 0 0.25rem;
  }

  .headline-item:last-child {
    margin-bottom: 0;
  }

  .headline-item:hover {
    background: var(--v-venom-ghost);
    margin-inline-start: 0;
    margin-inline-end: 0;
    padding-inline-start: 0.75rem;
    padding-inline-end: 0.75rem;
  }

  .headline-thumb {
    width: 72px;
    height: 48px;
  }

  .headline-item h4 {
    font-size: 0.875rem;
    line-height: 1.3;
  }

  /* ── Blog Grid Mobile ──────────────────────────────── */
  .blog-layout {
    padding: 1.5rem 0 2.5rem;
  }

  .blog-hero {
    padding: 1.5rem 0 1rem;
  }

  .blog-hero-title {
    font-size: 1.5rem;
  }

  .blog-hero-subtitle {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }

  .category-pills {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

  .category-pills::-webkit-scrollbar {
    display: none;
  }

  .pill {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    min-height: var(--touch-target);
  }

  .blog-grid,
  .blog-grid--home {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .blog-sidebar {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  /* ── Blog Card Mobile (LinuxNews Style) ────────────── */
  .blog-card {
    display: flex;
    flex-direction: row;
    border-radius: var(--v-radius);
    animation: none;
  }

  .blog-card:hover {
    transform: none;
  }

  .blog-card-image {
    width: 120px;
    min-width: 120px;
    aspect-ratio: 1 / 1;
    border-radius: var(--v-radius) 0 0 var(--v-radius);
  }

  /* Fallback for aspect-ratio */
  @supports not (aspect-ratio: 1 / 1) {
    .blog-card-image {
      height: 120px;
    }
  }

  .blog-card-body {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
  }

  .blog-card-meta {
    margin-bottom: 0.375rem;
    font-size: 0.625rem;
    gap: 0.375rem;
  }

  .blog-card-category {
    font-size: 0.5625rem;
    padding: 0.1rem 0.375rem;
  }

  .blog-card-title {
    font-size: 0.9375rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
  }

  .blog-card-summary {
    display: none;
  }

  .blog-card-footer {
    display: none;
  }

  /* First card as hero card on mobile */
  .blog-grid > .blog-card:first-child {
    flex-direction: column;
  }

  .blog-grid > .blog-card:first-child .blog-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--v-radius) var(--v-radius) 0 0;
  }

  @supports not (aspect-ratio: 16 / 9) {
    .blog-grid > .blog-card:first-child .blog-card-image {
      height: auto;
      padding-bottom: 56.25%;
    }
  }

  .blog-grid > .blog-card:first-child .blog-card-body {
    padding: 1rem;
  }

  .blog-grid > .blog-card:first-child .blog-card-title {
    font-size: 1.125rem;
  }

  .blog-grid > .blog-card:first-child .blog-card-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    font-size: 0.8125rem;
  }

  .blog-grid > .blog-card:first-child .blog-card-footer {
    display: flex;
    margin-top: 0.5rem;
  }

  /* ── Article Page Mobile ───────────────────────────── */
  .blog-post-hero {
    height: 200px;
  }

  .blog-post-wrapper {
    margin-top: -2rem;
    padding-bottom: 2.5rem;
  }

  .blog-post-header {
    margin-bottom: 1.5rem;
  }

  .blog-post-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .blog-post-header h1 {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .blog-post-body {
    font-size: 1rem;
    line-height: 1.75;
  }

  .blog-post-body h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
  }

  .blog-post-body h3 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
  }

  .blog-post-body pre {
    margin: 1.25rem -1rem;
    border-radius: 0;
    border-inline-start: 3px solid var(--v-venom);
    border-inline-end: none;
    padding: 1rem;
    font-size: 0.75rem;
  }

  .blog-post-body blockquote {
    margin: 1.25rem 0;
    padding: 0.875rem 1rem;
  }

  .blog-post-body img {
    margin: 1.5rem -1rem;
    width: calc(100% + 2rem);
    max-width: none;
    border-radius: 0;
  }

  .blog-post-nav {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .post-nav-next {
    text-align: start;
    grid-column: auto;
  }

  .post-nav-prev,
  .post-nav-next {
    padding: 0.75rem;
    min-height: var(--touch-target);
  }

  .post-nav-title {
    font-size: 0.875rem;
  }

  /* ── Footer Mobile ─────────────────────────────────── */
  .footer-inner {
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }

  .footer-brand {
    max-width: none;
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
    margin-bottom: 0.375rem;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .footer-col h4 {
    font-size: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .footer-col a {
    font-size: 0.8125rem;
    padding: 0.375rem 0;
  }

  .footer-bottom {
    padding: 0.875rem 1rem;
  }

  .footer-bottom p {
    font-size: 0.5625rem;
  }

  /* ── Consent Banner Mobile ─────────────────────────── */
  .consent-banner {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .consent-inner {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    text-align: center;
  }

  .consent-text p {
    font-size: 0.8125rem;
  }

  .consent-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }

  .consent-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    min-height: var(--touch-target);
    font-size: 0.9375rem;
  }

  /* ── Pagination Mobile ─────────────────────────────── */
  .pagination {
    margin-top: 1.5rem;
  }

  .pagination a,
  .pagination .current {
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    font-size: 0.9375rem;
  }
}

/* ── Small Mobile (max 480px) ────────────────────────── */
@media (max-width: 480px) {
  .container {
    padding-inline: 0.875rem;
  }

  .logo-text {
    font-size: 1.125rem;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .featured-content {
    min-height: 240px;
    padding: 1rem;
  }

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

  .blog-card-image {
    width: 100px;
    min-width: 100px;
  }

  .blog-card-title {
    font-size: 0.875rem;
  }

  .blog-card-meta {
    font-size: 0.5625rem;
  }

  .blog-post-header h1 {
    font-size: 1.375rem;
  }

  .blog-post-body {
    font-size: 0.9375rem;
  }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    text-align: center;
  }
}

/* ── Safe Area Insets (iPhone X+) ────────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .nav-list {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
  .site-header,
  .header-nav,
  .nav-toggle,
  .consent-banner,
  .blog-sidebar,
  .ad-zone,
  .pagination,
  .blog-post-nav {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .blog-post-body {
    font-size: 12pt;
    line-height: 1.6;
  }
}
