:root {
  --paper: #f7f5ef;
  --ink: #1f1e1b;
  --muted: #777169;
  --rule: #d8d2c6;
  --soft-rule: #e8e2d7;
  --measure: 68rem;
  --text-measure: 42rem;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Yu Gothic",
    sans-serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--ink) 32%, transparent);
  text-underline-offset: 0.18em;
  transition:
    text-decoration-color 160ms ease,
    color 160ms ease;
}

a:hover {
  color: #000;
  text-decoration-color: currentColor;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  width: min(var(--measure), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.site-title {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.1rem;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-nav a {
  text-decoration: none;
}

.page {
  width: min(var(--measure), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) 0 6rem;
}

.intro,
.page-heading {
  max-width: var(--text-measure);
}

.intro {
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 4rem;
}

.kicker {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 1.2rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(3.75rem, 14vw, 9rem);
  font-weight: 400;
  line-height: 0.95;
}

.page-heading h1 {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
}

h2 {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.lead {
  max-width: 36rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.7;
}

.index-section,
.resume-section {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.index-section + .index-section,
.resume-section + .resume-section {
  margin-top: 4rem;
}

.index-list {
  display: grid;
  border-top: 1px solid var(--soft-rule);
}

.index-item {
  display: grid;
  grid-template-columns: minmax(8rem, 0.36fr) 1fr;
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--soft-rule);
  text-decoration: none;
}

.index-item span:first-child {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.25rem;
}

.index-item span:last-child {
  color: var(--muted);
}

.quiet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--soft-rule);
}

.quiet-list li {
  display: grid;
  grid-template-columns: minmax(8rem, 0.24fr) 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--soft-rule);
}

time,
.work-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.work-list {
  border-top: 1px solid var(--soft-rule);
}

.work-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  margin: 3rem 0 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.work-filter button {
  appearance: none;
  padding: 0 0 0.12rem;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
}

.work-filter button:hover,
.work-filter button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: currentColor;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(8rem, 0.24fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--soft-rule);
  text-decoration: none;
}

.work-item[hidden] {
  display: none;
}

.work-item h2 {
  margin-bottom: 0.3rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.work-item p {
  margin-bottom: 0;
}

.resume-section {
  max-width: var(--text-measure);
}

.resume-section p {
  color: var(--muted);
}

.article {
  max-width: var(--text-measure);
}

.article-header {
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.article-header h1 {
  font-size: clamp(2.7rem, 8vw, 5.75rem);
}

.article-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.prose {
  font-size: 1.04rem;
}

.prose p {
  margin-bottom: 1.4rem;
}

.article-figure {
  margin: 2rem 0 2.5rem;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--soft-rule);
}

.article-figure figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.detail-list {
  margin: 3rem 0 0;
  padding: 0;
  border-top: 1px solid var(--soft-rule);
}

.detail-list div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.3fr) 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--soft-rule);
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.88rem;
}

.detail-list dd {
  margin: 0;
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .page {
    padding-top: 3.5rem;
  }

  .intro {
    min-height: 38vh;
  }

  .index-item,
  .quiet-list li,
  .work-item,
  .detail-list div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
