:root {
  --bg: #f4efe8;
  --paper: #fbf8f2;
  --text: #11100f;
  --soft-text: #34302c;
  --muted: #716b64;
  --faint: rgba(17, 16, 15, 0.035);
  --hairline: rgba(17, 16, 15, 0.11);
  --hairline-strong: rgba(17, 16, 15, 0.28);
  --accent: #087a7c;
  --accent-soft: rgba(8, 122, 124, 0.12);
  --max: min(1040px, calc(100vw - 56px));
  --measure: 690px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(var(--faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--faint) 1px, transparent 1px),
    radial-gradient(circle at 48% 0%, rgba(255, 255, 255, 0.58), transparent 30%),
    var(--bg);
  background-size: 54px 54px, 54px 54px, auto, auto;
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: rgba(8, 122, 124, 0.34);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 10;
  transform: translateY(-170%);
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
}

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

.topbar {
  width: 100%;
}

.nav {
  width: min(1320px, calc(100vw - 56px));
  min-height: 96px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  font-size: 1rem;
}

.nav-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  justify-content: flex-end;
  gap: clamp(18px, 2.3vw, 36px);
  color: #3d3833;
}

.nav-links a {
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:last-child {
  color: var(--text);
}

.intro {
  position: relative;
  min-height: calc(100svh - 96px);
  width: var(--max);
  margin-inline: auto;
  padding: clamp(70px, 9vw, 126px) 0 clamp(72px, 9vw, 104px);
  overflow: hidden;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 50%;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, var(--hairline), transparent);
}

.masthead {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 auto clamp(56px, 7vw, 88px);
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 28px);
}

.masthead-mark {
  width: clamp(54px, 5.2vw, 76px);
  height: auto;
  flex: 0 0 auto;
}

.masthead-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.7vw, 2.75rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 500;
  white-space: nowrap;
}

.memo {
  position: relative;
  z-index: 1;
  width: min(var(--measure), 100%);
  margin-inline: auto;
}

h1 {
  margin-bottom: 30px;
  font-size: clamp(1.95rem, 3.75vw, 3.35rem);
  line-height: 1.08;
  font-weight: 560;
  max-width: 720px;
}

.lede {
  color: var(--text) !important;
  font-size: clamp(1.14rem, 1.8vw, 1.34rem) !important;
  line-height: 1.62 !important;
}

.memo p,
.section-body > p,
.contact-block p {
  max-width: var(--measure);
  color: var(--soft-text);
  font-size: clamp(1.02rem, 1.35vw, 1.14rem);
  line-height: 1.76;
}

.inline-links,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 34px;
  font-size: 0.96rem;
  font-weight: 650;
}

.essay-block,
.system-block,
.people-block,
.contact-block {
  position: relative;
  width: var(--max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 74px minmax(0, var(--measure));
  justify-content: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(78px, 10vw, 128px) 0;
  border-top: 1px solid var(--hairline);
}

.compact {
  padding-block: clamp(58px, 8vw, 92px);
}

.section-index {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding-top: 6px;
}

h2 {
  margin-bottom: 28px;
  font-size: clamp(1.9rem, 3.55vw, 3.1rem);
  line-height: 1.08;
  font-weight: 590;
}

blockquote {
  margin: clamp(38px, 6vw, 58px) 0;
  padding: 0 0 0 clamp(22px, 4vw, 34px);
  border-left: 2px solid var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 3.3rem);
  line-height: 1.08;
}

.layer-list {
  margin-top: clamp(34px, 5vw, 58px);
  border-top: 1px solid var(--hairline-strong);
}

.layer-list article,
.people-index article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 26px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}

.layer-list span {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.layer-list p,
.people-index p {
  margin-bottom: 0;
  color: var(--muted);
}

.people-index {
  margin-top: clamp(34px, 5vw, 58px);
  border-top: 1px solid var(--hairline-strong);
}

.people-index article {
  grid-template-columns: minmax(210px, 0.48fr) minmax(0, 0.52fr);
  align-items: baseline;
}

.people-index h3 {
  margin-bottom: 0;
}

.people-index p:first-of-type {
  color: var(--text);
}

.people-index p:last-child {
  grid-column: 2;
  margin-top: 4px;
}

.mail {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  line-height: 1;
  text-decoration-color: var(--accent);
}

.footer {
  width: min(1320px, calc(100vw - 56px));
  min-height: 108px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer p {
  margin: 0;
}

.footer p:first-child {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 820px) {
  :root {
    --max: min(100% - 32px, 1040px);
  }

  body {
    background-size: 34px 34px, 34px 34px, auto, auto;
  }

  .nav {
    width: min(100% - 32px, 1320px);
    min-height: auto;
    display: block;
    padding: 22px 0 18px;
  }

  .nav-links {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 14px;
    font-size: 0.82rem;
  }

  .intro {
    min-height: auto;
    padding-top: 58px;
  }

  .intro::before {
    display: none;
  }

  .masthead {
    margin-bottom: 48px;
    gap: 14px;
  }

  .masthead-mark {
    width: 46px;
  }

  .masthead-name {
    font-size: clamp(1.45rem, 9vw, 2.1rem);
  }

  h1 {
    font-size: clamp(1.9rem, 9vw, 2.7rem);
  }

  .essay-block,
  .system-block,
  .people-block,
  .contact-block {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-block: 68px;
  }

  .section-index {
    padding-top: 0;
  }

  .layer-list article,
  .people-index article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .people-index p:last-child {
    grid-column: auto;
  }

  .footer {
    width: min(100% - 32px, 1320px);
    display: block;
    padding: 28px 0;
  }

  .footer p + p {
    margin-top: 8px;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: clamp(2rem, 10vw, 2.6rem);
  }

  h2 {
    font-size: clamp(1.75rem, 9vw, 2.55rem);
  }

  blockquote {
    padding-left: 18px;
  }

  .mail {
    overflow-wrap: anywhere;
  }
}
