:root {
  --paper: #f7f5ef;
  --ink: #111214;
  --muted: #55585e;
  --rule: #303238;
  --blue: #123cc7;
  --blue-dark: #0b2d9d;
  --proof: #d96557;
  --white: #fff;
  --shell: 1320px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.shell {
  width: min(100% - (2 * var(--gutter)), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.site-header {
  padding-top: 1.55rem;
}

.header-inner {
  min-height: 3.6rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  text-decoration: none;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  font-weight: 670;
  letter-spacing: -0.045em;
  line-height: 1;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 4vw, 4.8rem);
  line-height: 1.2;
}

.nav-link {
  position: relative;
  padding: 0.1rem 0 1.25rem;
  text-decoration: none;
  font-size: 1.02rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.65rem;
  left: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link:first-child::after {
  transform: scaleX(1);
}

.hero {
  min-height: 440px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-block: 1.75rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 700px;
  margin-bottom: 1.35rem;
  font-size: clamp(3.45rem, 4.2vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 690;
}

.hero-summary {
  max-width: 620px;
  margin-bottom: 2rem;
  font-size: clamp(1.08rem, 1.6vw, 1.45rem);
  line-height: 1.48;
}

.button {
  display: inline-flex;
  min-height: 3.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 610;
  transition: background-color 160ms ease, transform 160ms ease;
}

.button:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.button:focus-visible,
.nav-link:focus-visible,
.wordmark:focus-visible,
.contact a:focus-visible {
  outline: 3px solid var(--proof);
  outline-offset: 4px;
}

.hero-note {
  margin: 1.45rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.book-figure {
  width: min(100%, 590px);
  min-width: 0;
  justify-self: end;
  transform: translateY(0.75rem);
}

.book-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.book-pages,
.book-grid,
.book-baseline {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.book-grid {
  opacity: 0.62;
}

.book-baseline {
  stroke-width: 1.35;
}

.proof-marks {
  fill: none;
  stroke: var(--proof);
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
}

.proof-marks path:last-child {
  stroke-dasharray: none;
}

.ruled-section {
  border-top: 1px solid var(--rule);
}

.library {
  padding-block: 2rem;
}

.library h2,
.about h2,
.contact h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.65rem, 2.35vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 670;
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 6vw, 6rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
}

.topic-number {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  line-height: 1.4;
}

.topic-list h3 {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding-bottom: 0.32rem;
  border-bottom: 2px solid var(--blue);
  font-size: 1.14rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.topic-list p {
  max-width: 310px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.about {
  display: grid;
  grid-template-columns: 150px minmax(0, 560px);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: 2rem;
}

.notebook-mark {
  position: relative;
  width: 124px;
  height: 104px;
  border: 1px solid var(--rule);
  background: linear-gradient(to right, transparent 0 17px, var(--proof) 17px 18px, transparent 18px);
}

.notebook-mark span {
  display: block;
  height: 17px;
  border-bottom: 1px solid rgba(48, 50, 56, 0.6);
}

.about h2 {
  margin-bottom: 0.75rem;
}

.about p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.contact {
  background: var(--ink);
  color: var(--white);
}

.contact-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 118px;
  padding-block: 1.6rem;
}

.mail-mark {
  display: grid;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid var(--white);
  border-radius: 50%;
}

.mail-mark svg {
  width: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
}

.contact h2 {
  margin-bottom: 0.45rem;
}

.contact p {
  margin: 0;
  color: #dadadc;
  font-size: 1.04rem;
}

.contact a {
  color: var(--white);
  text-underline-offset: 5px;
}

.site-footer {
  padding-block: 1.1rem 1.5rem;
}

.site-footer .shell {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-top: 3.75rem;
  }

  .hero-copy {
    max-width: 720px;
  }

  .book-figure {
    width: min(100%, 650px);
    margin-inline: auto;
  }

  .topic-list {
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 1.25rem;
  }

  .site-header {
    padding-top: 1.25rem;
  }

  .header-inner {
    min-height: auto;
    align-items: center;
    padding-bottom: 1rem;
  }

  nav {
    gap: 1rem;
  }

  .nav-link {
    padding: 0.25rem 0;
    font-size: 0.9rem;
  }

  .nav-link::after {
    bottom: -0.2rem;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .hero {
    padding-block: 3.25rem 2.6rem;
  }

  .hero-summary {
    font-size: 1.08rem;
  }

  .book-figure {
    margin-top: 1rem;
  }

  .topic-list {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .topic-list p {
    max-width: 460px;
  }

  .about {
    grid-template-columns: 92px 1fr;
    gap: 1.4rem;
  }

  .notebook-mark {
    width: 86px;
    height: 86px;
    overflow: hidden;
  }

  .contact-inner {
    gap: 1.15rem;
  }

  .mail-mark {
    flex-basis: 58px;
    width: 58px;
    height: 58px;
  }

  .mail-mark svg {
    width: 29px;
  }
}

@media (max-width: 460px) {
  .header-inner {
    align-items: flex-start;
  }

  nav {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
  }

  h1 br {
    display: none;
  }

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

  .contact-inner {
    align-items: flex-start;
  }
}

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

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