:root {
  /* -- THE PRIVATE VAULT: Luxury Theme -- */

  /* Primary Colors - Midnight & Gold */
  --color-primary: #1a1a1a;
  --color-primary-light: #333333;
  --color-primary-dark: #000000;

  /* Accent: Brushed Gold */
  --color-accent: #c5a059;
  --color-accent-hover: #b38f4d;
  --color-accent-subtle: #fdfcf0;

  /* Semantic */
  --color-success: #065f46;
  --color-warning: #b45309;
  --color-danger: #991b1b;

  /* Surface / Backgrounds - Sophisticated Dark Slate */
  --color-bg: #1a1d23;
  --color-surface: #242830;
  --color-surface-translucent: rgba(36, 40, 48, 0.9);
  --color-surface-muted: #2d333f;

  /* Text - Silver & Off-white */
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-light: #64748b;
  --color-text-inverted: #1a1d23;

  /* Borders */
  --color-border: #373e4a;
  --color-border-hover: #c5a059;

  /* -- Spacing (Base 4px -> 0.25rem) -- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --section-gap: 4rem;

  /* -- Typography -- */
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-color: rgba(15, 23, 42, 0.08);

  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-color: rgba(15, 23, 42, 0.08);

  /* -- Radius -- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* -- Dark Theme Overrides -- */
[data-theme="dark"] {
  --color-primary: #f8fafc;
  /* Inverted for Text */
  --color-primary-light: #e2e8f0;

  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-surface-translucent: rgba(30, 41, 59, 0.85);
  --color-surface-muted: #334155;

  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-light: #64748b;
  --color-text-inverted: #0f172a;
  /* Inverted back */

  --color-border: #334155;
  --color-border-hover: #475569;

  --shadow-color: rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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

/* -- Typography -- */
h1,
h2,
h3,
.h1,
.h2,
.h3 {
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
}

h1,
.h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
}

h2,
.h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
}

h3,
.h3 {
  font-size: var(--text-xl);
  font-weight: 600;
}

.lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 1.6;
}

/* -- Layout -- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* -- Header (Glassmorphism) -- */
.site-header {
  background: var(--color-primary);
  color: white;
  padding: var(--space-4) 0;
  border-bottom: 3px solid var(--color-accent);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-accent) !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: 0.025em;
}

.nav-links {
  display: none;
  gap: var(--space-6);
  font-weight: 500;
  font-size: var(--text-sm);
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  transition: all 0.2s;
}

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

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: #94a3b8;
  padding: var(--section-gap) 0 var(--space-8);
  margin-top: auto;
}

.site-footer a {
  color: #f1f5f9;
  text-decoration: none;
  transition: color 0.2s;
}

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

.site-footer strong {
  color: var(--color-accent) !important;
  font-family: var(--font-serif);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

/* -- Components -- */

/* Cards (Interactivity & Depth) */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
  /* Removed height: 100% to allow auto-sizing based on content */
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xyz, 0 10px 40px -10px rgba(0, 0, 0, 0.1));
  border-color: var(--color-accent-subtle);
}

.card-body {
  padding: 1.25rem;
  /* Reduced from 2rem for more compact cards */
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--color-surface-muted);
  color: var(--color-text-muted);
}

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

/* Buttons (Modern Gradient/Flat) */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverted);
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.4);
}

.btn-accent:hover {
  box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-text-muted);
  background-color: var(--color-surface-muted);
}

/* Hero Section Specifics */
.hero-card {
  position: relative;
  background-color: var(--color-primary);
  background-size: cover;
  background-position: center;
  color: white;
  border: none;
  min-height: 500px !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-12);
}

.hero-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
  z-index: 1;
}

.hero-card .card-body {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 0 !important;
}

.hero-card h1 {
  color: white !important;
  font-size: 3.5rem !important;
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

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

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

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-sidebar {
    grid-template-columns: 1fr 320px;
  }
}

/* Utilities */
.mt-8 {
  margin-top: var(--space-8);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mb-12 {
  margin-bottom: var(--space-12);
}

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

.font-bold {
  font-weight: 700;
}

.flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-tabs .btn {
  white-space: nowrap;
  border-radius: 9999px;
  /* Pill shape */
  padding: 0.5rem 1rem;
}

/* Footer */
.site-footer {
  background-color: var(--color-primary);
  color: #94a3b8;
  padding: 4rem 0;
  margin-top: auto;
  font-size: var(--text-sm);
}

.site-footer h3 {
  color: white;
  margin-bottom: 1rem;
}

.site-footer a {
  color: #cbd5e1;
  display: block;
  margin-bottom: 0.5rem;
}

.site-footer a:hover {
  color: white;
  transform: translateX(2px);
  display: inline-block;
}

/* Sidebar Nav */
.nav-vertical {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-vertical a {
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced category link hover */
.category-link:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #6ee7b7 !important;
  transform: translateX(4px) scale(1.02);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}

.category-link:hover span:first-child {
  color: #059669 !important;
  font-weight: 600;
}

.category-link:hover .category-count {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4) !important;
}

/* Fallback for old nav-vertical hover */
.nav-vertical a:hover {
  background-color: var(--color-surface-muted);
  padding-left: 0.5rem !important;
  /* Visual kick */
  padding-right: 0.5rem !important;
  border-radius: var(--radius-sm);
  color: var(--color-accent);
}