@font-face {
  font-family: "Manrope";
  src: url("./fonts/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("./fonts/Newsreader-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #FAF9F6;
  --foreground: #20201E;
  --muted: #777670;
  --rule: #D2D1CB;
  --font-display: "Manrope", sans-serif;
  --font-reading: "Newsreader", Georgia, serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-reading);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.58;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.article {
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(56px, 8vw, 104px) 20px 120px;
}

.page-grid {
  --grid-gap: clamp(12px, 1.6vw, 24px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 72px);
}

.home {
  padding-top: clamp(56px, 7.5vw, 104px);
  padding-bottom: 144px;
}

.home .identity {
  grid-column: 1 / 4;
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.home .intro {
  grid-column: 5 / 12;
  max-width: 680px;
}

.home .intro p { margin: 0 0 1.3em; }

.home .index {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  margin-top: clamp(96px, 11vw, 160px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.home .index h2 {
  grid-column: 1 / 4;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.home .index-content { grid-column: 5 / -1; min-width: 0; }
.home .entries { margin: 0; padding: 0; list-style: none; }
.home .entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding-block: 12px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.45;
}
.home .entry a { width: fit-content; text-decoration: none; }
.home .entry a:hover { text-decoration: underline; }
.home .entry time { color: var(--muted); font-variant-numeric: tabular-nums; }

.home .projects {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 48px var(--grid-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home .project { grid-column: span 4; min-width: 0; }
.home .project.is-wide { grid-column: span 5; }
.home .project.is-narrow { grid-column: span 3; margin-top: clamp(32px, 6vw, 80px); }
.home .project a { display: block; text-decoration: none; }
.home .project a:hover .project-title { text-decoration: underline; }
.home .project-media { display: block; width: 100%; height: auto; }
.home .project-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.4;
}
.home .project-caption time { color: var(--muted); font-variant-numeric: tabular-nums; }

.article h1 {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(42px, 5.5vw, 76px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.article .lead {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.5;
  font-weight: 400;
}

.article .prose {
  font-family: var(--font-reading);
  font-size: 20px;
  line-height: 1.58;
  font-weight: 400;
  letter-spacing: 0;
  font-optical-sizing: auto;
}

.article .prose p { margin-block: 0 1.3em; }

.article h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 2.2em 0 0.7em;
  text-wrap: balance;
}

@media (max-width: 960px) {
  .page-grid, .home .index { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .home .identity, .home .index h2 { grid-column: 1 / 3; }
  .home .intro { grid-column: 4 / -1; }
  .home .index-content { grid-column: 4 / -1; }
  .home .projects { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .home .project, .home .project.is-wide { grid-column: span 3; }
  .home .project.is-narrow { grid-column: span 2; }
}

@media (max-width: 640px) {
  body, .article .prose { font-size: 18px; line-height: 1.6; }
  .article .lead { font-size: 20px; }
  .page-grid, .home .index { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home { padding-top: 48px; padding-bottom: 80px; }
  .home .identity, .home .intro, .home .index h2, .home .index-content { grid-column: 1 / -1; }
  .home .intro { margin-top: 48px; }
  .home .index { margin-top: 80px; row-gap: 20px; }
  .home .projects { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--grid-gap); }
  .home .project, .home .project.is-wide, .home .project.is-narrow { grid-column: 1 / -1; }
  .home .project.is-narrow { margin-top: 0; }
  .article { padding-bottom: 80px; }
}
