/* Boyun Choi — portfolio
   Neutral studio look: white ground, grotesk + mono, light-grey product
   tiles, dotted spec leaders, large grey view tabs, calm motion. */

/* Fonts, hosted with the site (Inter, IBM Plex Mono — SIL Open Font License) */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --hero-ratio: 1 / 1;
  --bg: #ffffff;
  --tile: #f1f1ef;
  --panel: #f4f4f2;
  --paper: #ffffff;
  --ink: #131313;
  --grey: #676763;
  --grey-2: #9b9b97;
  --rule: #e2e2df;
  --mark: #fff1a6;

  --sans: "Inter", "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --pad: clamp(16px, 2.6vw, 40px);
  --gap: 4px;
  --header: 52px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  /* iPhone notch in landscape */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--pad); top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { top: 8px; }

/* Placeholders that still need a decision */
mark.tbc { background: var(--mark); color: var(--ink); padding: 0 .2em; font-family: var(--mono); font-size: .86em; }

/* ---------- Type helpers ---------- */
.mono { font: 400 11.5px/1.45 var(--mono); letter-spacing: .01em; text-transform: uppercase; }
.grey { color: var(--grey); }
.display {
  font-weight: 500;
  font-size: clamp(52px, 9.6vw, 164px);
  line-height: .9;
  letter-spacing: -.055em;
}
.h2 { font-weight: 500; font-size: clamp(26px, 3vw, 44px); line-height: 1.05; letter-spacing: -.03em; }
.lead { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.3; letter-spacing: -.012em; }
.link-arrow { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.link-arrow:hover { color: var(--grey); }
sup.count { font: 400 .42em/1 var(--mono); vertical-align: top; margin-left: .15em; letter-spacing: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: calc(var(--header) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  column-gap: var(--gap);
  padding-left: var(--pad);
  padding-right: var(--pad);
  font-size: 13px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header .brand { grid-column: 1 / span 2; font-weight: 500; }
.site-header .brand sup { font-size: 9px; margin-left: 1px; }
.site-header .role { grid-column: 3 / span 2; color: var(--grey); }
.site-header .clock { grid-column: 5 / span 2; color: var(--grey); font-size: 11px; white-space: nowrap; }
.site-header .clock time { color: var(--ink); }
.site-header nav { grid-column: 7 / span 4; display: flex; gap: clamp(14px, 1.8vw, 28px); }
.site-header nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); }
.site-header nav a:hover { color: var(--grey); }
.site-header .mail { grid-column: 11 / span 2; text-align: right; }
.menu-btn { display: none; }
.site-header .nav-sub, .site-header .nav-mail { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(80px, 12vw, 180px);
  padding: 28px var(--pad) calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px var(--gap);
  font-size: 12px;
  color: var(--grey);
}
.site-footer a:hover { color: var(--ink); }
.site-footer .big { grid-column: 1 / -1; color: var(--ink); font-size: clamp(22px, 3vw, 40px); letter-spacing: -.03em; font-weight: 500; margin-bottom: 26px; }

/* ---------- Page head ---------- */
.page-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
  padding: clamp(48px, 8vw, 120px) var(--pad) clamp(36px, 5vw, 72px);
}
.page-head .display { grid-column: 1 / span 7; }
.page-head .intro { grid-column: 8 / span 4; font-size: 13.5px; color: var(--grey); max-width: 34em; }

