/* Won Lee — personal site styles */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d2125;
  --muted: #646b73;
  --faint: #8b9198;
  --line: #e7e4dd;
  --accent: #23406f;
  --accent-soft: #e9eef6;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 880px;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131518;
    --surface: #1a1d21;
    --text: #e7e8ea;
    --muted: #a3a9b1;
    --faint: #7c838b;
    --line: #2b2f35;
    --accent: #9db8e6;
    --accent-soft: #1f2a3b;
  }
  .hero-photo img { filter: brightness(.85); }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
}
.nav a:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

main { padding-top: 80px; padding-bottom: 72px; }

/* Typography */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: clamp(2.3rem, 5vw, 3.1rem); margin: 0 0 12px; }
.page-title { font-size: clamp(2rem, 4.2vw, 2.6rem); margin: 0 0 8px; }
.lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 40px; max-width: 640px; }

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 12px;
}

.section { margin-top: 56px; }
.section-label {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 8px;
}

/* Home hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 48px;
  align-items: center;
}
.hero p { margin: 0 0 14px; max-width: 580px; }
.hero-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 999px;
  transition: border-color .15s, color .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.chip.primary:hover { color: var(--bg); opacity: .9; }

.banner {
  margin: 56px 0 0;
}
.banner img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: 50% 62%;
  border-radius: var(--radius);
}
.banner figcaption { font-size: .78rem; color: var(--faint); margin-top: 8px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
  font-size: .85rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

/* Dated rows (news, timeline) */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.rows li:last-child { border-bottom: 0; }
.rows .when { color: var(--faint); font-size: .88rem; font-variant-numeric: tabular-nums; padding-top: 1px; }

/* Publications */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.pub:last-child { border-bottom: 0; }
.pub .year { color: var(--faint); font-size: .88rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.pub .title {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.35;
  color: var(--text);
  display: block;
}
a.title:hover { color: var(--accent); }
.pub .authors { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.pub .authors b { color: var(--text); font-weight: 600; }
.pub .venue { font-size: .92rem; color: var(--muted); }
.pub .venue i { color: var(--text); }
.extras { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.extras a {
  font-size: .76rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 10px;
  border-radius: 999px;
}
.extras a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.award {
  font-size: .86rem;
  color: var(--muted);
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

/* CV */
.cv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.cv-frame {
  width: 100%;
  height: 86vh;
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: block;
}

/* Data */
.cards { display: grid; gap: 28px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-head { padding: 18px 22px 14px; }
.card-head h3 { margin: 0; font-size: 1.25rem; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.card iframe, .card video {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
}
.card iframe { height: 640px; }
.card .tall { height: 860px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--line); }
.video-grid figure { margin: 0; border-right: 1px solid var(--line); }
.video-grid figure:last-child { border-right: 0; }
.video-grid video { border-top: 0; }
.video-grid figcaption { font-size: .82rem; color: var(--muted); padding: 8px 14px 12px; }

/* Featured platforms */
.features { display: grid; gap: 32px; }
.feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.feature:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(20, 30, 50, .08);
}
.feature img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  object-position: top left;
  border-right: 1px solid var(--line);
}
.feature-body { padding: 28px 28px 30px; display: flex; flex-direction: column; align-items: flex-start; }
.feature-url { margin: 0 0 6px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.feature-body h3 { margin: 0 0 10px; font-size: 1.6rem; }
.feature-body p { margin: 0 0 20px; color: var(--muted); font-size: .95rem; }
.feature-body .chip { margin-top: auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 40px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }

/* Small screens */
@media (max-width: 680px) {
  body { font-size: 16px; }
  main { padding-top: 36px; }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-photo { order: -1; }
  .hero-photo img { width: 120px; height: 120px; }
  .banner img { height: 180px; }
  .rows li, .pub { grid-template-columns: 1fr; gap: 2px; }
  .card iframe { height: 520px; }
  .card .tall { height: 760px; }
  .nav a { padding: 6px 9px; }
  .brand { font-size: 1.15rem; }
  .feature { grid-template-columns: 1fr; }
  .feature img { min-height: 0; height: 200px; border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-body { padding: 20px 20px 24px; }
}
