/* ==========================================
   JLarkStories — Dark Blue Theme
   ========================================== */

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a2035;
  --bg-card-hover: #1f2847;
  --text-primary: #e0e6f0;
  --text-secondary: #a0aec0;
  --text-muted: #6b7a94;
  --accent: #4a9eff;
  --accent-hover: #6db3ff;
  --accent-dim: #2a5a9e;
  --accent-glow: rgba(74, 158, 255, 0.15);
  --border: #2a3050;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --content-width: 800px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

/* ---- 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);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

p {
  margin-bottom: 1em;
}

/* ---- Layout ---- */

.content-wrapper {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ---- Header ---- */

.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}

.site-logo img {
  height: 75px;
  width: auto;
}

.site-title {
  letter-spacing: 0.02em;
}

.nav-menu {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: color var(--transition), background var(--transition);
}

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

/* Search */

.search-wrapper {
  position: relative;
  flex-shrink: 0;
  margin: 0 1rem;
}

.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  width: 180px;
  outline: none;
  transition: border-color var(--transition), width var(--transition);
}

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

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

.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 280px;
  margin-top: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: block;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.search-result-item:hover {
  background: var(--accent-glow);
}

.search-result-title {
  display: block;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.search-result-tags {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.search-no-results {
  padding: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Hamburger (mobile) */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle.active .hamburger {
  background: transparent;
}
.nav-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}
.nav-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* ---- Hero Section ---- */

.hero {
  text-align: center;
  padding: 1.5rem 1rem 1.5rem;
}

.hero-logo {
  max-width: min(500px, 100%);
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-lg);
}

.hero-bio {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ---- Section Headings ---- */

.section-heading {
  font-size: 1.75rem;
  text-align: center;
  margin: 3rem 0 1.5rem;
  position: relative;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* ---- Category Cards ---- */

.category-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.category-card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.category-card-title {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.category-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---- Gallery Marquee ---- */

.gallery-section {
  margin-bottom: 3rem;
}

.gallery-carousel {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marquee linear infinite;
}

.carousel-track:hover {
  animation-play-state: paused;
}

.carousel-slide {
  flex-shrink: 0;
}

.carousel-slide a {
  display: block;
}

.carousel-slide img {
  display: block;
  height: 200px;
  width: auto;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

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

/* ---- Post Cards ---- */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  cursor: pointer;
}

.post-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.post-card-thumbnail,
.project-card-thumbnail {
  flex-shrink: 0;
  width: 240px;
  height: 240px;
  overflow: hidden;
  display: block;
}

.post-card-thumbnail img,
.project-card-thumbnail img {
  display: block;
  width: 240px;
  height: 240px;
  max-width: none;
  object-fit: cover;
}

.post-card-content {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.post-card-meta time {
  color: var(--text-muted);
}

.post-card .category-badge,
.post-card .tag-pill,
.post-card .artist-badge {
  position: relative;
  z-index: 1;
}

.category-badge {
  background: var(--accent-dim);
  color: var(--accent-hover);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.category-badge:hover {
  background: var(--accent);
  color: #fff;
}

.post-card-title {
  margin-bottom: 0.4rem;
}

.post-card-title a {
  color: #fff;
  text-decoration: none;
}

.post-card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

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

.post-card-summary {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tag-pill {
  background: rgba(74, 158, 255, 0.1);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(74, 158, 255, 0.2);
}

.tag-pill:hover {
  background: rgba(74, 158, 255, 0.2);
  border-color: var(--accent);
}

/* ---- Artist Badge ---- */

.artist-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(168, 85, 247, 0.3);
  letter-spacing: 0.03em;
}

.artist-badge:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: #c084fc;
  color: #e9d5ff;
}

.post-card-artist {
  margin-top: 0.3rem;
}

.blog-single-artist {
  margin-top: 0.5rem;
}

.artist-website {
  margin-top: 0.5rem;
}

.artist-website-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.95rem;
}

.artist-website-link:hover {
  color: var(--accent-hover);
}

/* ---- Project Cards ---- */

.project-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 2px 12px var(--accent-glow);
}


.project-card-content {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-title {
  color: #fff;
  margin-bottom: 0.5rem;
}

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

.project-card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-card-desc p:last-child {
  margin-bottom: 0;
}

/* ---- Recent Posts (Home) ---- */

.recent-posts {
  margin-bottom: 3rem;
}

/* ---- Social Links Section (Home) ---- */

.social-section {
  text-align: center;
  margin-bottom: 3rem;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links .social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.social-links .social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ---- Single Blog Post ---- */

.blog-single {
  max-width: var(--content-width);
  margin: 0 auto;
}

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

.blog-single-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.blog-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.blog-single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-single-thumbnail {
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.blog-single-created-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.blog-single-content,
.single-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.blog-single-content h2 {
  margin-top: 2rem;
}

.blog-single-content h3 {
  margin-top: 1.5rem;
}

.blog-single-content img,
.single-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.blog-single-content blockquote,
.single-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.blog-single-content pre {
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

.blog-single-content code {
  font-size: 0.9em;
}

.blog-single-content ul,
.blog-single-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.blog-single-content li {
  margin-bottom: 0.3rem;
}

/* Sequence navigation */

.sequence-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.sequence-nav-link {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}

.sequence-nav-link:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  text-decoration: none;
}

/* Post navigation */

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex: 1;
  text-decoration: none;
  transition: border-color var(--transition);
}

.post-nav a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.post-nav-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-nav-title {
  color: #fff;
  font-size: 0.95rem;
}

.post-nav-random {
  text-align: center;
  justify-content: center;
  align-items: center;
  align-self: stretch;
}

.post-nav-next {
  text-align: right;
}

/* ---- Page Header ---- */

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.random-post-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}

.random-post-link::before {
  content: "\1F3B2 ";
}

.random-post-link:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.post-nav .random-post-link {
  margin-bottom: 0;
}

/* ---- Single Page (About, etc.) ---- */

.single-page {
  max-width: var(--content-width);
  margin: 0 auto;
}

.single-header {
  margin-bottom: 2rem;
}


/* ---- Taxonomy Pages ---- */

.taxonomy-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.taxonomy-term {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--text-primary);
  transition: all var(--transition);
}

.taxonomy-term:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.taxonomy-term-count {
  background: var(--accent-dim);
  color: var(--accent-hover);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* ---- Pagination ---- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.pagination-link {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  transition: all var(--transition);
}

.pagination-link:hover:not(.disabled) {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.pagination-link.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.pagination-info {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- Footer ---- */

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-social .social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-social .social-link:hover {
  color: var(--accent);
}

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

.footer-info .rss-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.footer-info .rss-link:hover {
  color: var(--accent);
}

/* ---- Utilities ---- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .search-wrapper {
    flex: 1 1 100px;
    min-width: 100px;
  }

  .search-input {
    width: 100%;
  }

  .search-input:focus {
    width: 100%;
  }

  .site-logo img {
    height: 45px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    padding: 0.75rem 1rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }

  .hero { padding: 2.5rem 1rem 2rem; }

  .category-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .post-card {
    flex-direction: column;
  }

  .post-card-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .post-card-thumbnail img {
    width: 100%;
    height: 100%;
    max-width: none;
  }

  .project-card {
    flex-direction: column;
  }

  .project-card-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
  }

  .project-card-thumbnail img {
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: contain;
  }

  .blog-single-header h1 {
    font-size: 1.75rem;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav a {
    max-width: 100%;
    flex: none;
  }
}

/* ---- Reviews ---- */

.reviews-intro {
  max-width: var(--content-width);
  margin: 0 auto 2.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.reviews-intro ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.reviews-intro li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.review-link {
  margin-top: 0.75rem;
}

.review-link a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.review-link a:hover {
  text-decoration: underline;
}

.review-rating {
  margin-top: 0.75rem;
}

.rating-badge {
  background: var(--accent-dim);
  color: var(--accent-hover);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.rating-badge:hover {
  background: var(--accent);
  color: #fff;
}

.review-warnings {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.warnings-label,
.review-field-label {
  font-weight: 600;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .category-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .content-wrapper {
    padding: 1.25rem 1rem;
  }

  h1 { font-size: 1.5rem; }

  .hero-bio {
    font-size: 1rem;
  }

  .footer-social {
    gap: 0.5rem;
  }

  .site-logo img {
    height: 36px;
  }

  .search-wrapper {
    min-width: 80px;
  }

  .category-cards {
    grid-template-columns: 1fr;
  }
}

/* ---- Reduced Motion ---- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .carousel-track {
    animation: none;
  }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---- Focus Visible ---- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ---- Touch Targets (mobile) ---- */

@media (max-width: 768px) {
  .nav-toggle {
    padding: 0.75rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .category-badge,
  .tag-pill,
  .artist-badge,
  .rating-badge {
    padding: 0.35rem 0.7rem;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
}

/* ---- Skip Link ---- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 1000;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---- View All Container ---- */

.view-all-container {
  text-align: center;
  margin-top: 1.5rem;
}

/* ---- Back to Top ---- */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), border-color var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* ---- 404 Page ---- */

.page-404 {
  text-align: center;
  max-width: 600px;
  margin: 4rem auto;
  padding: 2rem;
}

.page-404 h1 {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.page-404 p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.page-404 .home-link {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background var(--transition);
}

.page-404 .home-link:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ---- Lightbox ---- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ---- Search Result Focus ---- */

.search-result-item.focused {
  background: var(--accent-glow);
}

/* ---- Navigation Flash (keyboard/swipe indicator) ---- */

@keyframes nav-flash {
  0% { box-shadow: 0 0 0 0 var(--accent); }
  50% { box-shadow: 0 0 8px 2px var(--accent); }
  100% { box-shadow: 0 0 0 0 var(--accent); }
}

.nav-flash {
  animation: nav-flash 0.3s ease;
}
