/* ============================================================
   Kevin Wang — personal research site
   Clean, modern, academic. No external fonts (works offline).
   ============================================================ */
:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e6eaf0;
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --brand: #14506b;     /* deep teal-blue */
  --brand-2: #0e7490;   /* cyan accent */
  --brand-ink: #0b3a4f;
  --chip: #eef4f7;
  --radius: 14px;
  --maxw: 1080px;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 28px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
em { color: var(--brand-ink); font-style: italic; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 11px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-weight: 600; font-size: 14.5px; cursor: pointer; transition: .15s;
}
.btn:hover { text-decoration: none; border-color: #cbd5e1; transform: translateY(-1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--brand-2); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--brand); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; background:
  radial-gradient(1200px 400px at 80% -10%, #e8f3f7 0%, rgba(255,255,255,0) 60%); }
.hero-grid { display: grid; grid-template-columns: 1.5fr .8fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--brand-2); font-weight: 700; font-size: 13.5px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.hero h1 { font-size: 56px; margin: 0 0 14px; }
.lede { font-size: 22px; color: var(--ink); margin: 0 0 14px; font-weight: 500; }
.sub { font-size: 16.5px; color: var(--muted); max-width: 56ch; margin: 0 0 26px; }
.story { max-width: 62ch; }
.story p { font-size: 16.5px; color: var(--ink-2); line-height: 1.65; margin: 0 0 18px; }
.story p:last-child { margin-bottom: 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.social { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; padding: 0; margin: 0; }
.social a { color: var(--muted); font-size: 14.5px; font-weight: 600; }
.social a:hover { color: var(--brand); }
.hero-photo img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 20px;
  box-shadow: var(--shadow); background: #e8eef3;
}
.hero-photo img.ph { /* shown if profile.jpg missing */
  display: grid; place-items: center; min-height: 260px;
}
.hero-photo img.ph::after { content: "Add assets/profile.jpg"; color: var(--muted); font-size: 13px; }

/* ---------- sections ---------- */
.section { padding: 76px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }
.kicker { color: var(--brand-2); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
.section-title { font-size: 34px; margin: 0 0 16px; }
.section-lead { font-size: 18px; color: var(--ink-2); max-width: 72ch; margin: 0 0 28px; }
.mini-title { font-size: 18px; margin: 34px 0 14px; color: var(--ink); }

/* ---------- cards ---------- */
.cards { display: grid; gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-feature { border-left: 4px solid var(--brand-2); }
.card h3 { margin: 0 0 8px; font-size: 20px; }
.card p { margin: 0 0 14px; color: var(--ink-2); }
.card-link { font-weight: 700; }

/* ---------- interests chips ---------- */
.interests { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--chip); color: var(--brand-ink); border: 1px solid #dce8ed;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }

.note-band { margin-top: 28px; background: #f0f7fa; border: 1px solid #d6e8ee;
  border-radius: var(--radius); padding: 16px 20px; color: var(--ink-2); font-size: 15px; }

/* ---------- cta band ---------- */
.cta-band { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 44px 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; font-size: 28px; }
.cta-band p { margin: 0; opacity: .92; }
.cta-band .btn-primary { background: #fff; color: var(--brand-ink); border-color: #fff; }
.cta-band .btn-primary:hover { background: #eaf6fb; }

/* ---------- video ---------- */
.video-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); background: #0b1220; }
.video-frame video { display: block; width: 100%; aspect-ratio: 16/9; background: #0b1220; }
.video-fallback { margin: 0; padding: 14px 18px; background: #fff; color: var(--muted); font-size: 14px; }
.video-fallback code { background: var(--bg-alt); padding: 1px 6px; border-radius: 5px; }

/* ---------- publications ---------- */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.pub-year { font-weight: 800; color: var(--brand-2); font-size: 15px; }
.pub-title { margin: 0 0 4px; font-weight: 700; font-size: 17px; color: var(--ink); }
.pub-meta { margin: 0 0 6px; color: var(--muted); font-size: 14.5px; }
.pub-links { margin: 0; font-size: 14px; }
.badge { background: #fef3c7; color: #92400e; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 36px; align-items: start; }
.contact-line { margin: 6px 0; font-size: 16px; }
.contact-line span { display: inline-block; width: 90px; color: var(--muted); }
.contact-links { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.contact-links .btn { text-align: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }

.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 64px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 24px 16px;
    border-bottom: 1px solid var(--line); display: none; }
  body.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 220px; }
  .hero h1 { font-size: 42px; }
  .contact-grid { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 48px 1fr; }
}
