/* ==========================================================================
   Modern Researcher Website Style (Ben Mildenhall & Jon Barron Style)
   ========================================================================== */

/* 기본 상태: 라이트 모드 로고만 보여줌 */
.logo-dark {
  display: none !important;
}

.logo-light {
  /* block에서 inline-block으로 수정 */
  display: inline-block !important;
}

/* 바디에 .dark-theme 클래스가 붙으면 다크 모드 로고로 스위칭 */
body.dark-theme .logo-dark {
  /* block에서 inline-block으로 수정 */
  display: inline-block !important;
}

body.dark-theme .logo-light {
  display: none !important;
}


/* Theme Variables */
.dark-theme {
  --bg-primary: #0f172a;
  /* Slate 900 */
  --bg-secondary: #1e293b;
  /* Slate 800 */
  --bg-tertiary: #0f172a;
  --text-primary: #f1f5f9;
  /* Slate 100 */
  --text-secondary: #94a3b8;
  /* Slate 400 */
  --accent-color: #38bdf8;
  /* Sky 400 */
  --accent-color-rgb: 56, 189, 248;
  --accent-hover: #7dd3fc;
  /* Sky 300 */
  --border-color: #334155;
  /* Slate 700 */
  --card-bg: #1e293b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
}

.light-theme {
  --bg-primary: #f8fafc;
  /* Slate 50 */
  --bg-secondary: #ffffff;
  /* White */
  --bg-tertiary: #f1f5f9;
  /* Slate 100 */
  --text-primary: #1e293b;
  /* Slate 800 */
  --text-secondary: #475569;
  /* Slate 600 */
  --accent-color: #0284c7;
  /* Sky 600 */
  --accent-color-rgb: 2, 132, 199;
  --accent-hover: #0369a1;
  --border-color: #e2e8f0;
  /* Slate 200 */
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.03);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.03);
}

:root {
  --transition-speed: 0.25s;
}

/* Global Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  line-height: 1.38;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition-speed), color var(--transition-speed);
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed), border-color var(--transition-speed);
}

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

h1,
h2,
h3,
h4 {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Page Container (Centralized Flow) */
.page-container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 80px 24px 100px 24px;
}

/* ==========================================================================
   HEADER / PROFILE STYLES (Classic bmild & jonbarron layout)
   ========================================================================== */
.profile-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  margin-bottom: 24px;
  padding-bottom: 0;
}

.profile-avatar-area {
  flex-shrink: 0;
}

.profile-frame {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-speed), transform var(--transition-speed);
}

.profile-frame:hover {
  transform: rotate(5deg) scale(1.02);
  border-color: var(--accent-color);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info-area {
  flex-grow: 1;
}

.profile-name {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
}

.profile-title {
  font-size: 1.05rem;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 6px;
}

.profile-org {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-bottom: 12px;
}

.profile-email {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: monospace;
  margin-bottom: 16px;
}

/* Social links (bmild/jonbarron-style clean plain text links separated by spaces) */
.social-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.social-links-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.825rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: color var(--transition-speed);
}

.social-links-row a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.social-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Profile Links (slash separated Jon Barron style) */
.profile-links {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-top: 24px;
  line-height: 1.4;
}

.profile-links a {
  color: var(--text-primary);
  font-weight: 500;
  transition: color var(--transition-speed);
  text-decoration: none;
}

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

/* ==========================================================================
   MAIN SECTION FLOW
   ========================================================================== */
.main-flow {
  display: flex;
  flex-direction: column;
}

.flow-section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.bio-paragraph {
  line-height: 1.38;
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: justify;
}

.cv-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.875rem;
}

.cv-badge-row span {
  color: var(--text-secondary);
}

.badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-color);
  font-weight: 600;
  transition: color var(--transition-speed);
}

.badge-btn:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.btn-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* ==========================================================================
   NEWS SECTION
   ========================================================================== */
.news-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-bullet-list li {
  display: flex;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.3;
}

