/* Typography & base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #333;
  background-color: #faf7f5;
  font-size: 20px; /* base size */
}

a {
  color: #7a2732;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: #3b2023;
  margin-top: 0;
}

/* Layout */
.page {
  max-width: 1250px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  font-size: 1.3rem; /* ~19–20px on main content pages */
}

.page-home {
  padding-top: 5rem;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(250, 247, 245, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #e4d6c5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
}

.site-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.site-nav a {
  margin-left: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  font-size: 1.2rem; /* nav links larger */
}

.site-nav a.active {
  border-bottom: 2px solid #7a2732;
  padding-bottom: 0.25rem;
}

/* Hero/banner */
.hero-banner {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  padding-top: 40px; /* pushes everything down over darker part */
  color: #fff;
}

.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/banner.jpg");
  background-size: cover;
  background-position: center 90%;
  background-repeat: no-repeat;
  z-index: -2;
}

/* gradient overlay: light at top, black at bottom */
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.0) 0%,
    rgba(0, 0, 0, 0.35) 35%,
    rgba(0, 0, 0, 0.5) 85%
  );
  z-index: -1;
}

/* Home page layout */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: flex-start;
  margin-top: 0;
}

.hero-panel {
  background: rgba(0, 0, 0, 0.55);  /* see-through dark panel */
  border-radius: 14px;
  padding: 2rem 2.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  column-gap: 0rem;
  backdrop-filter: blur(2px);
}

.home-photo img {
  width: 260px;
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.home-text h1,
.home-text .subtitle,
.home-text p {
  color: #fff;
}

.home-text hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

/* Home heading sizes */
.home-text h1 {
  font-size: 3.8rem;
  margin-bottom: 0.4rem;
}

.home-text .subtitle {
  font-size: 1.4rem;
  color: #c6c2bd;
}

.home-text p {
  font-size: 1.3rem;
  line-height: 1.6;
  letter-spacing: 0.015em;
}

/* Social links on dark background */
.social-links {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.social-links img,
.social-links i {
  width: 20px !important;
  height: 20px !important;
  display: inline-block;
  object-fit: contain;
  margin-right: 0.9rem;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.7));
}

.social-links li {
  display: flex;
  align-items: center;
  margin-bottom: 0.6rem;
}

.social-links a {
  color: #c6c2bd;
  font-size: 1.4rem;
}

.social-links a:hover {
  color: #ffffff;
}

/* Sidebar + content layout for inner pages */
.page-research,
.page-teaching {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 3rem;
}

.sidebar {
  border-right: 1px solid #e4d6c5;
  padding-right: 2rem;
  position: sticky;
  top: 4.5rem;        /* how far below the header it sits */
  align-self: flex-start;  /* <-- critical for sticky inside grid */
}

.sidebar h2 {
  margin-bottom: 1rem;
  font-size: 1.65rem;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li {
  margin-bottom: 0.5rem;
}

.sidebar a {
  font-size: 1.15rem;
}

/* Section headings */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

/* Add separation before any top-level section heading except the first */
h2.section-heading-title {
  margin-top: 10rem;        /* space above section */
  padding-top: 3rem;
  border-top: 5px solid #e0d0be;
}

.section-heading h2 {
  margin: 0;
}

.section-count {
  color: #999;
  font-size: 0.95rem;
}


/* ---------- PUBLICATION LIST LAYOUT ---------- */
.pub {
  border-top: 1px solid #e0d0be;
  padding: 0.6rem 0;
}

.pub:last-of-type {
  border-bottom: 1px solid #e0d0be;
}

/* summary row layout */
.pub summary {
  list-style: none;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr); /* Year | Main block */
  gap: 0.4rem 1.5rem;
  cursor: pointer;
  align-items: baseline;
  padding: 0.35rem 0;
  transition: background-color 120ms ease, color 120ms ease;
}

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

/* hover + open highlights */
.pub summary:hover,
.pub[open] summary {
  background-color: #f7f3ed;
  border-bottom: none;
}

.pub[open] {
  border-color: #d1bfa9;
}

/* left column (year) */
.pub-year {
  font-weight: 400;
  color: #777;
}

