:root {
  color-scheme: dark;
  --bg: #0a0c0f;
  --surface: #111419;
  --surface-hover: #161a20;
  --line: #272c34;
  --text: #f2f4f6;
  --muted: #9199a4;
  --quiet: #68717c;
  --accent: #91e6c3;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
main { width: min(calc(100% - 48px), 1160px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 0.82rem; font-weight: 760; letter-spacing: 0.18em; }
.wordmark span { color: var(--accent); }
.topbar nav { display: flex; gap: 30px; color: var(--muted); font-size: 0.82rem; }
.topbar nav a:hover { color: var(--text); }

.intro { min-height: 680px; display: flex; flex-direction: column; justify-content: center; padding: 110px 0; border-bottom: 1px solid var(--line); }
.kicker, .project-index, .section-label { color: var(--quiet); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.intro h1 { max-width: 1020px; margin: 26px 0 28px; font-size: clamp(3rem, 7.8vw, 7.2rem); line-height: 0.96; letter-spacing: -0.066em; font-weight: 630; }
.intro h1 span { color: var(--muted); }
.lead { max-width: 580px; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.18rem); line-height: 1.75; }
.primary-link { width: max-content; margin-top: 38px; padding-bottom: 5px; border-bottom: 1px solid #49525e; color: var(--muted); font-size: 0.88rem; }
.primary-link:hover { color: var(--text); border-color: var(--accent); }

.work { padding: 104px 0 118px; border-bottom: 1px solid var(--line); }
.section-label { display: flex; justify-content: space-between; margin-bottom: 28px; }
.section-label p { margin: 0; }
.project-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.project { min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); transition: transform 170ms ease, border-color 170ms ease, background 170ms ease; }
.project:hover { transform: translateY(-4px); border-color: #46505d; background: var(--surface-hover); }
.project-featured { min-height: 370px; padding: 38px; border-color: rgba(145, 230, 195, 0.25); background: linear-gradient(140deg, rgba(145, 230, 195, 0.09), var(--surface) 65%); }
.project h3 { max-width: 780px; margin: 50px 0 12px; font-size: clamp(1.8rem, 4.8vw, 4.8rem); line-height: 1.04; letter-spacing: -0.05em; font-weight: 610; }
.project:not(.project-featured) h3 { margin-top: 34px; font-size: clamp(1.6rem, 3vw, 2.7rem); }
.project > div > p:not(.project-index) { max-width: 660px; margin: 0; color: var(--muted); line-height: 1.7; }
.project-meta { display: flex; align-items: end; justify-content: space-between; margin-top: 36px; color: var(--quiet); font-size: 0.78rem; }
.arrow { color: var(--accent); font-size: 1.35rem; transition: transform 170ms ease; }
.project:hover .arrow { transform: translate(3px, -3px); }

footer { min-height: 150px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 24px; align-items: center; color: var(--quiet); font-size: 0.76rem; }
footer p { margin: 0; }
footer a:hover { color: var(--text); }

@media (max-width: 720px) {
  main { width: min(calc(100% - 32px), 1160px); }
  .topbar nav { gap: 18px; }
  .intro { min-height: 620px; }
  .intro h1 { font-size: clamp(3.2rem, 15vw, 5.2rem); }
  .work { padding: 76px 0 88px; }
  .project-row { grid-template-columns: 1fr; }
  .project-featured { min-height: 330px; padding: 28px; }
  footer { grid-template-columns: 1fr; align-content: center; padding: 30px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
