@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&display=swap");

:root {
  color-scheme: dark light;
  --paper: #0c1014;
  --paper-deep: #111820;
  --surface: #161e25;
  --ink: #e9e7de;
  --muted: #a5aba8;
  --signal: #7599ad;
  --cyan: #c17e68;
  --violet: #8a7d73;
  --coral: var(--signal);
  --apricot: var(--cyan);
  --lavender: #1d2630;
  --sage: #23201e;
  --line: rgba(220, 229, 213, 0.18);
  --line-strong: rgba(220, 229, 213, 0.42);
  --serif: "Newsreader", Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --page: min(1180px, calc(100% - 48px));
}

@media (prefers-color-scheme: light) {
  :root {
    --paper: #eceae2;
    --paper-deep: #e0ded5;
    --surface: #f5f2e9;
    --ink: #20262a;
    --muted: #5d676a;
    --signal: #476f86;
    --cyan: #a75840;
    --violet: #786b63;
    --coral: var(--signal);
    --apricot: var(--cyan);
    --lavender: #dce2e5;
    --sage: #e5d9d2;
    --line: rgba(21, 26, 32, 0.17);
    --line-strong: rgba(21, 26, 32, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  content: "";
  pointer-events: none;
}

::selection {
  color: var(--paper);
  background: var(--signal);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 9px 14px;
  color: var(--paper);
  background: var(--signal);
  font-family: var(--mono);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
main {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 82px;
  border-bottom: 1px solid var(--line-strong);
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.pear-mark {
  width: 48px;
  height: 52px;
  overflow: visible;
}

.pear-outline,
.pear-line {
  stroke: var(--line-strong);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.pear-leaf {
  fill: color-mix(in srgb, var(--signal) 52%, transparent);
  stroke: var(--signal);
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.site-header nav,
.site-footer nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.site-header nav a,
.site-footer nav a {
  position: relative;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--ink);
}

.site-header nav a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: -30px;
  left: 0;
  height: 2px;
  background: var(--signal);
  content: "";
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 14px color-mix(in srgb, var(--signal) 75%, transparent);
}

/* Homepage */
.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(410px, 1.05fr);
  min-height: 400px;
}

.home-copy {
  display: flex;
  padding: 52px 64px 50px 0;
  flex-direction: column;
  justify-content: center;
}

.home-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(60px, 6.8vw, 90px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.78;
}

.home-copy h1 span {
  color: var(--signal);
}

.home-blurb {
  max-width: 590px;
  margin: 34px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.52;
}

.home-links {
  display: flex;
  gap: 27px;
  margin-top: 29px;
}

.text-link,
.read-more {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 1px;
  text-transform: uppercase;
}

.text-link span,
.read-more span {
  display: inline-block;
  color: var(--signal);
  transition: transform 150ms ease;
}

.text-link:hover span,
.read-more:hover span {
  transform: translate(3px, -2px);
}

.flourish-panel {
  display: grid;
  min-height: 380px;
  align-items: center;
  justify-items: center;
}

.flourish-art {
  width: min(88%, 520px);
  height: auto;
}

.flourish-line {
  stroke: var(--line-strong);
  stroke-linecap: round;
  stroke-width: 2;
}

.flourish-fill {
  fill: color-mix(in srgb, var(--signal) 55%, transparent);
  stroke: var(--signal);
  stroke-width: 1.5;
}

.flourish-accent {
  fill: color-mix(in srgb, var(--cyan) 78%, transparent);
  stroke: var(--cyan);
  stroke-width: 1.5;
}

.article-next h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(39px, 4.4vw, 57px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.archive-date,
.article-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.archive-item h2 a {
  text-decoration: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 31px 45px;
  border-top: 1px solid var(--line-strong);
}

.site-footer > div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-flourish {
  color: var(--signal);
  font-size: 10px;
}

/* Archive */
.page-header {
  display: grid;
  grid-template-columns: 1fr 0.65fr;
  gap: 40px;
  align-items: end;
  padding: 76px 0 65px;
}

.page-header .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -18px;
}

.page-header h1,
.article-header h1,
.prose-page h1,
.not-found h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(58px, 7.5vw, 92px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.86;
}

.page-header h1 em {
  color: var(--signal);
  font-weight: 400;
}

.page-header > p:last-child {
  max-width: 450px;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
}

.archive {
  margin-bottom: 100px;
  border-top: 1px solid var(--line-strong);
}

.archive-item {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 70px;
  gap: 35px;
  padding: 45px 10px;
  border-bottom: 1px solid var(--line-strong);
}

.archive-item h2 {
  max-width: 700px;
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(31px, 4vw, 46px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.archive-item h2 a:hover {
  color: var(--signal);
}

.archive-item p {
  max-width: 650px;
  margin: 0 0 17px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 18px;
}

.archive-mark {
  color: transparent;
  font-family: var(--mono);
  font-size: 55px;
  line-height: 0.8;
  text-align: right;
  -webkit-text-stroke: 1px var(--line-strong);
}

/* Articles */
.article {
  padding-bottom: 90px;
}

.article-header {
  max-width: 950px;
  margin: 0 auto;
  padding: 84px 0 66px;
  text-align: center;
}

.back-link {
  display: inline-block;
  text-decoration: none;
}

.article-header h1 {
  margin-top: 22px;
  font-size: clamp(59px, 7vw, 90px);
}

.dek {
  max-width: 680px;
  margin: 28px auto 22px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
}

.article-meta {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.article-meta > * + *::before {
  margin-right: 12px;
  color: var(--signal);
  content: "•";
}

.article-body {
  width: min(100% - 32px, 710px);
  margin-inline: auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.78;
}

.article-body > p:first-child::first-letter {
  float: left;
  margin: 0.04em 0.07em -0.06em 0;
  color: var(--signal);
  font-size: 4.2em;
  font-weight: 500;
  line-height: 0.76;
}

.article-body h2 {
  margin: 2em 0 0.55em;
  font-size: 39px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.article-body p,
.article-body ol,
.article-body ul {
  margin-block: 1.25em;
}

.article-body li {
  margin-block: 0.55em;
  padding-left: 0.25em;
}

.article-body li::marker {
  color: var(--signal);
  font-family: var(--mono);
  font-weight: 700;
}

.article-body blockquote {
  position: relative;
  margin: 2.2em -60px;
  padding: 20px 42px;
  border-block: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 29px;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
}

.article-body blockquote::before {
  position: absolute;
  top: -9px;
  left: calc(50% - 15px);
  padding-inline: 10px;
  color: var(--signal);
  background: var(--paper);
  content: "◉";
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
}

.article-next {
  width: min(850px, calc(100% - 48px));
  margin: 0 auto 90px;
  padding: 50px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-align: center;
}

.article-next h2 {
  margin-bottom: 22px;
  font-size: 40px;
}

/* About and utility pages */
.about-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  gap: 85px;
  justify-content: center;
  padding: 90px 0 110px;
}

.about-stamp {
  display: flex;
  width: 200px;
  height: 200px;
  margin-top: 95px;
  border: 1px solid var(--signal);
  border-radius: 50%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.17em;
  text-align: center;
  box-shadow: inset 0 0 50px color-mix(in srgb, var(--signal) 7%, transparent);
  transform: rotate(-8deg);
}

.about-stamp strong {
  display: block;
  margin-block: 6px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0;
}

.about-flourish {
  width: 72%;
  height: auto;
}

.prose-page {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.72;
}

.prose-page h1 {
  margin-bottom: 48px;
  font-size: clamp(65px, 8vw, 91px);
}

.prose-page h2 {
  margin: 1.8em 0 0.4em;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.prose-page a {
  color: var(--signal);
}

.not-found {
  display: flex;
  min-height: 650px;
  max-width: 760px;
  margin-inline: auto;
  padding-block: 100px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-mark {
  margin: 0 0 -46px;
  color: transparent;
  font-family: var(--mono);
  font-size: 170px;
  line-height: 1;
  -webkit-text-stroke: 1px var(--line-strong);
}

.not-found h1 {
  font-size: 68px;
}

.not-found > p:not(.eyebrow, .error-mark) {
  max-width: 550px;
  margin: 25px auto 30px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
}

.button {
  display: inline-flex;
  gap: 16px;
  align-items: center;
  padding: 12px 17px;
  border: 1px solid var(--signal);
  color: var(--signal);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.button:hover {
  color: var(--paper);
  background: var(--signal);
}

@media (max-width: 900px) {
  .home-intro {
    grid-template-columns: 1fr;
  }

  .home-copy {
    padding-right: 0;
  }

  .flourish-panel {
    min-height: 360px;
  }

  .page-header {
    grid-template-columns: 1fr;
  }

  .page-header .eyebrow {
    margin-bottom: 0;
  }

  .archive-item {
    grid-template-columns: 135px 1fr;
  }

  .archive-mark {
    display: none;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .about-stamp {
    width: 160px;
    height: 160px;
    margin: 0;
  }
}

@media (max-width: 620px) {
  :root {
    --page: min(100% - 32px, 1180px);
  }

  body {
    font-size: 16px;
    background: var(--paper);
  }

  .site-header {
    min-height: 68px;
  }

  .wordmark {
    min-width: 42px;
  }

  .pear-mark {
    width: 39px;
    height: 43px;
  }

  .site-header nav {
    gap: 15px;
  }

  .site-header nav a {
    font-size: 9px;
  }

  .site-header nav a[aria-current="page"]::after {
    bottom: -24px;
  }

  .home-copy {
    padding-block: 32px 34px;
  }

  .home-copy h1 {
    font-size: clamp(52px, 16vw, 64px);
  }

  .home-blurb {
    margin-top: 20px;
    font-size: 18px;
  }

  .home-links {
    gap: 16px;
    margin-top: 22px;
    flex-wrap: wrap;
  }

  .flourish-panel {
    min-height: 180px;
  }

  .flourish-art {
    width: min(76%, 280px);
  }

  .site-footer {
    gap: 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .page-header {
    gap: 28px;
    padding: 61px 0 50px;
  }

  .page-header h1 {
    font-size: clamp(54px, 17vw, 74px);
  }

  .archive-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-block: 34px;
  }

  .article-header {
    padding: 61px 0 48px;
  }

  .article-header h1 {
    font-size: clamp(50px, 15vw, 70px);
  }

  .dek {
    font-size: 19px;
  }

  .article-body {
    width: 100%;
    font-size: 19px;
  }

  .article-body h2 {
    font-size: 33px;
  }

  .article-body blockquote {
    margin-inline: 0;
    padding-inline: 14px;
    font-size: 25px;
  }

  .article-next {
    width: 100%;
    padding: 38px 23px;
  }

  .article-next h2 {
    font-size: 34px;
  }

  .about-layout {
    padding-block: 65px 85px;
  }

  .about-stamp {
    width: 135px;
    height: 135px;
  }

  .about-stamp strong {
    font-size: 20px;
  }

  .prose-page {
    font-size: 19px;
  }

  .prose-page h1 {
    font-size: 65px;
  }

  .error-mark {
    font-size: 130px;
  }

  .not-found h1 {
    font-size: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .article-next {
    display: none;
  }

  body {
    color: #111;
    background: white;
  }

  .article {
    padding: 0;
  }
}
