/* =====================================================
   Academic CV — Modern Redesign
   Inspired by thaoshibe.github.io
   ===================================================== */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  --font-main: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-bg: #fdf8f2;
  --color-surface: #ffffff;
  --color-text: #2d3748;
  --color-text-muted: #64748b;
  --color-heading: #1a1a2e;
  --color-accent: #2c4a80;
  --color-accent-hover: #1e3766;
  --color-highlight: #e8720e;
  --color-border: #e2e8f0;
  --color-card-shadow: rgba(44, 74, 128, 0.07);
  --color-tag-red-bg: #fef2f2;
  --color-tag-red-text: #b91c1c;
  --color-tag-yellow-bg: #fffbeb;
  --color-tag-yellow-text: #92400e;
  --color-cta-bg: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  --color-cta-border: #fecaca;
  --max-width: 1100px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Layout ---------- */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ---------- Links ---------- */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus {
  color: var(--color-highlight);
}

/* ---------- Header / Profile ---------- */
.layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.sidebar {
  flex-shrink: 0;
  position: sticky;
  top: 32px;
  align-self: flex-start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #c3c9d4 transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #c3c9d4;
  border-radius: var(--radius-full);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

.main-column {
  flex: 1;
  min-width: 0;
}

.profile-photo-wrapper {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 200px;
}

.profile-emails {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  text-align: center;
}

.profile-emails a {
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  word-break: break-all;
}

.profile-emails i {
  margin-right: 5px;
  vertical-align: -1px;
}

.profile-emails a:hover {
  color: var(--color-accent);
}

.resume-quicklinks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}

.resume-quick-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid #dce8e3;
  background: rgba(255, 255, 255, 0.42);
  color: #24313a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: all var(--transition);
}

.resume-quick-btn:hover,
.resume-quick-btn:focus-visible,
.resume-quick-btn.is-active {
  background: #293B61;
  color: #fff;
  border-color: #293B61;
  transform: translateY(-1px);
}

.resume-quick-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.profile-skills-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.profile-skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

a.skill-tag-link {
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

a.skill-tag-link:hover,
.page-view[data-page="skills"] a.skill-tag-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.skill-tag-link.has-tooltip {
  position: relative;
}

.skill-tooltip-anchor--kitten .skill-tooltip {
  position: absolute;
  top: -1px;
  left: calc(100% - 1px);
  height: calc(100% + 2px);
  box-sizing: border-box;
  margin: 0;
  padding: 7px 13px;
  border: 1px solid var(--color-accent);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--resume-soft);
  white-space: nowrap;
  pointer-events: auto;
}

.skill-tooltip {
  display: none;
  margin-left: 2px;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  pointer-events: none;
}

.skill-tooltip--wide {
  min-width: 210px;
  text-align: center;
  white-space: normal;
}

.skill-tooltip code {
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
}

.skill-tag-link.has-tooltip:hover .skill-tooltip,
.skill-tag-link.has-tooltip:focus-visible .skill-tooltip {
  display: inline-block;
}

.skill-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  object-fit: contain;
}

.skill-icon + .skill-icon {
  margin-left: -2px;
}

.skill-icon-fa {
  width: 14px;
  font-size: 13px;
  text-align: center;
  color: var(--color-accent);
}

.skill-group {
  margin-bottom: 24px;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-group-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.profile-photo-wrapper .social-links {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 0;
  gap: 4px;
}

.profile-photo-wrapper .social-link {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.profile-photo-wrapper .social-link--cv {
  padding: 6px 10px;
  border: 1.5px solid var(--color-text);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
}

.profile-photo-wrapper .social-link--cv:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
  box-shadow: none;
  transform: none;
}

.education-statement-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.research-statement-link {
  display: inline-block;
  padding: 6px 14px;
  border: 1.5px solid var(--color-text);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.research-statement-link:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.profile-photo-wrapper .social-link--icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #293B61;
  color: #fff;
  font-size: 15px;
  justify-content: center;
  border: 1px solid #293B61;
}

.profile-photo-wrapper .social-link--icon:hover {
  background: #203050;
  color: #fff;
  border-color: #203050;
  box-shadow: none;
  transform: translateY(-1px);
}

.profile-photo-wrapper > a {
  display: block;
  width: 100%;
  height: 260px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.profile-photo-wrapper a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.8);
  transform-origin: center 25%;
  transition: transform var(--transition);
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-heading);
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.profile-bio {
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text);
  margin-bottom: 12px;
}

