/* hey.icare.love — Haolong Hou portfolio · gallery minimal */
:root {
  --paper: #ffffff;
  --paper-2: #f4f4f3;
  --ink: #111111;
  --ink-2: #444444;
  --muted: #8b8b8b;
  --rule: #e7e7e7;
  --accent: #111111;
  --accent-ink: #111111;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15.5px/1.6 var(--sans);
  letter-spacing: -0.003em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p a, dd a, li a, figcaption a { text-decoration: underline; text-decoration-color: #c9c9c9; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--muted); }
p a:hover, dd a:hover, li a:hover { text-decoration-color: currentColor; color: var(--ink); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
em { font-style: italic; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }

/* small quiet labels */
.label, .eyebrow, .tags, .facts dt, figcaption .k, .chapter-no, .meta-line {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}
.eyebrow b, .chapter-no { font-weight: 400; }

/* header */
.site-head .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; }
.brand { font-weight: 500; font-size: 15.5px; }
.brand .dot { display: none; }
.site-nav { display: flex; gap: 22px; font-size: 15.5px; }
.site-nav a { color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* home */
.intro { padding: clamp(36px, 8vw, 110px) 0 clamp(48px, 8vw, 110px); }
.intro p { font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.45; color: var(--ink); max-width: 38rem; margin: 0; letter-spacing: -0.01em; }
.intro p + p { color: var(--muted); margin-top: 14px; font-size: 15.5px; }

.gallery { display: grid; gap: clamp(72px, 11vw, 150px); padding-bottom: clamp(80px, 12vw, 160px); }
.piece { display: block; }
.piece .media { background: var(--paper-2); overflow: hidden; }
.piece .media img { width: 100%; aspect-ratio: 16 / 9.5; object-fit: cover; transition: opacity .3s ease; }
.piece:hover .media img { opacity: .9; }
.piece .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 14px; }
.piece .cap .t { font-size: 15.5px; color: var(--ink); }
.piece .cap .t span { color: var(--muted); }
.piece .cap .arrow { color: var(--muted); font-size: 15.5px; white-space: nowrap; }
.piece:hover .cap .arrow { color: var(--ink); }
.piece .cap p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 40rem; }

/* info page */
.about { padding: clamp(28px, 6vw, 80px) 0 clamp(80px, 12vw, 160px); }
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); }
.about-grid > div > p:first-child { margin-top: 0; }
.about-grid > div > p { font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.5; color: var(--ink); max-width: 30rem; }
.about .sec-head { display: none; }
.cv { display: grid; gap: 34px; }
.cv h3 { font-size: 13px; font-weight: 400; color: var(--muted); margin: 0 0 8px; }
.cv ul { list-style: none; margin: 0; padding: 0; }
.cv li { display: grid; grid-template-columns: 6.5em 1fr; gap: 14px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14.5px; line-height: 1.5; }
.cv li .y { font-size: 13px; color: var(--muted); padding-top: 1px; }
.cv li span.w { color: var(--muted); }
.contact-block { margin-top: 36px; font-size: 14.5px; }
.contact-block .label { display: block; margin-bottom: 4px; }

/* footer */
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--rule); }
.site-foot .contact { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; }
.site-foot small { color: var(--muted); font-size: 13px; }

/* project page */
.back { display: none; }
.proj-head { padding: clamp(24px, 5vw, 64px) 0 clamp(24px, 4vw, 44px); display: grid; grid-template-columns: 5fr 7fr; gap: 12px clamp(28px, 5vw, 80px); align-items: start; }
.proj-head .eyebrow { grid-column: 1 / -1; margin: 0; }
.proj-head h1 { grid-column: 1; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 500; }
.proj-head .lede { grid-column: 2; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.55; color: var(--ink); margin: 0 0 8px; max-width: 42rem; }
.facts { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin: 18px 0 0; }
.facts > div { padding: 10px 0; border-top: 1px solid var(--rule); }
.facts dt { margin-bottom: 2px; }
.facts dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ai-note { grid-column: 2; font-size: 13px; color: var(--muted); margin: 10px 0 0; max-width: 42rem; line-height: 1.5; }

