:root {
  color-scheme: light;
  --bg:  #fff; 
  --panel: #fff; 
  --text:  #0f3a57;
  --muted: #185d8b;
  --line:  #97caed;
  --accent: #3498db; 
  --accent-strong: #2280bf;
  --label: #9a6a3a;
  --rose: #63b0e3;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  visibility: visible;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #cbe5f6;
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  width: min(1040px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 15px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: transparent;
  color: var(--accent-strong);
  outline: none;
}

.nav-link.active {
  background: var(--text);
  color: #fff;
}

main {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.intro {
  padding: 78px 0 56px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2rem);
  line-height: 0.95;
}

.lede {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.list-section {
  padding: 42px 0 76px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.list-menu {
  position: sticky;
  top: 96px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.list-menu h2 {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-menu {
  margin: 0;
  padding-left: 18px;
}

.section-menu a {
  padding: 3px 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-menu a:hover,
.section-menu a:focus-visible {
  color: var(--accent-strong);
  outline: none;
}

.list-content {
  min-width: 0;
}

.topic-filter {
  margin-bottom: 24px;
}

.topic-filter-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 700;
}

.topic-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-filter-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  padding: 0 12px;
}

.topic-filter-button[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
}

.section-heading p {
  max-width: 420px;
  margin-bottom: 4px;
  color: var(--muted);
}

.reading-list {
  display: grid;
  gap: 34px;
}

.list-group {
  scroll-margin-top: 100px;
}

.list-group-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.list-group-header h3 {
  margin-bottom: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.list-group-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.list-items {
  margin: 0;
  padding-left: 24px;
}

.list-item {
  margin-bottom: 10px;
  padding-left: 2px;
}

.list-item a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.item-description {
  color: var(--muted);
}

.item-meta {
  color: var(--label);
  font-size: 0.86rem;
}

.empty-state {
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.site-footer {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

.last-updated {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 640px) {
  .nav {
    min-height: auto;
    padding: 18px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-link {
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .intro {
    padding: 52px 0 42px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .list-section {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .list-menu {
    position: static;
    padding: 14px 0;
  }

  .section-menu {
    display: block;
    overflow-x: visible;
    padding-left: 20px;
  }

  .section-menu a {
    min-height: 0;
    border: 0;
    padding: 3px 0;
    white-space: nowrap;
  }

  .section-menu a:hover,
  .section-menu a:focus-visible {
    color: var(--accent-strong);
  }
}