.profile-bio .emoji-icon {
  margin-right: 6px;
}

/* ---------- Status Badge ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 13px;
  font-weight: 500;
}

.status-badge a {
  color: #166534;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.research-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.tag-red {
  background: var(--color-tag-red-bg);
  color: var(--color-tag-red-text);
}

.tag-yellow {
  background: var(--color-tag-yellow-bg);
  color: var(--color-tag-yellow-text);
}

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

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 74, 128, 0.25);
}

.social-link i {
  font-size: 14px;
}

/* ---------- Elsewhere Online ---------- */
.elsewhere-online {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: max-content;
  margin: 30px 0 0 auto;
}

.elsewhere-online-label {
  color: var(--color-text-muted);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.elsewhere-online-links {
  display: flex;
  gap: 6px;
}

.elsewhere-online-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 12.5px;
  transition: all var(--transition);
}

.elsewhere-online-link:hover,
.elsewhere-online-link:focus {
  background: #2f7d6d;
  color: #fff;
  transform: translateY(-1px);
}

.elsewhere-online-link i {
  font-size: 12.5px;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--color-cta-bg);
  border: 1px solid var(--color-cta-border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #78350f;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
}

.cta-banner b {
  color: #9a3412;
}

.profile-news {
  margin: 12px 0 0;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.profile-news b {
  color: var(--color-heading);
}

/* ---------- Section ---------- */
.section {
  margin-top: 48px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

/* ---------- Page Views (Home / Education / Experience / Honors / Skills) ---------- */
.page-view {
  display: none;
}

.page-view.is-active {
  display: block;
  animation: pageViewIn 0.25s ease;
}

@keyframes pageViewIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Resume Panels ---------- */
.page-view[data-page="education"],
.page-view[data-page="experience"],
.page-view[data-page="honors"],
.page-view[data-page="skills"],
.page-view[data-page="projects"] {
  --resume-ink: #24313a;
  --resume-muted: #6d7b83;
  --resume-soft: #eef4f1;
  --resume-accent: #2f7d6d;
  --resume-accent-deep: #19564d;
  --resume-warm: #b85c2d;
  color: var(--resume-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.62;
}

.page-view[data-page="education"] .section-title,
.page-view[data-page="experience"] .section-title,
.page-view[data-page="honors"] .section-title,
.page-view[data-page="skills"] .section-title,
.page-view[data-page="projects"] .section-title {
  position: relative;
  margin-bottom: 28px;
  padding-bottom: 8px;
  border-bottom: 0;
  color: var(--resume-accent-deep);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.page-view[data-page="education"] .section-title::after,
.page-view[data-page="experience"] .section-title::after,
.page-view[data-page="honors"] .section-title::after,
.page-view[data-page="skills"] .section-title::after,
.page-view[data-page="projects"] .section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--resume-warm);
}

/* ---------- Timeline (Education) ---------- */
.timeline {
  max-width: 760px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 18px;
}

.timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--resume-accent);
  border: 3px solid var(--resume-soft);
  box-shadow: 0 0 0 1px rgba(47, 125, 109, 0.22);
  flex-shrink: 0;
}

.timeline-line {
  width: 2px;
  flex: 1;
  min-height: 28px;
  background: #d9e5df;
  margin-top: 6px;
}

.timeline-info {
  padding-bottom: 24px;
}

.timeline-org {
  font-size: 17px;
  font-weight: 700;
  color: var(--resume-ink);
  line-height: 1.28;
}

.timeline-role {
  font-size: 14.5px;
  font-style: normal;
  font-weight: 600;
  color: var(--resume-accent-deep);
  margin-top: 4px;
  line-height: 1.38;
}

.timeline-meta {
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--resume-warm);
  margin-top: 4px;
}

.timeline-sub {
  font-size: 13.5px;
  color: var(--resume-muted);
  line-height: 1.55;
  margin-top: 4px;
}

.timeline-advisor {
  font-size: 13px;
  color: #7c6154;
}

.timeline-advisor a {
  color: inherit;
  border-bottom: 1px solid rgba(124, 97, 84, 0.35);
}

.timeline-advisor a:hover,
.timeline-advisor a:focus {
  color: var(--resume-warm);
  border-bottom-color: currentColor;
}

/* ---------- Entry list (Experience / Honors & Awards) ---------- */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}

