/* ==========================================================================
   Modern theme overrides for academicpages
   Loaded after main.css. Defines a light/dark palette via CSS variables and
   restyles the navbar, hero, sections, archive items, sidebar and footer.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Light palette */
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --bg-soft: #f4f4ef;
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --border: #e6e4dd;
  --border-strong: #d4d0c4;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --accent-strong: #4338ca;
  --success: #059669;
  --highlight: #fde68a;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 0 4px rgba(79, 70, 229, 0.12);

  --container: 1100px;
  --container-narrow: 820px;

  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] {
  --bg: #0b1020;
  --bg-elev: #11172b;
  --bg-soft: #161e36;
  --text: #e6e8ee;
  --text-muted: #a8b0c0;
  --text-subtle: #8089a0;
  --border: #1e2742;
  --border-strong: #2a3457;
  --accent: #818cf8;
  --accent-soft: #1c224a;
  --accent-strong: #a5b4fc;
  --success: #34d399;
  --highlight: #facc15;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 4px rgba(129, 140, 248, 0.18);
  color-scheme: dark;
}

/* ---------- Base ---------- */
html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font-sans) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  scroll-behavior: smooth;
}

body {
  font-size: 16.5px;
  line-height: 1.65;
}

a, a:visited {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p {
  color: var(--text);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Disable theme intro fade-in animations (they caused FOUT/washed-out content) */
#main, .masthead, .page__footer, .page, .page__title, .breadcrumbs,
.greedy-nav, header, .author__avatar, .author__content, .author__urls-wrapper {
  -webkit-animation: none !important;
          animation: none !important;
  opacity: 1 !important;
}

/* ---------- Top navbar (replaces .masthead) ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
          backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-nav__wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-nav__brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.site-nav__brand:hover {
  color: var(--accent);
  text-decoration: none;
}
.site-nav__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0;
  box-shadow: var(--shadow-sm);
}
.site-nav__links {
  display: flex;
  gap: 0.25rem;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  align-items: center;
}
.site-nav__links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.site-nav__links a:hover {
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
}
.site-nav__theme {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.site-nav__theme:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}
.site-nav__theme svg { width: 18px; height: 18px; }
.site-nav__theme .icon-sun { display: none; }
html[data-theme="dark"] .site-nav__theme .icon-sun { display: inline; }
html[data-theme="dark"] .site-nav__theme .icon-moon { display: none; }

.site-nav__burger {
  display: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.site-nav__burger svg { width: 18px; height: 18px; }

/* Hide the theme's old masthead since we render our own nav */
.masthead { display: none !important; }

@media (max-width: 800px) {
  .site-nav__links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }
  .site-nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav__links a {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
  }
  .site-nav__burger { display: inline-flex; }
}

/* ---------- Page container override ---------- */
#main {
  max-width: var(--container) !important;
  margin: 0 auto !important;
  padding: 2rem 1.25rem 4rem !important;
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2.5rem;
  float: none !important;
}
#main:after, #main:before { content: none !important; display: none !important; }

/* When there's no sidebar, collapse the grid */
#main:not(:has(.sidebar)),
.page--home #main {
  display: block !important;
}

@media (max-width: 900px) {
  #main { grid-template-columns: 1fr !important; gap: 1.5rem; }
}

.page, .archive {
  width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  min-width: 0;
}

.page__inner-wrap > header,
.page__inner-wrap > .page__content,
.page__content {
  max-width: var(--container-narrow);
}

.page__title {
  font-size: clamp(1.6rem, 1.4rem + 1vw, 2.2rem) !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  margin-top: 0.4rem !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.archive .page__title {
  margin-bottom: 1.75rem !important;
}

.page__content p,
.page__content li {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}
.page__content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}
.page__content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 2rem;
}

/* ---------- Sidebar (modern card, used on sub-pages) ---------- */
.sidebar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0 !important;
  width: 100% !important;
  float: none !important;
  position: sticky;
  top: 80px;
  align-self: start;
}
@media (max-width: 900px) {
  .sidebar { position: static; margin-bottom: 1.5rem !important; }
}

