/* billchung.co styles: the shared layout from the design drafts plus the chosen V3 "Night" theme (bottom of file). */
:root {
  --bg: #f0f4f8; --surface: #f8fbfd; --ink: #0f2038; --muted: #3a5a7a; --accent: #1a6fa8;
  --accent-soft: #dbe9f5; --line: #d6e2ee; --on-accent: #fff;
  --font-head: "Fraunces", Georgia, serif; --font-body: "Nunito", system-ui, sans-serif;
  --radius: 22px; --radius-pill: 999px; --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.75 var(--font-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); letter-spacing: -0.01em; }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 32px; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a:not(.btn):not(.icon-btn) { display: none; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 6px 12px; border-radius: var(--radius-pill); }
.nav nav a:not(.btn):not(.icon-btn):hover { background: var(--accent-soft); color: var(--ink); }
@media (min-width: 720px) { .nav nav a:not(.btn):not(.icon-btn) { display: inline-block; } }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line);
  color: var(--accent); font-weight: 800; text-decoration: none; font-size: 0.95rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 0.98rem; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }
.btn-solid { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: var(--surface); }
.btn-sm { padding: 8px 16px; font-size: 0.88rem; }

/* Hero */
.hero { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 72px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.25fr 1fr; align-items: start; padding-top: 72px; } }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 0.74rem;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 14px; border-radius: var(--radius-pill); margin-bottom: 22px; }
.lede { font-size: 1.08rem; margin-top: 22px; font-weight: 300; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-side { display: grid; gap: 24px; justify-items: center; }
.portrait { width: min(260px, 70vw); aspect-ratio: 1; object-fit: cover; object-position: 50% 30%; border-radius: 50%;
  border: 6px solid var(--surface); box-shadow: 0 18px 40px color-mix(in srgb, var(--ink) 14%, transparent); }

/* Cards */
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 28px; }
.what { width: 100%; }
.what ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.what li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; color: var(--ink); line-height: 1.5; }

.section { padding: 72px 0; border-top: 1px solid var(--line); }
.projects { display: grid; gap: 24px; }
.project .org { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.project h3 { margin-bottom: 12px; }
.tags { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 0.8rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.stats dt { font-family: var(--font-head); font-size: clamp(1.4rem, 4vw, 2rem); color: var(--accent); line-height: 1.1; }
.stats dd { margin: 4px 0 0; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); line-height: 1.35; }

/* Timeline: single rail on phones, centered rail on wide screens */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 36px 36px; display: grid; gap: 6px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent); }
.when strong { display: block; color: var(--ink); }
.when span { font-size: 0.85rem; color: var(--accent); font-weight: 700; }
.what h3 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.what p { font-size: 0.96rem; margin: 0; }
@media (min-width: 900px) {
  .timeline::before { left: 50%; }
  .timeline li { grid-template-columns: 1fr 1fr; gap: 56px; padding-left: 0; }
  .timeline li::before { left: calc(50% - 8px); }
  .when { text-align: right; }
}
.edu { display: grid; gap: 12px; margin-top: 8px; }
@media (min-width: 720px) { .edu { grid-template-columns: 1fr 1fr; } }
.edu div { background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 20px; display: grid; }
.edu span { color: var(--muted); font-size: 0.9rem; }

.beyond { display: grid; gap: 20px; }
@media (min-width: 900px) { .beyond { grid-template-columns: repeat(3, 1fr); } }
.tag-line { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; color: var(--accent); }
.beyond h3 { margin-bottom: 10px; }

.contact-inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .contact-inner { grid-template-columns: 1.4fr 1fr; } .contact-actions { justify-self: end; } }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer { padding: 32px 16px 48px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }

/* V3 "Night": the same layout in a dark theme. Deep navy, soft white text, sky-blue accent,
   Fraunces + Inter. A bolder, more product-tech feel. */
:root { --bg:#0e1623; --surface:#152132; --ink:#eef3f9; --muted:#a9b8cc; --accent:#7cc4ff; --accent-soft:#1c3550;
  --line:#24364d; --on-accent:#0e1623; --font-body:"Inter", system-ui, sans-serif; }
body { font-size: 16.5px; }
.portrait { border-color: #24364d; }
.stats dt { color: #ffd479; }
