*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #0d1b2a;
  --navy-mid: #1b2d45;
  --blue: #1e40af;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --sky: #dbeafe;
  --red: #b91c1c;
  --red-pale: #fef2f2;
  --green: #15803d;
  --green-pale: #f0fdf4;
  --text: #1a1a2e;
  --text-secondary: #4b5563;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --bg: #ffffff;
  --surface: #f9fafb;
  --sans: 'IBM Plex Sans', 'Noto Sans KR', -apple-system, sans-serif;
  --serif: 'IBM Plex Serif', 'Noto Sans KR', Georgia, serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--text); background: var(--bg); line-height: 1.75; font-size: 15px; }

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

/* ═══════════════ HEADER ═══════════════ */
header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 100;
}

.header-top {
  max-width: 800px; margin: 0 auto;
  padding: 1.2rem 2rem 0;
}

.header-logo-link { display: inline-block; text-decoration: none; }
.header-logo-link:hover { text-decoration: none; opacity: 0.85; }
.header-logo { height: 52px; width: auto; display: block; }

/* NAV */
.main-nav {
  max-width: 800px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: center; gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.main-nav::-webkit-scrollbar { display: none; }

.main-nav a {
  display: block; padding: 0.75rem 0; margin-right: 2rem;
  font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover { color: var(--navy); text-decoration: none; }
.main-nav a.active { color: var(--navy); border-bottom-color: var(--blue); font-weight: 600; }

/* ═══════════════ LAYOUT ═══════════════ */
.page { max-width: 800px; margin: 0 auto; padding: 0 2rem; }
.page-content { display: none; }
.page-content.active { display: block; }

/* ═══════════════ HOME ═══════════════ */

/* Welcome */
.welcome {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.welcome-intro {
  font-family: var(--serif);
  font-size: 1.2rem; line-height: 1.85;
  color: var(--text);
}
.welcome-intro strong { font-weight: 600; }

.welcome-detail {
  margin-top: 1.25rem;
  font-size: 0.92rem; color: var(--text-secondary);
  line-height: 1.8;
}

.welcome-links {
  display: flex; gap: 1.5rem; margin-top: 1.5rem; flex-wrap: wrap;
}
.welcome-links a {
  font-size: 0.82rem; font-weight: 500;
  color: var(--blue); display: inline-flex; align-items: center; gap: 0.3rem;
}
.welcome-links a::after { content: ' →'; font-size: 0.9em; }

/* Two-column */
.home-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem;
  padding: 2.5rem 0 4rem;
}

.home-section-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 1.25rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid var(--border);
}

/* Recent Research */
.recent-item {
  margin-bottom: 0.9rem; padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-light);
}
.recent-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.recent-tag {
  display: inline-block; font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.15rem 0.55rem; border-radius: 3px;
  margin-bottom: 0.3rem;
}
/* Per-venue tag colors */
.tag-conf     { background: var(--blue-pale); color: var(--blue); }
.tag-journal  { background: var(--red-pale); color: var(--red); }
.tag-preprint { background: var(--green-pale); color: var(--green); }
.tag-findings { background: #fefce8; color: #a16207; }
.tag-industry { background: #f5f3ff; color: #6d28d9; }
.tag-acl      { background: #dbeafe; color: #1e40af; }
.tag-emnlp    { background: #fce7f3; color: #be185d; }
.tag-iclr     { background: #dcfce7; color: #166534; }
.tag-neurips  { background: #ede9fe; color: #5b21b6; }
.tag-aaai     { background: #e0e7ff; color: #3730a3; }
.tag-kdd      { background: #fff1f2; color: #be123c; }
.tag-tacl     { background: #fef3c7; color: #92400e; }
.tag-coling   { background: #f0fdfa; color: #115e59; }
.tag-naacl    { background: #ecfdf5; color: #065f46; }
.tag-lrec     { background: #f0f9ff; color: #075985; }
.tag-uai      { background: #faf5ff; color: #7e22ce; }
.tag-www      { background: #fff7ed; color: #c2410c; }

.recent-item h3 {
  font-size: 0.9rem; font-weight: 600; line-height: 1.5;
  margin-bottom: 0; color: var(--text);
}
.recent-item h3 a { color: var(--text); }
.recent-item h3 a:hover { color: var(--blue); text-decoration: none; }

.recent-authors { font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.2rem; }
.recent-authors .me { font-weight: 600; color: var(--text-secondary); }
.recent-venue { font-size: 0.82rem; color: var(--text-secondary); font-style: italic; }
.recent-links { margin-top: 0.4rem; display: flex; gap: 0.75rem; }
.recent-links a {
  font-size: 0.75rem; font-weight: 600; color: var(--blue);
  padding: 0.12rem 0.5rem; background: var(--blue-pale); border-radius: 3px;
}
.recent-links a:hover { background: var(--sky); text-decoration: none; }

.view-all {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.82rem; font-weight: 500; color: var(--blue);
  margin-top: 0.5rem;
}
.view-all::after { content: ' →'; }

/* News */
.news-item {
  margin-bottom: 1.25rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.news-item:last-child { border-bottom: none; }

.news-date { font-size: 0.75rem; color: var(--text-light); font-weight: 500; margin-bottom: 0.25rem; }
.news-item p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; }
.news-item p a { font-weight: 500; }

.news-highlight {
  background: var(--blue-pale); border-left: 3px solid var(--blue);
  padding: 0.75rem 1rem; border-radius: 0 6px 6px 0;
  margin-bottom: 1.25rem;
}
.news-highlight .news-date { color: var(--blue); }
.news-highlight p { color: var(--text); }

/* ═══════════════ SUBPAGES ═══════════════ */
.subpage { padding: 2.5rem 0 4rem; }

.subpage-header {
  margin-bottom: 2rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.subpage-header h2 {
  font-size: 1.6rem; font-weight: 700; color: var(--navy);
  letter-spacing: -0.02em; margin-bottom: 0.4rem;
}
.subpage-header p { color: var(--text-secondary); font-size: 0.92rem; }

/* Publications Page */
.pub-year-group { margin-bottom: 2.5rem; }
.pub-year-label {
  font-size: 1.1rem; font-weight: 700; color: var(--navy);
  margin-bottom: 1rem; padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--navy);
  display: inline-block;
}

.pub-entry { margin-bottom: 1.25rem; padding-left: 1rem; border-left: 2px solid var(--border-light); }
.pub-entry:hover { border-left-color: var(--blue); }

.pub-entry h4 { font-size: 0.92rem; font-weight: 600; line-height: 1.5; margin-bottom: 0.15rem; }
.pub-authors { font-size: 0.82rem; color: var(--text-light); }
.pub-authors .me { font-weight: 600; color: var(--text-secondary); }
.pub-venue-line { font-size: 0.82rem; color: var(--text-secondary); }
.pub-venue-line em { font-style: italic; }
.pub-entry-links { margin-top: 0.3rem; display: flex; gap: 0.75rem; }
.pub-entry-links a {
  font-size: 0.75rem; font-weight: 600; color: var(--blue);
  padding: 0.15rem 0.5rem; background: var(--blue-pale); border-radius: 3px;
}
.pub-entry-links a:hover { background: var(--sky); text-decoration: none; }

/* Research page */
.research-grid-page {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
@media (max-width: 900px) { .research-grid-page { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .research-grid-page { grid-template-columns: 1fr; } }

.research-card {
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
  background: var(--bg);
}
.research-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.08); }

.research-card-img {
  width: 100%; height: 170px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 0.75rem;
}

.research-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}
.research-card-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 0.4rem; }
.research-card-body p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
.research-keywords { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.keyword {
  font-size: 0.72rem; font-weight: 500; padding: 0.2rem 0.6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-secondary);
}

/* SVG illustration styles */
.research-card-img svg { width: 92%; height: 92%; }
.ri-efficient { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); }
.ri-peft { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); }
.ri-repr { background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%); }
.ri-edu { background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); }

/* Projects page */
.project-entry {
  margin-bottom: 2rem; padding: 1.5rem;
  border: 1px solid var(--border); border-radius: 8px;
  transition: border-color 0.2s;
}
.project-entry:hover { border-color: var(--blue); }

.project-entry-status {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  padding: 0.15rem 0.55rem; border-radius: 3px;
  margin-bottom: 0.5rem;
}
.st-active { background: #dcfce7; color: #15803d; }
.st-done { background: var(--surface); color: var(--text-light); }

.project-entry h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--navy); }
.project-entry p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }
.project-meta { font-size: 0.8rem; color: var(--text-light); margin-top: 0.5rem; }

/* Applications page */
.app-entry {
  display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem;
  margin-bottom: 2rem; padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
  align-items: start;
}
.app-entry:last-child { border-bottom: none; }

.app-entry-icon {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; background: var(--blue-pale);
}
.app-entry h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--navy); }
.app-entry p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }
.app-entry-links { margin-top: 0.5rem; }
.app-entry-links a { font-size: 0.8rem; font-weight: 600; color: var(--blue); margin-right: 1rem; }

/* ═══════════════ FOOTER ═══════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 800px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: start;
  gap: 2rem; flex-wrap: wrap;
}
.footer-info { font-size: 0.8rem; color: var(--text-light); line-height: 1.8; }
.footer-info strong { color: var(--text-secondary); font-weight: 600; }
.footer-right { font-size: 0.78rem; color: var(--text-light); text-align: right; }
.footer-right a { color: var(--text-light); margin-left: 1rem; }
.footer-right a:hover { color: var(--blue); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 700px) {
  .home-grid { grid-template-columns: 1fr; gap: 2rem; }
  .header-top h1 { font-size: 1.25rem; }
  .welcome-intro { font-size: 1.05rem; }
  .main-nav a { margin-right: 1.25rem; font-size: 0.8rem; }
  .app-entry { grid-template-columns: 1fr; }
  .app-entry-icon { width: 44px; height: 44px; font-size: 1.2rem; }
  .footer-inner { flex-direction: column; }
}

/* ═══════════════ JOIN QUOTE ═══════════════ */
.join-quote {
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-left: none;
  background: #f8fafc;
  border-radius: 6px;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.6;
  text-align: center;
}
.join-quote a {
  color: #3b82f6;
  font-weight: 500;
  text-decoration: none;
  margin-left: 0.25rem;
}
.join-quote a:hover {
  text-decoration: underline;
}

/* ═══════════════ RESEARCH HIGHLIGHT SLIDER ═══════════════ */
.highlight-slider {
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

.highlight-slider .home-section-title {
  margin-bottom: 0.75rem;
}

.slider-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
}

.slider-figure {
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  min-height: 230px;
  overflow: hidden;
}

.slider-figure img {
  max-width: 100%;
  max-height: 210px;
  object-fit: contain;
  border-radius: 6px;
}

.slider-info {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slider-info .recent-tag {
  align-self: flex-start;
}

.slider-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--text);
  margin: 0.6rem 0 0.5rem;
}
.slider-info h3 a { color: var(--text); }
.slider-info h3 a:hover { color: var(--blue); text-decoration: none; }

.slider-info .slider-authors {
  font-size: 0.84rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}
.slider-info .slider-authors .me { font-weight: 600; color: var(--text-secondary); }

.slider-info .slider-venue {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.slider-info .slider-links {
  display: flex;
  gap: 0.75rem;
}
.slider-info .slider-links a {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  padding: 0.15rem 0.55rem;
  background: var(--blue-pale);
  border-radius: 3px;
}
.slider-info .slider-links a:hover { background: var(--sky); text-decoration: none; }

/* Slider Controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
}

.slider-dots {
  display: flex;
  gap: 0.5rem;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.2s;
}
.slider-dot:hover { background: var(--text-light); }
.slider-dot.active {
  background: var(--blue);
  transform: scale(1.2);
}

.slider-arrows {
  display: flex;
  gap: 0.5rem;
}

.slider-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.slider-arrow:hover {
  background: var(--blue-pale);
  border-color: var(--blue);
  color: var(--blue);
}

/* Slider counter */
.slider-counter {
  display: none;
}

@media (max-width: 700px) {
  .slider-slide {
    grid-template-columns: 1fr;
  }
  .slider-figure {
    min-height: 180px;
    padding: 1rem;
  }
  .slider-figure img {
    max-height: 180px;
  }
  .slider-info {
    padding: 1.25rem 1.5rem;
  }
  .slider-info h3 {
    font-size: 0.95rem;
  }
}

/* ═══════════════ ANIMATIONS ═══════════════ */
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
