/* ═══════════════════════════════════════════════
   JOY OLUSANYA — Academic Portfolio
   Structure inspired by everlynasiko.github.io
   Palette: Deep Blue-Black + Electric Blue + White
   ═══════════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  --bg:          #050810;
  --bg-2:        #080c18;
  --surface:     #101828;
  --surface-2:   #172035;

  --blue:        #3b9eff;
  --blue-light:  #6ab8ff;
  --blue-dim:    #1a6fc4;
  --cream:       #e8f4ff;
  --cream-dim:   #9bbdd8;

  --text:        #ffffff;
  --text-muted:  #c0d8f0;
  --text-dim:    #6e9ab8;

  --border:      rgba(59,158,255,0.13);
  --border-2:    rgba(59,158,255,0.07);

  --sidebar-w:   280px;
  --radius:      6px;
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--blue-dim); color: var(--cream); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── CANVAS ─── */
#langCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ─── MOBILE BAR ─── */
.mobile-bar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(5,8,16,0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 200;
}
.mobile-logo {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blue-light);
}
.mobile-controls { display: flex; align-items: center; gap: 10px; }

/* ─── LAYOUT ─── */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  background: rgba(8, 12, 24, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  padding: 40px 28px 32px;
  min-height: 100%;
  gap: 0;
}

/* Photo */
.sb-photo-wrap {
  position: relative;
  width: fit-content;
  margin: 0 auto 24px;
}
.sb-photo-ring {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--blue-dim), var(--blue), var(--blue-light));
  box-shadow: 0 6px 24px rgba(59,158,255,0.2);
  transition: transform 0.4s var(--ease), box-shadow 0.4s ease;
}
.sb-photo-ring:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 32px rgba(59,158,255,0.35);
}
.sb-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 3px solid var(--bg-2);
}
.sb-photo-glow {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,158,255,0.25) 0%, transparent 70%);
  filter: blur(16px);
  z-index: -1;
  animation: sbGlow 4s ease-in-out infinite alternate;
}
@keyframes sbGlow {
  from { opacity: 0.5; transform: scale(0.95); }
  to   { opacity: 1;   transform: scale(1.1); }
}

/* Identity */
.sb-identity {
  text-align: center;
  margin-bottom: 24px;
}
.sb-name {
  font-family: 'Cormorant Garant', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 8px;
}
.sb-name em {
  font-style: normal;
  font-weight: 700;
  color: var(--cream);
  -webkit-text-fill-color: var(--cream);
  background: none;
}
.sb-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream-dim);
  line-height: 1.4;
  margin-bottom: 4px;
}
.sb-affil {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 400;
}

/* Links */
.sb-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-2);
}
.sb-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.sb-link:hover {
  background: rgba(59,158,255,0.08);
  color: var(--blue-light);
}
.sb-link-icon {
  width: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--blue);
  flex-shrink: 0;
}

/* Nav */
.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sb-nav-link {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease, padding 0.2s ease;
  position: relative;
}
.sb-nav-link::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 0;
  background: var(--blue);
  border-radius: 1px;
  transition: height 0.25s ease;
}
.sb-nav-link:hover,
.sb-nav-link.active {
  background: rgba(59,158,255,0.09);
  color: var(--cream);
  padding-left: 16px;
}
.sb-nav-link:hover::before,
.sb-nav-link.active::before {
  height: 60%;
}
.sb-nav-link.active {
  color: var(--blue-light);
  font-weight: 500;
}

/* Bottom theme toggle */
.sb-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-2);
}
.sb-theme {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
  width: 100%;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
  position: static; /* override .theme-toggle relative */
  overflow: visible;
}
.sb-theme:hover {
  border-color: var(--blue);
  color: var(--cream);
  background: rgba(59,158,255,0.06);
}
/* The icon inside sb-theme should NOT be absolute */
.sb-theme .theme-icon {
  position: static;
  font-size: 1rem;
  flex-shrink: 0;
  transition: opacity 0.25s ease;
}
.sb-theme .theme-icon--dark  { opacity: 1;  display: inline; }
.sb-theme .theme-icon--light { opacity: 0;  display: none; }

body.light-mode .sb-theme .theme-icon--dark  { opacity: 0;  display: none; }
body.light-mode .sb-theme .theme-icon--light { opacity: 1;  display: inline; }

