/* ------------------------------------------------------------------
   Kwanghoon Choi — personal homepage
   One-page layout. Edit colors in :root only.
   ------------------------------------------------------------------ */

:root {
  --bg: #fcfcfc;
  --surface: #f4f5f7;
  --text: #1d1f23;
  --text-soft: #4b5160;
  --muted: #868c99;
  --line: #e6e8ec;
  --rule: #98a1bb;
  --accent: #3446b4;
  --todo-bg: #fff1a8;
  --todo-text: #6b5300;
  --nav-bg: rgba(252, 252, 252, 0.9);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --badge-bg: #f1e1e4;
  --badge-text: #9b2c3a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171c;
    --surface: #1c1f26;
    --text: #e6e8ec;
    --text-soft: #b5bac6;
    --muted: #8a909d;
    --line: #2a2e37;
    --rule: #4e5670;
    --accent: #8e9cf5;
    --todo-bg: #4a3f0b;
    --todo-text: #ffe680;
    --nav-bg: rgba(21, 23, 28, 0.88);
    --badge-bg: #3b2328;
    --badge-text: #f2a5ae;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

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

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.dot { color: var(--muted); margin: 0 4px; }

/* ---------- TODO marker (공개 전 전부 지우기) ---------- */
mark.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  padding: 0 4px;
  border-radius: 3px;
  font-size: 0.88em;
  font-weight: 500;
}
a.todo-link { text-decoration: underline wavy var(--todo-bg); }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  color: var(--text);
  font-size: 16px;
  white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.is-current {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 32px 0 16px;
}

.hero-photo {
  width: 124px;
  height: 124px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  background: var(--surface);
}

.hero-name {
  margin: 0;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero-role {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-soft);
}

.contact {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  row-gap: 4px;
  font-size: 13.5px;
}
.contact li { padding: 0 12px; border-left: 1px solid var(--line); }
.contact li:first-child { padding-left: 0; border-left: 0; }
.contact a { color: var(--text-soft); }
.contact a:hover { color: var(--accent); }

/* ---------- Sections ---------- */
.section {
  margin-top: 48px;
  scroll-margin-top: 68px;
}

.section h2 {
  margin: 0 0 24px;
  padding-bottom: 12px;
  font-size: 26px;
  font-weight: 400;
  border-bottom: 2px solid var(--rule);
}

.section h3 {
  margin: 24px 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.section p { margin: 0 0 12px; }

.interests {
  list-style: none;
  margin: 0;
  padding: 0;
}
.interests li { position: relative; padding-left: 24px; margin: 4px 0; }
.interests li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Entries (Education / Experience) ---------- */
.entry {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.entry:last-child { border-bottom: 0; margin-bottom: 0; }

.entry-head,
.entry-sub {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.entry-title { font-weight: 700; font-size: 17px; }
.entry-role { color: var(--text-soft); }
.entry-date,
.entry-place {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}
.entry-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.entry-project { font-weight: 600; margin-top: 10px; }
.entry-project + .bullets { margin-top: 2px; }

.bullets {
  margin: 8px 0 0;
  padding-left: 18px;
  list-style: square;
}
.bullets li { margin: 4px 0; }
.bullets li::marker { color: var(--muted); }

/* ---------- Publications / Patents / Projects ---------- */
.pub-list {
  margin: 0;
  padding-left: 24px;
}

.pub { margin-bottom: 24px; }
.pub::marker { font-weight: 700; }

.pub-title { font-weight: 700; line-height: 1.5; }
.pub-link { font-weight: 400; margin-left: 2px; }
.pub-authors { font-size: 15px; margin-top: 2px; }
.pub-venue {
  font-size: 16px;
  font-style: italic;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}
/* "★ Best Paper Nominee" 같은 배지 */
.pub-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

/* collapsible summary */
.pub-details { margin-top: 6px; }
.pub-details summary {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  width: fit-content;
}
.pub-details summary::-webkit-details-marker { display: none; }
.pub-details summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  font-size: 11px;
  transition: transform 0.15s ease;
}
.pub-details[open] summary::before { transform: rotate(90deg); }

.pub-summary {
  margin-top: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-soft);
}
.pub-summary p:last-child { margin-bottom: 0; }
.pub-label { font-weight: 700; color: var(--text); }

/* ---------- Awards ---------- */
.award-group h3 { margin-top: 16px; }
.award-group:first-of-type h3 { margin-top: 0; }

/* ---------- Teaching (항목 왼쪽, 학기 오른쪽) ---------- */
.term-list { list-style: none; margin: 0; padding: 0; }
.term-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.term-list li:last-child { border-bottom: 0; }
.term-list .term { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 72px;
  padding: 28px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.site-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .nav-inner {
    max-width: 760px;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 10px;
  }
  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .section { scroll-margin-top: 92px; }
}


/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  body { font-size: 16px; }

  .nav-inner {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 10px;
  }
  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }

  .section { scroll-margin-top: 92px; }

  .contact { gap: 4px 16px; }
  .contact li { padding: 0; border-left: 0; }

  .hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-photo { width: 104px; height: 104px; }
  .hero-name { font-size: 34px; }

  .entry-head,
  .entry-sub { flex-direction: column; gap: 0; }
  .entry-date,
  .entry-place { text-align: left; }
}