/* main column: title → journal → authors */
.pub-main {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

/* Title: large, not bold, maroon */
.pub-title {
  font-weight: 400;
  font-size: 1.25rem;
  color: #7a2732;
  line-height: 1.33;
}

/* Journal: bold, black */
.pub-journal {
  font-style: normal;
  font-weight: 600;
  font-size: 1.18rem;
  color: #111;
  margin-top: 0.5rem; /* adjust as needed */
}

/* Authors: slightly larger, medium gray */
.pub-authors {
  font-size: 1.1rem;
  color: #5c5c5c;
  margin-top: 0.1rem;
  margin-bottom:0rem;
}

/* expanded dropdown body */
.pub-body {
  margin-top: 0.9rem;
  padding-left: calc(70px + 1.5rem);
}

.pub-body h4 {
  font-family: "Source Sans Pro", sans-serif;
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  letter-spacing: 0.0em;
  text-transform: uppercase;
  color: #5a3a32;
}

.pub-body p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
  font-size: 1.11rem;
}

.pub[open] .pub-body {
  background-color: #f7f3ed;  /* VERY light grey */
  border-radius: 4px;
  padding: 1.2rem 1.6rem 1rem 1.6rem;      /* inner padding */
  margin-top: 0.0rem;                      /* spacing from summary row */
}

.pub-award {
  margin: 0 0 0.6rem 0; /* space before Abstract */
  font-size: 0.9em;    /* optional: slightly smaller */
  color: #666;
  display: flow-root; 
}

.pub-award em {
  font-style: italic;
}

.pub-meta {
  font-size: 0.98rem;
  margin-bottom: 0.0rem;
}

.pub-label {
  font-weight: 600;
}

.pub-figure {
  float: right;
  max-width: 380px;
  margin: 0 0 0.3rem 1.25rem; /* space from text */
}

.pub-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}


.pub-figure img:hover {
  transform: scale(1.03);
  box-shadow: 0 0 14px rgba(122, 39, 50, 0.35); /* soft maroon glow */
}

.pub-working .pub-figure {
  margin-top: 1.5rem;
}

/* One-column layout for working papers and ongoing projects */
.pub-working summary,
.pub-project summary {
  grid-template-columns: minmax(0, 1fr);  /* no year column */
}

.pub-working .pub-body,
.pub-project .pub-body {
  padding-left: 1.6rem;  /* small indent, but not the fake year offset */
}

/* Ensure all summary blocks (articles, book chapters, working papers) align properly */
details.pub summary {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

details.pub summary .pub-main {
  display: flex;
  flex-direction: column;
}


.figure-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.figure-modal.is-open {
  display: flex;
}

.figure-modal-inner {
  background: #f7f0e6;
  border-radius: 6px;
  padding: 1rem;
  max-width: 900px;
  width: 90%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  position: relative;
}

.figure-modal-inner img {
  width: 100%;
  height: auto;
  display: block;
}

.figure-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #7a2732;
}

/* links at bottom of abstract – button style */
.pub-links {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  clear:both;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e0d0be;
  background-color: #f7efe4; /* lighter, gold-ish tint */
  font-size: 0.95rem;
  color: #7a2732;
  text-decoration: none;
  white-space: nowrap;
}

.pub-link i {
  font-size: 0.85rem;
}

/* default hover */
.pub-link:hover {
  background-color: #e7dbcb;
  border-color: #d1bfa9;
  text-decoration: none;
}

/* primary button: Publication */
.pub-link.primary {
  background-color: #8a5a63;
  border-color: #7a4e56;
  color: #fff8f5;     /* warm bright neutral */
  font-weight: 600;
}
.pub-link.primary:hover {
  background-color: #5b1d25;
  border-color: #5b1d25;
}

/* --- Cite modal --- */
.cite-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.cite-modal.is-open {
  display: flex;
}

.cite-modal-inner {
  background: #f7f0e6;
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  position: relative;
}

.cite-modal-inner h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cite-text {
  width: 100%;
  min-height: 180px;
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.4;
  border: 1px solid #d6c7b5;
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  background: #fffaf4;
  resize: vertical;
}

.cite-actions {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.6rem;
}

.cite-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #7a2732;
}

/* Courses */
.course {
  border-top: 1px solid #e4d6c5;
  padding: 0.8rem 0;
}

.course:last-of-type {
  border-bottom: 1px solid #e4d6c5;
}

.course summary {
  list-style: none;
  display: flex;
  gap: 1rem;
  cursor: pointer;
  align-items: baseline;
}

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

.course-code {
  font-weight: 600;
  color: #555;
  min-width: 100px;
}

.course-title {
  font-weight: 600;
}

.course-body {
  margin-top: 0.6rem;
  padding-left: 100px;
}

/* CV */
.page-cv .content {
  max-width: 100vw;   /* wider CV page */
}

/* CV iframe wrapper */
.cv-embed-wrapper {
  margin-top: 1.5rem;
  border: 1px solid #e4d6c5;
  background-color: #fff;
}