.news-date {
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  min-width: 90px;
  flex-shrink: 0;
  white-space: nowrap;
}

.news-desc {
  color: var(--text-secondary);
}

/* ==========================================================================
   TIMELINE (Experiences)
   ========================================================================== */
.timeline-compact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-compact li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  line-height: 1.3;
  font-size: 0.9rem;
}

.timeline-date {
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  white-space: nowrap;
}

.timeline-desc {
  color: var(--text-secondary);
}

/* ==========================================================================
   COMPACT HORIZONTAL LOGO TIMELINE
   ========================================================================== */
.timeline-scroll-hint {
  display: none; /* No scrollbar now, so hide scroll hint */
}

.timeline-compact-bar {
  position: relative;
  width: 100%;
  height: 160px; /* Taller height for two swimlanes + labels */
  box-sizing: border-box;
  margin: 16px 0 0 0;
  padding: 0;
}

.timeline-compact-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
  transform: translateY(-50%);
  opacity: 0.6;
}

.timeline-duration-bar {
  position: absolute;
  top: 50%;
  height: 4px;
  opacity: 0.25;
  border-radius: 2px;
  z-index: 1;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, height 0.2s ease, box-shadow 0.2s ease;
}

.timeline-duration-bar.track-career {
  margin-top: -3.5px; /* Slightly above center axis */
  background: #34c759; /* Green tone for career */
}

.timeline-duration-bar.track-visits {
  margin-top: 3.5px; /* Slightly below center axis */
  background: #ff9500; /* Orange/Yellow tone for visits */
}

.timeline-duration-bar.highlight {
  opacity: 0.9 !important;
  height: 6px !important;
}

.timeline-duration-bar.track-career.highlight {
  box-shadow: 0 0 6px rgba(52, 199, 89, 0.6);
  background: #34c759;
}

.timeline-duration-bar.track-visits.highlight {
  box-shadow: 0 0 6px rgba(255, 149, 0, 0.6);
  background: #ff9500;
}

.timeline-stem {
  position: absolute;
  width: 1px;
  background: var(--border-color);
  opacity: 0.3;
  z-index: -1;
  transition: opacity 0.2s ease, width 0.2s ease, background-color 0.2s ease;
}

.timeline-node.track-career .timeline-stem {
  top: 18px; /* Starts from logo center */
  bottom: -10px; /* Extends to axis line (bottom + 10px) */
  left: 50%;
  transform: translateX(-50%);
}

.timeline-node.track-visits .timeline-stem {
  bottom: 18px; /* Starts from logo center */
  top: -10px; /* Extends to axis line (top + 10px) */
  left: 50%;
  transform: translateX(-50%);
}

