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

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.68;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-solid);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 30px auto 80px auto;
  padding: 0 24px;
}

/* ============================================================
   6-Directional Autumn Gradient Utility Classes
   ============================================================ */
.text-grad-pr { background: var(--grad-pr); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.text-grad-rp { background: var(--grad-rp); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.text-grad-py { background: var(--grad-py); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.text-grad-yp { background: var(--grad-yp); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.text-grad-ry { background: var(--grad-ry); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.text-grad-yr { background: var(--grad-yr); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }

.bar-grad-pr { background: var(--grad-pr); }
.bar-grad-rp { background: var(--grad-rp); }
.bar-grad-py { background: var(--grad-py); }
.bar-grad-yp { background: var(--grad-yp); }
.bar-grad-ry { background: var(--grad-ry); }
.bar-grad-yr { background: var(--grad-yr); }

/* Accent Bar Under Section Titles */
.accent-bar {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 22px;
  display: block;
}

/* Section Block Structure */
.section-block {
  margin-bottom: 52px;
  scroll-margin-top: 70px;
}

.section-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-title i {
  font-size: 0.85em;
  opacity: 0.9;
}

/* ============================================================
   Top Sticky Navigation Bar
   ============================================================ */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .top-navbar {
  background: rgba(24, 24, 26, 0.88);
}

.top-navbar-inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.2px;
  transition: color 0.15s ease;
}

.nav-brand:hover {
  text-decoration: none;
  color: var(--accent-solid);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--accent-solid);
  background: var(--accent-bg-subtle);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent-solid);
  font-weight: 700;
  background: var(--accent-bg-subtle);
}

.theme-btn {
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.theme-btn:hover {
  border-color: var(--accent-solid);
  color: var(--accent-solid);
  background: var(--accent-bg-subtle);
}

@media (max-width: 768px) {
  .top-navbar-inner {
    padding: 8px 16px;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .top-navbar-inner::-webkit-scrollbar {
    display: none;
  }
  .nav-brand {
    display: none;
  }
  .nav-links {
    flex-shrink: 0;
    gap: 2px;
  }
  .nav-link {
    font-size: 12px;
    padding: 4px 8px;
  }
  .theme-btn {
    padding: 4px 10px;
    font-size: 11px;
    flex-shrink: 0;
  }
}

/* ============================================================
   Profile Header
   ============================================================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
  background: var(--pill-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.name-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.affiliation-line {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-solid);
  margin-bottom: 4px;
}

.sub-affil {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.profile-links a {
  color: var(--accent-solid);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-links a:hover {
  text-decoration: underline;
}

.cv-pill {
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
}

/* Bio Text & Quote Box */
.bio-text {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-main);
  margin-bottom: 12px;
}

.quote-box {
  border-left: 3px solid var(--accent-solid);
  padding: 8px 16px;
  margin: 16px 0 0 0;
  font-style: italic;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--pill-bg);
  border-radius: 0 6px 6px 0;
}

/* ============================================================
   News & Updates
   ============================================================ */
.news-list {
  list-style: none;
  font-size: 14px;
}

.news-item {
  margin-bottom: 10px;
  display: flex;
  gap: 16px;
  align-items: baseline;
  line-height: 1.6;
}

.news-date {
  font-weight: 700;
  min-width: 82px;
  color: var(--accent-solid);
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

.news-content {
  color: var(--text-main);
}

.news-content strong {
  font-weight: 700;
}

.collapsible-news {
  display: none;
}

.collapsible-news.expanded {
  display: block;
}

.accordion-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 14px;
}

.accordion-btn:hover {
  border-color: var(--accent-solid);
  color: var(--accent-solid);
}

/* ============================================================
   Publications Section (Inspired by yooonlee.github.io)
   ============================================================ */
.pub-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.pub-author-notes {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.pub-author-notes span {
  font-style: italic;
}

.pub-total-citations {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--pill-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  font-style: normal;
  text-decoration: none;
  transition: all 0.15s ease;
}

.pub-total-citations:hover {
  border-color: var(--accent-solid);
  color: var(--accent-solid);
  background: var(--accent-bg-subtle);
  text-decoration: none;
}

.pub-total-citations strong {
  color: var(--accent-solid);
  font-weight: 700;
}

.pub-filter-bar {
  margin: 16px 0 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--pill-bg);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.pub-filter-btn {
  border: none;
  background: transparent;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pub-filter-btn:hover {
  color: var(--text-main);
}

.pub-filter-btn.active {
  background: var(--bg-page);
  color: var(--accent-solid);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.publications {
  margin-top: 1rem;
}

.bibliography {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.publication-entry {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.publication-entry:hover {
  background: var(--pill-bg);
  border-color: var(--border-subtle);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.publication-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

/* Prominent Media Frame (210px width matching yooonlee.github.io) */
.publication-media {
  position: relative;
  width: 210px;
  min-width: 210px;
  height: 125px;
  flex-shrink: 0;
}

.publication-image-link {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .publication-image-link {
  background: #252528;
  border-color: var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.publication-image-link img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
  object-position: center;
  border-radius: 7px;
  transition: transform 0.2s ease;
}

.publication-image-link:hover img {
  transform: scale(1.03);
}

/* Venue Badge Pinned on Media Thumbnail */
.venue-badge {
  position: absolute;
  top: 8px;
  left: 0;
  display: inline-block;
  padding: 3px 10px;
  color: #FFFFFF;
  border-radius: 0 4px 4px 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.journal-badge {
  background: var(--accent-solid);
}


.publication-details {
  min-width: 0;
  flex: 1;
}

.paper-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.paper-title a {
  color: inherit;
}

.paper-authors {
  margin: 3px 0 !important;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.author-highlight {
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--accent-bg-subtle);
  color: var(--accent-solid);
}

.paper-venue {
  margin: 3px 0 !important;
  font-size: 13px;
  color: var(--text-muted);
}

.paper-summary {
  margin: 6px 0 8px 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.paper-summary strong {
  color: var(--accent-solid);
  font-weight: 700;
}

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

.paper-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  background: var(--bg-page);
  transition: all 0.15s ease;
}

.paper-links a:hover {
  color: var(--accent-solid);
  border-color: var(--accent-solid);
  text-decoration: none;
  background: var(--accent-bg-subtle);
}

.paper-links a.paper-citation-badge {
  color: var(--accent-solid);
  background: var(--pill-bg);
  border-color: var(--border-subtle);
  gap: 5px;
}

.paper-links a.paper-citation-badge:hover {
  background: var(--accent-solid);
  color: #FFFFFF;
  border-color: var(--accent-solid);
}

.paper-links a.paper-citation-badge .cite-count {
  font-weight: 700;
}

/* ============================================================
   Projects Section (Spacious Media Cards)
   ============================================================ */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 22px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  background: var(--pill-bg);
  border-color: var(--border-subtle);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.project-media {
  width: 210px;
  min-width: 210px;
  height: 125px;
  flex-shrink: 0;
}

.project-image-box {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .project-image-box {
  background: #252528;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.project-image-box img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.project-details {
  min-width: 0;
  flex: 1;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.project-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  flex: 1;
  min-width: 240px;
}

.project-duration {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.project-agency {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-solid);
  margin-bottom: 6px;
}

.project-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Experience Section (Clean 2-Column Minimalist Format, No Logos)
   ============================================================ */
.exp-table-clean {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exp-row-clean {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.exp-row-clean:last-child {
  border-bottom: none;
}

.exp-date-clean {
  width: 160px;
  min-width: 160px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.exp-desc-clean {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}

.exp-desc-clean strong {
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================================
   Honors & Awards Section
   ============================================================ */
.award-list {
  list-style: none;
}

.award-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.award-item:last-child {
  border-bottom: none;
}

.award-name {
  font-weight: 700;
  color: var(--text-main);
}

.award-org {
  color: var(--text-secondary);
  font-weight: 500;
}

.award-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.back-to-top {
  color: var(--text-muted);
  font-weight: 600;
}

.back-to-top:hover {
  color: var(--accent-solid);
}

/* ============================================================
   Responsive Breakpoints
   ============================================================ */
@media (max-width: 768px) {
  .publication-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .publication-media {
    width: 100%;
    min-width: 100%;
    height: 160px;
  }
  .project-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .project-media {
    width: 100%;
    min-width: 100%;
    height: 160px;
  }
}

@media (max-width: 680px) {
  .profile-header { flex-direction: column; text-align: center; }
  .profile-links { justify-content: center; }
  .exp-row-clean { flex-direction: column; gap: 4px; }
  .exp-date-clean { width: 100%; }
  .interactive-bar { padding: 8px 14px; }
}