.author__avatar {
  display: block !important;
  width: auto !important;
  margin-bottom: 1rem;
}
.author__avatar img {
  width: 110px !important;
  height: 110px !important;
  max-width: 100% !important;
  border-radius: var(--radius-full) !important;
  object-fit: cover;
  border: 3px solid var(--bg-elev) !important;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-md) !important;
  padding: 0 !important;
}

.author__content {
  display: block !important;
  padding: 0 !important;
}
.author__name {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  margin: 0.5rem 0 0.25rem !important;
  color: var(--text) !important;
}
.author__bio {
  color: var(--text-muted) !important;
  font-size: 0.92rem !important;
  margin: 0 0 1rem !important;
}

.author__urls-wrapper {
  display: block !important;
}
.author__urls-wrapper > button { display: none !important; }
.author__urls {
  display: block !important;
  position: static !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.author__urls:before, .author__urls:after { display: none !important; }
.author__urls li {
  margin-bottom: 0.25rem;
  font-size: 0.92rem;
}
.author__urls a {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem !important;
  color: var(--text-muted) !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.author__urls a:hover {
  background: var(--accent-soft);
  color: var(--accent) !important;
  text-decoration: none !important;
}

/* ---------- Archive items (publication / teaching cards) ---------- */
.list__item, .grid__item {
  margin-bottom: 0 !important;
}
.archive__item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.archive__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.archive__item-title {
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  margin: 0 0 0.5rem !important;
  letter-spacing: -0.01em;
}
.archive__item-title a, .archive__item-title a:visited {
  color: var(--text) !important;
}
.archive__item-title a:hover {
  color: var(--accent) !important;
  text-decoration: none !important;
}
.archive__item-title li {
  list-style: none;
  display: inline;
  padding: 0;
  margin: 0;
}

.archive__item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0.4rem 0;
}
.archive__item p strong { color: var(--text); }

/* ---------- Modern action chip buttons (replace icon-only links) ---------- */
.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.pub-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted) !important;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all var(--transition);
}
.pub-action:hover {
  background: var(--accent-soft);
  color: var(--accent) !important;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.pub-action svg { width: 14px; height: 14px; }

/* venue badge */
.pub-venue {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent) !important;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}
.pub-venue a, .pub-venue a:visited {
  color: var(--accent) !important;
}
.pub-citation {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 0.4rem !important;
}
.pub-citation strong {
  color: var(--text);
  font-weight: 600;
}

/* keep the old icon styles from breaking layout */
.pdf-link::before, .code-link::before, .video-link::before {
  display: none !important;
}

/* ---------- Hero (homepage) ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0 3rem;
}
.hero__intro { grid-column: 1; grid-row: 1; }
.hero__avatar { grid-column: 2; grid-row: 1; }
@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: left;
    padding: 1.5rem 0 2rem;
  }
  .hero__avatar { grid-column: 1; grid-row: 1; justify-self: start; }
  .hero__intro { grid-column: 1; grid-row: 2; }
}
.hero__avatar {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--bg-soft);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
@media (max-width: 800px) {
  .hero__avatar {
    width: 140px; height: 140px;
  }
}
.hero__eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.hero__name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 1.6rem + 2.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 0.6rem;
  color: var(--text);
}
.hero__role {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.hero__role a { color: var(--text); font-weight: 600; }
.hero__role a:hover { color: var(--accent); }
.hero__lede {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.65;
  margin: 0 0 1.5rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text) !important;
  transition: all var(--transition);
  text-decoration: none !important;
}
.hero__btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.hero__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff !important;
}
.hero__btn--primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.hero__btn svg { width: 16px; height: 16px; }

/* ---------- Section heading ---------- */
.section {
  padding: 2rem 0;
  scroll-margin-top: 80px;
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.section__title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.section__title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 22px;
  background: linear-gradient(180deg, var(--accent), #a855f7);
  border-radius: 3px;
}
.section__more {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.section__more:hover { gap: 0.5rem; text-decoration: none; }

/* ---------- About ---------- */
.about-text p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0 0 1rem;
  max-width: 75ch;
}
.about-text strong, .about-text a {
  color: var(--text);
}
.about-text a {
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.about-text a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* ---------- Research interests ---------- */
.interests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.interest-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.interest-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.interest-card__icon {
  display: inline-flex;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.interest-card__icon svg { width: 20px; height: 20px; }
.interest-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}
.interest-card__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---------- News timeline ---------- */
.news {
  position: relative;
  padding-left: 1rem;
}
.news::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border-strong), transparent);
}
.news__year {
  position: relative;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin: 1.5rem 0 0.75rem -1rem;
  padding-left: 1.6rem;
}
.news__year:first-child { margin-top: 0; }
.news__year::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border-radius: var(--radius-full);
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.news__item {
  position: relative;
  padding: 0.65rem 0 0.65rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}
