/* ===== CSS VARIABLES ===== */
:root {
  --clr-bg: #f8f7f4;
  --clr-bg-2: #ffffff;
  --clr-bg-3: #f0ede8;
  --clr-surface: #ffffff;
  --clr-border: #e8e4dd;
  --clr-text: #1a1917;
  --clr-text-2: #4a4845;
  --clr-text-3: #8a8784;
  --clr-accent: #e84545;
  --clr-accent-hover: #c73333;
  --clr-accent-2: #2563eb;
  --clr-tag-bg: #f0ede8;
  --clr-tag-text: #4a4845;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .12), 0 4px 12px rgba(0, 0, 0, .06);

  --header-h: 64px;
  --header-top-h: 36px;
  --max-w: 1280px;
  --content-w: 780px;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --clr-bg: #111110;
  --clr-bg-2: #1a1917;
  --clr-bg-3: #222120;
  --clr-surface: #1e1d1c;
  --clr-border: #2e2c2a;
  --clr-text: #f0ede8;
  --clr-text-2: #b8b4ae;
  --clr-text-3: #7a7672;
  --clr-accent: #ff5555;
  --clr-accent-hover: #e84545;
  --clr-tag-bg: #2a2826;
  --clr-tag-text: #b8b4ae;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

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

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--clr-bg-2);
  border-bottom: 1px solid var(--clr-border);
  transition: box-shadow var(--transition), background var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-top {
  background: var(--clr-text);
  color: var(--clr-bg);
  font-size: 12px;
  height: var(--header-top-h);
  display: flex;
  align-items: center;
}

[data-theme="dark"] .header-top {
  background: var(--clr-bg-3);
  color: var(--clr-text-2);
}

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

.header-date {
  font-size: 12px;
  opacity: 0.75;
  font-family: var(--font-mono);
}

.header-top-nav {
  display: flex;
  gap: 20px;
}

.header-top-nav a {
  font-size: 12px;
  opacity: 0.8;
  transition: opacity var(--transition);
  letter-spacing: 0.02em;
}

.header-top-nav a:hover {
  opacity: 1;
}

.header-main {
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.header-main-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.logo-sync {
  color: var(--clr-text);
}

.logo-sup {
  color: var(--clr-accent);
}

.main-nav {
  display: flex;
  gap: 2px;
  flex: 1;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--clr-text-2);
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--clr-text);
  background: var(--clr-bg-3);
}

.nav-link.active {
  color: var(--clr-accent);
  background: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.search-toggle,
.theme-toggle,
.nav-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-2);
  transition: color var(--transition), background var(--transition);
}

.search-toggle:hover,
.theme-toggle:hover,
.nav-toggle:hover {
  color: var(--clr-text);
  background: var(--clr-bg-3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.icon-moon {
  display: none;
}

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

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

/* Search Bar */
.search-bar {
  background: var(--clr-bg-3);
  border-top: 1px solid var(--clr-border);
  padding: 12px 0;
  display: none;
  animation: slideDown 0.2s ease;
}

.search-bar.open {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  background: var(--clr-surface);
  color: var(--clr-text);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--clr-accent);
}

.search-submit {
  padding: 10px 20px;
  background: var(--clr-accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background var(--transition);
}

.search-submit:hover {
  background: var(--clr-accent-hover);
}

.search-close {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--clr-text-3);
  font-size: 16px;
  transition: color var(--transition);
}

.search-close:hover {
  color: var(--clr-text);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.mobile-nav-overlay.active {
  display: block;
}

/* ===== NEWS TICKER ===== */
.news-ticker {
  background: var(--clr-accent);
  color: #fff;
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.news-ticker .container {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  width: 100%;
}

.ticker-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.2);
  padding: 3px 10px;
  border-radius: 3px;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-content {
  display: inline-flex;
  gap: 0;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}

.ticker-content a {
  font-size: 13px;
  font-weight: 500;
  padding: 0 32px;
  opacity: 0.95;
  transition: opacity var(--transition);
}

.ticker-content a:hover {
  opacity: 1;
}

.ticker-content a::before {
  content: '•';
  margin-right: 32px;
  opacity: 0.5;
}

@keyframes ticker {
  from {
    transform: translateX(100vw);
  }

  to {
    transform: translateX(-100%);
  }
}

/* ===== HERO SECTION ===== */
.hero-section {
  padding: 40px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto auto;
  gap: 20px;
}

/* Hero Main Card */
.hero-card-main {
  grid-row: 1 / 3;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-card-main:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-card-main .card-img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  transition: transform 0.4s ease;
}

.hero-card-main:hover .card-img {
  transform: scale(1.02);
}

.hero-card-main .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 28px 24px;
  background: linear-gradient(to top, rgba(10, 9, 8, 0.9) 0%, rgba(10, 9, 8, 0.5) 60%, transparent 100%);
  color: #fff;
}

.card-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--clr-accent);
  color: #fff;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.hero-card-main .card-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  opacity: 0.8;
}