/* Optional: make the iframe itself wider with more breathing room */
.cv-embed-wrapper iframe {
  width: 100%;
  height: 1400px;
}

/* Footer */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  border-top: 1px solid #e4d6c5;
  padding: 1rem 1.5rem;
  background-color: #e7dbcb;
  font-size: 0.95rem;
  z-index: 20;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer a {
  margin-left: 1rem;
}

/* Responsive tweaks */
/* Force cite modal to be a full-screen overlay */
.cite-modal {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.35) !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.cite-modal.is-open {
  display: flex !important;
}

.cv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  background: #5a0f14;          /* same maroon as .pub-link.primary */
  color: #f8f4f4;               /* light text */
  padding: 12px 22px;           /* bigger button */
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;

  text-decoration: none;
  transition: background 0.2s ease;
}

.cv-download-btn:hover {
  background: #73161c;          /* same hover tone as pub-link.primary:hover */
}

.cv-download-btn i {
  font-size: 1.2rem;
}

/* =========================================
   TEACHING PAGE STYLES (UPDATED)
   Larger fonts + tighter top spacing
   ========================================= */

.page-teaching {
  display: block;
}

.page-teaching .teaching-content {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;

  /* Reduced top padding further */
  padding: 0.75rem 1.5rem 4rem;
}

/* Section headings */
.page-teaching .teaching-section {
  margin-bottom: 2.75rem;
}

.page-teaching .teaching-section-title {
  font-family: "Playfair Display", serif;
  font-size: 2.05rem;    /* bigger */
  font-weight: 600;
  color: #4a0e1f;
  margin: 0.35rem 0 0.9rem;  /* tighter above */
}

/* First section even tighter */
.page-teaching .teaching-section:first-of-type .teaching-section-title {
  margin-top: 0.1rem;
}

/* --- Course dropdown container --- */
.page-teaching details.course {
  border-top: 1px solid #e2e2e2;
  padding: 1rem 0;
}

.page-teaching .teaching-section details.course:last-of-type {
  border-bottom: 1px solid #e2e2e2;
}

