:root {
  --cat-bg: #f2f0eb;
  --cat-panel: rgba(255, 255, 255, 0.6);
  --cat-line: #d1cdc4;
  --cat-line-dim: rgba(0, 0, 0, 0.06);
  --cat-text: #222222;
  --cat-muted: #727272;
  --cat-accent: #b08d28;
  --cat-yellow-rgb: 255, 235, 59;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.catalogue-page {
  min-height: 100vh;
  background: 
    linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%),
    var(--cat-bg);
  color: var(--cat-text);
  font-family: "IBM Plex Mono", monospace;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Sunburst Effect */
body.catalogue-page::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.05);
    width: 60vmax;
    height: 60vmax;
    background: radial-gradient(
        circle, 
        rgba(255, 255, 255, 0.8) 0%,              
        rgba(253, 184, 19, 0.4) 15%,
        rgba(253, 184, 19, 0) 70%
    );
    border-radius: 50%;
    animation: pulseGlow 60s infinite ease-in-out;
    pointer-events: none;
    z-index: -1; 
}

@keyframes pulseGlow {
    0%   { transform: translate(-50%, -50%) scale(0.05); opacity: 0.8; }
    50%  { opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(4);   opacity: 0; }
}

/* Consistent Header */
.cat-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(to bottom, rgba(242, 240, 235, 0.9) 0%, transparent 100%);
  pointer-events: none;
  box-sizing: border-box; /* Prevent icon bleed */
}

.cat-topbar .logo {
  pointer-events: auto;
  display: inline-block;
  text-transform: uppercase;
  color: var(--cat-text);
  text-decoration: none;
  border: 1px solid var(--cat-line);
  background: rgba(255, 255, 255, 0.6);
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
}

.cat-topbar .cat-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  pointer-events: auto;
}

.cat-topbar .cat-nav a {
  text-decoration: none;
  color: var(--cat-text);
  border: 1px solid var(--cat-line);
  background: rgba(255, 255, 255, 0.6);
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.cat-topbar .cat-nav a:hover,
.cat-topbar .cat-nav a:focus-visible,
.cat-topbar .logo:hover,
.cat-topbar .logo:focus-visible {
  border-color: var(--cat-accent);
  background: #fff;
  color: var(--cat-text);
}

.cat-topbar .cat-nav a.active {
  border-color: var(--cat-accent);
  background: #fff;
}

/* Layout */
.cat-shell {
  width: min(1000px, calc(100vw - 3rem));
  margin: 6rem auto 4rem;
  display: grid;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.cat-intro {
  max-width: 65ch;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--cat-line);
}

.cat-intro p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
}

/* Columns & Lists */
.cat-columns {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
}

.cat-column {
  background: transparent;
  grid-column: span 6;
}

.cat-column h2 {
  margin: 0 0 1.5rem;
  font-family: "Archivo Expanded", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--cat-muted);
  text-transform: uppercase;
}

.cat-list {
  display: grid;
  gap: 0;
}

.cat-item {
  display: flex;
  gap: 1.5rem;
  text-decoration: none;
  padding: 1.25rem 0;
  border-top: 1px solid var(--cat-line-dim);
  transition: transform 0.2s ease, opacity 0.2s ease;
  align-items: center;
}

.cat-item:hover {
  transform: translateX(8px);
  opacity: 0.9;
}

.cat-img {
  width: 100px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--cat-line-dim);
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cat-item:not(:has(.cat-img)) .cat-content {
  padding-left: 0;
}

.cat-item:has(.cat-img) .cat-content {
  /* padding-left: 0.5rem; */
}

.cat-content {
  flex-grow: 1;
}

.cat-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.cat-title {
  display: block;
  font-family: "Archivo Expanded", sans-serif;
  font-size: 1rem;
  color: var(--cat-text);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.status-completed { color: #2e7d32; background: #2e7d32; } /* Dark Green */
.status-progress { color: #1976d2; background: #1976d2; } /* Blue */

.cat-meta {
  font-size: 0.7rem;
  color: var(--cat-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cat-description {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #555;
  max-width: 45ch;
  line-height: 1.5;
}

/* Mobile Nav Styles */
.mobile-menu-btn {
  display: none;
  background: #fff;
  border: 1px solid var(--cat-line);
  width: 44px;
  height: 44px;
  padding: 0;
  font-family: inherit;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--cat-text);
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  z-index: 100;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: #fcfaf5;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--cat-muted);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  text-align: center;
}

.mobile-nav-links a {
  font-family: "Archivo Expanded", sans-serif;
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--cat-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 900px) {
  .cat-column {
    grid-column: span 12;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .cat-topbar {
    padding: 0.75rem 1rem;
    background: linear-gradient(to bottom, rgba(242, 240, 235, 0.98) 0%, transparent 100%);
    width: 100%;
    overflow: hidden;
  }
  
  .cat-topbar .logo {
    font-size: 0.6rem;
    padding: 0.4rem 0.6rem;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cat-nav {
    display: none !important; /* Hide desktop nav */
  }

  .mobile-menu-btn {
    display: flex;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    margin-left: auto;
  }
  
  .cat-shell {
    margin-top: 4.5rem;
    gap: 2rem;
  }
  
  .cat-item {
    gap: 1rem;
  }
  
  .cat-img {
    width: 80px;
  }
}