/* Yiheng Wang: styles for the photos page and the AI pages. Each home-page design carries its own styles.
   Code Apache-2.0. No fonts or images from other hosts. */
:root {
  --bg: #faf6f1;
  --panel: #ffffff;
  --ink: #221a26;
  --muted: #5d5462;
  --accent: #6b2d74;
  --accent-ink: #ffffff;
  --accent-soft: #f1e7f2;
  --line: #e7dde6;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17121a;
    --panel: #211a25;
    --ink: #f3edf4;
    --muted: #bcb0c0;
    --accent: #d9a6e2;
    --accent-ink: #1b1220;
    --accent-soft: #33243a;
    --line: #3a2f3f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.65 var(--sans); background: var(--bg); color: var(--ink); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 3rem; background: var(--panel); padding: .5rem; z-index: 5; }

.wrap { max-width: 50rem; margin: 0 auto; padding: 0 1rem; }
.wrap.wide { max-width: 72rem; }

nav.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
nav.top .wrap { display: flex; flex-wrap: wrap; gap: .2rem 1.3rem; padding-top: .75rem; padding-bottom: .75rem; font-size: .9rem; max-width: 72rem; }
nav.top a { color: var(--muted); text-decoration: none; font-weight: 500; }
nav.top a:hover, nav.top a[aria-current] { color: var(--accent); }

header.hero { padding: 3.2rem 0 1.4rem; }
.kicker { font: 600 .78rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .6rem; }
h1 { font: 600 clamp(2.2rem, 5vw, 3.4rem)/1.08 var(--serif); margin: 0; letter-spacing: -.015em; }
.lead { font-size: 1.2rem; color: var(--muted); margin: 1rem 0 0; max-width: 40rem; }

section { padding: 2rem 0; border-top: 1px solid var(--line); }
h2 { font: 600 1.6rem/1.2 var(--serif); margin: 0 0 .8rem; }
h3 { font-size: 1.05rem; margin: 1.3rem 0 .3rem; }
.src { font-size: .84rem; color: var(--muted); }
.links { padding-left: 1.2rem; }
.links li { margin: .35rem 0; }

pre { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: .6rem; padding: .9rem 1.1rem; overflow-x: auto; font-size: .85rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
code { font-family: var(--mono); font-size: .9em; }

.gallery { columns: 3 16rem; column-gap: 1rem; }
.gallery figure { break-inside: avoid; margin: 0 0 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { padding: .6rem .8rem .7rem; font-size: .9rem; }
.gallery .credit { display: block; color: var(--muted); font-size: .78rem; margin-top: .2rem; }

footer.site { border-top: 1px solid var(--line); padding: 1.6rem 0 2.6rem; font-size: .86rem; color: var(--muted); margin-top: 2rem; }
footer.site p { margin: .25rem 0; }

@media (max-width: 30rem) { body { font-size: 16px; } .lead { font-size: 1.06rem; } }
@media print {
  nav.top, .no-print, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  .gallery { columns: 2; }
}