/* --- Summary row --- */
.page-teaching details.course summary {
  cursor: pointer;
  list-style: none;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0.55rem 0;
  font-weight: 600;

  /* Larger summary fonts */
  font-size: 1.22rem;

  font-family: "Source Sans Pro", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.page-teaching summary::-webkit-details-marker {
  display: none;
}

/* Chevron */
.page-teaching details.course summary::after {
  content: "▾";
  font-size: 0.9rem;
  margin-left: 1rem;
  color: #999;
  transition: transform 0.15s ease, color 0.15s ease;
}

.page-teaching details.course summary:hover {
  color: #4a0e1f;
}

.page-teaching details[open] summary {
  color: #4a0e1f;
}

.page-teaching details[open] summary::after {
  transform: rotate(180deg);
  color: #4a0e1f;
}

/* --- Course code + title formatting --- */
.page-teaching .course-main {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.page-teaching .course-code {
  font-weight: 700;
  color: #4a0e1f;
  letter-spacing: 0.02em;

  /* larger */
  font-size: 1.15rem;
}

.page-teaching .course-title {
  font-weight: 500;
  font-size: 1.15rem;
  color: #222;
}

/* --- Body text --- */
.page-teaching .course-body {
  margin-top: 0.85rem;
  padding-left: 0.25rem;

  /* Larger body font */
  font-size: 1.05rem;
  line-height: 1.7;
  color: #333;
}

.page-teaching .course-body p {
  margin: 0 0 0.7rem;
}

/* Meta text */
.page-teaching .course-meta p {
  margin: 0 0 0.25rem;
  font-size: 1rem;        /* larger */
  color: #555;
}

/* --- Syllabus button --- */
.page-teaching .course-links {
  margin-top: 1.2rem;
}

.page-teaching .course-links .pub-link {
  font-size: 1rem;         /* bigger */
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
}


@media (max-width: 700px) {

 :root {
    --site-header-height: 72px;
  }
    
  /* Remove extra bottom padding now that footer is static */
  .page {
    padding-bottom: 1.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Header */
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.6rem 1rem 0.4rem;   /* TIGHTER */
    position: sticky;
  top: 0;
  z-index: 100;
  }

  .site-brand {
    font-size: 2.05rem;
    line-height: 1.08;
    margin: 0 0 0.25rem 0;         /* TIGHTER */
  }

  .site-nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: hidden;
    padding-bottom: 0;
  }

  .site-nav a {
    margin-left: 0;
    margin-right: 0.45rem;
    font-size: 1.05rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid #e0d0be;
    border-radius: 999px;
    background: #f7efe4;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .site-nav a:last-child {
    margin-right: 0;
  }

  .site-nav a.active {
    border-bottom: none;
    background: #8a5a63;
    border-color: #7a4e56;
    color: #fff8f5;
  }

  /* Home hero */
  .page-home {
    padding-top: 0;
  }

  .hero-banner {
    min-height: auto;
    padding-top: 15px;
    padding-bottom: 10px;
  }

  .home-layout {
    display: block;
    margin-top: 0;
  }

  .hero-panel {
    padding: 1rem 1rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.72);
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    grid-template-areas:
      "photo title"
      "links title"
      "rule  rule"
      "body  body";
    column-gap: 0.95rem;
    row-gap: 0.2rem;
  }

  /* Title block (mobile replacement text) */
  .hero-panel::before {
    content:
      "\A"
      "Assistant Professor\A"
      "Political Science\A"
      "Florida State";
    grid-area: title;
    display: block;
    font-size: 1.15rem;
    line-height: 1.4;
    font-weight: 600;
    color: #cfcac4;
    white-space: pre-line;
    margin: 0;
  }

  /* Grid placement */
  .home-photo { grid-area: photo; }
  .social-links { grid-area: links; }

  .home-text { grid-area: body; }
  .home-text h1 { display: none; }

  .home-text hr { grid-area: rule; }

  /* Home photo */
  .home-photo img {
    grid-area: photo;
    width: 140px;
    border-radius: 10px;
    margin: 0;
    margin-bottom: 0.45rem;
  }

  /* Home title + text */
  .home-text h1 {
    display: none;
  }

  .home-text .subtitle {
    display: none;
  }

  .home-text hr {
    grid-area: rule;
    margin: 0.15rem 0 0.6rem;
  }

  .home-text {
    grid-column: 1 / -1;
  }

  .home-text p {
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0 0 0.85rem 0;
  }

  /* Social links */
  .social-links {
    grid-area: links;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
  }

  .social-links li {
    margin: 0 0.15rem 0.15rem 0;
    padding: 0.30rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.20);
  }

  .social-links li:last-child {
    margin-right: 0;
  }

  .social-links a {
    color: #e6e2dd;
    display: inline-flex;
    align-items: center;
  }

  .social-links li:first-child a {
    font-size: 1.0rem;
    line-height: 1;
  }

  .social-links li:not(:first-child) a {
    font-size: 0;
    line-height: 0;
  }

  .social-links li:not(:first-child) a i {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
  }

  .social-links li:not(:first-child) a img {
    width: 18px !important;
    height: 18px !important;
    display: inline-block;
  }

  .social-links i,
  .social-links img {
    margin-right: 0;
  }

  .social-links li:first-child i {
    margin-right: 0.55rem;
  }

  .social-links li:first-child img {
    margin-right: 0.55rem;
  }

  /* Hide entire Bluesky link on mobile */
  .social-links li:has(img[alt="Bluesky"]) {
    display: none;
  }

  /* Inner pages */
  .page-research,
  .page-teaching {
    grid-template-columns: 1fr;
  }

  /* Base sidebar (teaching can still use this) */
  .sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid #e4d6c5;
    padding-right: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .pub summary {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .pub-body {
    padding-left: 60px;
  }
/* =========================
   RESEARCH: mobile sticky sub-nav
   ========================= */

  /* Force single-column layout */
  .page-research {
    display: block;
    padding-top: 0;
  }

  /* -------------------------
     Base sidebar (non-research)
     ------------------------- */
  .sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid #e4d6c5;
    margin: 0 0 1rem 0;
    padding: 0 0 0.75rem 0;
  }
  /* -------------------------
     Research: sticky sections bar
     ------------------------- */
  .page-research .sidebar {
    position: sticky;
    top: var(--site-header-height);                /* height of mobile header */
    z-index: 50;

    margin: 0;
    padding: 0.25rem 0 0.35rem;

    background: #fbf6ef;        /* solid mask so content never bleeds through */
    border-top: 1px solid rgba(0,0,0,0.10);
    border-bottom: 1px solid rgba(0,0,0,0.10);
  }

  /* Hide sidebar title */
  .page-research .sidebar h2 {
    display: none;
  }

  /* -------------------------
     Sections label
     ------------------------- */
  .page-research .sidebar::before {
    content: "Sections";
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.65;
    padding: 0.35rem 0.75rem 0.2rem;
  }

  /* -------------------------
     Horizontal sub-nav
     ------------------------- */
  .page-research .sidebar ul {
    display: flex;
    gap: 0.6rem;

    margin: 0;
    padding: 0.3rem 0.75rem 0.45rem;

    list-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .page-research .sidebar li {
    flex: 0 0 auto;
  }

  /* Sub-nav pills (clearly secondary) */
.page-research .sidebar a {
  display: inline-block;
  white-space: nowrap;

  padding: 0.5rem 0.95rem;
  font-size: 1.0rem;
  font-weight: 600;
  line-height: 1;

  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.10);
  background: transparent;

  color: #7a4e56;
  text-decoration: none;
}