.hero-fig { margin: 0 0 clamp(64px, 9vw, 120px); }
.hero-fig img { width: 100%; }
figure { margin: 0; }
figcaption { font-size: 13px; line-height: 1.45; color: var(--muted); margin-top: 10px; max-width: 40rem; }
figcaption .k { color: var(--ink); margin-right: 6px; }

.chapter { display: grid; grid-template-columns: 5fr 7fr; grid-template-rows: auto 1fr; gap: 12px clamp(28px, 5vw, 80px); padding: 0 0 clamp(80px, 11vw, 140px); }
.chapter h2, .chapter-side { align-self: start; }
.chapter-side { grid-column: 1; }
.chapter-side .chapter-no { display: inline; }
.chapter-side .chapter-no::after { content: " · "; }
.chapter-side .label { display: inline; }
.chapter-side .label br { display: none; }
.chapter .body { display: contents; }
.chapter h2 { grid-column: 1; grid-row: 2; font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; letter-spacing: -0.015em; margin: 6px 0 0; font-weight: 500; }
.chapter .body > p { grid-column: 2; color: var(--ink-2); max-width: 40rem; margin: 0 0 12px; }
.chapter .body > p:first-of-type { grid-row: 1 / span 2; }
.chapter .body > p strong { color: var(--ink); font-weight: 500; }
.chapter .body > :is(figure, .figs, .stats, .linkrow) { grid-column: 1 / -1; }
.status { display: inline-block; font-size: 12px; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 1px 9px; margin-left: 8px; vertical-align: 1px; }
.linkrow { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 8px; font-size: 14px; grid-column: 2 !important; }
.linkrow a { text-decoration: underline; text-decoration-color: #c9c9c9; text-underline-offset: 0.2em; }
.linkrow a::after { content: " ↗"; }

.figs { display: grid; gap: clamp(12px, 2vw, 24px); margin: clamp(20px, 3vw, 36px) 0 0; }
.figs.two { grid-template-columns: 1fr 1fr; }
.figs.three { grid-template-columns: repeat(3, 1fr); }
.figs.phones { grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: center; gap: clamp(16px, 4vw, 56px); background: var(--paper-2); padding: clamp(24px, 5vw, 64px); }
.figs.wide-narrow { grid-template-columns: 2fr 1fr; align-items: start; }
.figs img { width: 100%; background: var(--paper-2); }
.chapter .body > figure { margin-top: clamp(20px, 3vw, 36px); }
.chapter .body > figure[style] { margin-top: clamp(20px, 3vw, 36px) !important; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: clamp(16px, 3vw, 28px) 0 0; }
.stats div { padding: 16px 16px 16px 0; }
.stats div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.stats b { display: block; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.05; font-weight: 400; }
.stats span { font-size: 12.5px; color: var(--muted); }

.next-proj { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--rule); padding: 28px 0 72px; }
.next-proj .label { order: 2; }
.next-proj strong { font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -0.015em; font-weight: 500; }
.next-proj:hover strong { color: var(--muted); }

img.blend { mix-blend-mode: multiply; background: transparent !important; }
.media:has(img.blend) { background: transparent; }

/* responsive */
@media (max-width: 900px) {
  .about-grid, .proj-head, .chapter { grid-template-columns: 1fr; }
  .proj-head > *, .chapter .body > *, .chapter-side, .chapter h2, .linkrow { grid-column: 1 !important; grid-row: auto !important; }
  .figs.three { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  .figs.two, .figs.three, .figs.wide-narrow, .facts { grid-template-columns: 1fr; }
  .figs.phones { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px; }
  .cv li { grid-template-columns: 1fr; gap: 2px; }
  .piece .cap { flex-direction: column; gap: 4px; }
}

/* print */
@media print {
  @page { size: Letter; margin: 13mm 14mm 14mm; }
  body { background: #fff; }
  .site-head, .site-foot, .back, .next-proj, .skip, .no-print { display: none !important; }
  .chapter, figure, .facts > div, .stats { break-inside: avoid; }
}
