/* Hong Jun Lee — personal site. Edit the variables below to retune the whole page. */
:root {
  --bg: #ffffff;
  --ink: #0d0d0d;
  --muted: #6f6f6f;
  --line: #ececec;
  --card: #f5f5f5;
  --border: #d9d9d9;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --wrap: 1120px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-wrap: pretty;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: #e6e6e6; }
img { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.muted { color: var(--muted); }

/* — headings: serif display cut, sans everywhere else — */
h1, h2 { font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 72; }
h1 { font-size: clamp(40px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.035em; max-width: 26ch; }
h2 { font-size: clamp(28px, 3vw, 34px); line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-size: 20px; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; }

/* — nav — */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333; color: #fff; }
.btn-outline { border: 1px solid var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.nav-links .btn-dark { color: #fff; }

/* — hero — */
.hero {
  padding-top: 96px; padding-bottom: 88px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 72px; align-items: center;
}
.hero-text { min-width: 0; }
.lede { font-size: 19px; line-height: 1.55; margin-top: 20px; max-width: 56ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.portrait { width: 320px; height: 320px; object-fit: cover; object-position: center top; border-radius: 16px; background: var(--card); }

/* — sections — */
.section {
  padding-top: 88px; padding-bottom: 88px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 64px; align-items: start;
}
.section-last { padding-bottom: 112px; }
#news .rows { grid-column: 2; }
.section > h2 { position: sticky; top: 96px; }
.prose { display: flex; flex-direction: column; gap: 20px; max-width: 64ch; font-size: 17px; line-height: 1.65; }
.prose a { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }

/* — research interests — */
.interests { gap: 24px; }
.interests h3 { font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; margin-bottom: 4px; }

/* — publications — */
.label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 16px; }
.label-gap { margin-top: 48px; }
.pub { padding: 24px 0 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.pub h3 { font-size: 22px; line-height: 1.3; max-width: 40ch; }
.pub .meta { font-size: 15px; color: var(--muted); }
.pub p:not(.meta) { max-width: 64ch; }
.tags, .links { display: flex; flex-wrap: wrap; gap: 8px; }
.links { margin-top: 8px; }
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 999px; background: var(--card); font-size: 12px; font-weight: 500;
}
.tag-outline { background: transparent; border: 1px solid #e3e3e3; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--border); font-size: 13px; font-weight: 500;
}
.chip:hover { border-color: var(--ink); text-decoration: none; }
.note { font-size: 14px; line-height: 1.55; color: var(--muted); padding-top: 16px; border-top: 1px solid var(--line); max-width: 60ch; }

/* — ruled rows (news, publication list) — */
.row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
#publications .row { grid-template-columns: 96px minmax(0, 1fr); padding: 16px 0; }
.rows .row:last-child { border-bottom: 1px solid var(--line); }
.row-key { font-size: 15px; color: var(--muted); font-feature-settings: "tnum" 1; }

/* — footer — */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  padding-top: 32px; padding-bottom: 40px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted);
}
.footer-links { display: flex; gap: 24px; }
.footer a:hover { color: var(--ink); }

/* — responsive — */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 80px; padding-bottom: 80px; }
  .portrait { order: -1; width: 160px; height: 160px; }
  .section { grid-template-columns: 1fr; gap: 28px; padding-top: 64px; padding-bottom: 64px; }
  .section > h2 { position: static; }
  #news .rows { grid-column: 1; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.btn) { display: none; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .lede { font-size: 17px; }
}