.sb-theme-label { font-family: 'DM Sans', sans-serif; }

/* ═══════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  max-width: 860px;
  padding: 60px 64px 0;
}

.content-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-2);
}
.content-section:last-of-type { border-bottom: none; }

.cs-heading {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.cs-divider {
  width: 40px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
  margin-bottom: 28px;
}
.cs-subheading {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cream);
  margin: 36px 0 16px;
}
.cs-intro {
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: 1rem;
}

.content-section p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
}
.content-section p strong { color: var(--cream); font-weight: 500; }

/* Text link */
.text-link {
  color: var(--blue);
  border-bottom: 1px solid rgba(59,158,255,0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.text-link:hover { color: var(--blue-light); border-color: var(--blue-light); }

/* ─── INTRO META ─── */
.intro-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  border-left: 3px solid var(--blue);
}
.intro-meta-item {
  display: flex;
  gap: 16px;
  font-size: 0.95rem;
}
.intro-meta-label {
  font-weight: 600;
  color: var(--blue);
  width: 90px;
  flex-shrink: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 1px;
}
.intro-meta-item span:last-child { color: var(--text-muted); }

/* Awards in intro */
.intro-awards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.award-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.97rem;
  color: var(--text-muted);
}
.award-year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  width: 36px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.award-dot { color: var(--blue); font-size: 0.5rem; flex-shrink: 0; }
.award-item strong { color: var(--cream); font-weight: 500; }

/* ─── NEWS TIMELINE ─── */
.news-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-year-group {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0 24px;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.news-year-label {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
  padding-top: 14px;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  line-height: 1;
}

.news-year-items {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  padding-left: 24px;
  padding-bottom: 16px;
}

.news-year-group:last-child .news-year-items {
  border-left-color: transparent;
}

.news-entry {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-2);
  position: relative;
  align-items: baseline;
}

.news-entry:last-child { border-bottom: none; }

/* dot on the timeline line */
.news-entry::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 19px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--blue);
  transition: background 0.2s ease;
}

.news-entry:hover::before {
  background: var(--blue);
}

.news-month {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 2px;
  white-space: nowrap;
}

.news-body {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.news-body strong { color: var(--cream); font-weight: 500; }

/* ─── RESEARCH INTERESTS ─── */
.ri-list {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.ri-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-2);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
  transition: padding-left 0.25s ease;
}
.ri-item:last-child { border-bottom: none; }
.ri-item:hover { padding-left: 6px; }
.ri-item-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ri-number {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.1em;
  opacity: 0.7;
}
.ri-item h3 {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.3;
  transition: color 0.2s ease;
}
.ri-item:hover h3 { color: var(--blue-light); }
.ri-item p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

/* ─── PUBLICATIONS ─── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pub-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.pub-list li:last-child { border-bottom: none; }
.pub-title-link {
  font-weight: 500;
  color: var(--cream);
  border-bottom: 1px solid rgba(59,158,255,0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
  font-size: 1rem;
}
.pub-title-link:hover { color: var(--blue-light); border-color: var(--blue-light); }
.pub-venue-inline {
  font-style: italic;
  color: var(--blue);
  font-size: 0.86rem;
}
.pub-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue);
  border: 1px solid rgba(59,158,255,0.25);
  border-radius: 100px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ─── PROJECTS ─── */
.proj-list {
  display: flex;
  flex-direction: column;
}
.proj-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-2);
}
.proj-list li:last-child { border-bottom: none; }
.proj-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.proj-title {
  font-weight: 500;
  color: var(--cream);
  font-size: 1.02rem;
  border-bottom: 1px solid rgba(59,158,255,0.25);
  transition: color 0.2s ease;
}
.proj-title:hover { color: var(--blue-light); }
.proj-tags {
  font-size: 0.68rem;
  color: var(--blue);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.proj-year {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-left: auto;
  white-space: nowrap;
}
.proj-list p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

/* ─── EXPERIENCE ─── */
.exp-list {
  display: flex;
  flex-direction: column;
}
.exp-list > li {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-2);
}
.exp-list > li:last-child { border-bottom: none; }
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.exp-role {
  font-weight: 600;
  color: var(--cream);
  font-size: 1.02rem;
}
.exp-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.exp-org {
  display: block;
  font-size: 0.9rem;
  color: var(--blue);
  margin-bottom: 10px;
}
.exp-bullets {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 2px;
}
.exp-bullets li {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.75;
  padding-left: 14px;
  position: relative;
}
.exp-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--blue-dim);
  font-size: 0.7rem;
}

