/*
Theme Name: Scubby
Theme URI: https://scubby.com
Author: Scubby Team
Author URI: https://scubby.com
Description: A modern, vibrant blog theme for Scubby — clean typography, expressive layouts, and joyful reading experiences.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scubby
Tags: blog, custom-colors, custom-header, custom-menu, custom-logo, featured-images, footer-widgets, full-width-template, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, two-columns
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Colors */
  --color-ink: #0f0f0e;
  --color-paper: #f8f5ef;
  --color-accent: #e84b2a;
  --color-accent-alt: #f5a623;
  --color-muted: #7a7369;
  --color-border: #e2ddd5;
  --color-card: #ffffff;
  --color-hero-bg: #0f0f0e;

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Layout */
  --max-width: 1280px;
  --content-width: 740px;
  --sidebar-width: 320px;
  --radius: 4px;
  --radius-lg: 12px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.3s;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-paper);
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.875rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.0625rem; }
h6 { font-size: 0.9375rem; }

p { margin-bottom: 1.5rem; }
p:last-child { margin-bottom: 0; }

.entry-content h2,
.entry-content h3,
.entry-content h4 { margin: 2.5rem 0 1rem; }

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content pre { margin-bottom: 1.75rem; }

.entry-content ul,
.entry-content ol { padding-left: 1.5rem; }

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin-left: 0;
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-muted);
}

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

.entry-content a:hover { opacity: 0.75; }

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--content-width);
}

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 245, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--duration) var(--ease);
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--color-ink);
  transition: opacity var(--duration) var(--ease);
}

.site-logo:hover { opacity: 0.75; }

.site-logo__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-block;
  margin-left: 2px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* Navigation */
.main-nav { display: flex; align-items: center; gap: var(--space-md); }

.main-nav__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav__menu a {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-ink);
  position: relative;
  padding-bottom: 2px;
}

.main-nav__menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--duration) var(--ease);
}

.main-nav__menu a:hover::after,
.main-nav__menu a.current-menu-item::after { width: 100%; }

.main-nav__cta {
  background: var(--color-accent);
  color: white !important;
  padding: 0.6rem 1.25rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--duration) var(--ease);
}

.main-nav__cta:hover {
  background: var(--color-ink);
  transform: translateY(-1px);
}

.main-nav__cta::after { display: none !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  transition: all var(--duration) var(--ease);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: var(--color-hero-bg);
  color: white;
  padding: calc(72px + var(--space-xl)) 0 var(--space-xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,75,42,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.hero__kicker::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-accent);
}

.hero__title {
  color: white;
  margin-bottom: 1.5rem;
}

.hero__title em {
  font-style: italic;
  color: var(--color-accent-alt);
}

.hero__desc {
  font-size: 1.125rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.65);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}

.btn--primary {
  background: var(--color-accent);
  color: white;
}

.btn--primary:hover {
  background: #c93d22;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 75, 42, 0.4);
}

.btn--ghost {
  border: 1.5px solid rgba(255,255,255,0.25);
  color: white;
}

.btn--ghost:hover {
  border-color: white;
  background: rgba(255,255,255,0.1);
}

/* Hero feature card */
.hero__featured {
  position: relative;
  z-index: 1;
}

.hero__featured-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: transform var(--duration) var(--ease);
}

.hero__featured-card:hover { transform: translateY(-4px); }

.hero__featured-img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}

.hero__featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.hero__featured-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.hero__featured-body { padding: 1.5rem; }

.hero__featured-cat {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

.hero__featured-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  color: white;
  margin-bottom: 0.75rem;
}

.hero__featured-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
}

/* ============================================
   TICKER / MARQUEE
   ============================================ */
.ticker {
  background: var(--color-accent);
  color: white;
  padding: 0.875rem 0;
  overflow: hidden;
}

