/*
 Theme Name: Enemy Slime Reborn
 Theme URI: http://enemyslime.com
 Description: A modern dark-mode bento redesign for Enemy Slime, built as a child theme.
 Author: Enemy Slime
 Author URI: http://enemyslime.com
 Template: enemyslime
 Version: 1.0.0
 Text Domain: enemyslime-reborn
*/

/* ===== RESET & VARIABLES ===== */
:root {
  --bg-primary: #0a0a0e;
  --bg-card: #13121a;
  --bg-card-hover: #1b1924;
  --bg-accent: #1e1c28;
  --bg-surface: #16141e;
  --text-primary: #e8e6e3;
  --text-secondary: #8a8894;
  --text-muted: #5a5868;
  --text-body: #c8c6c1;
  --slime-purple: #b06cbf;
  --slime-purple-bright: #c882d6;
  --slime-purple-dim: #6e3d78;
  --slime-glow: rgba(176, 108, 191, 0.12);
  --slime-glow-strong: rgba(176, 108, 191, 0.25);
  --review-gold: #e6c75a;
  --podcast-amber: #ffc46b;
  --news-blue: #64b5f6;
  --border-subtle: rgba(255,255,255,0.06);
  --border-hover: rgba(176, 108, 191, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Score colors */
  --score-1: #e05555;
  --score-2: #e08a55;
  --score-3: #d4a843;
  --score-4: #7bc95a;
  --score-5: #5ae0a0;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--slime-purple); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--slime-purple-bright); }

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

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

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

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

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(176, 108, 191, 0.4));
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-text span { color: var(--slime-purple); }

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
}

.site-nav a:hover {
  color: var(--slime-purple);
  background: var(--slime-glow);
}

/* Search in nav */
.nav-search {
  position: relative;
  margin-left: 8px;
}

.nav-search-toggle {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.nav-search-toggle:hover {
  border-color: var(--slime-purple);
  color: var(--slime-purple);
  background: var(--slime-glow);
}

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  width: 280px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 200;
}

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

.search-dropdown form {
  display: flex;
  gap: 6px;
}

.search-dropdown input[type="text"] {
  flex: 1;
  background: var(--bg-accent);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}

.search-dropdown input[type="text"]:focus {
  border-color: var(--slime-purple);
}

.search-dropdown button[type="submit"] {
  background: var(--slime-purple);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
}

.search-dropdown button[type="submit"]:hover {
  background: var(--slime-purple-bright);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

.mobile-menu {
  display: none;
}

.mobile-menu.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  background: rgba(10, 10, 14, 0.97);
  backdrop-filter: blur(20px);
  padding: 16px 24px 24px;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 99;
}

.mobile-menu a {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu a:hover { color: var(--slime-purple); }

.mobile-search {
  padding: 16px 0 4px;
}

.mobile-search form {
  display: flex;
  gap: 6px;
}

.mobile-search input[type="text"] {
  flex: 1;
  background: var(--bg-accent);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
}

.mobile-search button[type="submit"] {
  background: var(--slime-purple);
  border: none;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

/* ===== MAIN CONTENT ===== */
.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ===== BENTO GRID (Homepage) ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(80px, auto);
  gap: 16px;
  margin-bottom: 48px;
}

.bento-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px var(--border-hover);
  color: var(--text-primary);
}

/* Featured card */
.card-featured {
  grid-column: 1 / 8;
  grid-row: 1 / 5;
}

.card-featured .card-image {
  height: 65%;
  overflow: hidden;
}

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

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

.card-featured .card-body {
  padding: 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-featured .card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
}

.card-featured .card-excerpt {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Standard nugget cards */
.card-nugget {
  grid-column: span 4;
  grid-row: span 2;
}

.card-nugget .card-image {
  aspect-ratio: 260 / 130;
  overflow: hidden;
}

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

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

.card-nugget .card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-nugget .card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.3;
  margin-bottom: 6px;
}