.card-meta-dot {
  opacity: 0.5;
}

.card-read-time {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Hero Side Cards */
.hero-card-side {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-card-side:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-card-side .card-img {
  width: 120px;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.hero-card-side .card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.hero-card-side .card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--clr-text);
}

/* Skeleton */
.hero-skeleton {
  grid-column: 1 / -1;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-img {
  aspect-ratio: 16/9;
  background: linear-gradient(90deg, var(--clr-bg-3) 25%, var(--clr-border) 50%, var(--clr-bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 20px;
  margin: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--clr-bg-3) 25%, var(--clr-border) 50%, var(--clr-bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text.short {
  width: 50%;
}

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

  to {
    background-position: -200% 0;
  }
}

/* ===== AD SLOTS ===== */
.ad-slot {
  text-align: center;
  padding: 12px 0;
}

.ad-slot--leaderboard {
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-bg-3);
}

.ad-placeholder {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--clr-text-3);
  font-family: var(--font-mono);
}

/* Hide ad label in production — just show ad */
.ad-slot ins {
  display: block;
}

/* ===== MAIN LAYOUT ===== */
.site-main {
  padding: 40px 0 60px;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* ===== CATEGORY TABS ===== */
.category-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tab-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 99px;
  color: var(--clr-text-2);
  background: var(--clr-bg-3);
  border: 1px solid var(--clr-border);
  transition: all var(--transition);
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.tab-btn:hover {
  background: var(--clr-border);
  color: var(--clr-text);
}

.tab-btn.active {
  background: var(--clr-accent);
  color: #fff;
  border-color: var(--clr-accent);
}

/* ===== ARTICLES GRID ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Article Card */
.article-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

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

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

.article-card .card-body {
  padding: 18px;
}

.article-card .card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--clr-text);
  margin: 8px 0;
  transition: color var(--transition);
}

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

.article-card .card-excerpt {
  font-size: 14px;
  color: var(--clr-text-2);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--clr-border);
  padding-top: 12px;
  margin-top: 12px;
}

.card-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--clr-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.author-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--clr-text-2);
}

.card-date {
  font-size: 12px;
  color: var(--clr-text-3);
  font-family: var(--font-mono);
}

/* Share button on cards */
.card-share {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity var(--transition);
}

.article-card:hover .card-share {
  opacity: 1;
}

.card-img-wrap {
  position: relative;
}

.share-btn-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 14px;
  transition: background var(--transition);
  box-shadow: var(--shadow-sm);
}

.share-btn-small:hover {
  background: #fff;
}

/* ===== LOAD MORE ===== */
.load-more-wrapper {
  text-align: center;
  margin-top: 32px;
}

.btn-load-more {
  padding: 12px 36px;
  border: 2px solid var(--clr-border);
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  color: var(--clr-text);
  font-family: var(--font-body);
  transition: all var(--transition);
  background: var(--clr-surface);
}

.btn-load-more:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.btn-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--header-top-h) + 40px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--clr-accent);
}

/* Newsletter Widget */
.widget-newsletter p {
  font-size: 14px;
  color: var(--clr-text-2);
  margin-bottom: 14px;
  line-height: 1.5;
}

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

.newsletter-form input {
  padding: 10px 14px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background: var(--clr-bg);
  color: var(--clr-text);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-form input:focus {
  border-color: var(--clr-accent);
}

.newsletter-form button {
  padding: 10px;
  background: var(--clr-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background var(--transition);
}

.newsletter-form button:hover {
  background: var(--clr-accent-hover);
}

.newsletter-note {
  font-size: 11px;
  color: var(--clr-text-3);
  margin-top: 6px;
  margin-bottom: 0 !important;
}

/* Trending Widget */
.trending-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: trending;
}

.trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  counter-increment: trending;
}

.trending-item::before {
  content: counter(trending, decimal-leading-zero);
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--clr-border);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
}

.trending-item:hover::before {
  color: var(--clr-accent);
}

.trending-item a {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--clr-text);
  transition: color var(--transition);
}

.trending-item a:hover {
  color: var(--clr-accent);
}

.trending-meta {
  font-size: 11px;
  color: var(--clr-text-3);
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* Tags Widget */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--clr-tag-bg);
  color: var(--clr-tag-text);
  border: 1px solid var(--clr-border);
  transition: all var(--transition);
}

.tag-pill:hover {
  background: var(--clr-accent);
  color: #fff;
  border-color: var(--clr-accent);
}

/* ===== AD SIDEBAR ===== */
.ad-slot--sidebar {
  background: var(--clr-bg-3);
  border: 1px dashed var(--clr-border);
  border-radius: var(--radius-md);
  min-height: 280px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--clr-text);
  color: var(--clr-bg);
  padding: 60px 0 0;
}

