:root {
  /* The "Claude" Light Palette */
  --bg-color: #F9F8F6;
  /* Signature warm off-white background */
  --surface-color: #FFFFFF;
  /* Pure white for cards and modal surfaces */
  --text-primary: #111111;
  /* Deep, high-contrast charcoal for titles */
  --text-secondary: #666361;
  /* Muted warm gray for descriptions and meta */
  --border-color: #E5E2DE;
  /* Subtle taupe border to match the warmth */
  --tag-bg: #EEECE8;
  /* Soft gray-wash for trait chips */

  /* UI & Interaction */
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 12px 24px rgba(45, 42, 38, 0.08);
  --overlay-bg: rgba(249, 248, 246, 0.92);
  /* Matches bg-color for the modal */

  /* Motion */
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-bg: rgb(249, 248, 246, 0.75);
}

[data-theme="dark"] {
  /* Claude-inspired Dark Palette */
  --bg-color: #1A1A18;
  /* Deep carbon-gray with a hint of warmth */
  --surface-color: #242422;
  /* Slightly lighter for cards and modals */
  --text-primary: #E6E1DF;
  /* Soft, off-white for high readability */
  --text-secondary: #96918D;
  /* Muted warm gray for metadata */
  --border-color: #33312F;
  /* Subtle separation */
  --tag-bg: #3D3B39;
  /* Slightly lighter gray for chips/tags */

  /* Overlay and Shadows */
  --overlay-bg: rgba(18, 18, 17, 0.92);
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.6);
  --nav-bg: rgb(26, 26, 24, 0.75);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  padding: 70px 0 0 0;
  /* Adjust based on navbar height */
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-font-smoothing: antialiased;
}

/* Typography */
p {
  color: var(--text-secondary);
}

/* Layout & Navbar */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem 1.5rem;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background: var(--nav-bg);
  transition: var(--transition);
  backdrop-filter: url('#wave-filter');
}

/* Update Typography Section */

/* Update Typography Section */

.logo {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  font-size: 1.3rem;
  font-style: italic;
  /* Claude's serif often looks great in subtle italics */
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  height: 2rem;
  width: 2rem;
  object-fit: contain;
}

h1 {
  font-family: 'Newsreader', serif;
  font-size: 3.2rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  /* Tighter tracking for that high-end look */
  margin-bottom: 0.75rem;
}

h2,
h3 {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Breed Detail Title */
#modal-title {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

/* Card titles */
.card-title {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

/* Optional: Make the description more "Claude-like" */
.modal-desc {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary);
  /* Claude uses slightly darker text for body */
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#search-input {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: var(--surface-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  width: 200px;
}

#search-input:focus {
  border-color: var(--text-secondary);
}

#theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

#theme-toggle:hover {
  color: var(--text-primary);
}

.hidden {
  display: none !important;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1.5rem;
  margin-bottom: 2rem;
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-hover);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-color);
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-traits {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--surface-color);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-hover);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--surface-color);
  color: var(--text-primary);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal-content img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.modal-body {
  padding: 2rem;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background-color: var(--tag-bg);
  color: var(--text-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.modal-meta {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.modal-meta p {
  margin-bottom: 0.5rem;
}

.modal-meta strong {
  color: var(--text-primary);
  font-weight: 500;
}

#no-results {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 2rem;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  #search-input {
    width: 100%;
  }

  .nav-controls {
    width: 100%;
    justify-content: space-between;
  }

  .modal-content img {
    height: 250px;
  }
}

.site-footer {
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
  padding: 2rem 1.5rem;
  background-color: var(--bg-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  transition: var(--transition);
}

.footer-container p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Loading & Error States */
.loading-indicator {
  text-align: center;
  padding: 3rem 1.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.error-message {
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: #fee;
  color: #c33;
  border-radius: 8px;
  margin: 2rem 0;
  border: 1px solid #fcc;
  font-weight: 500;
}

[data-theme="dark"] .error-message {
  background-color: #3d2626;
  color: #ff9999;
  border-color: #5c3d3d;
}

.grid.hidden {
  display: none !important;
}

/* Mobile Adjustments for Footer */
@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}