.ticker__track {
  display: flex;
  gap: 3rem;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.ticker__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ticker__item::after {
  content: '✦';
  opacity: 0.5;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   FEATURED POSTS GRID
   ============================================ */
.section { padding: var(--space-lg) 0; }

.section--lg { padding: var(--space-xl) 0; }

.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  gap: 1rem;
}

.section__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.section__title span {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-family: var(--font-body);
  margin-bottom: 0.25rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  white-space: nowrap;
  transition: gap var(--duration) var(--ease);
}

.link-arrow:hover { gap: 0.75rem; }

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

/* Post Card */
.post-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
  border-color: transparent;
}

.post-card--large { grid-row: span 2; }

.post-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-border);
  position: relative;
}

.post-card--large .post-card__img { aspect-ratio: 4/5; }

.post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.post-card:hover .post-card__img img { transform: scale(1.05); }

.post-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--color-border) 0%, #d8d3cb 100%);
}

.post-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.625rem;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  color: var(--color-ink);
  transition: color var(--duration) var(--ease);
}

.post-card--large .post-card__title { font-size: 1.5rem; }

.post-card:hover .post-card__title { color: var(--color-accent); }

.post-card__excerpt {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.post-card__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.post-card__meta-sep { color: var(--color-border); }

/* ============================================
   HORIZONTAL POST LIST (sidebar style)
   ============================================ */
.post-list { display: flex; flex-direction: column; gap: 1rem; }

.post-list-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration) var(--ease);
}

.post-list-item:hover {
  border-color: var(--color-accent);
  transform: translateX(4px);
}

.post-list-item__num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-border);
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
}

.post-list-item__body { flex: 1; min-width: 0; }

.post-list-item__cat {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.25rem;
}

.post-list-item__title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-list-item__meta {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 0.375rem;
}

/* ============================================
   CATEGORIES STRIP
   ============================================ */
.categories-strip {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.categories-strip__grid {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.categories-strip__grid::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  color: var(--color-ink);
  background: var(--color-card);
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
  flex-shrink: 0;
}

.cat-pill:hover,
.cat-pill.active {
  background: var(--color-ink);
  color: white;
  border-color: var(--color-ink);
}

.cat-pill__icon { font-size: 1rem; }

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter {
  background: var(--color-ink);
  color: white;
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,75,42,0.2) 0%, transparent 65%);
  pointer-events: none;
}

.newsletter__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  position: relative;
  z-index: 1;
}

.newsletter__kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.newsletter__title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  color: white;
  margin-bottom: 1rem;
}

.newsletter__desc {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  line-height: 1.7;
}

.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.newsletter__field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.newsletter__field input {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  color: white;
  font-size: 1rem;
  transition: border-color var(--duration) var(--ease);
}

.newsletter__field input::placeholder { color: rgba(255,255,255,0.35); }

.newsletter__field input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.newsletter__submit {
  background: var(--color-accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--duration) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.newsletter__submit:hover {
  background: #c93d22;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,75,42,0.4);
}

.newsletter__privacy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  background: white;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}

.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
}

.stat-item {
  background: white;
  padding: var(--space-sm) var(--space-md);
  text-align: center;
}

.stat-item__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-ink);
  line-height: 1;
  margin-bottom: 0.375rem;
}

.stat-item__num span { color: var(--color-accent); }

.stat-item__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: 0.03em;
}

/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
  background: var(--color-ink);
  color: rgba(255,255,255,0.6);
  padding: var(--space-lg) 0 var(--space-md);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.footer-col__logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: white;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.footer-col__desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-col__social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  transition: all var(--duration) var(--ease);
}

.social-link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  transform: translateY(-2px);
}

.footer-col__heading {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 1.25rem;
}

.footer-nav { display: flex; flex-direction: column; gap: 0.75rem; }

.footer-nav a {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--duration) var(--ease);
}

.footer-nav a:hover { color: white; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* ============================================
   SINGLE POST
   ============================================ */
.post-hero {
  background: var(--color-ink);
  color: white;
  padding: calc(72px + var(--space-lg)) 0 var(--space-lg);
}

.post-hero__cat {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.375rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.post-hero__title { color: white; margin-bottom: 1.5rem; max-width: 800px; }

.post-hero__meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.55);
}

