﻿/* ---------------------------------------------------------------
   Christopher Hsieh â€” prototype stylesheet
   Direction: editorial warm (Stamatiou / Craig Mod) on a
   restrained monograph spine (Chipperfield).
----------------------------------------------------------------*/

:root {
  --paper:   #F7F4EF;
  --paper-2: #F1ECE4;
  --ink:     #1A1815;
  --muted:   #6F6963;
  --rule:    #DCD5C9;
  --accent:  #8A3A2A;
  --night:   #101413;
  --night-ink: #E8E2D8;

  --serif: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 1240px;
  --gut: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #E4D9C6; }

img { display: block; width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- structure ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- type ---------- */

.label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

h1, h2, h3 { font-weight: 300; margin: 0; }

h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.9rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
  text-wrap: balance;
  max-width: 22ch;
}

h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
}

.lede {
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
  line-height: 1.6;
  max-width: 58ch;
  color: #302C27;
}

.prose { max-width: 64ch; }
.prose p { margin: 0 0 1.15em; }
.prose p:last-child { margin-bottom: 0; }

.small { font-size: 14px; line-height: 1.6; }
.dim { color: var(--muted); }

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.site-head .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-top: 26px;
  padding-bottom: 26px;
}

.wordmark {
  font-size: 19px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.wordmark span { color: var(--muted); }

.nav {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 2.4vw, 34px);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav a { color: var(--muted); padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.nav a.is-current { color: var(--ink); border-bottom-color: var(--ink); }

.cv-link {
  border: 1px solid var(--rule);
  padding: 7px 13px 6px;
  color: var(--ink) !important;
  transition: background .2s, border-color .2s;
}
.cv-link:hover { background: var(--paper-2); border-color: #C9C1B2; }

/* ---------- hero ---------- */

.hero .wrap { padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(48px, 6vw, 84px); }

.hero .label { margin-bottom: clamp(26px, 3.4vw, 44px); }

.hero h1 { margin-bottom: clamp(28px, 3.6vw, 44px); }

.hero .lede { margin-bottom: clamp(34px, 4vw, 52px); }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

.facts div { min-width: 120px; }
.facts dt { font-family: var(--sans); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 15px; }

/* ---------- image bands ---------- */

.band { margin: 0; }

.band img { width: 100%; height: clamp(280px, 52vw, 620px); object-fit: cover; }

.band figcaption {
  font-size: 12.5px;
  font-style: italic;
  color: var(--muted);
  max-width: var(--wrap);
  margin: 12px auto 0;
  padding: 0 var(--gut);
}

/* ---------- sections ---------- */

.section { padding: clamp(64px, 8vw, 118px) 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  margin-bottom: clamp(34px, 4.6vw, 60px);
}

.section-head h2 { max-width: 26ch; }

.section-head .label { padding-top: 6px; }

/* ---------- work list ---------- */

.work { display: grid; gap: clamp(44px, 6vw, 84px); }

.work-item {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(22px, 4vw, 58px);
  align-items: start;
}

.work-item figure {
  margin: 0;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 4 / 3;
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1), opacity .4s;
  will-change: transform;
}

.work-item a:hover img { transform: scale(1.018); }

.work-meta { padding-bottom: 6px; }

.work-item img.pos-top { object-position: 50% 30%; }

.work-meta .num {
  font-size: 12px;
  font-family: var(--sans);
  letter-spacing: .18em;
  color: var(--muted);
  display: block;
  margin-bottom: 14px;
}

.work-meta h3 { margin-bottom: 14px; }

.work-meta dl {
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 16px;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
}

.work-meta dt { color: var(--muted); letter-spacing: .04em; }
.work-meta dd { margin: 0; }

.work-meta p { margin: 0; font-size: 15.5px; line-height: 1.6; color: #302C27; max-width: 40ch; }

.more { margin-top: clamp(38px, 4.5vw, 56px); }

.textlink {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  transition: opacity .2s;
}
.textlink:hover { opacity: .55; }

/* ---------- pull quote ---------- */

.pull {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(52px, 7vw, 104px) 0;
}

.pull .wrap {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}

.pull blockquote {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-style: italic;
  font-weight: 300;
  max-width: 22ch;
}

.pull cite {
  display: block;
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}

.pull p { font-size: 16px; line-height: 1.62; color: #302C27; margin: 0 0 1em; }
.pull p:last-child { margin-bottom: 0; }

/* ---------- feature item ---------- */

.feature {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin-bottom: clamp(48px, 6vw, 88px);
}

.feature-top { display: flex; align-items: baseline; gap: 16px; margin-bottom: 10px; }

.feature h3 { max-width: 24ch; }

.feature-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  margin-top: 24px;
}

.feature-body .spec { font-size: 12.5px; }

.feature blockquote {
  margin: 30px 0 0;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
  font-size: 19px;
  line-height: 1.5;
  font-style: italic;
  color: #302C27;
  max-width: 46ch;
}

.feature blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}

/* ---------- timeline ---------- */

.timeline {
  display: grid;
  grid-template-columns: 108px 1fr;
  column-gap: clamp(20px, 4vw, 56px);
  row-gap: 0;
  margin: 0;
}

.timeline dt {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 13px 0;
  border-top: 1px solid var(--rule);
}

.timeline dd {
  margin: 0;
  padding: 13px 0;
  border-top: 1px solid var(--rule);
  font-size: 16.5px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 24px;
}

.timeline dd span { color: var(--muted); font-size: 14px; font-family: var(--sans); }

.timeline .now { color: var(--accent); }

/* ---------- night / flying ---------- */

.night {
  background: var(--night);
  color: var(--night-ink);
  padding: 0;
}

.night-body { padding: clamp(56px, 7vw, 104px) 0; }

.night .label { color: #9A948A; }
.night .section-head { border-top-color: #2A302E; }
.night .section-head h2 { color: #F3EEE6; }
.night .prose p { color: #C9C4BA; }
.night a { color: var(--night-ink); }

.night-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3.4vw, 48px);
  border-top: 1px solid #2A302E;
  padding-top: 26px;
  margin-top: clamp(38px, 4.6vw, 60px);
}

.night-grid h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9A948A;
  margin: 0 0 10px;
}

.night-grid p { margin: 0; font-size: 15px; color: #C9C4BA; line-height: 1.55; }
.night-grid strong { color: #F3EEE6; font-weight: 400; display: block; font-size: 17px; margin-bottom: 2px; }

.night .band img { height: clamp(220px, 42vw, 520px); filter: saturate(.92); }

.night .textlink { color: var(--night-ink); border-bottom-color: #5D5A53; }
.night .textlink:hover { opacity: .6; }

.night-invite {
  margin-top: clamp(42px, 5.5vw, 76px);
  border-top: 1px solid #2A302E;
  padding-top: clamp(26px, 3vw, 38px);
}

.night-invite p {
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  line-height: 1.48;
  letter-spacing: -0.008em;
  color: #F0EAE1;
  max-width: 42ch;
  margin: 0 0 clamp(20px, 2.6vw, 30px);
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: start;
}

.contact-list { display: grid; gap: 14px; font-family: var(--sans); font-size: 14px; }
.contact-list div { display: grid; grid-template-columns: 92px 1fr; gap: 14px; border-top: 1px solid var(--rule); padding-top: 12px; }
.contact-list dt, .contact-list .k { color: var(--muted); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; padding-top: 2px; }
.contact-list a { border-bottom: 1px solid var(--rule); }
.contact-list a:hover { border-bottom-color: var(--ink); }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 34px 0 46px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}

.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }

/* ---------- project page ---------- */

.project-head { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 48px); }

.project-head h1 { margin: 18px 0 0; max-width: 16ch; }

.project-lead {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
  padding-bottom: clamp(38px, 5vw, 60px);
}

.spec { margin: 0; display: grid; gap: 0; font-family: var(--sans); font-size: 13px; }
.spec div { display: grid; grid-template-columns: 96px 1fr; gap: 14px; border-top: 1px solid var(--rule); padding: 10px 0; }
.spec dt { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding-top: 2px; }
.spec dd { margin: 0; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 20px); align-items: start; }
.gallery figure { margin: 0; }
.gallery img { height: clamp(300px, 40vw, 540px); object-fit: cover; }

.next {
  border-top: 1px solid var(--rule);
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .work-item { grid-template-columns: 1fr; gap: 20px; }
  .work-meta { padding-bottom: 0; }
  .feature-body { grid-template-columns: 1fr; }
  .pull .wrap { grid-template-columns: 1fr; }
  .night-grid { grid-template-columns: 1fr; gap: 22px; }
  .contact-grid { grid-template-columns: 1fr; }
  .project-lead { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 76px 1fr; }
  .timeline dd { flex-direction: column; }
  .site-head .wrap { flex-wrap: wrap; }
  .nav { font-size: 10px; gap: 14px; }
  .cv-link { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .band img { height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* =================================================================
   Site-only styles (added by build.py target): work index, about, cv
   ================================================================= */

.page-head { padding: clamp(48px, 7vw, 96px) 0 clamp(28px, 3.4vw, 44px); }
.page-head h1 { max-width: 18ch; margin-bottom: 0; }
.page-lead { max-width: 56ch; margin-top: 24px; }

/* ---------- work index ---------- */

.index-group { margin-bottom: clamp(40px, 5vw, 64px); }
.index-group:last-child { margin-bottom: 0; }

.index-group h2 {
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  letter-spacing: -0.005em;
  margin: 0 0 14px;
  color: #302C27;
}

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

.index-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
  transition: color .2s;
}

.index-row .n {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--muted);
}

.index-row .t { font-size: 19px; line-height: 1.3; }
.index-row .m {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.index-row:hover .t { color: var(--accent); }
.index-row:hover .n { color: var(--accent); }

a.plain { border-bottom: 1px solid var(--rule); }
a.plain:hover { border-bottom-color: var(--ink); }

/* ---------- about ---------- */

.about-hero {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(28px, 5vw, 76px);
  align-items: start;
  padding-bottom: clamp(44px, 6vw, 80px);
}

.about-hero figure { margin: 0; }
.about-hero img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }

.cred-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.cred-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
}
.cred-list li span { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: .04em; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 76px); align-items: start; }

/* ---------- 404 ---------- */

.notfound { padding: clamp(80px, 12vw, 180px) 0; }
.notfound h1 { margin-bottom: 26px; }

/* ---------- CV ---------- */

.cv-page { background: #fff; }
.cv {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) 32px 80px;
  font-size: 14px;
  line-height: 1.5;
}
.cv header { border-bottom: 2px solid #1A1815; padding-bottom: 16px; margin-bottom: 26px; }
.cv h1 { font-size: 30px; letter-spacing: -0.01em; margin: 0 0 6px; }
.cv .cv-role { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6F6963; margin: 0 0 14px; }
.cv .cv-contact { font-family: var(--sans); font-size: 12.5px; color: #302C27; }
.cv .cv-contact a { border-bottom: 1px solid #DCD5C9; }
.cv h2 {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6F6963;
  margin: 30px 0 10px;
  border-top: 1px solid #DCD5C9;
  padding-top: 12px;
}
.cv h2:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.cv .job { margin-bottom: 14px; break-inside: avoid; }
.cv .job-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.cv .job-head strong { font-weight: 500; font-size: 14.5px; }
.cv .job-head em { font-family: var(--sans); font-style: normal; font-size: 11.5px; color: #6F6963; white-space: nowrap; }
.cv .job-sub { font-family: var(--sans); font-size: 12px; color: #6F6963; margin-bottom: 5px; }
.cv ul { margin: 0; padding-left: 16px; }
.cv li { margin-bottom: 4px; }
.cv p { margin: 0 0 8px; }
.cv .cv-summary { max-width: 68ch; }

@media print {
  .site-head, .site-foot, .no-print { display: none !important; }
  body, .cv-page { background: #fff; }
  .cv { max-width: none; padding: 0; font-size: 9.8pt; line-height: 1.36; }
  .cv h1 { font-size: 18pt; margin-bottom: 4px; }
  .cv .cv-role { font-size: 9.5pt; margin-bottom: 8px; }
  .cv .cv-contact { font-size: 9.5pt; }
  .cv header { padding-bottom: 9px; margin-bottom: 14px; }
  .cv h2 { font-size: 8pt; margin: 12pt 0 4pt; padding-top: 6pt; }
  .cv .job { margin-bottom: 7pt; }
  .cv li { margin-bottom: 1.5px; }
  .cv p { margin-bottom: 4px; }
  a { color: #1A1815 !important; text-decoration: none; }
  @page { size: A4; margin: 13mm 14mm; }
}

@media (max-width: 860px) {
  .about-hero { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .index-row { grid-template-columns: 24px 1fr; }
  .index-row .m { grid-column: 2; text-align: left; white-space: normal; margin-top: 2px; }
}

@media (max-width: 520px) {
  .index-row .t { font-size: 17px; }
}

/* contained band for low-resolution or portrait project images */
.band.contained { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.band.contained img { height: auto; }

/* blockquotes inside body prose (project pages) */
.prose blockquote {
  margin: 30px 0 26px;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
  font-size: 19px;
  line-height: 1.5;
  font-style: italic;
  color: #302C27;
}
.prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}


/* make grid (life page) */
.make-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 26px);
  margin-top: clamp(26px, 3.4vw, 40px);
}
.make-grid figure { margin: 0; }
.make-grid img { aspect-ratio: 1 / 1; object-fit: cover; background: #fff; }
.make-grid figcaption { font-size: 13.5px; margin-top: 9px; color: #302C27; line-height: 1.35; }
.make-grid figcaption span {
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .05em;
  color: var(--muted);
  margin-top: 3px;
}

@media (max-width: 860px) {
  .make-grid { grid-template-columns: repeat(2, 1fr); }
}

/* comic plates (life page) */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.6vw, 34px);
  margin-top: clamp(28px, 3.6vw, 44px);
}
.comic-grid figure { margin: 0; }
.comic-grid img {
  background: #fff;
  border: 1px solid var(--rule);
  width: 100%;
  height: auto;
}
.comic-grid figcaption { font-size: 13.5px; margin-top: 9px; color: #302C27; line-height: 1.35; }
.comic-grid figcaption span {
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .05em;
  color: var(--muted);
  margin-top: 3px;
}

@media (max-width: 700px) {
  .comic-grid { grid-template-columns: 1fr; }
}
