/* =============================================
   GADGETGLOW BYTES — Modern Redesign
   ============================================= */

/* --- CSS Variables / Theming --- */
:root {
  --bg: #09090b;
  --surface: #111115;
  --surface2: #1c1c22;
  --border: #2a2a35;
  --text: #f0f0f5;
  --muted: #888899;
  --accent: #22d3ee;
  --accent-dim: rgba(34,211,238,0.12);
  --accent-glow: 0 0 24px rgba(34,211,238,0.25);
  --hot: #f97316;
  --hot-dim: rgba(249,115,22,0.12);
  --card-shadow: 0 4px 24px rgba(0,0,0,0.4);
  --header-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg: #f8f8fc;
  --surface: #ffffff;
  --surface2: #f0f0f7;
  --border: #e2e2ec;
  --text: #0d0d14;
  --muted: #6b6b80;
  --accent: #0891b2;
  --accent-dim: rgba(8,145,178,0.1);
  --accent-glow: 0 0 24px rgba(8,145,178,0.2);
  --hot: #ea580c;
  --hot-dim: rgba(234,88,12,0.1);
  --card-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
input, button { outline: none; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="light"] .site-header {
  background: rgba(248,248,252,0.9);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-bolt {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px var(--accent));
}

.logo-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-name strong {
  color: var(--accent);
}

/* Main Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

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

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

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  transition: color var(--transition), background var(--transition);
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface2);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 10px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: var(--transition);
}

/* Search Bar */
.search-bar {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
  display: none;
  z-index: 99;
}

.search-bar.open { display: block; animation: slideDown 0.2s ease; }

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

.search-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.625rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color var(--transition);
}

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

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

/* =============================================
   TICKER
   ============================================= */
.ticker {
  background: var(--accent);
  color: #000;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 36px;
  font-size: 0.8rem;
  font-weight: 600;
}

.ticker-badge {
  background: #000;
  color: var(--accent);
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  flex-shrink: 0;
  white-space: nowrap;
}

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

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
  will-change: transform;
}

.ticker-item {
  padding: 0 3rem;
}

.ticker-item::before {
  content: "•";
  margin-right: 3rem;
  opacity: 0.5;
}

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  padding: 2.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

/* Feature Card */
.hero-feature-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  display: block;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow), var(--accent-glow);
}

.hero-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface2);
}

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

.hero-feature-card:hover .hero-img-wrap img {
  transform: scale(1.04);
}

.hero-img-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
}

.hero-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--border) 100%);
  font-size: 4rem;
  opacity: 0.3;
}

.hero-content {
  padding: 1.75rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.875rem;
  color: var(--text);
}

.hero-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  transition: opacity var(--transition), transform var(--transition);
}

.btn-read-more:hover {
  opacity: 0.9;
  transform: translateX(2px);
}

/* Hero Stack (sidebar cards) */
.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-card {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  text-decoration: none;
}

.side-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.side-thumb {
  width: 80px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}

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

.side-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0.3;
}

.side-info { flex: 1; min-width: 0; }

.side-title {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.side-date {
  font-size: 0.75rem;
  color: var(--muted);
}

/* =============================================
   BADGES & TAGS
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  line-height: 1;
}

.badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-hot {
  background: var(--hot-dim);
  color: var(--hot);
}

.badge-purple {
  background: rgba(139,92,246,0.12);
  color: #a78bfa;
}

.badge-green {
  background: rgba(34,197,94,0.12);
  color: #4ade80;
}

.read-time {
  font-size: 0.78rem;
  color: var(--muted);
}

/* =============================================
   ARTICLES SECTION
   ============================================= */
.articles-section {
  padding: 1rem 0 4rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title span {
  color: var(--accent);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.tab {
  padding: 0.4rem 0.875rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid transparent;
  transition: all var(--transition);
}

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

.tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(34,211,238,0.3);
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Post Card */
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.post-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--card-shadow), var(--accent-glow);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface2);
  position: relative;
}

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

.post-card:hover .card-thumb img {
  transform: scale(1.06);
}

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.2;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--border) 100%);
}

.card-body {
  padding: 1.125rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
  flex-wrap: wrap;
}

.card-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.625rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

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

.card-date {
  font-size: 0.75rem;
  color: var(--muted);
}

.card-arrow {
  color: var(--accent);
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  font-size: 1.1rem;
  line-height: 1;
}

.post-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Load More */
.load-more-wrap {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  transition: all var(--transition);
  font-family: var(--font-body);
}

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

.btn-load-more.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* =============================================
   NEWSLETTER
   ============================================= */