[data-theme="dark"] .site-footer {
  background: var(--clr-bg-3);
  border-top: 1px solid var(--clr-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .footer-grid {
  border-bottom-color: var(--clr-border);
}

.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 16px;
}

.footer-brand .logo-sync {
  color: #fff;
}

.footer-brand .logo-sup {
  color: var(--clr-accent);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  max-width: 300px;
}

[data-theme="dark"] .footer-brand p {
  color: var(--clr-text-3);
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--clr-accent);
  color: #fff;
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

[data-theme="dark"] .footer-links h4 {
  color: var(--clr-text-3);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
}

[data-theme="dark"] .footer-links a {
  color: var(--clr-text-2);
}

.footer-links a:hover {
  color: var(--clr-accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .footer-bottom {
  color: var(--clr-text-3);
}

.footer-tagline {
  font-family: var(--font-mono);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 50;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--clr-accent-hover);
  transform: translateY(-2px);
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--clr-text);
  color: var(--clr-bg);
  padding: 16px 0;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-banner.show {
  transform: translateY(0);
}

[data-theme="dark"] .cookie-banner {
  background: var(--clr-bg-3);
  border-top: 1px solid var(--clr-border);
}

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

.cookie-inner p {
  font-size: 14px;
  opacity: 0.85;
}

.cookie-inner a {
  text-decoration: underline;
  opacity: 1;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-cookie-accept {
  padding: 8px 20px;
  background: var(--clr-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background var(--transition);
}

.btn-cookie-accept:hover {
  background: var(--clr-accent-hover);
}

.btn-cookie-decline {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  transition: all var(--transition);
}

.btn-cookie-decline:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* ===== ARTICLE PAGE ===== */
.article-hero {
  padding: 40px 0 0;
}

.article-hero-inner {
  max-width: var(--content-w);
  margin: 0 auto;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--clr-text-3);
  margin-bottom: 20px;
}

.article-breadcrumb a {
  transition: color var(--transition);
}

.article-breadcrumb a:hover {
  color: var(--clr-accent);
}

.article-breadcrumb span {
  opacity: 0.4;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--clr-text);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 32px;
}

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

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

.meta-author-name {
  font-weight: 600;
  font-size: 14px;
}

.meta-date,
.meta-read {
  font-size: 13px;
  color: var(--clr-text-3);
  font-family: var(--font-mono);
}

.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Article Body */
.article-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--clr-text-2);
  max-width: var(--content-w);
  margin: 0 auto;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--clr-text);
  margin: 36px 0 16px;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--clr-text);
  margin: 28px 0 12px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body a {
  color: var(--clr-accent-2);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.3);
  transition: text-decoration-color var(--transition);
}

.article-body a:hover {
  text-decoration-color: var(--clr-accent-2);
}

.article-body ul,
.article-body ol {
  list-style: revert;
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body blockquote {
  border-left: 4px solid var(--clr-accent);
  padding: 16px 20px;
  background: var(--clr-bg-3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  font-style: italic;
  font-size: 18px;
  color: var(--clr-text);
}

/* Article Tables (Markdown) */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 15px;
  text-align: left;
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--clr-border);
}

.article-body th,
.article-body td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--clr-border);
}

.article-body th {
  background: var(--clr-bg-3);
  font-weight: 700;
  color: var(--clr-text);
  font-family: var(--font-body);
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body tbody tr:hover {
  background: var(--clr-bg-2);
}

/* Responsive Tables */
@media (max-width: 600px) {
  .article-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--clr-bg-3);
  padding: 2px 6px;
  border-radius: 3px;
}

.article-body pre {
  background: #1a1917;
  color: #e0dbd3;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  font-size: 14px;
}

/* Social Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  margin: 40px 0;
  flex-wrap: wrap;
}

.share-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-text-3);
  font-family: var(--font-mono);
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all var(--transition);
  border: 1px solid var(--clr-border);
  color: var(--clr-text-2);
  background: var(--clr-surface);
}

.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.share-btn--twitter:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

.share-btn--facebook:hover {
  background: #1877f2;
  color: #fff;
  border-color: #1877f2;
}

.share-btn--whatsapp:hover {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
}

.share-btn--copy:hover {
  background: var(--clr-accent);
  color: #fff;
  border-color: var(--clr-accent);
}

/* ===== READING PROGRESS BAR ===== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--clr-accent);
  z-index: 200;
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== UTILITY ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.no-scroll {
  overflow: hidden;
}

/* Fade in animation for cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

.article-card {
  animation: fadeInUp 0.4s ease both;
}

.article-card:nth-child(1) {
  animation-delay: 0.0s;
}

.article-card:nth-child(2) {
  animation-delay: 0.05s;
}

.article-card:nth-child(3) {
  animation-delay: 0.10s;
}

.article-card:nth-child(4) {
  animation-delay: 0.15s;
}

.article-card:nth-child(5) {
  animation-delay: 0.20s;
}

.article-card:nth-child(6) {
  animation-delay: 0.25s;
}