:root {
  --paper: #f6f4f0;
  --ink: #252621;
  --muted: #3c4038;
  --line: #d4cfc6;
  --mark: #af3828;
  --field: #e7e4dc;
  --shade: #e3e7e1;
  --desk: #16181b;
  --desk-ink: #f2f3f5;
  --sans: "SF Pro Text", "PingFang TC", "PingFang HK", "Helvetica Neue", sans-serif;
  --serif: "Songti TC", "Songti SC", "Noto Serif CJK TC", "Iowan Old Style", Palatino, serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
  --measure: 38rem;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--mark); }
:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: var(--pad);
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.7rem;
}
.skip:focus { transform: none; }

.bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem var(--pad) 0;
}
.mark {
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.bar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.1rem;
}
.bar a { text-decoration: none; }
.bar nav a { font-size: 0.95rem; }

.hero, .work, .pictures, .writing, .about, .profile, .contact, .foot {
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.hero { padding-top: clamp(2.5rem, 8vh, 6rem); }
h1, h2, h3 { font-weight: 560; letter-spacing: -0.03em; }
h1 {
  margin: 0;
  font-size: clamp(3.25rem, 11vw, 8.25rem);
  line-height: 0.92;
  font-weight: 600;
}
.question {
  margin: 1.15rem 0 0;
  max-width: 9em;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.6vw, 3.15rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0;
}
.stop { color: var(--mark); }
.line {
  margin: 1.15rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 560;
}
.still {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
}
.lede, .piece p, .essay p, .about p, .profile .lede, .contact p, .roles p {
  max-width: var(--measure);
}
.lede {
  margin: 1.25rem 0 0;
  color: var(--ink);
}
.hero-split {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: clamp(0.8rem, 2vw, 1.4rem);
  align-items: stretch;
  margin-top: clamp(2rem, 5vh, 3.5rem);
}
.slot, .frame, .portrait {
  margin: 0;
  background: var(--field);
  min-height: 16rem;
}
.slot-city, .frame {
  display: grid;
  overflow: hidden;
  padding: 0;
}
.slot-city > img,
.frame > img,
.slot-city > figcaption,
.frame > figcaption {
  grid-area: 1 / 1;
}
.slot-city img, .frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slot-city {
  min-height: clamp(16rem, 36vw, 28rem);
}
.slot-city figcaption, .frame figcaption {
  align-self: end;
  justify-self: start;
  z-index: 1;
  width: max-content;
  max-width: calc(100% - 1.4rem);
  margin: 0.7rem;
  padding: 0.4rem 0.65rem 0.45rem;
  background: var(--paper);
  color: var(--ink);
}
.slot-city figcaption strong,
.frame figcaption {
  color: var(--ink);
}
.slot-city figcaption span,
.slot-city figcaption em {
  color: var(--muted);
}
.portrait figcaption {
  padding: 1rem 1.1rem 1.15rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}
.slot-city figcaption,
.frame figcaption {
  font-size: 0.875rem;
  line-height: 1.45;
}
.slot-city figcaption strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.slot figcaption em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
}
.desk {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  min-height: 11rem;
  margin: 0.9rem 0 1rem;
  padding: 1.15rem 1.2rem 1.2rem;
  background: var(--desk);
  color: var(--desk-ink);
  text-decoration: none;
}
.desk:hover { color: var(--desk-ink); }
.desk-kicker { font-size: 0.875rem; opacity: 0.72; }
.desk-title {
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-weight: 560;
}
.desk-go { font-size: 0.95rem; }

.section-head { margin: clamp(4.5rem, 10vh, 7.5rem) 0 1.5rem; }
.section-head h2, .about h2, .profile h2, .contact h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
}
.section-head p { margin: 0.8rem 0 0; max-width: var(--measure); }

.work-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.piece-kicker, .essay-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.875rem;
  color: var(--mark);
}
.piece h3, .essay h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
}
.piece h3 a, .essay h3 a { text-decoration: none; }
.piece p, .essay p { margin: 0.4rem 0; }
.role { color: var(--muted); }
.links a { text-decoration: none; border-bottom: 1px solid var(--line); }