.card-nugget .card-excerpt {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Big nugget - wide card */
.card-big-nugget {
  grid-column: span 12;
  flex-direction: row;
}

.card-big-nugget .card-image {
  width: 320px;
  height: 160px;
  flex-shrink: 0;
  overflow: hidden;
}

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

.card-big-nugget:hover .card-image img { transform: scale(1.04); }

.card-big-nugget .card-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-big-nugget .card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

.card-big-nugget .card-excerpt {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Card tag labels */
.card-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
  margin-bottom: 10px;
}

.tag-review { background: rgba(230, 199, 90, 0.12); color: var(--review-gold); }
.tag-podcast { background: rgba(255, 196, 107, 0.15); color: var(--podcast-amber); }
.tag-news { background: rgba(100, 181, 246, 0.15); color: var(--news-blue); }
.tag-editorial { background: var(--slime-glow); color: var(--slime-purple); }

/* Recent link list card (text-only, right side of hero) */
.bento-grid .bento-card.card-recent-list {
  grid-column: 8 / 13;
  grid-row: 1 / 5;
  background: linear-gradient(145deg, #141220, var(--bg-card));
  flex-direction: column;
}

.bento-card.card-recent-list .card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

ul.recent-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}

.recent-link-item {
  margin: 0;
  padding: 0;
}

.recent-link-item a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0 10px;
  text-decoration: none;
  transition: var(--transition);
  color: var(--text-primary);
}

.recent-link-item:last-child a {
  padding-bottom: 0;
}

.recent-link-item a:hover .recent-link-title {
  color: var(--slime-purple);
}

.recent-link-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--news-blue);
  flex-shrink: 0;
  margin-top: 8px;
}

.recent-link-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  transition: var(--transition);
}

.recent-link-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  margin-top: 2px;
}

.recent-link-tag-row {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.recent-link-tag-row .card-tag {
  font-size: 0.58rem;
  padding: 3px 8px;
  margin-bottom: 0;
}

.recent-link-item:first-child .recent-link-tag-row {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

/* Section headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-top: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--slime-purple);
  border-radius: 2px;
}

.section-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.section-link:hover { color: var(--slime-purple); }

/* ===== SINGLE ARTICLE ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
}

.article-header { margin-bottom: 32px; }

.article-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 16px;
}

.article-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.article-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 300;
  margin-bottom: 20px;
}

/* Byline */
.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}

.byline-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 2px solid var(--border-subtle);
  overflow: hidden;
  flex-shrink: 0;
}

.byline-avatar img,
.byline-avatar img.avatar,
.byline-avatar img.photo {
  width: 52px !important;
  height: 52px !important;
  object-fit: cover;
  border-radius: 0 !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block;
}

.byline-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
}

.byline-name a { color: var(--text-primary); }
.byline-name a:hover { color: var(--slime-purple); }

.byline-date {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Banner */
.article-banner {
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  line-height: 0;
}

.article-banner img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 0;
}