/* Hover highlights stem as well */
.timeline-node:hover .timeline-stem {
  opacity: 0.9;
  width: 2px;
  background: var(--accent-color, #069);
}

.timeline-node.track-career:hover .timeline-stem {
  background: #34c759;
}

.timeline-node.track-visits:hover .timeline-stem {
  background: #ff9500;
}

.timeline-node {
  position: absolute;
  z-index: 2;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-node:hover {
  transform: translateX(-50%) scale(1.1);
}

.timeline-node.track-career {
  bottom: calc(50% + 10px);
}

.timeline-node.track-visits {
  top: calc(50% + 10px);
}

.timeline-node-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  border: 2px solid var(--border-color);
  padding: 2px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.timeline-node:hover .timeline-node-logo {
  border-color: var(--accent-color, #069);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.timeline-node-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.timeline-node.track-career .timeline-node-year {
  margin-top: 4px;
  order: 2; /* year label below logo for career */
}

.timeline-node.track-visits .timeline-node-year {
  margin-bottom: 4px;
  order: -1; /* year label above logo for visits */
}

.timeline-node-year {
  display: none !important; /* Hide year label on desktop nodes */
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.timeline-grid-line {
  position: absolute;
  top: 0;
  bottom: 24px; /* Leaves space for year text */
  width: 0;
  border-left: 1px dashed var(--border-color);
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
}

.timeline-ruler-axis {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}

.timeline-ruler-tick {
  position: absolute;
  bottom: 20px; /* Centers 8px tick vertically around bottom: 24px ruler */
  width: 1px;
  height: 8px;
  background: var(--border-color);
  opacity: 0.4;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

.timeline-grid-year {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.timeline-phd-division {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  z-index: 1;
  pointer-events: none;
}

.timeline-phd-line {
  position: absolute;
  top: 15px;
  bottom: 20px;
  width: 0;
  border-left: 1.5px dashed var(--accent-color, #069);
  opacity: 0.55;
}

.timeline-phd-label {
  position: absolute;
  top: -5px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-color, #069);
  white-space: nowrap;
  opacity: 0.85;
}

.timeline-phd-label.left {
  right: 8px;
  text-align: right;
}

.timeline-phd-label.right {
  left: 8px;
  text-align: left;
}

.timeline-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  background: rgba(20, 20, 25, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eee;
  padding: 10px 12px;
  border-radius: 8px;
  width: 260px;
  font-size: 0.75rem;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
  white-space: normal;
  text-align: left;
}

.timeline-node.track-career .timeline-tooltip {
  bottom: 125%;
  transform: translateX(-50%) translateY(4px);
}

.timeline-node.track-visits .timeline-tooltip {
  top: 125%;
  transform: translateX(-50%) translateY(-4px);
}

body.light-theme .timeline-tooltip {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.12);
  color: #333;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.timeline-node.track-career:hover .timeline-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.timeline-node.track-visits:hover .timeline-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.timeline-tooltip strong {
  color: var(--text-primary);
}

.timeline-node-desc-mobile {
  display: none;
}

@media (max-width: 768px) {
  .timeline-compact-bar {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 0 !important;
    margin: 20px 0 !important;
  }

  .timeline-compact-bar::before {
    display: none !important;
  }

  .timeline-node {
    order: var(--mobile-order) !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    cursor: default !important;
    margin-bottom: 8px;
  }

  .timeline-node:hover {
    transform: none !important;
  }

  .timeline-node-logo {
    width: 32px !important;
    height: 32px !important;
    order: 2 !important;
    flex-shrink: 0;
  }

  .timeline-node-year {
    display: block !important;
    position: static !important;
    transform: none !important;
    font-size: 0.72rem !important;
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    min-width: 85px !important;
    flex-shrink: 0 !important;
    order: 1 !important;
    margin: 0 !important;
  }

  .timeline-node-desc-mobile {
    display: block !important;
    font-size: 0.72rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    order: 3 !important;
  }

  .timeline-tooltip {
    display: none !important;
  }

  .timeline-duration-bar {
    display: none !important;
  }

  .timeline-stem {
    display: none !important;
  }

  .timeline-grid-line,
  .timeline-ruler-axis,
  .timeline-ruler-tick,
  .timeline-grid-year,
  .timeline-phd-division {
    display: none !important;
  }
}

/* ==========================================================================
   PROGRESSIVE DISCLOSURE (Extendable Accordion)
   ========================================================================== */
.extendable-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

.extendable-content.expanded {
  max-height: 3500px;
  opacity: 1;
}

.extend-section-wrapper {
  padding-top: 20px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cv-subsection h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  border-left: 3px solid var(--accent-color);
  padding-left: 8px;
}

.detail-timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-timeline li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.detail-timeline li span:first-child {
  white-space: nowrap;
}

.cv-bullets {
  list-style: disc;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.cv-bullets strong {
  color: var(--text-primary);
}

.patents-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.patents-bullet-list li {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text-secondary);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.patents-bullet-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.patents-bullet-list li strong {
  color: var(--text-primary);
}

/* Minimalist Extend Trigger Button (No border, just text with underscore and arrows) */
.btn-container {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

.extend-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px dashed transparent;
  transition: all var(--transition-speed);
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
}

.extend-btn:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.arrow-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform var(--transition-speed);
}

.extend-btn.active .arrow-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   RESEARCH & PUBLICATIONS FLOW (Classic bmild & jonbarron Style 2-Column)
   ========================================================================== */
.publications-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-entry {
  display: grid;
  grid-template-columns: 180px 1fr;
  /* Tight 180px media column */
  gap: 16px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  transition: border-color var(--transition-speed);
}

.pub-entry.no-image-entry {
  /* Inherits grid-template-columns: 180px 1fr to keep text aligned with standard entries */
  padding-bottom: 12px;
}

.pub-entry.no-image-entry .entry-media {
  max-width: 180px;
  aspect-ratio: 18 / 7.5; /* 180px width, 75px height */
}

.pub-entry.no-image-entry .paper-placeholder-icon svg {
  width: 22px;
  height: 22px;
  opacity: 0.25;
}

.pub-entry.blank-image-entry {
  /* Inherits grid-template-columns: 180px 1fr to keep text aligned with standard entries */
  padding-bottom: 12px;
}

.pub-entry.blank-image-entry .entry-media {
  max-width: 180px;
  aspect-ratio: 18 / 7.5; /* 180px width, 75px height */
  border: none;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.pub-entry.blank-image-entry:hover .entry-media {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.pub-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pub-entry.no-border-bottom {
  border-bottom: none !important;
  padding-bottom: 12px;
}

/* Left column Media Container */
.pub-entry .entry-media {
  position: relative;
  /* Stacking context for hover swap */
  width: 100%;
  max-width: 180px;
  aspect-ratio: 16 / 10;
  /* Clean standardized aspect ratio */
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-secondary);
  transition: all var(--transition-speed);
}

.pub-entry:hover .entry-media {
  transform: scale(1.025);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}

.pub-entry .entry-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: opacity 0.3s ease-in-out;
}

/* Stacking hover effect for representative and thumbnail images */
.pub-entry .entry-media img.first-page-img {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.pub-entry .entry-media:hover img.first-page-img {
  opacity: 1;
}

.pub-entry .entry-media:hover img.representative-img {
  opacity: 0;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  overflow: hidden;
  background-color: #000000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Aesthetic gradient for placeholders */
.paper-placeholder-icon {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.paper-placeholder-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  opacity: 0.35;
}

/* Right column Text Details */
.pub-entry .entry-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pub-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent-color);
}

.pub-title a {
  color: inherit;
}

.pub-title a:hover {
  text-decoration: underline;
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Bold and slightly highlighted name in authors */
.pub-authors strong {
  color: var(--text-primary);
  font-weight: 700;
}

.pub-venue {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.pub-summary-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 5px 0;
  text-align: justify;
}

/* Hyperlinks represented as minimal bracketed texts [arXiv], [Project] */
.pub-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-color);
  transition: color var(--transition-speed);
}

.badge::before {
  content: '[';
  color: var(--text-secondary);
  margin-right: 1px;
}

.badge::after {
  content: ']';
  color: var(--text-secondary);
  margin-left: 1px;
}

.badge:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.pub-note-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background-color: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(var(--accent-color-rgb), 0.2);
}

.pub-note-badge.award-highlight {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

body.dark-theme .pub-note-badge.award-highlight {
  background-color: rgba(251, 113, 133, 0.15);
  color: #fda4af;
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.pub-lang-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.pub-list-compact-style {
  list-style: disc;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.pub-list-compact-style strong {
  color: var(--text-primary);
}

/* ==========================================================================
   RESOURCES & LINKS SECTION
   ========================================================================== */
.links-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.link-flow-card {
  background-color: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.link-flow-card h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flow-styled-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flow-styled-links li {
  position: relative;
  padding-left: 14px;
}

.flow-styled-links li::before {
  content: '»';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.flow-styled-links a {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-secondary);
}

.flow-styled-links a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.quote-text {
  font-size: 0.775rem;
  font-style: italic;
  line-height: 1.38;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  border-left: 2px solid var(--accent-color);
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* ==========================================================================
   SIMPLE FOOTER
   ========================================================================== */
.simple-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   FLOATING THEME TOGGLE BUTTON
   ========================================================================== */
.floating-theme-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all var(--transition-speed);
}

.floating-theme-btn:hover {
  border-color: var(--accent-color);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.floating-theme-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
}

.dark-theme .floating-theme-btn .sun-icon {
  display: none;
}

.dark-theme .floating-theme-btn .moon-icon {
  display: block;
  color: var(--accent-color);
}

.light-theme .floating-theme-btn .sun-icon {
  display: block;
  color: #eab308;
}

.light-theme .floating-theme-btn .moon-icon {
  display: none;
}

/* Rivian logo container – aligns logos tightly next to profile image */
.rivian-logo-container {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
}

/* Publication Filters */
.pub-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: none;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 6px;
  transition: color var(--transition-speed);
}

.filter-btn::before {
  content: '[';
  color: var(--text-secondary);
  margin-right: 2px;
}

.filter-btn::after {
  content: ']';
  color: var(--text-secondary);
  margin-left: 2px;
}

.filter-btn.active {
  color: var(--accent-color);
}

.filter-btn.active::before,
.filter-btn.active::after {
  color: var(--accent-color);
}

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

.pub-entry.hidden {
  display: none !important;
}


/* ==========================================================================
   RESPONSIVE DESIGN MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
  .page-container {
    padding: 60px 16px 80px 16px;
  }

  /* Profile Header stacks vertically on smaller screens */
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding-bottom: 24px;
  }

  .profile-frame {
    width: 110px;
    height: 110px;
  }

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

  .social-links-row {
    justify-content: center;
  }

  /* 2-Column Pub Entry collapses to 1-Column */
  .pub-entry {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pub-entry .entry-media {
    max-width: 100%;
  }

  .pub-entry.no-image-entry .entry-media,
  .pub-entry.blank-image-entry .entry-media {
    display: none;
    /* Hide placeholder image box on mobile to save vertical space */
  }

  .timeline-compact li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .detail-timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .simple-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .floating-theme-btn {
    top: 16px;
    right: 16px;
  }
}

/* ==========================================================================
   Tooltips for Publication Full Names
   ========================================================================== */
.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip-container .tooltip-text {
  visibility: hidden;
  width: 320px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  z-index: 100;
  bottom: 125%; /* Position above the text */
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-lg);
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.3;
  pointer-events: none;
  backdrop-filter: blur(10px);
  white-space: normal;
}

.tooltip-container .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--border-color) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text,
.tooltip-container:focus-within .tooltip-text,
.tooltip-container.active .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ==========================================================================
   REVIEWER & TPC FIELD-CATEGORIZED LIST
   ========================================================================== */
.reviewer-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-color, #069);
  padding: 0;
  padding-left: 8px;
  margin-top: 24px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.reviewer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding-left: 11px; /* aligns categories vertically with the title text */
  box-sizing: border-box;
}

.reviewer-row {
  display: flex;
  align-items: baseline;
  font-size: 0.82rem;
  line-height: 1.45;
  border-bottom: 1px dotted var(--border-color);
  padding-bottom: 8px;
}

.reviewer-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.reviewer-category {
  font-weight: 700;
  color: var(--accent-color, #069);
  width: 200px;
  flex-shrink: 0;
}

.reviewer-venues {
  color: var(--text-primary);
  flex-grow: 1;
}

.reviewer-item {
  display: inline-block;
  white-space: nowrap;
}

.reviewer-item .venue-name {
  font-weight: 600;
}

.reviewer-item .venue-years {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.academic-footnote {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--text-secondary);
  opacity: 0.75;
  margin-top: 8px;
  margin-bottom: 16px;
  padding: 0 11px; /* aligns vertically with the reviewer items */
  text-align: justify;
}

/* Tablet and Mobile responsiveness */
@media (max-width: 768px) {
  .reviewer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-bottom: 10px;
  }
  .reviewer-category {
    width: auto;
    margin-bottom: 2px;
  }
}