/* Big grey view tabs (Grid / List / Feed / Full in the reference) */
.tabs-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 0 var(--pad) 22px;
}
.tabs-row .h2 { white-space: nowrap; }
.tabs { display: flex; gap: clamp(18px, 4vw, 72px); font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -.02em; }
.tabs a, .tabs button { color: var(--grey-2); transition: color .2s; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs [aria-current="page"], .tabs [aria-pressed="true"] { color: var(--ink); }
.subtabs { display: flex; gap: 18px; padding: 0 var(--pad) 18px; justify-content: flex-end; }
.subtabs button { color: var(--grey-2); }
.subtabs button[aria-pressed="true"] { color: var(--ink); border-bottom: 1px solid var(--ink); }

/* ---------- Images ---------- */
.tile { background: var(--tile); overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile picture { display: contents; }
figure.fig { position: relative; }
figure.fig img { width: 100%; background: var(--tile); }
figure.fig figcaption { margin-top: 8px; display: flex; justify-content: space-between; gap: 12px; }
figure.fig.is-drawing img { background: var(--paper); }
.badge {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 6px 1px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--rule);
  font: 400 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .02em;
}

/* ---------- Home: intro ---------- */
.home-intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 28px;
  padding: clamp(24px, 3.5vw, 56px) var(--pad) clamp(24px, 3vw, 40px);
}
.home-intro .display { grid-column: 1 / span 7; font-size: clamp(52px, 8.2vw, 140px); }
.home-intro .statement { grid-column: 8 / span 5; align-self: end; display: grid; gap: 14px; }
.home-intro .statement p { max-width: 30em; }
.home-intro .seeking { font-size: 13px; color: var(--grey); }
.strengths {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(12px, 2vw, 28px);
}
.strengths li { border-top: 1px solid var(--ink); padding-top: 8px; font-size: 12.5px; line-height: 1.4; }
.strengths b { display: block; font-weight: 500; margin: 4px 0 2px; font-size: 14px; }

/* ---------- Home: focus field ---------- */
.field {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: 0 var(--pad);
  border-top: 1px solid var(--rule);
}
.field-index, .field-meta {
  position: sticky; top: calc(var(--header) + 24px);
  align-self: start;
  padding-top: 24px;
}
.field-index { grid-column: 1 / span 3; }
.field-index li + li { margin-top: 2px; }
.field-index a {
  display: flex; gap: 10px; align-items: baseline;
  color: var(--grey-2);
  font-size: 15px; letter-spacing: -.01em;
  transition: color .3s, font-size .3s;
}
.field-index a .mono { font-size: 10.5px; }
.field-index a:hover { color: var(--ink); }
.field-index a.is-active { color: var(--ink); font-size: clamp(22px, 2.2vw, 32px); font-weight: 500; letter-spacing: -.03em; }
.field-hint { margin-top: 26px; color: var(--grey); }

