/* Siming Shan — homepage. Black, a sky of stars, and as little else as possible. */

:root {
  --bg: #020308;
  --text: #e6e9f0;
  --muted: #8a93a6;
  --accent: #9cc8ff;
  --line: rgba(176, 202, 255, .14);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: clamp(16px, 0.35vw + 12px, 20px)/1.65 var(--sans);   /* grows a little on big screens */
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }

/* the sky (stars, galaxy) and the black hole live on fixed canvases behind the page */
.spacetime, .lens {
  position: fixed; left: 0; top: 0; z-index: 0;
  width: 100%; height: 100vh; height: 100lvh;
  pointer-events: none;
}
.hero, main { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero { height: 100vh; height: 100svh; min-height: 560px; }

.nav {
  position: absolute; top: 0; right: 0;
  display: flex; gap: 24px;
  padding: 20px var(--gutter);
  font-size: 14px;
}
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }

.hero-text {
  position: absolute;
  left: var(--gutter); bottom: clamp(56px, 10vh, 112px);
  max-width: min(640px, 48vw);
}
.name {
  font: 400 clamp(52px, 7vw, 104px)/1 var(--serif);
  letter-spacing: -.01em;
  margin: 0 0 20px;
}
.role { color: var(--muted); font-size: clamp(17px, 1.3vw, 19px); margin: 0 0 16px; }
.links { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; }

/* ---------- Sections: lined up with the name, heading column + content ---------- */
main { max-width: 1800px; margin: 0; padding: 0 var(--gutter); }
section {
  display: grid;
  grid-template-columns: clamp(140px, 16vw, 300px) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 72px);
  padding-top: clamp(96px, 12vh, 140px);
}
h2 { font-size: .88em; font-weight: 500; color: var(--muted); margin: .25em 0 0; }
p { margin: 0 0 1em; max-width: 90ch; }
.muted { color: var(--muted); font-size: .9em; }

.about {
  display: grid;
  grid-template-columns: clamp(160px, 15vw, 280px) minmax(0, 1fr);
  gap: clamp(28px, 3vw, 56px);
  align-items: start;
}
.portrait { width: 100%; height: auto; border-radius: 4px; display: block; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { margin: 0 0 2em; }
.title { font-weight: 500; font-size: 1.08em; text-decoration: none; }
.title:hover { text-decoration: underline; }
.meta { color: var(--muted); font-size: .9em; margin: .35em 0 0; }
.meta a { color: var(--muted); }
.meta a:hover { color: var(--accent); }
.me { color: var(--text); }

footer { padding: 120px 0 48px; color: var(--muted); font-size: .8em; }

@media (max-width: 960px) {
  section { grid-template-columns: 1fr; gap: 20px; padding-top: 88px; }
  .about { grid-template-columns: 160px minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 820px) {
  .hero-text { max-width: none; right: var(--gutter); bottom: 48px; }
}
@media (max-width: 600px) {
  .about { grid-template-columns: 1fr; }
  .portrait { width: 140px; }
}