/* ─── SERVICE ─── */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.service-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.service-list li:last-child { border-bottom: none; }
.service-list strong { color: var(--cream); font-weight: 500; }

/* Skills inline chips */
.skills-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-chip {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-2);
  padding: 4px 12px;
  border-radius: 100px;
  transition: all 0.2s ease;
}
.skill-chip:hover {
  background: rgba(59,158,255,0.1);
  border-color: rgba(59,158,255,0.3);
  color: var(--blue-light);
}

/* ─── BLOG ─── */
.blog-list {
  display: flex;
  flex-direction: column;
}
.blog-list li {
  padding: 22px 0;
  border-bottom: 1px solid var(--border-2);
}
.blog-list li:last-child { border-bottom: none; }
.blog-list-title {
  display: block;
  font-weight: 500;
  color: var(--cream);
  font-size: 1.02rem;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(59,158,255,0.25);
  transition: color 0.2s ease;
  width: fit-content;
}
.blog-list-title:hover { color: var(--blue-light); }
.blog-list-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.blog-list p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

/* ─── FOOTER ─── */
.main-footer {
  padding: 40px 0 60px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ─── THEME TOGGLE (shared) ─── */
/* Mobile top-bar theme button — small circle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s ease;
  position: relative;
}
.theme-toggle:hover { transform: scale(1.15); }

/* hide spans inside the small mobile toggle — use data-attr approach instead */
.theme-toggle .theme-icon {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.theme-toggle .theme-icon--dark  { opacity: 1;  transform: rotate(0deg) scale(1); }
.theme-toggle .theme-icon--light { opacity: 0;  transform: rotate(-90deg) scale(0.5); }

body.light-mode .theme-toggle .theme-icon--dark  { opacity: 0;  transform: rotate(90deg) scale(0.5); }
body.light-mode .theme-toggle .theme-icon--light { opacity: 1;  transform: rotate(0deg) scale(1); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-dim); }

/* ═══════════════════════════════════════════════
   LIGHT MODE
   ═══════════════════════════════════════════════ */
body.light-mode {
  --bg:          #ffffff;
  --bg-2:        #f5f5f5;
  --surface:     #f0f0f0;
  --surface-2:   #e0e0e0;

  --blue:        #1a6fc4;
  --blue-light:  #2484e0;
  --blue-dim:    #0e559e;
  --cream:       #000000;
  --cream-dim:   #1a1a1a;

  --text:        #000000;
  --text-muted:  #2a2a2a;
  --text-dim:    #555555;

  --border:      rgba(0, 0, 0, 0.12);
  --border-2:    rgba(0, 0, 0, 0.07);
}
body.light-mode .sidebar {
  background: rgba(245, 245, 245, 0.95);
  border-right-color: rgba(0,0,0,0.1);
}
body.light-mode .sb-photo {
  border-color: var(--bg);
}
body.light-mode .mobile-bar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(0,0,0,0.1);
}
body.light-mode .sb-name em {
  background: none;
  -webkit-text-fill-color: #000;
  color: #000;
}
body.light-mode .sb-link { color: #2a2a2a; }
body.light-mode .sb-link:hover { background: rgba(26,111,196,0.08); color: var(--blue); }
body.light-mode .sb-nav-link { color: #2a2a2a; }
body.light-mode .sb-nav-link:hover,
body.light-mode .sb-nav-link.active { color: var(--blue); background: rgba(26,111,196,0.08); }
body.light-mode .sb-theme { color: #2a2a2a; border-color: rgba(0,0,0,0.15); }
body.light-mode .sb-theme:hover { border-color: var(--blue); color: var(--blue); }
body.light-mode .cs-heading { color: #000000; }
body.light-mode .content-section p strong { color: #000000; }
body.light-mode .news-body strong { color: #000000; }
body.light-mode .exp-role { color: #000000; }
body.light-mode .pub-title-link { color: #000000; }
body.light-mode .proj-title { color: #000000; }
body.light-mode .teach-title { color: #000000; }
body.light-mode .blog-list-title { color: #000000; }
body.light-mode .callout-item strong { color: #000000; }
body.light-mode .intro-meta { border-left-color: var(--blue); background: #f0f0f0; }
body.light-mode .skill-chip { background: #e8e8e8; color: #2a2a2a; border-color: rgba(0,0,0,0.1); }
body.light-mode .skill-chip:hover { background: rgba(26,111,196,0.1); color: var(--blue); border-color: var(--blue); }
body.light-mode .proj-card { background: #f0f0f0; border-color: rgba(0,0,0,0.08); }
body.light-mode .proj-card:hover { border-color: var(--blue); box-shadow: 0 8px 28px rgba(0,0,0,0.1); }
body.light-mode .teach-list li,
body.light-mode .pub-list li,
body.light-mode .service-list li,
body.light-mode .blog-list li,
body.light-mode .news-entry { border-bottom-color: rgba(0,0,0,0.08); }
body.light-mode .callout-banner { background: #f0f0f0; border-color: rgba(0,0,0,0.08); border-left-color: var(--blue); }
body.light-mode .callout-cta { background: rgba(26,111,196,0.05); border-top-color: rgba(0,0,0,0.08); }
body.light-mode .ri-item { border-bottom-color: rgba(0,0,0,0.08); }
body.light-mode .exp-list > li { border-bottom-color: rgba(0,0,0,0.08); }
body.light-mode .news-year-items { border-left-color: rgba(0,0,0,0.15); }
body.light-mode .news-entry::before { background: #ffffff; border-color: var(--blue); }

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --sidebar-w: 240px; }
  .main-content { padding: 60px 40px 0; }
}

@media (max-width: 700px) {
  .mobile-bar { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease);
    top: 56px;
  }
  .sidebar.open { transform: translateX(0); }

  .main-content {
    margin-left: 0;
    padding: 80px 22px 0;
  }

  .ri-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .ri-item-header { flex-direction: row; align-items: baseline; gap: 10px; }

  .exp-header { flex-direction: column; gap: 2px; }
  .proj-year  { margin-left: 0; }
}

/* ─── PUBLICATION LINKS ─── */
.pub-links {
  display: inline-flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.pub-ext-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue);
  border: 1px solid rgba(59,158,255,0.25);
  border-radius: 100px;
  padding: 2px 10px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.pub-ext-link:hover {
  background: rgba(59,158,255,0.1);
  border-color: var(--blue);
  color: var(--blue-light);
}

/* Google Scholar sidebar icon */
.sb-link-icon[style="font-size:0.7rem"] {
  font-size: 0.7rem;
}

/* ─── CALLOUT BANNER ─── */
.callout-banner {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0 32px;
}

.callout-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
}

.callout-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-item div { display: flex; flex-direction: column; gap: 4px; }

.callout-item strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
}

.callout-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 !important;
}

.callout-divider {
  height: 1px;
  background: var(--border-2);
  margin: 0 24px;
}

.callout-cta {
  padding: 16px 24px;
  border-top: 1px solid var(--border-2);
  background: rgba(59,158,255,0.04);
}

.callout-btn {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.02em;
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.callout-btn:hover {
  color: var(--blue-light);
  letter-spacing: 0.05em;
}

body.light-mode .callout-banner {
  background: var(--surface);
  border-color: var(--border);
  border-left-color: var(--blue);
}
body.light-mode .callout-cta {
  background: rgba(26,111,196,0.04);
}

/* ─── TEACHING ─── */
.teach-list {
  display: flex;
  flex-direction: column;
}

.teach-list li {
  padding: 22px 0;
  border-bottom: 1px solid var(--border-2);
}

.teach-list li:last-child { border-bottom: none; }

.teach-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.teach-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  border-bottom: 1px solid rgba(59,158,255,0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.teach-title:hover {
  color: var(--blue-light);
  border-color: var(--blue-light);
}

.teach-org {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue);
  background: rgba(59,158,255,0.08);
  border: 1px solid rgba(59,158,255,0.18);
  padding: 2px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.teach-list p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 10px !important;
}

.teach-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
  transition: color 0.2s ease, letter-spacing 0.2s ease;
  letter-spacing: 0.01em;
}

.teach-link:hover {
  color: var(--blue-light);
  letter-spacing: 0.04em;
}

/* ─── SERVICE CERTIFICATE LINK ─── */
.service-cert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.cert-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  border: 1px solid rgba(59,158,255,0.25);
  border-radius: 100px;
  padding: 3px 12px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cert-link:hover {
  background: rgba(59,158,255,0.1);
  border-color: var(--blue);
  color: var(--blue-light);
}

.cert-note {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-style: italic;
}

.cert-note code {
  font-family: monospace;
  color: var(--blue-dim);
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ─── CV SIDEBAR BUTTON ─── */
.sb-cv-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 20px;
  padding: 10px 16px;
  background: var(--blue-dim);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.25s ease, transform 0.2s ease;
  border: none;
}

.sb-cv-btn:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

/* ─── CV SECTION ─── */
.cv-actions {
  display: flex;
  gap: 14px;
  margin: 24px 0 16px;
  flex-wrap: wrap;
}

.cv-btn-primary,
.cv-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  cursor: pointer;
}

.cv-btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
}

.cv-btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59,158,255,0.3);
}

.cv-btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--border);
}

.cv-btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue-light);
  transform: translateY(-2px);
}

.cv-btn-icon {
  font-size: 1rem;
}

.cv-note {
  font-size: 0.8rem !important;
  color: var(--text-dim) !important;
  font-style: italic;
  margin-top: 4px !important;
}

.cv-note code {
  font-family: monospace;
  color: var(--blue-dim);
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 3px;
  font-style: normal;
}

body.light-mode .cv-btn-ghost {
  color: var(--cream);
  border-color: var(--border);
}

/* ─── PROJECTS BOX STYLE ─── */
.proj-list li {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 14px;
  border-bottom: none !important;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.proj-list li:hover {
  border-color: rgba(59,158,255,0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.proj-list li:last-child {
  margin-bottom: 0;
}

.proj-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--blue);
  transition: color 0.2s ease;
}

.proj-link:hover {
  text-decoration: underline;
  color: var(--blue-light);
}

/* ─── PROJECT GRID CARDS ─── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.proj-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.proj-card:hover {
  border-color: rgba(59,158,255,0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.proj-card .proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.proj-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

/* ─── EXPERIENCE SECTION TITLE ─── */
.exp-section-title {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.04em;
  margin: 24px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.exp-list > li:first-child .exp-section-title {
  margin-top: 0;
}

@media (max-width: 600px) {
  .proj-grid { grid-template-columns: 1fr; }
}

/* ─── CV SECTION COMPACT ─── */
.cv-section {
  padding: 24px 0 !important;
  border-bottom: 1px solid var(--border-2);
}

.cv-section .cv-actions {
  margin: 0;
}

/* ─── SMALLER PROJECT CARDS ─── */
.proj-card {
  padding: 14px 16px !important;
  gap: 6px !important;
}

.proj-card p {
  font-size: 0.85rem !important;
  line-height: 1.6 !important;
}

.proj-card .proj-title {
  font-size: 0.92rem !important;
}

.proj-card .proj-tags {
  font-size: 0.65rem !important;
}

.proj-link {
  font-size: 0.78rem !important;
  margin-top: 6px !important;
}

/* ─── RESEARCH INTERESTS — NARRATIVE STYLE ─── */
.ri-narrative {
  margin-bottom: 36px;
  max-width: 780px;
}

.ri-narrative p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 16px !important;
}

.ri-narrative strong {
  color: var(--cream);
  font-weight: 600;
}

.ri-themes {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border-2);
}

.ri-theme-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  transition: padding-left 0.2s ease;
}

.ri-theme-item:hover {
  padding-left: 8px;
  color: var(--text);
}

.ri-theme-item strong {
  color: var(--cream);
  font-weight: 600;
  margin-right: 4px;
}

body.light-mode .ri-narrative strong,
body.light-mode .ri-theme-item strong {
  color: #000;
}

/* ─── RESEARCH INTEREST BULLETS ─── */
.ri-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.ri-bullets li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.ri-bullets li::before {
  content: '●';
  color: var(--blue);
  font-size: 0.45rem;
  flex-shrink: 0;
  margin-top: 1px;
}