.field-cards {
  grid-column: 4 / span 6;
  display: flex; flex-direction: column;
  gap: clamp(64px, 14vh, 160px);
  padding: 24px 0 clamp(80px, 18vh, 200px);
}
.card { display: block; position: relative; width: 74%; transition: filter .5s, opacity .5s; }
.card:nth-child(even) { align-self: flex-end; }
.card.is-large { width: 100%; }
.card.is-square { width: 88%; }
.card .media { position: relative; overflow: hidden; background: var(--tile); }
.card .media img, .card .media video {
  width: 100%; height: 100%; object-fit: cover;
}
.card .media video { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.card.is-playing .media video { opacity: 1; }
.card .cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.field.has-focus .card:not(.is-focus):not(:hover) { filter: blur(3px) grayscale(.2); opacity: .45; }

.field-meta { grid-column: 10 / span 3; padding-left: 12px; font-size: 13px; }
.field-meta .t { font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; letter-spacing: -.02em; margin: 6px 0 10px; }
.field-meta p { margin-bottom: 16px; }

.cursor-label {
  position: fixed; left: 0; top: 0; z-index: 30;
  pointer-events: none;
  padding: 5px 8px 4px;
  background: var(--ink); color: var(--paper);
  white-space: nowrap;
  opacity: 0; transition: opacity .2s;
}
.cursor-label.is-on { opacity: 1; }

/* ---------- Works grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  padding: 0 var(--pad);
  row-gap: 22px;
}
.grid .item .tile { aspect-ratio: 1; }
.grid .item img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.grid .item:hover img { transform: scale(1.03); }
.grid .item .cap { margin-top: 8px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; font-size: 13px; }
.grid .item .cap .grey { grid-column: 2 / -1; }

/* Works list view */
.list { padding: 0 var(--pad); }
.list a {
  display: grid;
  grid-template-columns: 56px 3fr 3fr 3fr 72px;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}
.list li:last-child a { border-bottom: 1px solid var(--rule); }
.list a:hover { color: var(--grey); }
.list .t { font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -.02em; font-weight: 500; }
.list .t small { font-weight: 400; color: var(--grey-2); font-size: .7em; margin-left: 6px; }
.list .y { text-align: right; }
.list-preview {
  position: fixed; z-index: 30; left: 0; top: 0; width: 220px; aspect-ratio: 4 / 5;
  pointer-events: none; opacity: 0; transition: opacity .2s; background: var(--tile);
}
.list-preview.is-on { opacity: 1; }
.list-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Project page ---------- */
.p-head { padding: clamp(28px, 5vw, 72px) var(--pad) 28px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 14px; }
.p-head .crumbs { grid-column: 1 / -1; }
.p-head .display { grid-column: 1 / span 8; }
/* Korean title follows the English one; if it wraps, it starts the next line indented ~20px */
.p-head .p-title { display: flex; flex-wrap: wrap; align-items: baseline; }
.p-head .p-title small { font-size: .28em; letter-spacing: -.01em; color: var(--grey-2); font-weight: 400; padding-left: 20px; line-height: 1.5; }
.p-head .lead { grid-column: 9 / span 4; align-self: end; }

.p-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: 0 var(--pad); }
.p-hero .main { grid-column: 1 / span 7; }
.p-hero .main .tile { aspect-ratio: 4 / 3; }
.p-hero .main .tile img { object-fit: cover; }
.p-hero .side { grid-column: 8 / span 5; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-content: start; }
.p-hero .thumb .tile { aspect-ratio: 1; }
.p-hero .thumb[aria-pressed="true"] .tile { outline: 1px solid var(--ink); outline-offset: -1px; }
.p-hero .thumb .mono { display: block; margin-top: 6px; text-align: left; }
.p-hero .desc, .p-hero .spec { margin-top: clamp(48px, 5vw, 72px); font-size: 13px; line-height: 1.6; }
.p-hero .desc { grid-column: 1; padding-right: clamp(16px, 2vw, 32px); }
.p-hero .spec { padding-left: clamp(16px, 2vw, 32px); }
.p-hero h2.mono { padding-bottom: 10px; border-bottom: 1px solid var(--ink); margin-bottom: 20px; }
.p-hero .desc ol { margin-top: 24px; }
.p-hero .desc ol a { display: flex; gap: 8px; padding: 5px 0; }
.p-hero .desc ol a:hover { color: var(--grey); }
.spec dl div { display: flex; gap: 8px; align-items: baseline; padding: 7px 0; }
.spec dt { white-space: nowrap; }
.spec dt::after { content: ""; }
.spec .dots { flex: 1; border-bottom: 1px dotted var(--grey-2); transform: translateY(-4px); min-width: 16px; }
.spec dd { text-align: right; max-width: 70%; }