.entry-card {
  border: 1px solid #dce8e3;
  border-left: 4px solid var(--resume-accent);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 8px 24px rgba(36, 49, 58, 0.04);
}

/* Salient variant for a standout entry (e.g. the Korean patent) */
.entry-card--highlight {
  border-color: #f0cdb6;
  border-left: 6px solid var(--resume-warm);
  background: linear-gradient(135deg, #fff4ea 0%, #fffaf5 100%);
  box-shadow: 0 10px 28px rgba(184, 92, 45, 0.16);
}

.entry-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--resume-warm);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.entry-org {
  font-size: 17px;
  font-weight: 700;
  color: var(--resume-ink);
  line-height: 1.28;
}

.entry-role {
  font-size: 14.5px;
  font-style: normal;
  font-weight: 600;
  color: var(--resume-accent-deep);
  margin-top: 4px;
  line-height: 1.38;
}

.entry-meta {
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--resume-warm);
  margin-top: 4px;
}

.entry-sub {
  font-size: 13.5px;
  color: var(--resume-muted);
  line-height: 1.55;
  margin-top: 5px;
}

.award-photo-link {
  display: block;
  margin-top: 12px;
  max-width: 520px;
}

.award-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid #e5c7b2;
}

.entry-bullets {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--resume-muted);
  line-height: 1.55;
}

.entry-bullets li + li {
  margin-top: 3px;
}

.page-view[data-page="skills"] .skill-group {
  margin-bottom: 26px;
  max-width: 760px;
}

.page-view[data-page="skills"] .skill-group-label {
  margin-bottom: 12px;
  color: var(--resume-accent-deep);
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.page-view[data-page="skills"] .profile-skills-tags {
  gap: 10px;
}

.page-view[data-page="skills"] .skill-tag {
  padding: 7px 13px;
  border-color: #d4e3dc;
  border-radius: var(--radius-sm);
  background: var(--resume-soft);
  color: var(--resume-ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
}

/* ---------- Publication Filter ---------- */
.section-title .pub-filter {
  font-size: 0.85rem;
  font-weight: 400;
  margin-left: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.pub-filter-link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.pub-filter-link.active {
  color: var(--color-accent);
  font-weight: 600;
}

.pub-filter-link:hover {
  color: var(--color-accent);
}

.pub-filter-sep {
  margin: 0 6px;
}

/* ---------- About Me ---------- */
.about-section {
  margin-top: 36px;
}

.about-meta {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.about-meta b {
  color: var(--color-text);
}

.about-secondary {
  color: var(--color-accent);
  font-style: italic;
}

.research-statement {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.research-quote {
  padding: 20px 24px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-accent);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}

.research-quote:hover {
  background: rgba(44, 74, 128, 0.03);
}

.quote-highlight {
  color: var(--color-highlight);
  font-weight: 700;
  font-style: italic;
}

.toggle-hint {
  font-size: 12.5px;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.research-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 24px;
  border-top: 0px solid var(--color-border);
}

.research-details.expanded {
  max-height: 800px;
  overflow-y: auto;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--color-border);
}

.research-details p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 12px;
}

.research-details p:last-child {
  margin-bottom: 0;
}

.research-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
}

.research-list li {
  position: relative;
  padding: 6px 0 6px 20px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--color-text);
}

.research-list li::before {
  content: '.';
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: 20px;
  font-weight: 900;
  color: var(--color-accent);
}

.research-list li b {
  color: var(--color-heading);
}

.research-list li a {
  font-weight: 600;
}


.publication-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pub-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeSlideIn 0.5s ease forwards;
}

.pub-card:nth-child(1) {
  animation-delay: 0.1s;
}

.pub-card:nth-child(2) {
  animation-delay: 0.2s;
}

.pub-card:nth-child(3) {
  animation-delay: 0.3s;
}

.pub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.pub-media {
  position: relative;
  width: 100%;
  line-height: 0;
  background: var(--color-bg);
}

.pub-media img,
.pub-media video {
  width: 75%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.pub-media-slider .pub-media-slide {
  display: none;
}

.pub-media-slider .pub-media-slide.is-active {
  display: block;
}

.pub-media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.pub-media-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.pub-media-nav--prev {
  left: calc(12.5% + 10px);
}

.pub-media-nav--next {
  right: calc(12.5% + 10px);
}

.pub-media-dots {
  position: absolute;
  right: calc(12.5% + 12px);
  bottom: 12px;
  z-index: 2;
  display: flex;
  gap: 5px;
}

.pub-media-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all var(--transition);
}

