/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f3ef;
  --bg-soft: #eeeae4;
  --text: #2c2825;
  --text-muted: #5c5650;
  --text-light: #948e87;
  --accent: #3d6b8e;
  --accent-hover: #2f5470;
  --border: #dcd8d2;
  --nav-bg: rgba(245,243,239,0.97);
  --nav-height: 60px;
  --max-width: 860px;
  --font-sans: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  padding-top: var(--nav-height);
}

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}
nav .nav-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
nav .nav-links { display: flex; gap: 0.2rem; align-items: center; }
nav .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
nav .nav-links a:hover, nav .nav-links a.active {
  color: var(--accent);
  background: #e8eef3;
}
nav .nav-links a.cv-link {
  border: 1px solid var(--border);
  color: var(--text-muted);
}
nav .nav-links a.cv-link:hover { border-color: var(--accent); }

/* Hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 5px; flex-shrink: 0; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.25s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== LAYOUT ===== */
main { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

/* ===== SECTION ===== */
.section { margin-bottom: 2.8rem; }
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
}

/* ===== PROFILE (index) ===== */
.profile-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
.profile-photo {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--border);
}
.profile-photo-placeholder {
  width: 150px; height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d6e0e9 0%, #c2d0dc 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem; color: var(--accent); border: 3px solid var(--border);
  flex-shrink: 0;
}
.profile-name { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.25rem; }
.profile-name-ko { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.profile-title { font-size: 0.95rem; color: var(--text-muted); margin: 0.4rem 0 0.1rem; }
.profile-inst { font-size: 0.95rem; margin-bottom: 0.7rem; }
.profile-inst a { color: var(--accent); text-decoration: none; }
.profile-inst a:hover { text-decoration: underline; }
.profile-email { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; font-family: monospace; }

.social-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.social-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.social-link:hover { border-color: var(--accent); color: var(--accent); background: #e8eef3; }
.social-link svg { width: 14px; height: 14px; fill: currentColor; }

.bio-text { font-size: 0.97rem; line-height: 1.75; color: var(--text); }
.bio-text a { color: var(--accent); text-decoration: none; }
.bio-text a:hover { text-decoration: underline; }
.bio-text p + p { margin-top: 0.75rem; }

/* info blocks */
.info-item { display: flex; gap: 1rem; margin-bottom: 0.5rem; font-size: 0.93rem; }
.info-year { color: var(--text-light); min-width: 120px; flex-shrink: 0; font-size: 0.88rem; }
.info-content a { color: var(--accent); text-decoration: none; }
.info-content a:hover { text-decoration: underline; }

/* news */
.news-list { list-style: none; }
.news-list li {
  display: flex; gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.news-list li:last-child { border-bottom: none; }
.news-date { color: var(--text-light); min-width: 90px; flex-shrink: 0; font-size: 0.87rem; }
.news-content a { color: var(--accent); text-decoration: none; }
.news-content a:hover { text-decoration: underline; }

/* ===== PAPERS ===== */
.scholar-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--accent); text-decoration: none; font-size: 0.93rem; margin-bottom: 1.2rem; }
.scholar-link:hover { text-decoration: underline; }

.paper-list { list-style: none; }
.paper-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.paper-item:last-child { border-bottom: none; }
.paper-item .authors { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0.2rem; }
.paper-item .authors strong { color: var(--text); font-weight: 600; }
.paper-item .title { font-weight: 600; margin-bottom: 0.2rem; }
.paper-item .title a { color: var(--text); text-decoration: none; }
.paper-item .title a:hover { color: var(--accent); }
.paper-item .venue { color: var(--text-muted); font-style: italic; font-size: 0.88rem; }
.paper-item .venue em { font-style: normal; font-weight: 500; color: var(--text); }
.badge {
  display: inline-block; font-size: 0.72rem; padding: 0.1rem 0.5rem;
  border-radius: 3px; font-weight: 600; letter-spacing: 0.03em;
  margin-left: 0.5rem; vertical-align: middle;
  text-decoration: none; cursor: default;
}
a.badge { cursor: pointer; transition: opacity 0.15s; }
a.badge:hover { opacity: 0.8; text-decoration: none; }
.badge-preprint { background: #f0f0ee; color: #555; border: 1px solid #ccc; }
.badge-arxiv { background: rgba(179,27,27,0.75); color: #fff; border: 1px solid rgba(179,27,27,0.5); }
.badge-journal { background: rgba(46,107,79,0.72); color: #fff; border: 1px solid rgba(46,107,79,0.5); }
.badge-pub { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }

/* ===== TALKS ===== */
.talk-list { list-style: none; }
.talk-item { display: flex; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.93rem; }
.talk-item:last-child { border-bottom: none; }
.talk-date { color: var(--text-light); min-width: 115px; flex-shrink: 0; font-size: 0.87rem; }
.talk-content a { color: var(--accent); text-decoration: none; }
.talk-content a:hover { text-decoration: underline; }

/* ===== RESEARCH ===== */
.page-intro { font-size: 0.97rem; margin-bottom: 1.5rem; line-height: 1.75; }
.page-intro a { color: var(--accent); text-decoration: none; }
.page-intro a:hover { text-decoration: underline; }
.research-item { margin-bottom: 2rem; }
.research-item h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.research-item p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.75; }

.question-list { list-style: disc; padding-left: 1.5rem; margin: 0.6rem 0 1rem; }
.question-list li { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0.3rem; line-height: 1.65; }

/* ===== TEACHING ===== */
.teaching-block { margin-bottom: 1.5rem; }
.teaching-block h3 { font-size: 0.97rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.6rem; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.06em; }
.course-list { list-style: none; }
.course-item { display: flex; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.course-item:last-child { border-bottom: none; }
.course-year { color: var(--text-light); min-width: 100px; flex-shrink: 0; font-size: 0.87rem; }

.award-badge {
  display: inline-block; background: #fdf6e3; border: 1px solid #e8d5a0; color: #7a5c1e;
  font-size: 0.82rem; font-weight: 600; padding: 0.25rem 0.7rem; border-radius: 4px; margin-bottom: 1rem;
}
.award-badge::before { content: "🏆 "; }

.philosophy-item { margin-bottom: 1rem; }
.philosophy-item strong { font-style: italic; }
.philosophy-item p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.75; margin-top: 0.3rem; }

/* ===== PAGE HEADER ===== */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.6rem; font-weight: 700; }
.page-header p { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.3rem; }

/* ===== FOOTER ===== */
footer {
  text-align: center; font-size: 0.82rem; color: var(--text-light);
  padding: 1.5rem; border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  body { padding-top: var(--nav-height); }
  .profile-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1.5rem; }
  .social-links { justify-content: center; }
  .hamburger { display: flex; }

  nav .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--nav-bg);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    padding: 0.25rem 0;
  }
  nav .nav-links.open { display: flex; }
  nav .nav-links a {
    padding: 0.85rem 1.5rem;
    font-size: 0.97rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }
  nav .nav-links a:last-child { border-bottom: none; }
  nav .nav-links a.cv-link { border-radius: 0; border: none; border-bottom: 1px solid var(--border); }

  .info-item { flex-direction: column; gap: 0.1rem; }
  .info-year { min-width: unset; }
  .talk-item { flex-direction: column; gap: 0.1rem; }
  .talk-date { min-width: unset; }
}