.p-sec {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  padding: clamp(56px, 8vw, 110px) var(--pad) 0;
}
.p-sec > header { grid-column: 1 / span 3; }
.p-sec > header .inner { position: sticky; top: calc(var(--header) + 20px); }
.p-sec > header h2 { font-size: 15px; font-weight: 500; margin-top: 4px; }
.p-sec > .body { grid-column: 4 / span 9; display: grid; gap: 22px; }
.p-sec .body > p { max-width: 44em; }
.p-sec .lead { max-width: 30em; }
.sub { display: grid; grid-template-columns: 1fr 1fr; gap: 22px clamp(20px, 3vw, 48px); }
.sub h3 { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.sub p { font-size: 14px; color: #333; }
.bullets li { padding: 8px 0; border-top: 1px solid var(--rule); max-width: 44em; }
.senses { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.senses li { background: var(--panel); padding: 16px; min-height: 120px; }
.senses b { display: block; font-weight: 500; font-size: 18px; letter-spacing: -.02em; margin: 6px 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }
.steps li { background: var(--panel); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.steps li img { background: var(--panel); aspect-ratio: 4 / 3; object-fit: contain; width: 100%; }
.steps h3 { font-size: 14px; font-weight: 500; line-height: 1.3; }
.steps p { font-size: 13.5px; color: #333; }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 18px clamp(20px, 3vw, 48px); }
.points b { display: block; font-weight: 500; }
.points p { font-size: 14px; color: #333; }
.levels { border-top: 1px solid var(--ink); font-size: 14px; }
.levels div { display: grid; grid-template-columns: 2fr 1fr 4fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.note { margin-top: -10px; }
.credit { margin-top: -6px; }
.sense-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin: -16px -16px 14px; }
.sense-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--tile); }
.steps-rows li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 260px); gap: clamp(20px, 4vw, 64px); align-items: center; padding: 22px 0; border-top: 1px solid var(--rule); }
.steps-rows h3 { font-size: 15px; font-weight: 500; line-height: 1.3; margin: 6px 0 8px; max-width: 30em; }
.steps-rows p { font-size: 13.5px; color: #333; max-width: 36em; }
.steps-rows img { width: 100%; height: auto; mix-blend-mode: multiply; }
.lb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.lb-grid button { display: block; width: 100%; cursor: zoom-in; background: var(--tile); }
.lb-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity .2s; }
.lb-grid button:hover img { opacity: .85; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); row-gap: 14px; align-items: start; }
.figs.n1 { grid-template-columns: 1fr; }
.figs.n1 img { max-height: 80vh; object-fit: contain; }
.figs.n1 .fig.is-drawing { max-width: 560px; }
/* Two equal items side by side */
.figs.pair { grid-template-columns: 1fr 1fr; align-items: stretch; }
.figs.pair img { width: 100%; height: auto; }
.figs.pair.is-small { grid-template-columns: repeat(2, minmax(0, 220px)); }
.figs.pair.is-small img { aspect-ratio: 1; object-fit: cover; background: none; }
/* Image beside a looping clip: both in the same 2:3 box */
.figs.pair .is-clip video, .figs.pair:has(.is-clip) .fig img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; background: var(--tile); }
/* Wide image first, then two portraits, all the same height */
.figs.is-wide-first { grid-template-columns: 2fr 1fr 1fr; }
figure.fig.is-logo img { background: none; padding: clamp(20px, 4vw, 48px) 0; }