/* Publication action pills (mobile): smaller, secondary */
.page-research details.pub .pub-links a {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;

  border-radius: 999px;
  line-height: 1.1;
}


  /* -------------------------
     Content spacing below sticky bar
     ------------------------- */
  .page-research .content {
    padding-top: 0.3rem;
  }

  .page-research h2:first-of-type {
    margin-top: 0.4rem;
  }

  /* -------------------------
     Publication typography (mobile)
     ------------------------- */
  .page-research .pub-title,
  .page-research .pub-title a {
    font-size: 1.1rem;
    line-height: 1.35;
  }

  .page-research .pub-journal {
    font-size: 0.95rem;
    font-weight: 600;
  }

  .page-research .pub-authors {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .page-research .pub-year {
    font-size: 0.9rem;
    opacity: 0.75;
  }

  /* Research: awards / notes text slightly smaller on mobile */
  .page-research .pub-award,
  .page-research .pub-awards,
  .page-research .pub-note {
    font-size: 0.85rem;
    line-height: 1.3;
    opacity: 0.85;
  }

/* Abstract label + abstract text: smaller than collapsed metadata */
.page-research .pub-body h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0.6rem 0 0.35rem;
  opacity: 0.85;
}

/* Only shrink paragraphs inside the expanded body (not everywhere) */
.page-research .pub-body p {
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}



  /* -------------------------
     Option A: inline-right figure on mobile (when expanded)
     ------------------------- */
  .page-research details.pub[open] .pub-figure {
    float: right;
    width: 44%;
    max-width: 190px;
    margin: 0.2rem 0 0.6rem 0.75rem; /* top/right/bottom/left */
  }

  .page-research details.pub[open] .pub-figure img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 10px;
  }

  /* If the screen is too narrow, fall back to centered */
  @media (max-width: 420px) {
    .page-research details.pub[open] .pub-figure {
      float: none;
      width: 100%;
      max-width: none;
      margin: 0.6rem 0 0.8rem;
    }

    .page-research details.pub[open] .pub-figure img {
      width: min(320px, 92%);
      margin: 0 auto;
    }
  }


  /* =========================
     TEACHING (mobile)
     ========================= */
  .page-teaching details.course {
    margin: 0.0rem 0;
  }

  .page-teaching details.course > summary {
    display: block;
    text-align: left;
    position: relative;
    padding: 0.25rem 2.1rem 0.25rem 0;  /* top/right/bottom/left */
    margin: 0;
    list-style: none;
  }

  .page-teaching details.course > summary::-webkit-details-marker {
    display: none;
  }

  .page-teaching details.course > summary::after {
    content: "▾";
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.7;
  }

  .page-teaching details.course[open] > summary::after {
    content: "▴";
  }

  .page-teaching .course-main {
    display: block;
    margin: 0;
    padding: 0;
  }

  .page-teaching .course-code,
  .page-teaching .course-title {
    display: block;
    margin: 0;
    padding: 0;
  }

  .page-teaching .course-title {
    margin-top: 0.1rem;
  }

  .page-teaching .course-body {
    padding-top: 0.3rem;
    padding-left: 0;
  }

  .page-teaching .teaching-section-title {
    font-size: 2.15rem;
    line-height: 1.05;
    margin: 0.8rem 0 0.35rem;
  }

  .page-teaching hr {
    margin: 0.35rem 0;
  }

  .page-teaching .teaching-section-title + hr {
    margin-top: 0.55rem;
    margin-bottom: 0.2rem;
  }

  .page-teaching details.course + hr {
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
  }

  /* CV page: hide embedded PDF on mobile, keep download link */
  .page-cv .cv-embed-wrapper {
    display: none;
  }

  /* Footer */
  .site-footer {
    position: static;
  }

  .footer-inner {
    flex-wrap: wrap;
  }

  .site-footer a {
    margin-left: 0;
    margin-right: 1rem;
    white-space: nowrap;
  }
}

