/* ==========================================================================
   site.css
   Structure after Lan A. Li (centered name, letter-spaced nav, quiet cards)
   and Inhwa Song (sidebar with news, structured publications).
   Color and motion after Trigger: solid color cards; one entrance on the home
   page where the pieces slide in; hovers that turn extra-bold text a bold color.
   Nothing scales, slides on hover, or wipes between pages.
   Ink drawings are 3-frame sprite strips (frame 2 at rest) drawn with
   mix-blend-mode: multiply, so white paper drops out and only ink stays.
   ========================================================================== */

:root {
  --bg: #fbfaf6; --ink: #1c1c1a; --ink-2: #4a4843; --mute: #85817a; --line: #e3dfd5;
  --teal: #0b8285; --vermil: #ec5a37; --sand: #ebe3d0; --night: #17211f; --gold: #ffd23f;
  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-text: "EB Garamond", Garamond, "Times New Roman", serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --col: 640px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-text); font-size: 18.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
::selection { background: var(--teal); color: #fff; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 300; }
.skip:focus { top: 10px; }

/* ---------- hover language: bold color + zoom ---------- */
/* prose links: color only, so the line of text doesn't jump */
.bio a, .sheet p a:not(.btn), .sheet li a { font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .bio a:hover, .sheet p a:not(.btn):hover, .sheet li a:hover { color: var(--teal); } }
/* standalone links and buttons: extra bold, color change only */
.zoom { display: inline-block; font-weight: 700; transition: color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .zoom:hover { color: var(--teal); } }

/* ---------- masthead ---------- */
.mast { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; max-width: 1120px; margin: 0 auto; padding: clamp(22px, 2.6vw, 34px) 22px clamp(22px, 2.6vw, 34px); overflow-x: clip; }
.mast__name { font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 3.4vw, 42px); line-height: 1; letter-spacing: 0.02em; color: var(--ink); text-decoration: none; display: inline-block; transition: color 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .mast__name:hover { color: var(--teal); } }
.mast--small { padding-block: 22px 24px; }
.mast--small .mast__name { font-size: clamp(26px, 2.8vw, 34px); }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 28px; }
.nav a { font-size: 15.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); text-decoration: none; padding: 4px 0; }
.nav a[aria-current] { color: var(--ink); }

/* ---------- home: sidebar with news + main column ---------- */
.home { overflow-x: clip; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.side { position: sticky; top: 24px; }
.portrait { margin: 0 0 16px; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 28%; }
.side__mail { font-size: 15px; color: var(--mute); margin: 0 0 30px; }
.news h2 { font-family: var(--f-text); font-size: 14.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin: 0; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.news ol { list-style: none; margin: 0; padding: 0 6px 0 0; max-height: 360px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.news li { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 8px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.4; color: var(--ink-2); }
.news time { color: var(--teal); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.news a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; transition: color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .news a:hover { color: var(--teal); } }
.bio p { color: var(--ink-2); font-size: 17px; line-height: 1.5; margin-bottom: 0.7em; }
.bio p:last-child { margin-bottom: 0; }
.main-col .sec { padding-top: clamp(20px, 2.2vw, 30px); }
.main-col .sec__title { text-align: left; padding-left: 0; margin-bottom: 10px; }
.main-col .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; padding: 0; justify-content: stretch; }
.main-col .cards { --cap: 60px; }
.main-col .card__cap b { font-size: 13.5px; }
.main-col .card__cap small { font-size: 12.5px; }

/* ---------- sections ---------- */
.sec { padding: clamp(64px, 9vw, 112px) 0 0; }
.sec__title { text-align: center; font-family: var(--f-text); font-size: 15.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin: 0 0 clamp(30px, 4vw, 48px); }

/* ---------- ink art: 3-frame sprites ---------- */
.art { display: block; background-repeat: no-repeat; background-size: 300% 100%; background-position: 50% 0; mix-blend-mode: multiply; }
.card--night .art, .banner__card.card--night .art { filter: invert(1); mix-blend-mode: screen; opacity: 0.88; }
/* rest, back, rest, forward: a pendulum through the three drawn frames */
@keyframes frames { 0% { background-position: 50% 0; } 25% { background-position: 0% 0; } 50% { background-position: 50% 0; } 75% { background-position: 100% 0; } }
.play { animation: frames 0.8s steps(1, end) infinite; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 250px)); justify-content: center; gap: clamp(14px, 2vw, 24px); max-width: 1120px; margin: 0 auto; padding-inline: 22px; }
.card { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; text-decoration: none; color: #fff; background: var(--teal); isolation: isolate; --hl: var(--gold); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.card--vermil { background: var(--vermil); }
.card--sand { background: var(--sand); color: var(--ink); --hl: var(--vermil); }
.card--night { background: var(--night); }
.card .art { position: absolute; left: 50%; top: 4%; bottom: var(--cap, 68px); aspect-ratio: 3 / 4; transform: translateX(-50%); }
.card__cap { position: absolute; left: 0; right: 0; bottom: 0; height: var(--cap, 68px); padding: 0 14px 12px; display: flex; flex-direction: column; justify-content: flex-end; background: inherit; z-index: 1; line-height: 1.15; }
.card__cap b { display: block; font-weight: 700; font-size: 14.5px; letter-spacing: 0.05em; text-transform: uppercase; transition: color 0.15s ease; }
.card__cap small { display: block; font-size: 13px; opacity: 0.78; margin-top: 3px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-8px); }
  .card:hover .art { animation: frames 0.8s steps(1, end) infinite; }
  .card:hover .card__cap b { color: var(--hl); }
}

