/* sueyoonlee.com — 2026-11 redesign
   A24-style type on warm off-white, one terracotta accent.
   Change colours and type ONLY in :root. */

:root {
  --bg: #EEECE7;          /* warm off-white */
  --ink: #141414;         /* near-black */
  --muted: #77726B;       /* warm grey for meta */
  --line: #141414;
  --line-soft: #CFCAC1;
  --accent: #B4472C;      /* terracotta — the only colour */
  --accent-wash: #E8D9CF;

  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
main img, .stage canvas {               /* discourage saving: no drag, no iOS long-press menu, no selection */
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

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

/* ---------- Top bar (after jshwang.com): Home · clock · links · Get in touch, all terracotta ---------- */
.bar {
  position: sticky; top: 0; z-index: 100;
  display: grid; grid-template-columns: 2fr 3fr 2fr 1fr; align-items: start; gap: 16px;
  padding: 16px var(--gutter) 14px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  color: var(--accent);
  font-size: 15px; font-weight: 500; line-height: 1.25; letter-spacing: -0.005em;
}
.bar a { text-decoration: none; color: var(--accent); }
.bar a:hover { color: var(--ink); }
.bar-name { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: .95; }
.bar-clock { margin: 0; display: flex; flex-direction: column; white-space: nowrap; }
.bar-time { font-variant-numeric: tabular-nums; }
.bar-nav { display: flex; gap: clamp(20px, 2.6vw, 40px); white-space: nowrap; }
.bar-cta {
  justify-self: end; white-space: nowrap;
  text-decoration: underline !important; text-decoration-thickness: 1.5px !important; text-underline-offset: 5px;
}

/* ---------- Hero: centred name over a full-bleed 3D table ---------- */
.hero {
  position: relative;
  display: grid; place-items: center;
  min-height: min(calc(100svh - 60px), 1000px);
  padding: 40px var(--gutter) 64px;
  margin-bottom: clamp(32px, 6vh, 72px);
  overflow: hidden;
}
.hero-text {
  position: relative; z-index: 2;
  text-align: center;
  pointer-events: none;           /* clicks pass through to the objects behind */
}
.hero-text::before {              /* soft fog: objects drifting behind the name fade back */
  content: ""; position: absolute; z-index: -1;
  inset: -12% -10%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--bg) 82%, transparent), transparent);
}
.display {
  margin: 18px 0 26px;
  font-size: clamp(58px, 9.6vw, 164px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.05em;
}
.display em { font-size: 0.6em; color: var(--accent); white-space: nowrap; }
.hero-line {
  max-width: 32ch; margin: 0 auto 24px;
  font-size: clamp(19px, 1.7vw, 25px); line-height: 1.25; letter-spacing: -0.01em;
}

/* Stage fills the whole hero, behind the text */
.stage { position: absolute; inset: 0; z-index: 1; user-select: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.obj {
  position: absolute; margin: 0;
  width: var(--w, 14%);
  transform: rotate(var(--r, 0deg));
  filter: drop-shadow(0 10px 14px rgba(40, 30, 20, .18));
}
.stage.is-3d .obj { display: none; }
.tidy { position: absolute; bottom: 20px; z-index: 3; }
.tidy {
  right: var(--gutter);
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: 500 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  text-decoration: none;
}
.tidy:hover { color: var(--ink); }
.stage:not(.is-3d) .tidy { display: none; }

/* Object label */
.tag {
  position: absolute; z-index: 4;
  transform: translate(-50%, calc(-100% - 10px));
  background: var(--ink); color: var(--bg);
  padding: 8px 12px 9px;
  pointer-events: none; white-space: nowrap;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.tag[hidden] { display: none; }
.tag strong { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.tag span { font-size: 12px; color: #B9B3A9; white-space: pre-line; text-align: center; line-height: 1.35; }
.tag::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; translate: -50% 0;
  border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink);
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter) clamp(72px, 12vh, 140px);
}
.section-head {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 16px; align-items: end;
  border-top: 2px solid var(--line);
  padding-top: 14px; margin-bottom: 8px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(44px, 6vw, 96px); font-weight: 600; line-height: .9; letter-spacing: -0.045em;
}

/* Rows — the A24 / Felix-style list */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 140px 1fr minmax(0, 340px); gap: 16px; align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
}
.row-year { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--muted); }
.row-title { font-size: clamp(22px, 2.4vw, 34px); font-weight: 500; line-height: 1.08; letter-spacing: -0.025em; }
.row-meta { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-align: right; }
a.row:hover .row-title, summary.row:hover .row-title { color: var(--accent); }

