/* ---------------------------------
   Design Tokens & Base Variables
--------------------------------- */
:root {
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #3b82f6;
  --primary-hover: #1d4ed8;
  --hover-bg: #f1f5f9;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --transition: all 0.2s ease;
}

/* Dark Mode Support (Automatic via system preferences) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090d16;
    --card-bg: #111827;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1f2937;
    --hover-bg: #1e293b;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  padding: 2.5rem 1.25rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------------------------------
   Header & Quick Filter Bar
--------------------------------- */
header {
  text-align: center;
  margin-bottom: 2.5rem;
}

header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Quick category jump navigation */
.nav-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.nav-pills a {
  text-decoration: none;
  color: var(--text-muted);
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-pills a:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

/* ---------------------------------
   Responsive Grid Layout
--------------------------------- */
.sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

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

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

/* ---------------------------------
   Card & Link List Styling
--------------------------------- */
.link-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.link-section:hover {
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.section-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  color: var(--text-main);
  background: transparent;
  border-radius: 8px;
  transition: var(--transition);
  gap: 0.75rem;
}

.link-item:hover {
  background-color: var(--hover-bg);
  transform: translateX(3px);
}

.link-item-content {
  display: flex;
  flex-direction: column;
}

.link-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.link-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.link-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.link-item:hover .link-arrow {
  color: var(--primary);
  transform: translateX(2px);
}

/* ---------------------------------
   Footer
--------------------------------- */
footer {
  text-align: center;
  margin-top: 3.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}
