:root {
  color-scheme: light;
  --page: #f7f8ff;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --ink: #090b11;
  --muted: #656a78;
  --line: #171a22;
  --line-soft: #d9dce8;
  --blue: #1649ff;
  --blue-strong: #0737de;
  --coral: #ff4d5e;
  --coral-strong: #d93246;
  --yellow: #ffe100;
  --acid: #d7ff32;
  --shadow: 8px 8px 0 #171a22;
  --nav-height: 72px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #0b0d12;
  --surface: #14171f;
  --surface-raised: #1b1f29;
  --ink: #f4f6ff;
  --muted: #aeb4c5;
  --line: #f4f6ff;
  --line-soft: #3a3f4d;
  --blue: #7898ff;
  --blue-strong: #9ab0ff;
  --coral: #ff6575;
  --coral-strong: #ff8a96;
  --yellow: #ffe438;
  --acid: #cfff3d;
  --shadow: 8px 8px 0 #7898ff;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 20px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(255, 77, 94, 0.22);
}

body,
.site-nav,
.site-footer,
.index-card,
.latest-list li,
.theme-toggle {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

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

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

a {
  color: var(--coral);
}

a:hover,
a:focus {
  color: var(--coral-strong);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

button,
a {
  touch-action: manipulation;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ink);
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  padding: 10px 14px;
  transform: translateY(-180%);
  border: 2px solid var(--line);
  background: var(--acid);
  color: #090b11;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
  color: #090b11;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--nav-height);
  border-bottom: 2px solid var(--line);
  background: color-mix(in srgb, var(--page) 92%, transparent);
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  backdrop-filter: blur(18px);
}

.site-nav__inner {
  display: flex;
  width: min(100% - 40px, 1440px);
  min-height: var(--nav-height);
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-nav__brand,
.site-footer__brand {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 1;
  text-decoration: none;
}

.site-nav__brand span,
.site-footer__brand span {
  color: var(--coral);
}

.site-nav__brand:hover,
.site-nav__brand:focus,
.site-footer__brand:hover,
.site-footer__brand:focus {
  color: var(--ink);
  text-decoration: none;
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav__menu ul {
  display: flex;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: clamp(14px, 1.6vw, 28px);
  list-style: none;
}

.site-nav__menu li {
  margin: 0;
}

.site-nav__menu li a {
  position: relative;
  display: inline-block;
  padding: 25px 0 21px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav__menu li a::after {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--coral);
  content: "";
  transition: transform 160ms ease;
}

.site-nav__menu li a:hover::after,
.site-nav__menu li a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav__menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 2px solid var(--line);
  background: var(--surface);
}

.site-nav__menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.theme-toggle {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 9px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  align-items: center;
  gap: 7px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--acid);
  color: #090b11;
}

.theme-toggle__mark {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.theme-toggle kbd {
  min-width: 20px;
  padding: 3px 5px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: 10px;
}

main {
  display: block;
}

.home-intro,
.home-section {
  width: min(100% - 48px, 1320px);
  margin-right: auto;
  margin-left: auto;
}

.home-intro {
  padding: clamp(24px, 3vw, 38px) 0 0;
}

.home-intro h1 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 400;
  line-height: 1.12;
}

.home-intro h1 strong {
  font-weight: 700;
  color: var(--coral);
}

.section-kicker {
  margin: 0 0 18px;
  color: var(--blue);
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 50px;
  padding: 13px 20px 11px;
  border: 2px solid var(--line);
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.button:hover,
.button:focus {
  color: inherit;
  text-decoration: none;
}

.button--primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 5px 5px 0 var(--line);
}

.button--primary:hover,
.button--primary:focus {
  transform: translate(2px, 2px);
  background: var(--blue-strong);
  box-shadow: 3px 3px 0 var(--line);
  color: #ffffff;
}

.home-section {
  padding: clamp(72px, 9vw, 128px) 0;
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.home-section--latest-stories {
  padding-top: clamp(16px, 2vw, 24px);
  padding-bottom: clamp(36px, 4vw, 56px);
}

.section-heading {
  display: flex;
  margin: 0 0 44px;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.section-heading--compact {
  margin-bottom: 32px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(46px, 6vw, 78px);
  line-height: 0.95;
}

.section-heading > p,
.section-heading > .text-link {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.text-link {
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.featured-grid {
  display: grid;
  grid-auto-rows: 310px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.featured-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  background: #090b11;
}

.featured-card a {
  position: absolute;
  inset: 0;
  display: block;
  color: #ffffff;
  text-decoration: none;
}

.featured-card img {
  width: 100%;
  height: 100%;
  transform: scale(1.001);
  object-fit: cover;
  transition: transform 320ms ease, filter 320ms ease;
}

.featured-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 26%, rgba(4, 5, 8, 0.88) 100%);
}

.featured-card__content {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
}

.featured-card__label {
  display: inline-block;
  padding: 5px 8px 4px;
  background: var(--acid);
  color: #090b11;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(20px, 2vw, 31px);
  line-height: 1.04;
}

.featured-card__meta {
  display: flex;
  margin-top: 9px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.featured-card time {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.featured-card a:hover img,
.featured-card a:focus img {
  transform: scale(1.045);
  filter: saturate(1.12);
}

.home-section--more-stories {
  padding-top: 0;
}

.latest-list {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--line);
  list-style: none;
}

.latest-list li {
  margin: 0;
  border-bottom: 2px solid var(--line);
}

.latest-list li:nth-child(odd) {
  background: color-mix(in srgb, var(--surface) 68%, transparent);
}

.latest-list a {
  display: grid;
  min-height: 122px;
  padding: 24px 16px;
  color: var(--ink);
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  text-decoration: none;
}

.latest-list a:hover,
.latest-list a:focus {
  background: var(--acid);
  color: #090b11;
}

.latest-list__number {
  color: var(--coral);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.latest-list__content {
  min-width: 0;
}

.latest-list__title {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(23px, 2.3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.latest-list__excerpt {
  display: block;
  max-width: 800px;
  margin-top: 9px;
  overflow: hidden;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-list a:hover .latest-list__excerpt,
.latest-list a:focus .latest-list__excerpt {
  color: #353841;
}

.latest-list time {
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.index-grid {
  display: grid;
  border-top: 2px solid var(--line);
  border-left: 2px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.index-card {
  position: relative;
  display: flex;
  min-height: 240px;
  padding: 24px;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  flex-direction: column;
  text-decoration: none;
}

.index-card:nth-child(4n + 2) {
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
}

.index-card:nth-child(4n + 3) {
  background: color-mix(in srgb, var(--coral) 12%, var(--surface));
}

.index-card:nth-child(4n + 4) {
  background: color-mix(in srgb, var(--yellow) 20%, var(--surface));
}

.index-card:hover,
.index-card:focus {
  z-index: 1;
  transform: translate(-5px, -5px);
  background: var(--blue);
  box-shadow: 7px 7px 0 var(--line);
  color: #ffffff;
  text-decoration: none;
}

.index-card__number {
  color: var(--coral);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.index-card:hover .index-card__number,
.index-card:focus .index-card__number {
  color: var(--acid);
}

.index-card h3 {
  margin: auto 0 10px;
  color: inherit;
  font-size: 28px;
  line-height: 1;
}

.index-card p {
  max-width: 250px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
}

.index-card:hover p,
.index-card:focus p {
  color: rgba(255, 255, 255, 0.8);
}

.index-card__arrow {
  position: absolute;
  top: 17px;
  right: 20px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
}

.trip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.trip-card {
  margin: 0;
}

.trip-card a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.trip-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 2px solid var(--line);
  filter: saturate(0.92);
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.trip-card__meta {
  display: block;
  margin-top: 17px;
  color: var(--coral);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.trip-card h3 {
  margin: 7px 0 0;
  font-size: clamp(25px, 2.6vw, 38px);
  line-height: 1.04;
}

.trip-card a:hover img,
.trip-card a:focus img {
  transform: translateY(-7px);
  filter: saturate(1.12);
  box-shadow: 7px 7px 0 var(--yellow);
}

.home-archive-callout {
  width: min(100% - 48px, 1320px);
  margin-bottom: clamp(72px, 9vw, 130px);
  padding: clamp(48px, 7vw, 90px);
  border: 3px solid var(--line);
  background: var(--acid);
  box-shadow: var(--shadow);
}

.home-archive-callout .section-kicker {
  color: #0737de;
}

.home-archive-callout h2 {
  max-width: 1040px;
  margin: 0 0 36px;
  color: #090b11;
  font-size: clamp(38px, 5.5vw, 72px);
  line-height: 1;
}

.home-archive-callout .button {
  border-color: #090b11;
  box-shadow: 5px 5px 0 #090b11;
}

.site-footer {
  padding: clamp(58px, 7vw, 96px) max(24px, calc((100vw - 1320px) / 2));
  border-top: 3px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
}

.site-footer__intro {
  display: grid;
  padding-bottom: 44px;
  border-bottom: 2px solid var(--line);
  grid-template-columns: 1fr 2fr;
  align-items: end;
  gap: 30px;
}

.site-footer__brand {
  font-size: clamp(48px, 7vw, 88px);
}

.site-footer__intro p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-family: "Newsreader", serif;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.35;
}

.site-footer__links {
  display: grid;
  padding: 48px 0;
  border-bottom: 2px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.site-footer__links h2 {
  margin: 0 0 19px;
  color: var(--coral);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer__links a {
  display: block;
  width: fit-content;
  margin: 9px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-footer__links a:hover,
.site-footer__links a:focus {
  color: var(--coral);
}

.site-footer__bottom {
  display: grid;
  padding-top: 26px;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
}

.site-footer__bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer__social {
  display: flex;
  gap: 18px;
}

.site-footer__social a {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

/* Existing post and page layouts */
.intro-header {
  min-height: 410px;
  margin: 0;
  border-bottom: 3px solid var(--line);
  background-color: #343741;
  background-position: center;
  background-size: cover;
}

.intro-header .site-heading,
.intro-header .post-heading,
.intro-header .page-heading {
  padding: 112px 0 82px;
}

.intro-header .site-heading h1,
.intro-header .page-heading h1,
.intro-header .post-heading h1 {
  max-width: 1050px;
  color: #ffffff;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(44px, 6.5vw, 78px);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.intro-header .post-heading .subheading,
.intro-header .post-heading .meta,
.intro-header .site-heading .subheading {
  color: rgba(255, 255, 255, 0.9);
  font-family: "Newsreader", serif;
}

.intro-header .post-heading .meta,
.intro-header .site-heading .subheading {
  font-size: 20px;
}

.intro-header .site-heading hr.small {
  border-color: #ffffff;
}

article {
  color: var(--ink);
}

article > .container,
main > .container {
  padding-top: 26px;
  padding-bottom: 36px;
}

article p,
article li,
main > .container p,
main > .container li {
  font-family: "Newsreader", Georgia, serif;
}

article p {
  font-size: 21px;
  line-height: 1.62;
}

article h2 {
  margin-top: 68px;
  margin-bottom: 22px;
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.08;
}

article h3 {
  margin-top: 48px;
  margin-bottom: 18px;
  font-size: clamp(25px, 2.5vw, 34px);
}

article p img {
  display: block;
  border: 1px solid var(--line-soft);
}

article blockquote {
  margin: 36px 0;
  padding: 12px 0 12px 28px;
  border-left: 5px solid var(--coral);
  color: var(--muted);
  font-style: italic;
}

article a,
main > .container a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

hr {
  border-color: var(--line-soft);
}

.pager li > a,
.pager li > span {
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
}

.pager li > a:hover,
.pager li > a:focus {
  border-color: var(--line);
  background: var(--acid);
  color: #090b11;
}

.post-tags .label,
.post-tags .tags a,
.post-meta {
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
}

.tag-cloud li a {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.tag-cloud li a:hover,
.tag-cloud li a:focus {
  background: var(--acid);
  color: #090b11;
}

@media (max-width: 1120px) {
  .site-nav__inner {
    width: min(100% - 28px, 1440px);
  }

  .site-nav__menu {
    gap: 14px;
  }

  .site-nav__menu ul {
    gap: 13px;
  }

  .site-nav__menu li a {
    font-size: 11px;
  }

  .featured-grid {
    grid-auto-rows: 280px;
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-card:nth-child(4n + 2),
  .index-card:nth-child(4n + 3),
  .index-card:nth-child(4n + 4) {
    background: var(--surface);
  }

  .index-card:nth-child(4n + 2) {
    background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  }

  .index-card:nth-child(4n + 3) {
    background: color-mix(in srgb, var(--coral) 12%, var(--surface));
  }
}

@media (max-width: 900px) {
  :root {
    --nav-height: 64px;
  }

  .site-nav__inner {
    position: relative;
    min-height: var(--nav-height);
  }

  .site-nav__menu-button {
    display: block;
  }

  .site-nav__menu {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    right: -14px;
    left: -14px;
    padding: 18px 20px 24px;
    border-bottom: 2px solid var(--line);
    background: var(--page);
  }

  .site-nav__menu.in {
    display: block;
  }

  .site-nav__menu ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .site-nav__menu li a {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 12px;
  }

  .site-nav__menu li a::after {
    display: none;
  }

  .site-nav__menu .theme-toggle {
    margin-top: 18px;
  }

  .featured-grid {
    grid-auto-rows: 240px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trip-grid {
    gap: 16px;
  }

  .site-footer__intro {
    grid-template-columns: 1fr;
  }

  .site-footer__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    font-size: 18px;
  }

  .home-intro,
  .home-section,
  .home-archive-callout {
    width: min(100% - 30px, 1320px);
  }

  .home-intro {
    padding: 24px 0 0;
  }

  .home-intro h1 {
    font-size: 25px;
  }

  .button {
    width: 100%;
  }

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

  .section-heading h2 {
    font-size: 48px;
  }

  .featured-grid {
    display: grid;
    grid-auto-rows: 285px;
    grid-template-columns: 1fr;
  }

  .featured-card h3 {
    font-size: 29px;
  }

  .latest-list a {
    min-height: 0;
    padding: 20px 8px;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .latest-list time {
    display: none;
  }

  .latest-list__title {
    font-size: 24px;
  }

  .latest-list__excerpt {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .index-grid {
    grid-template-columns: 1fr;
  }

  .index-card {
    min-height: 190px;
  }

  .trip-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .home-archive-callout {
    padding: 42px 24px;
  }

  .site-footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .site-footer__links {
    grid-template-columns: 1fr 1fr;
    gap: 36px 18px;
  }

  .site-footer__bottom {
    grid-template-columns: 1fr;
  }

  .site-footer__social {
    flex-wrap: wrap;
  }

  .intro-header {
    min-height: 330px;
  }

  .intro-header .site-heading,
  .intro-header .post-heading,
  .intro-header .page-heading {
    padding: 76px 0 58px;
  }

  .intro-header .site-heading h1,
  .intro-header .page-heading h1,
  .intro-header .post-heading h1 {
    font-size: 41px;
  }

  article p {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
