/* ============================================================
   Minimal academic CV  —  Wonyeong Lee
   Edit colors below; everything is driven by CSS variables.
   ============================================================ */

:root {
  --bg: #fdfdfc;
  --surface: #f4f4f2;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --accent: #2f5fd0;
  --border: #e6e6e2;
  --avatar-ring: #e6e6e2;
  --max-width: 760px;
}

[data-theme="dark"] {
  --bg: #16181d;
  --surface: #20232a;
  --text: #e7e7ea;
  --muted: #9a9aa2;
  --accent: #7aa2ff;
  --border: #2c2f37;
  --avatar-ring: #2c2f37;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 80px;
}

/* ---------- Links ---------- */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.15s ease;
  z-index: 10;
}
.theme-toggle:hover { transform: scale(1.08); }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline; }

/* ---------- Header / profile ---------- */
.profile {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-bottom: 36px;
}
.avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--avatar-ring);
}
.profile-text { min-width: 0; }
.profile h1 {
  margin: 0 0 4px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.profile .title { margin: 0; font-weight: 600; }
.profile .affiliation { margin: 2px 0 0; }
.profile .address {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- Link / icon row ---------- */
.links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}
.links a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.18s ease;
}
.links a:hover { color: var(--accent); text-decoration: none; }
.links svg { width: 22px; height: 22px; }

.cv-button {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 13px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text) !important;
  background: var(--surface);
}
.cv-button:hover { border-color: var(--accent); color: var(--accent) !important; text-decoration: none; }

/* ---------- About ---------- */
.about p {
  margin: 0 0 40px;
  font-size: 1.02rem;
}

/* ---------- Section headers ---------- */
section { margin-bottom: 38px; }
h2 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Education entries ---------- */
.entry {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 6px 18px;
  padding: 10px 0;
}
.entry + .entry { border-top: 1px dashed var(--border); }
.entry-date { color: var(--muted); font-size: 0.85rem; padding-top: 2px; }
.entry-body { display: flex; flex-direction: column; }
.entry-org { font-weight: 600; }
.entry-sub { font-size: 0.95rem; }
.entry-note { color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.entry-loc { color: var(--muted); font-size: 0.85rem; text-align: right; white-space: nowrap; padding-top: 2px; }

/* ---------- Research interest tags ---------- */
.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.tags li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.9rem;
}

/* ---------- Publications ---------- */
.pub-list { margin: 0; padding-left: 1.3em; }
.pub-list li { margin-bottom: 16px; }
.pub-title { font-weight: 600; }
.pub-venue { font-style: italic; color: var(--muted); }
.me { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Generic lists (awards, teaching) ---------- */
.list { margin: 0; padding-left: 1.3em; }
.list li { margin-bottom: 9px; }
.list li > span:first-child { font-weight: 600; }
.muted { color: var(--muted); }

/* ---------- Footer ---------- */
footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}
footer p { margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  main { padding: 48px 20px 64px; }
  .profile {
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }
  .links { justify-content: center; }
  .profile h1 { font-size: 1.7rem; }

  .entry {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .entry-date { order: -1; padding-top: 0; }
  .entry-loc { text-align: left; }
}
