:root {
  --paper: #ffffff;
  --ink: #202722;
  --muted: #68726b;
  --green: #173f32;
  --green-soft: #dfe9e3;
  --coral: #c96855;
  --line: #dce2de;
  --max-width: 1180px;
  --serif: ui-serif, "Songti SC", STSong, "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.7;
  letter-spacing: 0;
}

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

button {
  font: inherit;
}

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 50%;
  display: flex;
  width: min(calc(100% - 72px), var(--max-width));
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  border-bottom: 1px solid rgb(255 255 255 / 42%);
  transform: translateX(-50%);
}

.brand {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  gap: 34px;
  font-size: 14px;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

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

.hero {
  position: relative;
  display: grid;
  min-height: 640px;
  height: 82svh;
  max-height: 860px;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  background: var(--green);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 72px), var(--max-width));
  padding-top: 84px;
  text-shadow: 0 2px 18px rgb(0 0 0 / 42%);
}

.hero h1 {
  max-width: 640px;
  margin: 0;
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-content > p {
  max-width: 520px;
  margin: 24px 0 34px;
  font-size: 18px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 9px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid #ffffff;
}

.hero-link svg,
.note-open svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-caption {
  position: absolute;
  z-index: 1;
  right: max(36px, calc((100% - var(--max-width)) / 2));
  bottom: 24px;
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  text-shadow: 0 2px 10px rgb(0 0 0 / 45%);
}

.notes-section {
  display: grid;
  width: min(calc(100% - 72px), var(--max-width));
  margin: 0 auto;
  padding: 112px 0 126px;
  grid-template-columns: 0.8fr 2fr;
  gap: 10%;
}

.section-heading h2,
.reading-copy h2,
.about-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.25;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 270px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.notes-list {
  border-top: 1px solid var(--ink);
}

.note-row {
  display: grid;
  min-height: 158px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 110px 1fr 52px;
  gap: 24px;
}

.note-row time {
  align-self: start;
  padding-top: 37px;
  color: var(--coral);
  font-size: 12px;
}

.note-row h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
}

.note-row p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.note-open {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.note-open:hover,
.note-open:focus-visible {
  color: #ffffff;
  background: var(--green);
  transform: translateX(3px);
}

.reading-section {
  display: grid;
  min-height: 580px;
  background: #edf2ef;
  grid-template-columns: 1.25fr 0.75fr;
}

.reading-media {
  min-height: 580px;
}

.reading-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reading-copy {
  display: flex;
  max-width: 510px;
  padding: 84px 68px;
  align-self: center;
  flex-direction: column;
}

.reading-copy h2 {
  color: var(--green);
  font-size: 22px;
}

.book-title {
  margin: 28px 0 20px;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.3;
}

.reading-copy > p:not(.book-title):not(.reading-meta) {
  margin: 0;
  color: #4e5e55;
  font-size: 15px;
}

.reading-meta {
  margin: 32px 0 0;
  padding-top: 20px;
  color: var(--coral);
  font-size: 12px;
  border-top: 1px solid #cbd7d0;
}

.about-section {
  display: grid;
  min-height: 430px;
  padding: 108px max(36px, calc((100% - var(--max-width)) / 2));
  align-items: center;
  color: #ffffff;
  background: var(--green);
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12%;
}

.about-section p {
  max-width: 580px;
  margin: 28px 0 0;
  color: #d9e5df;
  font-size: 16px;
}

.about-section blockquote {
  margin: 0;
  padding-left: 32px;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.5;
  border-left: 3px solid var(--coral);
}

.site-footer {
  display: grid;
  width: min(calc(100% - 72px), var(--max-width));
  min-height: 116px;
  margin: 0 auto;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  grid-template-columns: 1fr auto 1fr;
}

.site-footer span:first-child {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
}

.site-footer span:last-child {
  text-align: right;
}

.note-dialog {
  width: min(calc(100% - 40px), 680px);
  max-height: min(82vh, 760px);
  padding: 58px 62px 64px;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgb(11 33 25 / 28%);
}

.note-dialog::backdrop {
  background: rgb(13 31 24 / 72%);
  backdrop-filter: blur(4px);
}

.note-dialog time {
  color: var(--coral);
  font-size: 12px;
}

.note-dialog h2 {
  margin: 12px 0 30px;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.3;
}

.note-dialog p {
  margin: 0 0 18px;
  color: #4f5b54;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.95;
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  background: var(--green-soft);
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
}

@media (max-width: 820px) {
  .site-header {
    width: calc(100% - 40px);
    min-height: 112px;
    padding: 16px 0 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    gap: 0;
    justify-content: space-between;
  }

  .hero {
    min-height: 600px;
    height: 84svh;
  }

  .hero-image {
    object-position: 43% center;
  }

  .hero-content {
    width: calc(100% - 40px);
    padding-top: 106px;
    align-self: end;
    padding-bottom: 92px;
  }

  .hero h1 {
    max-width: 300px;
    font-size: 46px;
  }

  .hero-content > p {
    max-width: 310px;
    margin: 18px 0 28px;
    font-size: 16px;
  }

  .hero-caption {
    right: 20px;
    bottom: 18px;
  }

  .notes-section {
    width: calc(100% - 40px);
    padding: 76px 0 88px;
    grid-template-columns: 1fr;
    gap: 44px;
  }

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

  .note-row {
    min-height: 0;
    padding: 26px 0;
    grid-template-columns: 1fr 44px;
    gap: 14px;
  }

  .note-row time {
    padding: 0;
    grid-column: 1 / -1;
  }

  .note-row h3 {
    font-size: 21px;
  }

  .reading-section {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .reading-media {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .reading-copy {
    max-width: none;
    padding: 56px 28px 64px;
  }

  .book-title {
    font-size: 30px;
  }

  .about-section {
    min-height: 0;
    padding: 76px 28px 84px;
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .about-section h2 {
    font-size: 32px;
  }

  .about-section blockquote {
    font-size: 25px;
  }

  .site-footer {
    width: calc(100% - 40px);
    min-height: 150px;
    padding: 28px 0;
    grid-template-columns: 1fr auto;
    row-gap: 10px;
  }

  .site-footer p {
    margin: 0;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .note-dialog {
    padding: 50px 26px 42px;
  }

  .note-dialog h2 {
    font-size: 28px;
  }
}

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

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