.news__item::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 1.05rem;
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-strong);
  margin-left: 1px;
}
.news__date {
  flex-shrink: 0;
  width: 5.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.news__body {
  font-size: 0.96rem;
  color: var(--text);
  line-height: 1.55;
  flex: 1;
}
.news__body strong { color: var(--text); }
.news__body a { color: var(--accent); }
.news__body a:hover { color: var(--accent-strong); }
.news__body .badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.news__more-wrap {
  text-align: center;
  margin-top: 1.5rem;
}
.news__more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.news__more:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* hidden state for collapsed news items */
.news__item.is-hidden,
.news__year.is-hidden { display: none; }
.news.is-expanded .news__item.is-hidden,
.news.is-expanded .news__year.is-hidden { display: flex; }
.news.is-expanded .news__year.is-hidden { display: block; }

/* ---------- Selected publications row ---------- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.pub-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.pub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.pub-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.4;
}
.pub-card__title a { color: var(--text); }
.pub-card__title a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Talks list ---------- */
.talks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.talk-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), background var(--transition);
}
.talk-row:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 50%, var(--bg-elev));
}
.talk-row__date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.talk-row__venue {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.talk-row__title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}
.talk-row__title a { color: var(--text); }
.talk-row__title a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 600px) {
  .talk-row { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- CV page ---------- */
.cv-page {
  min-height: calc(100vh - 120px);
}
.cv-page__viewer {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.cv-page__viewer iframe {
  width: 100%;
  height: min(1100px, calc(100vh - 170px));
  min-height: 760px;
  border: 0;
  display: block;
  background: var(--bg-elev);
}
@media (max-width: 700px) {
  .cv-page__viewer iframe {
    height: 760px;
    min-height: 640px;
  }
}

/* ---------- Footer ---------- */
.page__footer {
  display: none !important;
  background: transparent !important;
  border-top: 0 !important;
  box-shadow: none !important;
  color: var(--text-muted) !important;
}
.page__footer footer { max-width: var(--container) !important; padding: 2rem 1.25rem !important; }
.page__footer-follow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  flex-wrap: wrap;
}
.page__footer-follow ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.page__footer-follow a {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.page__footer-follow a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
}
.page__footer-copyright {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-subtle);
  padding: 0 1.25rem 1.5rem;
}
.page__footer-copyright a { color: var(--text-muted); }

/* ---------- Hide the old "About me" page title that conflicts with hero ---------- */
.page--home .page__title { display: none; }
.page--home #main { padding-top: 1rem !important; }
.page--home .page__inner-wrap > header { display: none; }
.page--home .page__content > p:first-of-type { margin-top: 0; }
.page--home .page__inner-wrap > .page__content,
.page--home .page__content {
  max-width: var(--container);
}
.page--home .page__meta,
.page--home .page__taxonomy,
.page--home .page__share { display: none; }

/* ---------- Code blocks ---------- */
code, pre {
  font-family: var(--font-mono) !important;
  background: var(--bg-soft) !important;
  border-radius: var(--radius-sm);
  font-size: 0.88em;
}
pre { padding: 1rem 1.25rem; border: 1px solid var(--border); }

/* Buttons (override theme btn) */
.btn {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: var(--radius-full) !important;
  padding: 0.5rem 1rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all var(--transition);
  display: inline-block;
}
.btn:hover {
  background: var(--accent-strong) !important;
  transform: translateY(-1px);
}

/* Misc theme cleanup */
.page__taxonomy { display: none; }
.page__related, .page__share { border-top-color: var(--border) !important; }
.page__inner-wrap { padding-bottom: 0 !important; }

figcaption {
  color: var(--text-subtle);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 0.5rem;
}
img { border-radius: var(--radius-md); }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