.post-hero__author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
}

.post-featured-img {
  aspect-ratio: 21/9;
  background: var(--color-border);
  overflow: hidden;
}

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

.post-body {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

/* Sidebar */
.sidebar { position: sticky; top: calc(72px + 2rem); height: fit-content; }

.sidebar-widget {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget__title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

/* ============================================
   PAGE HERO (generic)
   ============================================ */
.page-hero {
  background: var(--color-ink);
  color: white;
  padding: calc(72px + var(--space-lg)) 0 var(--space-lg);
  text-align: center;
}

.page-hero__title { color: white; margin-bottom: 1rem; }
.page-hero__desc { color: rgba(255,255,255,0.6); font-size: 1.125rem; max-width: 560px; margin: 0 auto; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--space-md) 0;
}

.page-numbers {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1.5px solid var(--color-border);
  color: var(--color-ink);
  transition: all var(--duration) var(--ease);
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

/* ============================================
   SEARCH FORM
   ============================================ */
.search-form {
  display: flex;
  gap: 0;
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: 100px;
  overflow: hidden;
  transition: border-color var(--duration) var(--ease);
}

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

.search-form input {
  flex: 1;
  border: none;
  background: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-ink);
}

.search-form input:focus { outline: none; }

.search-form button {
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: white;
  font-size: 1rem;
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) 0;
}

.error-404__num {
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 900;
  line-height: 1;
  color: var(--color-border);
  margin-bottom: -1rem;
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-area { padding: var(--space-md) 0; }

.comment {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.comment-meta { font-size: 0.8125rem; color: var(--color-muted); margin-bottom: 0.5rem; }
.comment-meta strong { color: var(--color-ink); font-weight: 600; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-muted); }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__featured { display: none; }
  .newsletter__inner { grid-template-columns: 1fr; }
  .posts-grid--featured { grid-template-columns: 1fr; }
  .post-card--large { grid-row: auto; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .stats-bar__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --space-lg: 2.5rem; --space-xl: 4rem; }

  .main-nav__menu { display: none; }
  .main-nav__cta { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.open .main-nav__menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-paper);
    padding: var(--space-md);
    align-items: flex-start;
    gap: 1.5rem;
    font-size: 1.5rem;
  }

  .posts-grid--3 { grid-template-columns: 1fr; }
  .posts-grid--2 { grid-template-columns: 1fr; }
  .post-body { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .stats-bar__grid { grid-template-columns: repeat(2, 1fr); }
  .section__header { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   ARCHIVE LAYOUT
   ============================================ */
.archive-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

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

/* ============================================
   CLEAN PAGINATION
   ============================================ */
.scubby-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.scubby-page-numbers {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.scubby-page-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-ink);
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.scubby-page-num:hover {
  border-color: var(--color-border);
  background: var(--color-card);
}

.scubby-page-num.scubby-page-current {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  font-weight: 700;
}

.scubby-page-ellipsis {
  color: var(--color-muted);
  padding: 0 0.25rem;
  font-size: 0.9375rem;
}

.scubby-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  color: var(--color-ink);
  background: var(--color-card);
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.scubby-page-btn:hover:not(.scubby-page-disabled) {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.scubby-page-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */
.main-nav__menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  min-width: 220px;
  padding: 0.5rem;
  z-index: 200;
}

.main-nav__menu li {
  position: relative;
}

.main-nav__menu li:hover > .sub-menu,
.main-nav__menu li:focus-within > .sub-menu {
  display: block;
}

.main-nav__menu .sub-menu li a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--color-ink);
  border-radius: 6px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.main-nav__menu .sub-menu li a:hover {
  background: var(--color-paper);
  color: var(--color-accent);
}

.main-nav__menu .sub-menu li a::after {
  display: none !important;
}

.main-nav__menu li.menu-item-has-children > a::after {
  content: ' \25be';
  font-size: 0.7rem;
  opacity: 0.55;
  display: inline !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
}
