/* Premium design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Outfit:wght@700&display=swap');

:root {
  --bg-color: hsl(220, 10%, 10%);
  --text-color: hsl(0, 0%, 95%);
  --accent-gradient: linear-gradient(135deg, hsl(210, 80%, 55%), hsl(260, 80%, 55%));
  --accent-hover: linear-gradient(135deg, hsl(210, 85%, 60%), hsl(260, 85%, 60%));
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.12);
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0;
  /* Updated to accommodate top bar */
}

.ai-notice {
  background: linear-gradient(90deg, #2c3e50, #4ca1af);
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.nav-dropdown-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(20, 20, 30, 0.98);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 1rem 0;
  margin-top: 0.5rem;
  min-width: 350px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  list-style: none;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu li {
  padding: 0;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-color);
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: hsl(210, 80%, 65%);
  padding-left: 2rem;
}

.nav-dropdown-menu::-webkit-scrollbar {
  width: 8px;
}

.nav-dropdown-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 8rem 2rem;
  background-image: linear-gradient(rgba(10, 10, 20, 0.7), rgba(10, 10, 20, 0.7)), url('../assets/hero-bg.png');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
}

/* Main Content */
main {
  max-width: 1000px;
  /* Reduced from 1400px for better reading experience on posts */
  margin: 0 auto;
  padding: 3rem 2rem;
  /* Increased vertical padding */
}

main h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* Cluster Grid (Home Page) */
.cluster-grid-home {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  padding: 0 2rem;
}

.cluster-card-home {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.cluster-card-home:hover {
  background: var(--card-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.cluster-card-home h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: hsl(210, 80%, 65%);
}

.cluster-card-home p {
  opacity: 0.8;
  font-size: 0.95rem;
}

/* Cluster List (Hub Pages) */
.cluster-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.cluster-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.75rem;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.cluster-card:hover {
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.15);
}

.cluster-card a {
  display: block;
  font-weight: 500;
  line-height: 1.5;
}

/* CTA Buttons */
.cta-button {
  display: inline-block;
  background: var(--accent-gradient);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* TL;DR Section */
.tldr {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  border-left: 4px solid hsl(210, 80%, 55%);
}

.tldr pre {
  font-family: var(--font-body);
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 1rem;
}

/* Footer */
footer {
  background: #0a0a0a;
  color: #999;
  text-align: center;
  padding: 3rem 2rem;
  font-size: 0.9rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a {
  color: hsl(210, 70%, 60%);
  text-decoration: underline;
}

footer a:hover {
  color: hsl(210, 80%, 70%);
}

footer nav {
  margin: 1rem 0;
}

footer p {
  margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  footer nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  footer nav a {
    display: inline-block;
    padding: 0.5rem;
  }

  #cookie-banner {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem !important;
  }

  #cookie-banner p {
    margin: 0 0 0.5rem 0 !important;
    text-align: center;
  }

  #cookie-banner button {
    width: 100%;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .nav-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .nav-dropdown-menu {
    right: auto;
    left: 0;
    min-width: 280px;
  }

  .cluster-grid-home,
  .cluster-list {
    grid-template-columns: 1fr;
    padding: 0;
  }

  main {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .site-header {
    padding: 1rem;
  }

  .nav-dropdown-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}