.pub-media-dot.is-active {
  width: 14px;
  background: #fff;
}

.pub-content {
  flex: 1;
  min-width: 0;
  padding: 16px 20px 20px;
}

.pub-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.45;
  margin-bottom: 6px;
  transition: color var(--transition);
}

.pub-title a {
  color: inherit;
}

.pub-title a:hover {
  color: var(--color-accent);
}

.pub-authors {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 4px;
}

.pub-authors strong {
  color: var(--color-text);
  font-weight: 600;
}

.pub-authors--collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.authors-toggle {
  display: inline-block;
  cursor: pointer;
  color: var(--color-accent);
  font-size: 12px;
  margin-top: 2px;
}

.authors-toggle:hover { text-decoration: underline; }

.pub-venue {
  font-size: 14.5px;
  color: var(--color-accent);
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.pub-venue-note {
  font-size: 13.5px;
  color: var(--color-text-muted);
  font-style: normal;
  line-height: 1.45;
  margin-bottom: 8px;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.pub-tag {
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
}

.pub-tag--hci {
  color: #4338ca;
  background: #eef0fd;
  border-color: #c7d2fe;
}

.pub-tag--prompt {
  color: #7e22ce;
  background: #f6eefd;
  border-color: #e9d5ff;
}

.pub-tag--interpretable {
  color: #15803d;
  background: #eafbf0;
  border-color: #bbf7d0;
}

.pub-tag--vla {
  color: #c2410c;
  background: #fef2e8;
  border-color: #fed7aa;
}

.pub-tag--agent {
  color: #be185d;
  background: #fdeef5;
  border-color: #fbcfe8;
}

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

.pub-link {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 500;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  transition: all var(--transition);
}

.pub-link:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.pub-desc {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.65;
  margin-bottom: 6px;
}

/* ---------- Interests ---------- */
.interests-intro {
  font-size: 14.5px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

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

.interest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.interest-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-accent);
}

.interest-emoji {
  font-size: 22px;
  line-height: 1;
}

/* ---------- Reviewer / Service ---------- */
#teaching,
#mentoring,
#service,
#collaborations {
  margin-top: 34px;
}

#teaching .section-title,
#mentoring .section-title,
#service .section-title,
#collaborations .section-title {
  margin-bottom: 14px;
}

.reviewer-list {
  list-style: none;
  padding: 0;
}

.reviewer-list li {
  position: relative;
  padding: 4px 0 4px 20px;
  font-size: 14.5px;
  color: var(--color-text);
}

.reviewer-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* ---------- Collaborations ---------- */
.collab-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.collab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  min-width: 150px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.collab-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.collab-item img {
  height: 36px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
}

.collab-item span {
  font-size: 12.5px;
  color: var(--color-text-muted);
  text-align: center;
}

/* ---------- Blog / Small Wins ---------- */
.blog-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--color-accent);
}

.blog-header {
  margin-bottom: 40px;
}

.blog-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 8px;
}

.blog-page-subtitle {
  font-size: 15px;
  color: var(--color-text-muted);
}

.blog-list,
.blog-list-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-card {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  color: inherit;
}

.blog-card-date {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.blog-month {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
}

.blog-day {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.1;
}

.blog-year {
  font-size: 11px;
  color: var(--color-text-muted);
}

.blog-card-body {
  flex: 1;
  min-width: 0;
}

.blog-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 6px;
  line-height: 1.4;
}

.blog-card-excerpt {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 500;
  background: rgba(44, 74, 128, 0.08);
  color: var(--color-accent);
}

.blog-see-all {
  margin-top: 16px;
  text-align: right;
}

.see-all-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.see-all-link:hover {
  gap: 10px;
  color: var(--color-highlight);
}

/* Blog Post Article */
.blog-post {
  max-width: 680px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 32px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.post-reading-time {
  padding-left: 16px;
  border-left: 1px solid var(--color-border);
}

.post-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.35;
  margin-bottom: 12px;
}

.post-body {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--color-text);
}

.post-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-top: 28px;
  margin-bottom: 12px;
}

.post-body p {
  margin-bottom: 16px;
}

.post-body strong {
  color: var(--color-heading);
}

/* ---------- Research Figure Expand ---------- */
.research-fig-toggle {
  display: inline-block;
  margin-left: 4px;
  font-size: 12px;
  color: var(--color-accent);
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

.research-fig-toggle:hover {
  color: var(--color-accent-hover);
}

.research-fig-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, margin 0.4s ease;
  margin-top: 0;
}

