:root {
  --bg: #f4f5ef;
  --paper: #f4f5ef;
  --ink: #111111;
  --muted: #6f746b;
  --line: #8f968c;
  --soft: #e9ebe4;
  --sans: "Avenir Next", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", sans-serif;
  --display: "Avenir Next", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

body.is-lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.poster-card img:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

h3 a,
h4 a {
  text-decoration: none;
}

h3 a:hover,
h4 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(244, 245, 239, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: grid;
  gap: 0;
  text-decoration: none;
}

.brand span:first-child {
  font-size: 14px;
  font-weight: 430;
}

.brand span:last-child,
.eyebrow,
.section-kicker {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  font-size: 13px;
}

.nav a,
.brand {
  text-decoration: none;
}

.nav a:hover,
.inline-links a:hover,
.footer a:hover,
.article-link:hover {
  color: var(--muted);
}

.language-toggle {
  display: flex;
  border: 0;
  background: transparent;
}

.lang-button {
  min-width: 26px;
  height: 22px;
  border: 0;
  border-right: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.lang-button:last-child {
  border-right: 0;
}

.lang-button.is-active {
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

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

h2 {
  margin-bottom: 28px;
  font-family: var(--display);
  font-size: clamp(42px, 7vw, 88px);
  font-weight: 360;
  line-height: 1;
}

h3 {
  margin-bottom: 6px;
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 400;
  line-height: 1.24;
}

h4 {
  margin: 0 0 6px;
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 400;
  line-height: 1.28;
}

.section {
  display: grid;
  grid-template-columns: minmax(120px, 0.26fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 92px);
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 9vw, 132px) 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.section:first-child {
  border-top: 0;
  padding-top: clamp(52px, 7vw, 96px);
}

.section-kicker {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding-top: 9px;
}

.section-kicker span {
  color: var(--ink);
}

.section-body {
  max-width: 1040px;
}

.rich-text {
  max-width: 740px;
  font-size: clamp(13px, 1.18vw, 16px);
  line-height: 1.68;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
  font-size: 14px;
}

.writing-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 24px;
}

.filter {
  min-height: 27px;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
}

.filter.is-active {
  border-bottom-color: var(--ink);
}

.writing-list,
.index-list {
  display: grid;
  border-top: 1px solid var(--ink);
  background: transparent;
}

.writing-item,
.index-list article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: clamp(12px, 1.8vw, 22px);
  align-items: start;
  min-height: 40px;
  padding: 7px 0;
  border-bottom: 1px solid var(--ink);
}

.index-list article {
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: auto;
  padding: 11px 0;
}

.writing-item time,
.index-list time {
  color: var(--ink);
  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 380;
  line-height: 1.28;
}

.year-spacer {
  min-height: 1px;
}

.index-list h3,
.index-list h4 {
  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 400;
  line-height: 1.28;
  margin: 0 0 5px;
}

.index-list p {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  margin-bottom: 0;
}

.writing-title {
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 380;
  line-height: 1.28;
  text-decoration: none;
}

.writing-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.writing-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px 14px;
  align-items: baseline;
  min-width: 0;
}

.writing-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-groups {
  display: grid;
  gap: 38px;
}

.project-group > h3 {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 420;
  text-transform: uppercase;
}

.project-group {
  padding: 0;
}

.project-drawer summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
  cursor: pointer;
  list-style: none;
}

.project-drawer summary::-webkit-details-marker {
  display: none;
}

.puncture-title {
  color: var(--ink);
  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 400;
  line-height: 1.28;
  margin: 0 0 5px;
}

.drawer-mark::before {
  color: var(--muted);
  content: "+";
  font-size: 13px;
}

.project-drawer[open] .drawer-mark::before {
  content: "-";
}

.project-drawer .drawer-content {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  transition: grid-template-rows 820ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 620ms ease,
    transform 780ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-drawer .drawer-content > * {
  min-height: 0;
}

.project-drawer[open] .drawer-content {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

.project-drawer.is-closing .drawer-content {
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-10px);
}

.project-drawer .poster-card {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 620ms ease, transform 780ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-drawer[open] .poster-card {
  opacity: 1;
  transform: translateY(0);
}

.project-drawer.is-closing .poster-card {
  opacity: 0;
  transform: translateY(12px);
}

.puncture-description {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin-top: 12px;
  color: var(--ink);
}

.puncture-description p {
  margin: 0;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.7;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 16px);
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.poster-card {
  margin: 0;
}

.poster-card img,
.poster-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4.18;
  background: var(--soft);
  object-fit: contain;
}

.poster-card img {
  cursor: pointer;
  transform-origin: center;
  transition: filter 180ms ease, transform 180ms ease;
}

.poster-card:hover img,
.poster-card img:focus {
  filter: contrast(1.03);
  outline: 0;
  transform: scale(1.035);
}

.poster-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
  background: rgba(244, 245, 239, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.poster-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.poster-lightbox img {
  max-width: min(92vw, 980px);
  max-height: 88vh;
  object-fit: contain;
  transform: scale(0.965);
  transition: transform 180ms ease;
}

.poster-lightbox.is-open img {
  transform: scale(1);
}

.poster-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.poster-placeholder {
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
}

.poster-card figcaption {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 0;
  }

  .header-right {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .section {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

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

@media (max-width: 620px) {
  .header-right {
    flex-direction: column;
    gap: 14px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 48px 0;
  }

  .writing-item,
  .index-list article {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
  }

  .writing-title {
    font-size: 13px;
  }

  .writing-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .writing-meta {
    font-size: 11px;
  }

  .poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer {
    flex-direction: column;
  }
}
