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

:root {
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --c-bg: #fafaf8;
  --c-text: #1a1a1a;
  --c-text-secondary: #555;
  --c-text-muted: #999;
  --c-text-faint: #ccc;
  --c-accent: #2563eb;
  --c-accent-hover: #1d4ed8;
  --c-border: #eee;
  --c-border-light: rgba(120, 120, 120, 0.12);
  --c-card: #fff;
  --c-highlight: #d97706;
}

body {
  background: var(--c-bg);
  font-family: var(--font-sans);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ===== Layout ===== */
.top-accent {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 32px 80px;
}

/* ===== Header ===== */
.header { margin-bottom: 32px; animation: fadeSlideUp 0.6s ease forwards; }

.header-inner {
  display: flex; align-items: flex-start; gap: 28px; flex-wrap: wrap;
}

.avatar {
  width: 112px; height: 164px; border-radius: 12px; flex-shrink: 0;
  border: 3px solid #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  object-fit: cover; object-position: center top;
}

.avatar-placeholder {
  width: 112px; height: 164px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 700; color: #4338ca;
  font-family: var(--font-serif);
  border: 3px solid #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.header-info { flex: 1; min-width: 240px; }

.header-name {
  font-size: 32px; font-weight: 700; font-family: var(--font-serif);
  letter-spacing: -0.01em;
}
.header-name-ko { font-size: 18px; font-weight: 400; color: #888; }

.header-role {
  font-size: 15px; color: var(--c-text-secondary); line-height: 1.6; margin-top: 8px;
}
.header-role .muted { color: #888; }
.header-role .advisor { color: #888; font-size: 13px; }

/* ===== Social Links ===== */
.social-links { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.social-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--c-text-secondary); font-weight: 500;
  padding: 5px 12px; border-radius: 6px; border: 1px solid #e8e8e8;
  background: var(--c-card); transition: all 0.2s;
}
.social-link:hover {
  border-color: var(--c-accent); color: var(--c-accent); opacity: 1;
}
.social-link svg { flex-shrink: 0; }

/* ===== Navigation ===== */
.nav {
  position: sticky; top: 3px; z-index: 90;
  display: flex; gap: 4px; margin-bottom: 56px;
  padding-top: 8px;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.nav a {
  padding: 8px 16px; font-size: 13px; font-weight: 400;
  color: #888; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all 0.2s;
  white-space: nowrap;
}
.nav a:hover { color: var(--c-text-secondary); opacity: 1; }
.nav a.active { font-weight: 600; color: var(--c-accent); border-bottom-color: var(--c-accent); }

/* ===== Sections ===== */
.section { margin-bottom: 56px; scroll-margin-top: 72px; }

.section-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: #aaa; margin-bottom: 24px;
  font-family: var(--font-mono);
  border-bottom: 2px solid var(--c-border); padding-bottom: 8px;
}

/* ===== About ===== */
.about-text { font-size: 15px; line-height: 1.75; color: #444; }
.about-text p + p { margin-top: 12px; }

.keywords-box {
  margin-top: 20px; padding: 16px 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f0ff 100%);
  border-radius: 10px; border-left: 3px solid var(--c-accent);
}
.keywords-box p {
  font-size: 13.5px; color: #444; line-height: 1.6; margin: 0;
  display: flex; align-items: flex-start; gap: 8px;
}
.keywords-box svg { flex-shrink: 0; margin-top: 3px; }

/* ===== Publications ===== */
.pub-year {
  font-size: 20px; font-weight: 300; color: var(--c-text-faint);
  font-family: var(--font-serif); margin-bottom: 0; margin-top: 8px;
}

.pub-card {
  padding: 24px 0; border-bottom: 1px solid var(--c-border-light);
  transition: all 0.3s ease;
}
.has-method-image { position: relative; }

.pub-inner { display: flex; gap: 16px; align-items: flex-start; }

.pub-tag {
  font-family: var(--font-mono); font-size: 11px;
  color: #8a8a8a; min-width: 32px; padding-top: 4px;
}
.has-method-image .pub-tag {
  position: absolute; top: 34px; left: 10px; z-index: 1;
  min-width: auto; padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--c-border);
  color: #777;
}

.pub-method {
  width: 176px; aspect-ratio: 16 / 10;
  flex: 0 0 176px;
  margin-top: 3px;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background: #fff;
}
.pub-method img {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
}

.pub-content { flex: 1; }

.pub-title {
  font-size: 15.5px; font-weight: 600; line-height: 1.45;
  color: var(--c-text); margin: 0; transition: color 0.2s;
  font-family: var(--font-serif);
}
.pub-card:hover .pub-title { color: var(--c-accent); }

.pub-authors {
  font-size: 13px; color: #666; margin: 6px 0 8px; line-height: 1.5;
}
.pub-authors .me { font-weight: 700; color: var(--c-text); }

.pub-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.venue-badge {
  display: inline-block; padding: 2px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; font-family: var(--font-mono);
  color: #fff;
  background: #475569;
}
.venue-badge.cvpr { background: #1a365d; }
.venue-badge.neurips { background: #7c2d12; }
.venue-badge.acmmm { background: #2d3748; }
.venue-badge.aei { background: #065f46; }
.venue-badge.microchemical { background: #155e75; }
.venue-badge.ieee { background: #4a3060; }

.pub-year-label {
  font-size: 12px; color: var(--c-text-muted);
  font-family: var(--font-mono);
}

.pub-highlight {
  font-size: 11px; color: var(--c-highlight); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.pub-highlight svg { color: var(--c-highlight); }

.pub-note {
  font-size: 11.5px; color: var(--c-text-muted);
  margin: 6px 0 0; font-style: italic;
}

.pub-links { display: flex; gap: 8px; margin-top: 8px; }

.pub-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 3px 10px; border-radius: 4px;
  border: 1px solid #e0e0e0; color: var(--c-text-secondary);
  font-weight: 500; transition: all 0.2s;
}
.pub-link:hover {
  border-color: var(--c-accent); color: var(--c-accent); opacity: 1;
}
.pub-link svg { flex-shrink: 0; }

/* ===== Experience ===== */
.exp-list { display: flex; flex-direction: column; gap: 28px; }

.exp-item { display: flex; gap: 16px; }
.exp-icon { color: var(--c-text-muted); flex-shrink: 0; padding-top: 2px; }

.exp-role { font-size: 15px; font-weight: 600; margin: 0; }
.exp-org { font-size: 13.5px; color: #666; margin: 2px 0; }
.exp-period {
  color: #bbb; font-family: var(--font-mono); font-size: 11px;
}
.exp-detail { font-size: 13px; color: var(--c-text-muted); margin: 0; }

/* ===== Awards ===== */
.awards-subtitle {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #bbb; margin-top: 40px;
  margin-bottom: 16px; font-family: var(--font-mono);
}

.award-card {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13.5px; color: var(--c-text-secondary);
  padding: 12px 16px; background: var(--c-card);
  border-radius: 8px; border: 1px solid #f0f0f0;
  line-height: 1.5; margin-bottom: 10px;
}
.award-card svg { flex-shrink: 0; margin-top: 2px; color: var(--c-text-muted); }

/* ===== Service ===== */
.service-text {
  font-size: 14px; color: var(--c-text-secondary); line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--c-border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--c-text-faint);
  font-family: var(--font-mono);
}

/* ===== Animations ===== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .container { padding: 40px 20px 60px; }
  .header-inner { flex-direction: column; align-items: center; text-align: center; }
  .social-links { justify-content: center; }
  .header-info { min-width: auto; }
  .header-name { font-size: 26px; }
  .nav { justify-content: center; }
  .section-heading-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .footer { flex-direction: column; gap: 8px; text-align: center; }
  .pub-inner { flex-direction: column; gap: 8px; }
  .pub-tag { min-width: auto; }
  .has-method-image .pub-tag { top: 34px; left: 8px; }
  .pub-method {
    width: 100%;
    max-width: 320px;
    flex-basis: auto;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
