/*
  Type: Newsreader (serif) + IBM Plex Mono — free stand-ins for a
  quiet book serif and a small semi-mono label face.
*/
@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,600&family=IBM+Plex+Mono:wght@400&display=swap");

:root {
  --ink: #000;
  --muted: #666;
  --chip: rgba(224, 224, 224, 0.6);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", SFMono-Regular, Menlo, monospace;
  --side: 36px;
  --gap: 24px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 20px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--muted); }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 15px;
  letter-spacing: 0.02em;
}

/* ================= Home / profile ================= */

.profile {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px var(--side) 96px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.grid9 {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  column-gap: var(--gap);
}

.profile__header { row-gap: 64px; }

.profile__info {
  grid-column: 1 / span 6;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.profile__bio p { margin-bottom: 12px; }
.profile__bio p:last-child { margin-bottom: 0; }

.profile__photo {
  grid-column: 8 / span 2;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f0f0f0;
  display: block;
}

.list__label { margin-bottom: 24px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li + li { margin-top: 12px; }
.list a {
  text-decoration: none;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  column-gap: var(--gap);
}
.list a:hover { color: var(--muted); }
.list__date { grid-column: 1 / span 2; }
.list__main { grid-column: 3 / span 5; display: flex; flex-direction: column; }
.list__main h2 { font: inherit; margin: 0; }
.list__tags { grid-column: 8 / span 2; }

@media (max-width: 760px) {
  .profile { padding-top: 48px; gap: 96px; }
  .profile__info { grid-column: 1 / -1; grid-row: 2; }
  .profile__photo { grid-column: 1 / span 5; grid-row: 1; }
  .list a { grid-template-columns: 1fr; row-gap: 2px; }
  .list__date, .list__main, .list__tags { grid-column: 1; }
  .list__tags { color: var(--muted); }
  .list li + li { margin-top: 28px; }
}

/* ================= Project page ================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gap);
}
.crumbs {
  font-size: 28px;
  line-height: 30.8px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.crumbs a { text-decoration: none; }

.chip {
  position: absolute;
  right: var(--gap);
  height: 30px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--chip);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.chip:hover { color: var(--ink); background: #ddd; }

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px) minmax(0, 1fr);
  column-gap: var(--gap);
  padding: 64px var(--gap) 160px;
}

.story__meta {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  position: sticky;
  top: 132px;
}
.story__meta .by { margin-bottom: 16px; }
.story__actions button,
.story__actions a {
  all: unset;
  cursor: pointer;
  display: flex;
  gap: 14px;
}
.story__actions button:hover,
.story__actions a:hover { color: var(--muted); }

.story__title {
  grid-column: 2;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-align: center;
  text-wrap: balance;
  margin: 0 auto 116px;
  max-width: 14em;
}

.story__body { grid-column: 2; }
.story__body p {
  font-size: 18px;
  line-height: 27px;
  margin-bottom: 27px;
}
.story__body h2 {
  font-weight: 400;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.02em;
  margin: 54px 0 18px;
}
.story__figure { margin: 0 0 40px; }
.story__figure img { width: 100%; height: auto; display: block; }
.story__figure figcaption { margin-top: 10px; color: var(--muted); }
.story__body ol { font-size: 18px; line-height: 27px; margin: 0 0 27px; padding-left: 1.3em; }
.story__body li { margin-bottom: 12px; }
.story__body strong { font-weight: 600; }
.story__body a { color: var(--muted); }
.story__body a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .story { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .story__meta { grid-column: 1; grid-row: auto; position: static; margin-bottom: 40px; }
  .story__title, .story__body { grid-column: 1; }
  .story__title { margin-bottom: 64px; }
  .chip { display: none; }
}