.newsletter {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.nl-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.newsletter-text h2 {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.newsletter-text p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.nl-input-wrap {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.nl-input-wrap input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color var(--transition);
}

.nl-input-wrap input:focus {
  border-color: var(--accent);
}

.nl-input-wrap input::placeholder { color: var(--muted); }

.nl-input-wrap button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: opacity var(--transition);
  font-family: var(--font-body);
}

.nl-input-wrap button:hover { opacity: 0.9; }

.nl-note {
  font-size: 0.78rem;
  color: var(--muted);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand .logo { margin-bottom: 1rem; display: inline-flex; }

.footer-brand p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(34,211,238,0.3);
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--accent-dim);
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

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

.footer-col ul li a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag-pill {
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  transition: all var(--transition);
  cursor: pointer;
}

.tag-pill:hover {
  color: var(--accent);
  border-color: rgba(34,211,238,0.4);
  background: var(--accent-dim);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-bottom a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* =============================================
   SKELETON LOADERS
   ============================================= */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skel {
  border-radius: var(--radius);
  background: linear-gradient(90deg,
    var(--surface2) 0%,
    var(--border) 50%,
    var(--surface2) 100%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skel-hero {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
}

.skel-side {
  height: 96px;
  border-radius: var(--radius-sm);
}

.skel-card {
  height: 340px;
  border-radius: var(--radius);
}

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

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

.back-top:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* =============================================
   CATEGORY COLOR MAP
   ============================================= */
[data-cat-color="ai"]      { background: rgba(139,92,246,0.12); color: #a78bfa; }
[data-cat-color="news"]    { background: var(--hot-dim); color: var(--hot); }
[data-cat-color="gadgets"] { background: rgba(34,197,94,0.12); color: #4ade80; }
[data-cat-color="shop"]    { background: rgba(251,191,36,0.12); color: #fbbf24; }
[data-cat-color="tips"]    { background: rgba(99,102,241,0.12); color: #818cf8; }
[data-cat-color="science"] { background: rgba(20,184,166,0.12); color: #2dd4bf; }
[data-cat-color="default"] { background: var(--accent-dim); color: var(--accent); }

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.empty-state h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* =============================================
   POST READER
   ============================================= */
.post-reader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}

.post-reader.open {
  transform: translateX(0);
}

.pr-topbar {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.pr-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
  padding: 0.5rem 0;
}

.pr-back:hover { color: var(--accent); }

.pr-close { color: var(--muted); }
.pr-close:hover { color: var(--text); }

.pr-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pr-article {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* Post hero image */
.pr-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

/* Post meta */
.pr-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Post title */
.pr-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.pr-byline {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

/* Post content — override Blogger inline styles */
.pr-content {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.8;
}

.pr-content * { max-width: 100% !important; }

.pr-content img {
  border-radius: 8px;
  margin: 1.5rem auto;
  display: block;
  height: auto !important;
}

.pr-content h1, .pr-content h2, .pr-content h3, .pr-content h4 {
  font-family: var(--font-head) !important;
  color: var(--text) !important;
  margin: 2rem 0 0.75rem !important;
  letter-spacing: -0.02em !important;
  line-height: 1.3 !important;
}

.pr-content p {
  margin-bottom: 1.25rem !important;
  color: var(--text) !important;
}

.pr-content a {
  color: var(--accent) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pr-content ul, .pr-content ol {
  padding-left: 1.5rem !important;
  margin-bottom: 1.25rem !important;
}

.pr-content li { margin-bottom: 0.4rem !important; color: var(--text) !important; }

.pr-content blockquote {
  border-left: 3px solid var(--accent) !important;
  padding-left: 1.25rem !important;
  margin: 1.5rem 0 !important;
  color: var(--muted) !important;
  font-style: italic !important;
}

.pr-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-bottom: 1.5rem !important;
}

.pr-content td, .pr-content th {
  border: 1px solid var(--border) !important;
  padding: 0.5rem 0.75rem !important;
  color: var(--text) !important;
}

/* Force dark backgrounds to be transparent */
.pr-content div[style*="background"] {
  background: var(--surface) !important;
  border-radius: 8px !important;
  padding: 1rem !important;
  margin: 1rem 0 !important;
}

/* =============================================
   MOBILE NAV OVERLAY
   ============================================= */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav .nav-link {
  font-size: 1.75rem;
  font-family: var(--font-head);
  font-weight: 700;
}

.mobile-nav-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr 300px;
  }
}

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

  .hero-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

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

  .newsletter-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand { grid-column: 1 / -1; }

  .main-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 600px) {
  :root { --header-h: 56px; }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .hero-stack {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .nl-input-wrap {
    flex-direction: column;
  }

  .nl-input-wrap button {
    justify-content: center;
  }

  .back-top {
    bottom: 1.25rem;
    right: 1.25rem;
  }
}
