/* ===== 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: 110px; height: 110px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  object-fit: cover;
}

.avatar-placeholder {
  width: 110px; height: 110px; border-radius: 50%; 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); }
.misc-nav {
  justify-content: center;
  margin-bottom: 48px;
}
.misc-nav a {
  font-size: 16px;
  font-weight: 700;
  padding: 12px 24px;
}

/* ===== 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; }

/* ===== News ===== */
.news-item {
  display: flex; gap: 16px; padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  animation: fadeSlideUp 0.4s ease forwards;
  opacity: 0;
}
.news-date {
  font-family: var(--font-mono); font-size: 12px;
  color: #aaa; min-width: 80px; padding-top: 2px;
}
.news-text {
  font-size: 14px; color: #444; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 8px;
}
.news-text svg { flex-shrink: 0; margin-top: 3px; color: var(--c-text-muted); }

/* ===== 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;
}
.venue-badge.cvpr { background: #1a365d; }
.venue-badge.emnlp { background: #553c2e; }
.venue-badge.acmmm { background: #2d3748; }
.venue-badge.aaai { background: #1e3a2f; }
.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); }

/* ===== Misc ===== */
.misc-text { font-size: 14.5px; line-height: 1.75; color: var(--c-text-secondary); }

.gallery-grid {
  margin-top: 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}

.gallery-item {
  aspect-ratio: 4/3; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #e0e7ff, #f5f5f5);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
}
.gallery-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; color: var(--c-text-muted); font-weight: 500;
}
.gallery-placeholder svg { color: #ccc; }

.gallery-item-label {
  position: absolute; left: 8px; bottom: 8px;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0,0,0,0.06);
  color: var(--c-text-secondary);
  font-size: 11px; font-weight: 700;
  font-family: var(--font-mono);
}
.gallery-date-tag {
  position: absolute; right: 8px; top: 8px;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(26, 26, 26, 0.64);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.16);
  font-size: 11px; font-weight: 700;
  font-family: var(--font-mono);
}

.gallery-caption {
  text-align: center; font-size: 12px; color: #bbb; margin-top: 8px;
}

.gallery-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 10px;
}
.gallery-footer .gallery-caption { margin-top: 0; text-align: left; }
.gallery-detail-link {
  font-size: 12px; font-weight: 600; color: var(--c-text-secondary);
  border-bottom: 1px solid var(--c-border);
}
.gallery-detail-link:hover { color: var(--c-accent); opacity: 1; border-bottom-color: var(--c-accent); }

.section-heading-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; border-bottom: 2px solid var(--c-border); margin-bottom: 24px;
}
.section-heading-row .section-title {
  border-bottom: 0; margin-bottom: 0; padding-bottom: 8px;
}
.gallery-section { margin-top: 40px; }
.gallery-section-title {
  font-size: 14px; font-weight: 700; color: var(--c-text-secondary);
  margin-bottom: 16px; font-family: var(--font-mono);
}
.gallery-detail-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.gallery-card { margin: 0; }
.gallery-card-media {
  position: relative;
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06); background: var(--c-card);
}
.gallery-card-media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.gallery-card figcaption {
  margin-top: 8px; font-size: 13px; color: var(--c-text-secondary);
}

/* ===== 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; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-detail-grid { grid-template-columns: 1fr; }
  .gallery-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
  .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;
  }
  .news-item { flex-direction: column; gap: 4px; }
  .news-date { min-width: auto; }
}

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

/* ===== Staggered animation delays for news items ===== */
.news-item:nth-child(1) { animation-delay: 0s; }
.news-item:nth-child(2) { animation-delay: 0.05s; }
.news-item:nth-child(3) { animation-delay: 0.1s; }
.news-item:nth-child(4) { animation-delay: 0.15s; }
.news-item:nth-child(5) { animation-delay: 0.2s; }
.news-item:nth-child(6) { animation-delay: 0.25s; }
.news-item:nth-child(7) { animation-delay: 0.3s; }
.news-item:nth-child(8) { animation-delay: 0.35s; }