/* ---------- publications ---------- */
.pubs__year { font-family: var(--f-display); font-size: 24px; color: var(--ink); margin: 30px 0 2px; }
.pubs__year:first-of-type { margin-top: 0; }
.pub { padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.pub__venue { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 6px; font-size: 14.5px; color: var(--mute); }
.pub__tag { background: var(--teal); color: #fff; padding: 1px 9px; font-size: 13.5px; letter-spacing: 0.04em; }
.pub__tag--plain { background: var(--sand); color: var(--ink); }
.pub__first { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--vermil); }
.pub__title { font-family: var(--f-text); font-weight: 500; font-size: 19.5px; line-height: 1.32; color: var(--ink); margin: 0 0 4px; }
.pub__authors { font-size: 15.5px; line-height: 1.45; color: var(--mute); margin: 0 0 10px; }
.pub__authors b { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pub__note { font-size: 13.5px; color: var(--mute); margin: -6px 0 10px; font-style: italic; }
.pub__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chip { display: inline-block; padding: 2px 11px; font-weight: 700; border: 1px solid currentColor; background: transparent; color: var(--ink); font-family: inherit; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.chip[aria-expanded="true"] { color: var(--teal); }
.pub__abs { margin: 12px 0 0; padding: 12px 16px; background: #f2ede1; border-left: 3px solid var(--teal); font-size: 16.5px; line-height: 1.5; color: var(--ink-2); max-width: 68ch; }

/* ---------- footer ---------- */
.foot { text-align: center; padding: clamp(80px, 11vw, 140px) 20px 40px; color: var(--mute); font-size: 15px; }
.foot .art { width: 160px; aspect-ratio: 5 / 2; margin: 0 auto 22px; opacity: 0.85; }
@media (hover: hover) and (pointer: fine) { .foot .art:hover { animation: frames 0.8s steps(1, end) infinite; } }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; letter-spacing: 0.06em; font-size: 13.5px; text-transform: uppercase; margin: 0 0 14px; }
.foot__links a { color: var(--ink); text-decoration: none; }

/* ---------- the one entrance: home page pieces slide in (Trigger) ---------- */
@keyframes inUp { from { opacity: 0; transform: translateY(48px); } }
@keyframes inDown { from { opacity: 0; transform: translateY(-40px); } }
@keyframes inLeft { from { opacity: 0; transform: translateX(-72px); } }
@keyframes inRight { from { opacity: 0; transform: translateX(72px); } }
.js .is-home [data-in] { animation: 0.9s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 85ms + 80ms); }
.js .is-home [data-in="up"] { animation-name: inUp; }
.js .is-home [data-in="down"] { animation-name: inDown; }
.js .is-home [data-in="left"] { animation-name: inLeft; }
.js .is-home [data-in="right"] { animation-name: inRight; }

@media (prefers-reduced-motion: reduce) {
  .js .is-home [data-in] { animation: none; }
  .card:hover .art, .foot .art:hover { animation: none; }
  .card, .card:hover { transition: none; transform: none; }
}

/* ---------- briefs and other-work pages ---------- */
.banner { max-width: 900px; margin: 0 auto 8px; padding-inline: 22px; }
.banner__card { position: relative; aspect-ratio: 21 / 8; overflow: hidden; background: var(--teal); }
.banner__card.card--vermil { background: var(--vermil); } .banner__card.card--sand { background: var(--sand); } .banner__card.card--night { background: var(--night); }
.banner__card .art { position: absolute; left: 50%; top: 6%; height: 92%; aspect-ratio: 3 / 4; transform: translateX(-50%); }
@media (hover: hover) and (pointer: fine) { .banner__card:hover .art { animation: frames 0.8s steps(1, end) infinite; } }
.sheet { max-width: var(--col); margin: 0 auto; padding-inline: 22px; color: var(--ink-2); }
.sheet .wrap { max-width: none; padding: 0; }
.sheet .label, .q__n, .facts dt, .risks .hd, table.tl th, .exams h3, .pager small { font-family: var(--f-text); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); font-weight: 400; }
.sheet .label { display: block; margin: 0 0 10px; }
.sheet .h1 { font-family: var(--f-display); font-size: clamp(32px, 4.4vw, 48px); line-height: 1.1; color: var(--ink); }
.sheet .h1 em { font-style: italic; color: var(--teal); }
.sheet .h2 { font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; color: var(--ink); }
.sheet .h3 { font-family: var(--f-text); font-size: 20px; color: var(--ink); }
.sheet .lede { font-size: 20px; line-height: 1.5; color: var(--ink-2); }
.case-head, .page-head { padding: 40px 0 28px; border-bottom: 1px solid var(--line); }
.page-head__grid { display: block; }
.case-head .lede, .page-head .lede { margin-top: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-block; padding: 9px 16px; background: var(--ink); color: #fff; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; text-decoration: none; transition: color 0.15s ease; }
.btn--plain { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
@media (hover: hover) and (pointer: fine) { .btn:hover { color: var(--gold); } .btn--plain:hover { color: var(--teal); } }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; margin: 26px 0 0; }
.facts div { margin: 0; }
.facts dd { margin: 4px 0 0; font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.case { display: block; padding: 8px 0 20px; }
.toc { display: none; }
.q { padding: 34px 0 6px; border-bottom: 1px solid var(--line); }
.q:last-child { border-bottom: 0; }
.q__n { display: block; margin-bottom: 8px; }
.q .h2 { margin-bottom: 14px; }
.q p, .q li { font-size: 17.5px; }
.q p.answer { font-style: italic; font-size: 20px; line-height: 1.45; color: var(--ink); }
.q li b { color: var(--ink); font-weight: 500; }
.q ul { padding-left: 1.1em; }
.risks { margin: 6px 0 0; }
.risks div { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.risks dt { color: var(--ink); } .risks dd { margin: 0; }
table.tl { width: 100%; border-collapse: collapse; font-size: 16px; }
table.tl th, table.tl td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tl td:first-child { white-space: nowrap; color: var(--mute); }
.exams { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.exams ul { margin: 6px 0 0; padding-left: 1.1em; }
.exams li { font-size: 16px; }
.note { font-size: 15px; color: var(--mute); font-style: italic; }
.fig { margin: 20px 0 0; }
.fig img { width: 100%; border: 1px solid var(--line); }
.fig figcaption { font-size: 14px; color: var(--mute); margin-top: 6px; font-style: italic; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.figs .fig { margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 20px; padding: 26px 0 0; margin-top: 30px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; }
.pager a + a { text-align: right; }
.pager span { display: inline-block; font-family: var(--f-display); font-weight: 700; font-size: 19px; color: var(--ink); transition: color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .pager a:hover span { color: var(--teal); } }
.sheet .sec { padding: 34px 0 10px; border-bottom: 1px solid var(--line); }
.work-item__media { margin-top: 18px; }
.work-item__media img { width: 100%; border: 1px solid var(--line); }
.itch { width: min(100%, 552px); height: 167px; border: 0; margin-top: 16px; display: block; }
.prose p, .prose li { font-size: 17.5px; }

@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; }
  .side { position: static; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .side .portrait { grid-row: span 2; }
  .side .news { grid-column: 1 / -1; margin-top: 18px; }
  .news ol { max-height: 260px; }
  .main-col .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body { font-size: 17.5px; }
  .nav { gap: 2px 18px; }
  .nav a { font-size: 14px; }
  .nav { justify-content: flex-start; width: 100%; gap: 4px 18px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts, .exams, .figs, .risks div { grid-template-columns: 1fr; }
  .banner__card { aspect-ratio: 16 / 9; }
}