.rows-small .row { padding: 12px 0; }
.rows-small .row-title { font-size: clamp(17px, 1.5vw, 21px); letter-spacing: -0.01em; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
summary.row { position: relative; padding-right: 36px; }
summary.row::after {
  content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%;
  font-size: 26px; font-weight: 400; transition: rotate .2s ease;
}
details[open] > summary.row::after { rotate: 45deg; color: var(--accent); }
.row-body {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px;
  padding: 20px 0 32px; border-bottom: 1px solid var(--line-soft);
}
.row-body p { grid-column: 2; max-width: 62ch; margin: 0; font-size: 19px; }
.row-body img { grid-column: 2; width: min(100%, 720px); margin-bottom: 18px; }

.row-body-small { padding: 14px 0 22px; align-items: start; grid-template-columns: 140px 280px minmax(0, 1fr); }
.row-body-small img { grid-column: 2; width: 100%; margin: 0; aspect-ratio: 4 / 3; object-fit: cover; }
.row-body-small p { grid-column: 3; font-size: 16px; color: var(--muted); }
.rows-small summary.row { padding-right: 36px; }
.rows-small summary.row::after { font-size: 20px; }
.spin { grid-column: 2; position: relative; width: min(100%, 760px); margin-bottom: 18px; cursor: grab; touch-action: pan-y; user-select: none; }
.spin.is-dragging { cursor: grabbing; }
.spin img { width: 100%; display: block; pointer-events: none; }
.spin-hint { position: absolute; left: 0; bottom: -22px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.archive { margin-top: 28px; }
.archive > summary { display: inline-flex; gap: 10px; color: var(--muted); padding: 8px 0; }
.archive > summary:hover { color: var(--accent); }
.archive[open] .plus { rotate: 45deg; }
.plus { display: inline-block; transition: rotate .2s ease; }

.record { margin-top: 56px; }
.record-title { margin-bottom: 4px; }
.record-group { margin-top: 0; border-top: 1px solid var(--line-soft); }
.record-group > summary { padding: 14px 0; width: 100%; color: var(--ink); font-size: 14px; }
.record-group .count { color: var(--muted); }
.record-group:last-child { border-bottom: 1px solid var(--line-soft); }
.note { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

.section-intro {
  margin: 18px 0 0 156px; max-width: 72ch; text-wrap: balance;
  font-size: clamp(16px, 1.3vw, 19px); line-height: 1.4; letter-spacing: -0.005em;
}

/* Paintings — horizontal shelf (A24 "Watch at home" style), bleeds off the right edge */
.shelf {
  --pad: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  display: flex; gap: clamp(16px, 2vw, 28px); align-items: flex-end;   /* every painting sits on the same bottom line */
  margin: 32px calc(50% - 50vw) 0;
  padding: 0 var(--pad) 12px;
  scroll-padding-inline: var(--pad);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shelf figure { flex: 0 0 auto; margin: 0; scroll-snap-align: start; width: min-content; }
.shelf figure, .row-body, .row-body-small { position: relative; }
.shelf figure::after {                 /* invisible sheet over the painting: nothing to "Save image" */
  content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 1;
}
.shelf img {                          /* never crop: scale down to fit, keeping each painting's real proportions */
  width: auto; height: auto;
  max-height: calc(clamp(300px, 54vh, 560px) * var(--h, 50) / 50);
  max-width: 90vw;
}
.shelf figcaption { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; }
.shelf figcaption em { font-family: var(--sans); font-style: normal; font-weight: 500; font-size: 16px; letter-spacing: -0.005em; line-height: 1.3; }
.shelf .wip { color: var(--accent); font-weight: 500; }
.shelf figcaption span { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.scroll-arrows { display: flex; gap: 8px; align-self: end; }
.arrow {
  width: 48px; height: 48px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: 400 20px/1 var(--sans); cursor: pointer; transition: background .15s, color .15s;
}
.arrow:hover { background: var(--ink); color: var(--bg); }
.arrow:disabled { opacity: .25; cursor: default; background: transparent; color: var(--ink); }

/* About */
.about { display: grid; grid-template-columns: 140px 1.4fr 1fr; gap: 16px; margin-top: 28px; }
.about-lede { grid-column: 2; margin: 0; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -0.02em; max-width: 26ch; }
.facts { margin: 0; font-size: 15px; }
.facts dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 16px; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 4px 0 0; }

/* Footer — mirrors the header: same 4 columns, terracotta, sentence case */
.foot {
  max-width: var(--max); margin: 0 auto;
  padding: 22px var(--gutter) 36px;
  display: grid; grid-template-columns: 2fr 3fr 2fr 1fr; gap: 16px; align-items: start;
  color: var(--accent);
  font-size: 15px; font-weight: 500; line-height: 1.25;
}
.foot a { color: var(--accent); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot-mail { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.6vw, 38px); line-height: 1; }
.foot-copy { margin: 0; white-space: nowrap; grid-column: 1; }
.foot-links { display: flex; gap: clamp(20px, 2.6vw, 40px); white-space: nowrap; grid-column: 3; }
.foot-top {
  justify-self: end; white-space: nowrap;
  text-decoration: underline !important; text-decoration-thickness: 1.5px !important; text-underline-offset: 5px;
}

/* Essay pages (writing/_template.html) */
.essay { max-width: 720px; margin: 0 auto; padding: clamp(40px, 8vh, 96px) var(--gutter) 120px; }
.essay h1 { font-size: clamp(44px, 6vw, 84px); font-weight: 600; line-height: .92; letter-spacing: -0.045em; margin: 16px 0 24px; }
.essay-lede { font-family: var(--serif); font-size: 26px; line-height: 1.25; margin: 0 0 40px; }
.essay-body { font-size: 19px; line-height: 1.6; }
.essay-body h2 { font-size: 28px; letter-spacing: -0.02em; margin: 48px 0 12px; }
.essay-body blockquote { margin: 32px 0; padding-left: 20px; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 24px; line-height: 1.3; }
.essay-body figure { margin: 32px 0; }
.essay-body figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.essay-end { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 15px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { min-height: calc(100svh - 52px); }
  .section-head, .row-body { grid-template-columns: 1fr; }
  .row-body p, .row-body img, .row-body-small img, .row-body-small p, .spin { grid-column: 1; }
  .row-body-small img { width: min(100%, 320px); }
  .row { grid-template-columns: 64px 1fr; gap: 4px 12px; }
  .row-meta { grid-column: 2; text-align: left; font-size: 12px; }
  .scroll-arrows { display: none; }
  .section-intro { margin-left: 0; }
  .about { grid-template-columns: 1fr; }
  .about-lede { grid-column: 1; }
  .foot { grid-template-columns: 1fr auto; row-gap: 18px; }
  .foot-copy { grid-column: 1; }
  .foot-links { grid-column: 1; grid-row: 2; }
  .foot-top { grid-column: 2; grid-row: 1; justify-self: end; }
}
@media (max-width: 900px) {
  .bar { grid-template-columns: auto 1fr auto auto; gap: 28px; }
}
@media (max-width: 640px) {
  .bar { grid-template-columns: auto 1fr auto; gap: 20px; font-size: 14px; }
  .bar-nav { display: none; }   /* phone: Home · clock · Get in touch */
  .foot { font-size: 14px; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  summary.row::after, .plus { transition: none; }
}