/* CMF block (portfolio CMF page structure) */
.cmf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.cmf .col .tile { aspect-ratio: 4 / 5; position: relative; }
.cmf .col .tile.empty { display: grid; place-items: center; padding: 16px; text-align: center; color: var(--grey); }
.cmf .col h3 { margin: 10px 0 2px; }
.cmf .col h4 { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.cmf .col p { font-size: 13.5px; color: #333; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.swatch { background: var(--panel); }
.swatch .chip { height: 72px; }
.swatch .lbl { padding: 8px 10px 10px; font-size: 13px; }
.swatch .lbl b { display: block; font-weight: 500; }

/* Films */
.films { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }
.films video { display: block; width: auto; height: auto; max-width: 100%; max-height: 82vh; }
.films figcaption { padding: 8px 0; }

.p-gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: clamp(56px, 8vw, 110px) var(--pad) 0; }
.p-gallery figure { grid-column: span 6; }
.p-gallery[style*="--ratio"] img { aspect-ratio: var(--ratio); object-fit: cover; }
.p-gallery figure:only-child { grid-column: 4 / span 6; }

.doc-link {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  background: var(--panel); padding: 20px; font-size: 15px;
}
.doc-link:hover { background: var(--ink); color: var(--paper); }

.pn { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: clamp(80px, 10vw, 150px) var(--pad) 0; }
.pn a { display: block; padding: 18px 0; border-top: 1px solid var(--ink); }
.pn a:hover .h2 { color: var(--grey); }
.pn .next { text-align: right; }

/* ---------- CMF & Modular pages ---------- */
.cmf-proj, .mod-proj { padding: clamp(48px, 7vw, 100px) var(--pad) 0; }
.cmf-proj > header, .mod-proj > header {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  border-top: 1px solid var(--ink); padding-top: 12px; margin-bottom: 22px;
}
.mod-proj .row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.mod-proj .row .txt { grid-column: 1 / span 4; padding-right: 24px; }
.mod-proj .row .txt p { margin: 10px 0 18px; }
.mod-proj .row .im { grid-column: span 4; }
.mod-proj .row .im .tile { aspect-ratio: 4 / 5; }
.mod-proj .row .im.is-drawing .tile { background: var(--paper); }
.mod-proj .row .im.is-drawing img { object-fit: contain; }

/* ---------- About / CV / Contact ---------- */
.cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 0 var(--pad); }
.block { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: clamp(40px, 6vw, 80px) 0 0; }
.block > h2 { grid-column: 1 / span 3; }
.block > .content { grid-column: 4 / span 9; }
.bio p + p { margin-top: 1em; }
.bio p:first-child { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.3; letter-spacing: -.012em; }
.statement-list li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--rule); }
.statement-list h3 { font-size: 17px; font-weight: 500; letter-spacing: -.015em; margin-bottom: 6px; }
.rows li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.rows li .grey { display: block; }
.rows li p { margin-top: 6px; color: #333; font-size: 13.5px; max-width: 46em; }
.leaders li { display: flex; gap: 8px; align-items: baseline; padding: 8px 0; font-size: 15px; }
.leaders .dots { flex: 1; border-bottom: 1px dotted var(--grey-2); transform: translateY(-4px); }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--ink); color: var(--paper); font-size: 14px;
}
.btn:hover { background: #333; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.contact-mail { font-weight: 500; font-size: clamp(30px, 6.4vw, 108px); letter-spacing: -.05em; line-height: 1; word-break: break-word; }
.contact-mail:hover { color: var(--grey); }

/* GIWA documents */
.docs { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: 0 var(--pad); }
.doc { grid-column: span 6; background: var(--panel); display: grid; grid-template-columns: 2fr 3fr; gap: 20px; padding: 20px; }
.doc .cover { background: var(--tile); }
.doc h2 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; margin: 8px 0 10px; }
.doc p { font-size: 13.5px; color: #333; }
.doc-viewer { grid-column: 1 / -1; margin-top: var(--gap); }
.doc-viewer iframe { width: 100%; height: 85vh; border: 0; background: var(--tile); }

/* ---------- Lightbox ---------- */
.lb-open, .lb-open body { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(255, 255, 255, .97); display: grid; place-items: center;
  padding: calc(56px + env(safe-area-inset-top)) calc(clamp(56px, 7vw, 96px) + env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) calc(clamp(56px, 7vw, 96px) + env(safe-area-inset-left));
  touch-action: pan-y pinch-zoom;
}
.lightbox[hidden] { display: none; }
.lightbox figure { display: grid; justify-items: center; gap: 10px; max-width: 100%; max-height: 100%; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; }
.lightbox button { position: absolute; font-size: 22px; min-width: 44px; min-height: 44px; padding: 8px 12px; color: var(--ink); }
.lightbox button:hover { color: var(--grey); }
.lightbox .lb-prev { left: clamp(4px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: clamp(4px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lightbox .lb-close { top: calc(6px + env(safe-area-inset-top)); right: calc(clamp(4px, 2vw, 24px) + env(safe-area-inset-right)); font-size: 30px; line-height: 1; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card .media video, .grid .item img, .field-index a { transition: none; }
  .field.has-focus .card:not(.is-focus):not(:hover) { filter: none; opacity: 1; }
}

/* ---------- Desktop only (wider than the tablet breakpoint) ---------- */
.home-desk { display: none; }
.tile-poster, .tile-film { display: none; }
.p-hero .thumb.desk-only { display: none; }

/* Tablet and desktop (everything wider than phones): Home grid design and tile films */
@media (min-width: 721px) {
  /* Home: the Works layout with the name as title */
  .home-desk { display: block; }
  .home-intro, .field, .home-all { display: none; }
  .home-desk .tabs-row { justify-content: flex-end; }
  .home-desk .intro p + p { margin-top: 6px; }

  /* Project grid: the film plays inside the square tile */
  .grid .item .tile { position: relative; }
  .tile-poster, .tile-film { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .tile-film { opacity: 0; transition: opacity .5s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
  .tile.is-playing .tile-film { opacity: 1; }
  .grid .item:hover .tile-film, .grid .item:hover .tile-poster { transform: scale(1.03); }

  /* Home: tabs and grid ~57px closer to the intro */
  .home-desk .page-head { padding-bottom: max(12px, calc(clamp(36px, 5vw, 72px) - 57px)); }
}

@media (min-width: 1081px) {
  /* Header: menu flush with the right edge of the content; the email sits just left of it */
  .site-header .mail { grid-column: 7 / span 3; text-align: left; grid-row: 1; }
  .site-header nav { grid-column: 10 / span 3; justify-content: flex-end; grid-row: 1; }

  /* Project pages: one hero ratio for all projects */
  .p-hero .main .tile { aspect-ratio: var(--hero-ratio) !important; }
  .p-hero .main .tile img { object-position: var(--hero-pos, 50% 50%) !important; }

  /* Description + Specifications: two-thirds of the previous spacing, tops aligned,
     the longer one ending on the hero's bottom edge */
  .p-hero .side { grid-template-rows: auto 1fr auto; align-content: stretch; }
  .p-hero .desc, .p-hero .spec { grid-row: 3; align-self: start; margin-top: clamp(32px, 3.33vw, 48px); }
  .p-hero .desc { grid-column: 1; padding-right: clamp(11px, 1.33vw, 21px); }
  .p-hero .spec { grid-column: 2; padding-left: clamp(11px, 1.33vw, 21px); }
  .p-hero h2.mono { padding-bottom: 7px; margin-bottom: 13px; }
  .p-hero .desc ol { margin-top: 16px; }
  .p-hero .desc ol a { padding: 3px 0; }
  .p-hero .desc ol li:last-child a { padding-bottom: 0; }
  .spec dl div { padding: 5px 0; }
  .spec dl div:last-child { padding-bottom: 0; }

  /* All · CMF · Modular tabs: one size step smaller; the line box keeps its old height so nothing below moves */
  .tabs { font-size: clamp(17px, 1.6vw, 23px); gap: clamp(14px, 3vw, 54px); line-height: calc(clamp(20px, 2.2vw, 30px) * 1.5); }
  /* beside the "Selected Works" heading the smaller text sits 3px lower on the shared baseline; take that back */
  .tabs-row .h2 + .tabs { margin-bottom: -3px; }

  /* Desktop-only secondary cover images */
  .p-hero .thumb.desk-only { display: block; }

  /* GIWA: the two films at exactly the same size, cropped to square */
  .films.is-pair { align-items: start; }
  .films.is-pair video { width: 100%; max-height: none; aspect-ratio: 1 / 1; object-fit: cover; }

  /* Two process images at the same size, side by side */
  .figs.is-equal { grid-template-columns: 1fr 1fr; }
  .figs.is-equal img { aspect-ratio: 4 / 5; object-fit: cover; }

  /* Single image shown at its own width: no grey bands beside a tall photo */
  .figs.is-natural img { width: auto; max-width: 100%; background: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .site-header .role { display: none; }
  .site-header .clock { grid-column: 3 / span 3; }
  .site-header nav { grid-column: 6 / span 4; }
  .site-header .mail { grid-column: 10 / span 3; white-space: nowrap; }
  .field-meta { display: none; }
  .field-index { grid-column: 1 / span 3; }
  .field-cards { grid-column: 4 / -1; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-hero .main { grid-column: 1 / -1; }
  .p-hero .side { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .p-hero .desc { grid-column: 1 / span 2; }
  .p-hero .spec { grid-column: 3 / span 2; }
  .strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
}

@media (min-width: 901px) and (max-width: 1080px) {
  /* Header: menu flush right, email just left of it (as on desktop) */
  .site-header .mail { grid-column: 6 / span 4; text-align: left; grid-row: 1; }
  .site-header nav { grid-column: 10 / span 3; justify-content: flex-end; grid-row: 1; }
}

@media (max-width: 900px) {
  /* Not enough room for the address in the header; it stays in the footer and on Contact. */
  .site-header .mail { display: none; }
  .site-header nav { grid-column: 7 / -1; justify-content: flex-end; }
}

/* ---------- Phones in landscape ---------- */
@media (orientation: landscape) and (max-height: 500px) {
  /* keep full width, cap the height and crop instead of shrinking */
  .p-hero .main .tile, .card .media { aspect-ratio: auto !important; height: 82vh; }
  .films video { max-height: 78vh; }
  .lightbox { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .lightbox img { max-height: calc(100vh - 48px); }
  .lightbox figcaption { display: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }

  /* Header: name · small clock · menu button */
  .site-header { grid-template-columns: 1fr auto auto; column-gap: 12px; }
  .site-header .brand { grid-column: 1; display: flex; align-items: center; min-height: 44px; }
  .site-header .clock { grid-column: 2; font-size: 10.5px; }
  .site-header .clock > span { display: none; }
  .site-header .mail { display: none; }
  .menu-btn { display: block; grid-column: 3; font-size: 14px; min-width: 44px; min-height: 44px; margin-right: -8px; padding: 0 8px; }

  /* Mobile menu: full-screen sheet, links at the bottom within thumb reach;
     tapping the empty area closes it */
  .menu-open, .menu-open body { overflow: hidden; }
  .site-header nav {
    position: fixed; z-index: 45;
    top: calc(var(--header) + env(safe-area-inset-top)); left: 0; right: 0; bottom: 0;
    flex-direction: column; justify-content: flex-end; gap: 0;
    padding: 16px calc(var(--pad) + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(var(--pad) + env(safe-area-inset-left));
    background: var(--bg);
    border-top: 1px solid var(--rule);
    font-size: 30px; letter-spacing: -.02em;
    overflow-y: auto;
    display: none;
  }
  .site-header nav > a { display: flex; align-items: center; min-height: 56px; border-bottom: 1px solid var(--rule); }
  .site-header nav a[aria-current="page"] { color: var(--grey); }
  .site-header .nav-sub { display: flex; flex-direction: column; padding: 4px 0 8px 20px; border-bottom: 1px solid var(--rule); font-size: 20px; }
  .site-header .nav-sub a { display: flex; align-items: center; min-height: 44px; }
  .site-header .nav-sub a[aria-current="page"]::after { content: "●"; font-size: 8px; margin-left: 10px; color: var(--ink); }
  .site-header .nav-mail { display: flex; align-items: center; min-height: 52px; margin-top: 12px; font-size: 16px; letter-spacing: 0; color: var(--grey); }
  .site-header.is-open nav { display: flex; }
  /* the blur would make the header the sheet's containing block */
  .site-header.is-open { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .site-header nav > a[aria-current="page"] { border-bottom-color: var(--rule); }

  /* Body copy at least 16px */
  .p-sec .body > p, .sub p, .steps p, .steps-rows p, .points p, .cmf .col p, .rows li, .rows li p,
  .strengths li, .home-intro .seeking, .page-head .intro, .p-hero .desc, .p-hero .spec, .doc p,
  .levels, .bullets li, .senses li, .list a, .leaders li, .statement-list p, .mod-proj .row .txt p,
  .swatch .lbl, .doc-link, .cmf .col h4, .steps h3, .steps-rows h3, .sub h3 { font-size: 16px; }
  .strengths b { font-size: 17px; }

  /* Tap targets at least 44px: enlarge the hit area without changing the look */
  .link-arrow, .crumbs a, .tabs a, .subtabs button { position: relative; }
  .link-arrow::after, .crumbs a::after, .tabs a::after, .subtabs button::after { content: ""; position: absolute; inset: -14px -6px; }
  .p-hero .desc ol a { min-height: 44px; align-items: center; padding: 0; }
  .btn { min-height: 48px; }
  .site-footer { font-size: 15px; row-gap: 0; }
  .site-footer a, .site-footer span { display: flex; align-items: center; min-height: 44px; }
  .site-footer .big { min-height: 0; }
  .leaders li { padding: 12px 0; }

  .home-intro .display, .home-intro .statement, .page-head .display, .page-head .intro,
  .p-head .display, .p-head .lead { grid-column: 1 / -1; }
  .strengths { grid-template-columns: 1fr; }
  /* Home intro on phones: name and discipline line only (text stays in the HTML for larger screens) */
  .home-intro { row-gap: 16px; padding-bottom: 24px; }
  .home-intro .statement > p:not(:first-child), .home-intro .strengths { display: none; }

  /* Home: one column of featured cards, GIWA first and largest; the side index is hidden */
  .field { display: block; padding: 0 var(--pad); }
  .field-index { display: none; }
  .card, .card.is-large, .card.is-square { width: 100%; }
  .card:nth-child(even) { align-self: auto; }
  .field-cards { gap: 56px; }

  .tabs-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list a { grid-template-columns: 34px 1fr 56px; }
  .list .c3, .list .c4 { display: none; }

  .p-hero .side { grid-template-columns: 1fr 1fr; }
  .p-hero .desc, .p-hero .spec { grid-column: 1 / -1; }
  .p-sec > header, .p-sec > .body { grid-column: 1 / -1; }
  .p-sec > header { margin-bottom: 14px; }
  .sub, .points, .senses, .cmf, .swatches { grid-template-columns: 1fr; }
  /* Each scenario diagram sits above its own text */
  .steps-rows li { grid-template-columns: 1fr; gap: 12px; }
  .steps-rows img { order: -1; max-width: 240px; }
  .lb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figs.is-wide-first { grid-template-columns: 1fr 1fr; }
  .figs.is-wide-first .fig:first-child { grid-column: 1 / -1; }
  .p-hero .desc, .p-hero .spec { padding: 0; margin-top: 48px; }
  .p-hero .spec dd { max-width: 62%; }
  .levels div { grid-template-columns: 1fr 1fr; }
  .levels div span:last-child { grid-column: 1 / -1; }
  .p-gallery figure, .p-gallery figure:only-child { grid-column: 1 / -1; }
  .pn { grid-template-columns: 1fr; }
  .pn .next { text-align: left; }

  .mod-proj .row .txt, .mod-proj .row .im { grid-column: 1 / -1; padding: 0; }
  .block > h2, .block > .content { grid-column: 1 / -1; }
  .block > h2 { margin-bottom: 12px; }
  .doc { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .contact-mail { font-size: clamp(26px, 8vw, 40px); }
  .lightbox { padding: calc(52px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) calc(64px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left)); }
  .lightbox img { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; transform: none; bottom: calc(8px + env(safe-area-inset-bottom)); }
  .lightbox .lb-prev { left: calc(8px + env(safe-area-inset-left)); }
  .lightbox .lb-next { right: calc(8px + env(safe-area-inset-right)); }
  .lightbox figcaption { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; }
}