/* Article content - styles WP the_content() output */
.article-content {
  max-width: 740px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content img,
.article-content iframe,
.article-content video,
.article-content embed,
.article-content object {
  max-width: 100% !important;
  height: auto !important;
}

.article-text {
  overflow: hidden;
}

.article-content p {
  color: var(--text-body);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.article-content em { color: var(--text-primary); }

.article-content img {
  max-width: 100%;
  height: auto;
}

.article-text img {
  border-radius: var(--radius-sm);
  margin: 20px auto;
  display: block;
  max-width: 100%;
  height: auto;
}

/* WordPress caption wrappers */
.article-text .wp-caption {
  max-width: 100%;
  margin: 20px auto;
  text-align: center;
}

.article-text .wp-caption img {
  margin: 0 auto;
}

/* Override WP alignment classes to be consistent */
.article-text .aligncenter,
.article-text .alignnone,
.article-text .alignleft,
.article-text .alignright {
  float: none;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.article-content a {
  color: var(--slime-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover { color: var(--slime-purple-bright); }

.article-content h2, .article-content h3 {
  font-family: 'Outfit', sans-serif;
  margin: 32px 0 16px;
}

.article-content blockquote {
  border-left: 3px solid var(--slime-purple);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content ul, .article-content ol {
  margin: 16px 0 24px 24px;
  color: var(--text-body);
}

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

/* Podcast player */
.podcast-player {
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}

.podcast-player audio {
  width: 100%;
  margin-bottom: 8px;
}

.podcast-player .podcast-credit {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.podcast-player .podcast-credit a { color: var(--slime-purple); }

/* Score block */
.score-block {
  margin: 48px 0;
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 28px;
}

.score-number {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 4.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.score-number .score-max {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-muted);
}

.score-details { flex: 1; }

.score-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.score-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

.score-dot.filled {
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.score-verdict {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.sidebar-section { margin-bottom: 32px; }

.sidebar-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--slime-purple);
  border-radius: 2px;
}

/* Share buttons */
.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.share-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.share-btn svg { flex-shrink: 0; opacity: 0.7; transition: var(--transition); }
.share-btn:hover svg { opacity: 1; }

.share-btn.btn-twitter:hover { border-color: rgba(29, 161, 242, 0.4); }
.share-btn.btn-reddit:hover { border-color: rgba(255, 69, 0, 0.4); }
.share-btn.btn-facebook:hover { border-color: rgba(66, 103, 178, 0.4); }
.share-btn.btn-clipboard:hover { border-color: var(--border-hover); }

/* Related articles */
.related-card {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
}

.related-card:last-child { border-bottom: none; }
.related-card:hover .related-title { color: var(--slime-purple); }

.related-thumb {
  width: 80px;
  aspect-ratio: 320 / 120;
  border-radius: var(--radius-sm);
  background: var(--bg-accent);
  flex-shrink: 0;
  overflow: hidden;
}

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

.related-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.3;
  transition: var(--transition);
}

.related-date {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== ABOUT STRIP ===== */
.about-strip {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  padding: 36px 40px;
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-tagline {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.about-tagline span { color: var(--slime-purple); }

.about-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 520px;
  line-height: 1.6;
}

.about-links {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.about-links a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-accent);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: var(--transition);
}

.about-links a:hover {
  border-color: var(--slime-purple);
  color: var(--slime-purple);
  background: var(--slime-glow);
}

/* ===== SEARCH RESULTS ===== */
.search-results-header {
  margin-bottom: 32px;
}

.search-results-header h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.search-results-header h1 span {
  color: var(--slime-purple);
}

.search-result-card {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.search-result-card:hover .search-result-title { color: var(--slime-purple); }

.search-result-thumb {
  width: 160px;
  aspect-ratio: 960 / 300;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-accent);
}

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

.search-result-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  transition: var(--transition);
  margin-bottom: 4px;
}

.search-result-excerpt {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.search-result-date {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.footer-left span { color: var(--slime-purple); }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-links a:hover { color: var(--slime-purple); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(8, 1fr); }
  .card-featured { grid-column: 1 / 9; grid-row: 1 / 4; }
  .card-nugget { grid-column: span 4; }
  .card-big-nugget { grid-column: span 8; }
  .bento-grid .bento-card.card-recent-list { grid-column: 1 / 9; grid-row: auto; }

  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .sidebar-section { margin-bottom: 0; }
}

@media (max-width: 768px) {
  .header-inner { height: 56px; }
  .site-nav { display: none; }
  .nav-search { display: none; }
  .nav-toggle { display: flex; }

  .site-main { padding: 20px 16px 60px; }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .card-featured,
  .card-nugget,
  .card-big-nugget { grid-column: 1 / -1; grid-row: auto; }
  .card-featured .card-image { height: 200px; }
  .card-featured .card-title { font-size: 1.3rem; }
  .card-nugget .card-image { aspect-ratio: 260 / 130; }
  .card-recent-list { grid-column: 1 / -1; grid-row: auto; }
  .card-big-nugget { flex-direction: column; }
  .card-big-nugget .card-image { width: 100%; height: 160px; }

  .article-title { font-size: 1.7rem; }
  .score-block { flex-direction: column; text-align: center; gap: 16px; }
  .score-dots { justify-content: center; }
  .sidebar { grid-template-columns: 1fr; }

  .about-strip { flex-direction: column; padding: 24px; text-align: center; }
  .about-desc { max-width: 100%; }

  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }

  .search-result-card { flex-direction: column; gap: 12px; }
  .search-result-thumb { width: 100%; }
}

@media (max-width: 480px) {
  .article-title { font-size: 1.45rem; }
  .score-number { font-size: 3.5rem; }
  .logo-text { font-size: 1.1rem; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.bento-card, .about-strip {
  animation: fadeUp 0.5s ease-out both;
}

.bento-card:nth-child(1) { animation-delay: 0.05s; }
.bento-card:nth-child(2) { animation-delay: 0.1s; }
.bento-card:nth-child(3) { animation-delay: 0.15s; }
.bento-card:nth-child(4) { animation-delay: 0.2s; }
.bento-card:nth-child(5) { animation-delay: 0.25s; }
.bento-card:nth-child(6) { animation-delay: 0.3s; }
.bento-card:nth-child(7) { animation-delay: 0.35s; }
.bento-card:nth-child(8) { animation-delay: 0.4s; }

/* WordPress core overrides */
.wp-caption { max-width: 100%; }
.wp-caption img { border-radius: var(--radius); }
.wp-caption-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
}

.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }

/* Comments */
#comments { margin-top: 48px; }
.comment { padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.comment-author { font-weight: 600; }
.comment-content p { color: var(--text-body); }

/* =========================================
   MOBILE RESPONSIVENESS FIXES
   Add to the bottom of style.css
   ========================================= */

/* 1. OVERRIDE WORDPRESS CAPTION WIDTHS
   Forces the caption container to ignore the "style='width: 800px'" 
   that WordPress automatically adds to old posts. */
.article-text .wp-caption {
  width: 100% !important;
  max-width: 100% !important;
}

/* 2. CATCH-ALL FOR ROGUE DIVS & TABLES
   Prevents any pasted HTML tables or divs with fixed widths 
   from breaking the screen edge. */
.article-text div,
.article-text table {
  max-width: 100% !important;
  box-sizing: border-box; /* Includes padding in the width calculation */
}

/* 3. FIX RESPONSIVE VIDEOS (IFRAMES)
   Your existing rule (Line 475) uses "height: auto !important" on iframes,
   which breaks YouTube embeds. This overrides it. */
.article-text iframe,
.article-text object,
.article-text embed {
  max-width: 100% !important;
  /* Reset the height so the video doesn't collapse */
  height: auto; 
  /* Modern browser fix: Keeps video 16:9 automatically */
  aspect-ratio: 16 / 9; 
}

/* 4. TABLE SCROLLING
   If a table (like a specs sheet) is simply too wide to shrink,
   this makes it scroll horizontally instead of stretching the whole page. */
.article-text table {
  display: block;
  overflow-x: auto;
  width: 100%;
}

/* CATEGORY PAGE FIXES */

/* On category pages, stretch the featured card to 8 columns 
   so it fits perfectly with the 4-column nuggets (8+4=12) */
.category-grid .card-featured {
  grid-column: span 8; 
}

/* Mobile fix for category pages */
@media (max-width: 1024px) {
  .category-grid .card-featured {
    grid-column: 1 / -1; /* Full width on tablets */
  }
}

/* Pagination Styling */
.pagination .page-numbers {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--bg-accent);
    color: var(--slime-purple);
    border-color: var(--slime-purple);
}