.research-fig-wrap.open {
  max-height: 500px;
  margin-top: 12px;
}

.research-fig {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-map {
  flex-shrink: 0;
}

/* ---------- Animations ---------- */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.explore-subtitle {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.explore-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.explore-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.explore-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.explore-card:hover::before {
  opacity: 0;
}

.explore-emoji {
  font-size: 32px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.explore-card:hover .explore-emoji {
  transform: scale(1.2) rotate(-8deg);
}

.explore-card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.explore-card-desc {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.9;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  flex: 1;
}

.explore-thumb {
  width: 100%;
  max-height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

.explore-card:hover .explore-thumb {
  opacity: 1;
}

.explore-arrow {
  position: relative;
  z-index: 1;
  font-size: 14px;
  opacity: 0.7;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.explore-card:hover .explore-arrow {
  transform: translateX(6px);
  opacity: 1;
}

/* ---------- Projects Page ---------- */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.project-banner {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.project-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 28px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

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

.project-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 6px;
}

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.project-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 500;
  background: rgba(44, 74, 128, 0.08);
  color: var(--color-accent);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 500;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  text-decoration: none;
  transition: all var(--transition);
}

.project-link:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ---------- Inspiration Page ---------- */
.inspo-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.inspo-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-main);
}

.inspo-tab:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.inspo-tab.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(44, 74, 128, 0.25);
}

.inspo-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.inspo-panel.active {
  display: flex;
}

.inspo-card {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.inspo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  color: inherit;
}

.inspo-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 18px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
}

.inspo-body {
  flex: 1;
  min-width: 0;
}

.inspo-author {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 4px;
}

.inspo-handle {
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-muted);
}

.inspo-excerpt {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 6px;
}

.inspo-empty {
  font-size: 14px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 40px 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .page-wrapper {
    padding: 24px 16px 40px;
  }

  .layout {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .sidebar {
    position: static;
    align-self: center;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .main-column {
    width: 100%;
  }

  .profile-info {
    text-align: center;
  }

  .profile-photo-wrapper {
    width: auto;
    align-items: center;
  }

  .profile-photo-wrapper > a {
    width: 160px;
    height: 210px;
  }

  .profile-photo-wrapper .social-links {
    justify-content: center;
  }

  .profile-name {
    font-size: 1.6rem;
  }

  .section-title .pub-filter {
    display: block;
    margin: 4px 0 0;
  }

  .pub-card {
    flex-direction: column;
    gap: 14px;
  }

  .pub-media img,
  .pub-media video {
    width: 100%;
  }

  .pub-media-nav--prev {
    left: 10px;
  }

  .pub-media-nav--next {
    right: 10px;
  }

  .pub-media-dots {
    right: 12px;
  }

  .pub-thumb {
    width: 100%;
    max-height: 200px;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }

  .interests-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .explore-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    flex-direction: column;
    gap: 12px;
  }

  .inspo-tabs {
    gap: 6px;
  }

  .inspo-tab {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* ===== Resources page ===== */
.resources-intro {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 8px;
}

.resource-section {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  margin-top: 20px;
}

.resource-heading {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
}

.resource-list {
  margin: 0;
  padding-left: 20px;
}

.resource-list li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.resource-list a {
  color: var(--color-accent);
  font-weight: 500;
  margin-right: 4px;
}

.resource-list a:hover {
  color: var(--color-accent-hover);
}

.resource-summary {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: -2px 0 12px;
}

.resource-accordion-list {
  display: grid;
  gap: 8px;
}

.resource-accordion {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  overflow: hidden;
}

.resource-accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  color: var(--color-accent);
  font-size: 14px;
  font-weight: 600;
}

.resource-accordion summary::-webkit-details-marker {
  display: none;
}

.resource-accordion summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.resource-accordion[open] summary::before {
  transform: rotate(90deg);
}

.resource-accordion summary:hover {
  color: var(--color-accent-hover);
}

.resource-accordion-content {
  border-top: 1px solid var(--color-border);
  padding: 10px 14px 10px 34px;
  color: var(--color-text-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.resource-accordion-content ul {
  margin: 0;
  padding-left: 18px;
}

.resource-accordion-content li {
  margin-bottom: 6px;
}

.resource-accordion-content li:last-child {
  margin-bottom: 0;
}
