:root {
  --paper: #f3f2ed;
  --card: #fffefa;
  --ink: #171915;
  --muted: #6d7169;
  --line: #d7d6cf;
  --green: #136d4d;
  --lime: #dff25f;
  --button-bg: #171915;
  --button-ink: #ffffff;
  --text-soft: #50544d;
  --nav-text: #555950;
  --nav-index: #92958d;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --paper: #101310;
  --card: #191d19;
  --ink: #eef1eb;
  --muted: #9ba198;
  --line: #303630;
  --green: #62d3a0;
  --lime: #dff25f;
  --button-bg: #eef1eb;
  --button-ink: #101310;
  --text-soft: #b8beb5;
  --nav-text: #b2b8af;
  --nav-index: #858c83;
}

* { box-sizing: border-box; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
main { margin: 0 auto; max-width: 1480px; min-height: 100vh; padding: 0 4vw; }
header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 82px;
}
.mark {
  align-items: center;
  background: var(--button-bg);
  border-radius: 50%;
  color: var(--button-ink);
  display: flex;
  font-family: var(--serif);
  font-style: italic;
  height: 44px;
  justify-content: center;
  width: 44px;
}
.header-actions { align-items: center; display: flex; gap: 18px; }
.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font: 750 9px var(--sans);
  letter-spacing: .08em;
  padding: 10px 12px;
  text-transform: uppercase;
}
.theme-toggle:hover { background: var(--button-bg); color: var(--button-ink); }
header span,
.hero > p,
nav small,
footer {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .42fr);
  padding: 8vw 2vw 7vw;
}
.hero > p {
  color: var(--green);
  grid-column: 1 / -1;
  margin: 0 0 22px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(58px, 8vw, 118px);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .84;
  margin: 0;
}
.hero-note {
  align-self: end;
  border-top: 2px solid var(--ink);
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  padding-top: 17px;
}
nav {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
nav a {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  color: inherit;
  display: grid;
  gap: 22px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 250px;
  padding: 34px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
nav a:first-child { border-right: 1px solid var(--line); }
nav a > span {
  color: var(--nav-index);
  font-family: var(--serif);
  font-size: 14px;
}
nav h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 48px);
  font-weight: 400;
  letter-spacing: -.04em;
  margin: 10px 0 14px;
}
nav p { color: var(--nav-text); font-size: 13px; line-height: 1.55; margin: 0; max-width: 470px; }
nav b { align-self: end; font-size: 28px; font-weight: 400; }
nav a:hover { background: var(--button-bg); color: var(--button-ink); }
nav a:hover p, nav a:hover span, nav a:hover small { color: #c9cbc5; }
nav a.primary:hover b { color: var(--lime); }
footer {
  display: flex;
  justify-content: space-between;
  min-height: 100px;
  padding: 40px 0;
}

@media (max-width: 800px) {
  .hero { gap: 42px; grid-template-columns: 1fr; padding: 70px 0 58px; }
  .hero h1 { font-size: 62px; }
  nav { grid-template-columns: 1fr; }
  nav a:first-child { border-right: 0; }
}

@media (max-width: 520px) {
  main { padding: 0 5vw; }
  header { align-items: flex-start; padding: 18px 0; }
  .header-actions { align-items: flex-end; flex-direction: column; gap: 9px; }
  .hero h1 { font-size: 49px; }
  nav a { min-height: 220px; padding: 25px 20px; }
  footer { gap: 8px; flex-direction: column; }
}
