:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: #efebe4;
  --ink: #12202a;
  --ink-soft: #5f6a72;
  --line: #ddd6cc;
  --line-strong: #c9c0b3;
  --accent: #1f5667;
  --accent-soft: #edf4f5;
  --radius: 12px;
  --max: 76rem;
  --measure: 43rem;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 238, 0.96);
  border-bottom: 1px solid var(--line);
}

.site-header__inner,
.site-main,
.site-footer__inner,
.site-footer__lower {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand__mark {
  flex: none;
}

.brand__mark-image {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.7rem;
}

.brand__text {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand__title {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand__tagline {
  display: none;
}

.site-navigation {
  margin-left: auto;
}

.menu,
.footer-menu,
.topic-pills,
.sidebar-links {
  list-style: none;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem 1.2rem;
}

.menu-item a,
.footer-menu a {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.menu-item.current-menu-item a,
.menu-item.current_page_item a {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.site-main {
  padding: 1.5rem 0 4rem;
}

.eyebrow,
.story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before,
.story-kicker::before {
  content: "";
  width: 0.85rem;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.story-kicker {
  margin-bottom: 0.6rem;
}

.home-intro,
.front-section,
.archive-shell,
.single-article,
.page-article {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.home-intro {
  max-width: 47rem;
  padding-top: 1rem;
}

.home-intro h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
}

.home-intro__summary {
  max-width: 42rem;
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section-heading {
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.simple-empty {
  max-width: 46rem;
}

.simple-empty h2 {
  max-width: 18ch;
  margin-bottom: 0.8rem;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.9fr);
  gap: 2rem;
}

.hero-grid__sidebar,
.story-stack,
.archive-grid,
.journal-grid,
.section-list,
.article-sidebar {
  display: grid;
}

.story-stack {
  gap: 1rem;
}

.section-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 2rem;
}

.section-list__item {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.section-list__item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.section-list__item p {
  max-width: 34rem;
  color: var(--ink-soft);
}

.journal-grid,
.archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem 1.8rem;
}

.story-card {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.story-card--compact {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.story-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 0.65rem;
  background: var(--surface-soft);
}

.story-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card__media--placeholder,
.article-placeholder {
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.story-card__placeholder-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-card__title {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.story-card--lead .story-card__title {
  max-width: 12ch;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.story-card--compact .story-card__title {
  font-size: 1.08rem;
}

.story-card__excerpt,
.archive-header__summary,
.article-header__dek,
.entry-content > p:first-of-type,
.section-list__item p,
.simple-empty p,
.sidebar-panel p {
  color: var(--ink-soft);
}

.story-card__content {
  max-width: 44rem;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.article-byline a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.article-byline a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.story-meta time + span::before,
.story-meta span + span::before {
  content: "•";
  margin-right: 0.75rem;
  color: var(--line-strong);
}

.archive-shell,
.single-article,
.page-article {
  padding-top: 2.2rem;
}

.archive-header,
.article-header {
  max-width: 54rem;
  margin-bottom: 1.8rem;
}

.archive-header h1,
.article-header h1 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.archive-header__summary,
.article-header__dek {
  max-width: 40rem;
  margin-top: 1rem;
  font-size: 1.05rem;
}

.archive-search {
  margin-top: 1rem;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.search-field,
.search-submit {
  font: inherit;
}

.search-field {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}

.search-field:focus {
  outline: 2px solid rgba(31, 86, 103, 0.14);
  outline-offset: 0;
}

.search-submit {
  padding: 0.9rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.article-figure,
.article-placeholder {
  margin: 0 0 2rem;
  overflow: hidden;
  border-radius: 0.75rem;
}

.article-placeholder {
  min-height: 18rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 3rem;
}

.entry-content {
  max-width: var(--measure);
  font-size: 1.05rem;
}

.entry-content > * {
  margin-top: 0;
  margin-bottom: 1.4rem;
}

.entry-content > h2,
.entry-content > h3,
.entry-content > h4 {
  margin-top: 2rem;
}

.entry-content > h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.entry-content > h3 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.entry-content blockquote {
  margin: 2rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--line-strong);
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25rem;
}

.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.article-sidebar {
  gap: 1.2rem;
  align-content: start;
}

.sidebar-panel {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.sidebar-panel h2 {
  margin-bottom: 0.55rem;
  font-size: 1.2rem;
}

.sidebar-links {
  gap: 0.8rem;
}

.sidebar-links li {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.empty-state {
  max-width: 42rem;
  padding: 1rem 0;
}

.empty-state h1,
.empty-state h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.topic-pills li a {
  color: var(--ink-soft);
}

.topic-pills--centered {
  justify-content: center;
}

.site-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1rem;
}

.site-footer__nav {
  margin-left: auto;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem 1.2rem;
}

.site-footer__lower {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.tone-climate {
  --tone-color: #1f5667;
}

.tone-ocean {
  --tone-color: #2e6d85;
}

.tone-space {
  --tone-color: #40557b;
}

.tone-physics {
  --tone-color: #7a5743;
}

.tone-biology {
  --tone-color: #476b52;
}

.tone-energy {
  --tone-color: #8a6a2f;
}

.tone-default {
  --tone-color: var(--accent);
}

.tone-climate .story-kicker,
.tone-ocean .story-kicker,
.tone-space .story-kicker,
.tone-physics .story-kicker,
.tone-biology .story-kicker,
.tone-energy .story-kicker,
.tone-default .story-kicker,
.tone-climate .eyebrow,
.tone-ocean .eyebrow,
.tone-space .eyebrow,
.tone-physics .eyebrow,
.tone-biology .eyebrow,
.tone-energy .eyebrow,
.tone-default .eyebrow {
  color: var(--tone-color);
}

.post-navigation,
.posts-navigation,
.pagination {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
}

@media (max-width: 960px) {
  .hero-grid,
  .journal-grid,
  .archive-grid,
  .section-list,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .site-header__bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-navigation {
    display: none;
    width: 100%;
    margin-left: 0;
  }

  .site-navigation[data-open="true"] {
    display: block;
  }

  .menu {
    justify-content: flex-start;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-footer__inner,
  .site-footer__lower {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__nav,
  .footer-menu {
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .site-header__inner,
  .site-main,
  .site-footer__inner,
  .site-footer__lower {
    width: min(calc(100% - 1.2rem), var(--max));
  }

  .brand__mark-image {
    width: 2.35rem;
    height: 2.35rem;
  }

  .home-intro h1,
  .archive-header h1,
  .article-header h1 {
    max-width: 100%;
  }

  .search-form {
    grid-template-columns: 1fr;
  }
}