.shade {
  position: relative;
  height: 100%;
  min-height: 18rem;
  overflow: hidden;
  background: var(--shade);
}
.shade-under {
  margin: 0;
  padding: 3.4rem 1.15rem 1.1rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: 0;
}
.shade-sheet {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
  transition: height 280ms ease;
}
.shade.is-shut .shade-sheet {
  bottom: auto;
  height: 2.6rem;
}
.shade-sheet button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  height: 2.6rem;
  margin: 0;
  padding: 0 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}
.shade-sheet button:active { transform: translateY(1px); }
.shade-sq {
  width: 0.7rem;
  height: 0.7rem;
  border: 1.5px solid var(--mark);
}
.shade-body p { margin: 0.85rem 1.05rem; max-width: 16rem; }
.shade-hint { color: var(--muted); font-size: 0.875rem; }
.shade-status, .wait, .aside-line {
  color: var(--muted);
  font-size: 0.875rem;
}
.shade-status { margin: 0.75rem 0 0; }
.aside-line { margin: 2rem 0 0; }
.aside-line a { color: var(--ink); }

.frames {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.75fr 1.05fr;
  gap: 0.7rem;
  align-items: end;
}
.frame { min-height: 0; }
.frame-a { min-height: 22rem; }
.frame-b { min-height: 16rem; }
.frame-c { min-height: 16rem; }
.frame-d { min-height: 19rem; }
.frame figcaption, .portrait figcaption {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
}
.roles {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(3rem, 8vh, 5rem);
  align-items: end;
}
.roles h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}
.portraits {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  gap: 0.7rem;
  align-items: end;
}
.portrait { min-height: 14rem; }
.portrait-mid { min-height: 18rem; }

.essay-lead {
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.essay-q {
  margin: 0.8rem 0;
  max-width: 16em;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.25;
  letter-spacing: 0;
}
.essay-rest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  padding-top: 1.4rem;
}

.about { padding-top: clamp(4.5rem, 10vh, 7rem); }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: 1.4rem;
}
blockquote { margin: 0; }
blockquote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.28;
}
blockquote cite {
  display: block;
  margin-top: 0.9rem;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.875rem;
}
blockquote cite a { color: var(--muted); }

.profile { padding-top: clamp(4rem, 9vh, 6.5rem); }
.cases {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  max-width: 46rem;
  border-top: 1px solid var(--line);
}
.cases li {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.cases a { text-decoration: none; font-weight: 560; }
.cases span { color: var(--muted); }

.contact { padding-top: clamp(4rem, 9vh, 6.5rem); padding-bottom: 1rem; }
.contact h2 { max-width: 12em; }
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}
.social a { text-decoration: none; border-bottom: 1px solid var(--line); }
.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 3rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.card-page { min-height: 100dvh; }
.card-main {
  padding: clamp(2rem, 8vh, 5rem) var(--pad) 3rem;
}
.card {
  max-width: 28rem;
}
.card-url {
  margin: 0 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--mark);
}
.card h1 { font-size: clamp(3.4rem, 12vw, 5.4rem); }
.card .question { font-size: clamp(1.45rem, 3vw, 1.85rem); max-width: 12em; }
.card-works {
  margin: 1.6rem 0;
  padding: 0.9rem 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.card-works li + li { margin-top: 0.35rem; }
.card-works a { text-decoration: none; font-weight: 560; }
.card-blurb { margin: 0; max-width: 22rem; }

@media (max-width: 800px) {
  body { font-size: 1.0625rem; }
  .hero-split, .work-split, .frames, .roles, .essay-rest, .about-grid, .cases li {
    grid-template-columns: 1fr;
  }
  .desk { margin-bottom: 0; }
  .frame-a, .frame-b, .frame-c, .frame-d, .portrait, .portrait-mid {
    min-height: 9.5rem;
  }
  .slot-city { min-height: 14rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shade-sheet { transition: none; }
}
