/* ═══════════════════════════════════════════════
   DESIGN SYSTEM — Academic Editorial
   ═══════════════════════════════════════════════ */

:root {
  /* Sidebar */
  --sidebar-bg: #3D4F5F;
  --sidebar-text: #E4E9ED;
  --sidebar-text-muted: #B6C5D1;
  --sidebar-width: 340px;

  /* Content */
  --content-bg: #F8F9FB;
  --text: #2A2E33;
  --text-muted: #525A62;
  --text-light: #6E7780;

  /* Accent */
  --accent: #4A7C9B;
  --accent-hover: #5E94B5;
  --accent-glow: rgba(74, 124, 155, 0.15);

  /* Surface */
  --card-bg: #FFFFFF;
  --border: #D8DDE3;
  --border-light: #E9ECF0;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Libre Franklin', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --section-gap: 5rem;
  --content-max: 720px;
  --content-pad: 3.5rem;
}


/* ═══════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--content-bg);
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

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

img {
  max-width: 100%;
  display: block;
}

strong {
  font-weight: 500;
}

em {
  font-style: italic;
}


/* ═══════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  z-index: 100;
  overflow-y: auto;
  /* Subtle texture — noise-like gradient */
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(74, 124, 155, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(74, 124, 155, 0.03) 0%, transparent 50%);
}

.sidebar__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 2.75rem 2.25rem;
}

.sidebar__top {
  text-align: center;
}

/* Photo */
.sidebar__photo {
  width: 130px;
  height: 130px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid rgba(74, 124, 155, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06),
              0 4px 16px rgba(0, 0, 0, 0.3);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.sidebar__photo:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(74, 124, 155, 0.12),
              0 4px 16px rgba(0, 0, 0, 0.3);
}

.sidebar__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.sidebar__photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 124, 155, 0.1);
  color: var(--sidebar-text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* Name & affiliation */
.sidebar__name {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #F0F3F6;
  margin-bottom: 0.5rem;
}

.sidebar__title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.sidebar__affiliation {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--sidebar-text-muted);
  line-height: 1.5;
}

/* Accent line */
.sidebar__accent-line {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 1.75rem auto;
  opacity: 0.5;
}

/* Navigation */
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0;
}

.sidebar__nav-link {
  display: block;
  padding: 0.55rem 1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sidebar-text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.3s ease;
}

.sidebar__nav-link:hover {
  color: var(--sidebar-text);
  border-left-color: rgba(74, 124, 155, 0.3);
}

.sidebar__nav-link.active {
  color: #F0F3F6;
  border-left-color: var(--accent);
  font-weight: 500;
}

/* Bottom links */
.sidebar__bottom {
  text-align: center;
}

.sidebar__links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sidebar__icon-link {
  color: var(--sidebar-text-muted);
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.sidebar__icon-link:hover {
  color: var(--accent);
  transform: translateY(-1px);
  background: rgba(74, 124, 155, 0.08);
}

.sidebar__copyright {
  font-size: 0.72rem;
  color: var(--sidebar-text-muted);
  opacity: 0.5;
  letter-spacing: 0.05em;
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  background: var(--sidebar-bg);
  border: 1px solid rgba(74, 124, 155, 0.2);
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--sidebar-text);
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-nav-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.mobile-nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
}


/* ═══════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════ */

.content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: var(--content-pad);
  /* Subtle paper texture */
  background-image:
    radial-gradient(ellipse at 70% 10%, rgba(74, 124, 155, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 80%, rgba(74, 124, 155, 0.03) 0%, transparent 50%);
}

.section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-gap) 0;
}

.section:first-child {
  padding-top: 2rem;
}


/* ═══════════════════════════════════════════════
   SECTION LABELS
   ═══════════════════════════════════════════════ */

.section__label {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.section__label-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
}

.section__label-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* ═══════════════════════════════════════════════
   ORNAMENT (section divider)
   ═══════════════════════════════════════════════ */

.ornament {
  text-align: center;
  max-width: var(--content-max);
  margin: 0 auto;
  color: var(--border);
  font-size: 0.7rem;
  position: relative;
}

.ornament::before,
.ornament::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 1.5rem);
  height: 1px;
  background: var(--border-light);
}

.ornament::before { left: 0; }
.ornament::after { right: 0; }

.ornament span {
  display: inline-block;
  color: var(--accent);
  opacity: 0.35;
}


/* ═══════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════ */

.about__lead {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.about__text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.about__text:last-child {
  margin-bottom: 0;
}

.about__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.about__field-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.about__field-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about__field-list li {
  padding: 0.2rem 0;
}

.about__alert {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text);
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: rgba(74, 124, 155, 0.05);
  border-radius: 0 4px 4px 0;
  margin-bottom: 1.5rem;
}


/* ═══════════════════════════════════════════════
   RESEARCH
   ═══════════════════════════════════════════════ */

.research__category {
  margin-bottom: 1.25rem;
  margin-top: 1.5rem;
}

.research__category:first-of-type {
  margin-top: 0;
}

.research__category-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text-muted);
}

/* Dissertation overview */
.research__program {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-light);
}

.research__program-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.research__program-text {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.research__program-directions {
  list-style: none;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-light);
  margin-top: 0.25rem;
  padding-left: 1rem;
}

.research__program-directions li {
  padding: 0.15rem 0;
}

/* Paper card */
.paper {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.paper:hover {
  border-color: var(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

/* Featured paper (Job Market Paper) */
.paper--featured {
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, rgba(74, 124, 155, 0.03) 0%, var(--card-bg) 60%);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.paper--featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.paper__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74, 124, 155, 0.08);
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.paper__summary {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.paper__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.paper__authors {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.paper__authors a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}

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

.paper__status {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.9rem;
}

/* Abstract toggle */
.paper__abstract-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  transition: color 0.25s ease, background 0.25s ease;
}

.paper__abstract-toggle:hover {
  color: var(--accent-hover);
  background: rgba(74, 124, 155, 0.08);
}

.paper__abstract-toggle svg {
  transition: transform 0.3s ease;
}

.paper__abstract-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.paper__abstract {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease,
              padding 0.35s ease;
  padding-top: 0;
}

.paper__abstract.open {
  max-height: 500px;
  opacity: 1;
  padding-top: 0.75rem;
}

.paper__abstract p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-muted);
  padding-left: 1rem;
  border-left: 2px solid var(--border-light);
}

.paper__links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.paper__link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(74, 124, 155, 0.25);
  border-radius: 3px;
  transition: all 0.25s ease;
}

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


/* ═══════════════════════════════════════════════
   TEACHING
   ═══════════════════════════════════════════════ */

.teaching__intro {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
}

.teaching__course {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.teaching__course:hover {
  border-color: var(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.teaching__course-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.teaching__course-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.teaching__course-role {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.teaching__course-detail {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.teaching__course-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.teaching__course-eval {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
}


/* ═══════════════════════════════════════════════
   CV
   ═══════════════════════════════════════════════ */

.cv__card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2rem 2.25rem;
}

.cv__summary {
  margin-bottom: 2rem;
}

.cv__item {
  margin-bottom: 1.5rem;
}

.cv__item:last-child {
  margin-bottom: 0;
}

.cv__item-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.cv__item p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  padding: 0.15rem 0;
}

.cv__year {
  color: var(--text-light);
  font-size: 0.85rem;
}

.cv__download {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--accent);
  padding: 0.85rem 1.75rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.cv__download:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--accent-glow);
}


/* ═══════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════ */

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.contact__item-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.contact__item-value {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.6;
}

a.contact__item-value:hover {
  color: var(--accent-hover);
}

.contact__profiles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact__profiles a {
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: all 0.25s ease;
}

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

.contact__note {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--text-muted);
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: rgba(74, 124, 155, 0.03);
  border-radius: 0 4px 4px 0;
}


/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */

.footer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 0 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}


/* ═══════════════════════════════════════════════
   SCROLL REVEAL ANIMATION
   ═══════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings */
.reveal:nth-child(2) { transition-delay: 0.06s; }
.reveal:nth-child(3) { transition-delay: 0.12s; }
.reveal:nth-child(4) { transition-delay: 0.18s; }
.reveal:nth-child(5) { transition-delay: 0.24s; }
.reveal:nth-child(6) { transition-delay: 0.30s; }


/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 280px;
    --content-pad: 2.5rem;
  }

  .sidebar__name {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  :root {
    --content-pad: 1.25rem;
    --section-gap: 3rem;
  }

  /* Sidebar becomes sticky top header */
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: auto;
    overflow: visible;
    background: var(--sidebar-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar__inner {
    min-height: auto;
    padding: 1.25rem 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  /* Grid layout for photo + text */
  .sidebar__top {
    display: grid;
    grid-template-columns: 75px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 1.25rem;
    row-gap: 0.15rem;
    width: 100%;
    text-align: left;
    align-items: start;
  }

  .sidebar__photo {
    width: 75px;
    height: 75px;
    margin: 0;
    grid-column: 1 / 2;
    grid-row: 1 / 4;
  }

  .sidebar__name {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    font-size: 1.4rem;
    margin-bottom: 0;
  }

  .sidebar__title {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    font-size: 0.75rem;
    margin-bottom: 0;
  }

  .sidebar__affiliation {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--sidebar-text-muted);
  }

  .sidebar__affiliation br {
    display: block;
  }

  .sidebar__accent-line {
    display: none;
  }

  /* Horizontal nav */
  .sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    padding: 0.6rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0.75rem;
    justify-content: center;
  }

  .sidebar__nav-link {
    border-left: none;
    padding: 0.4rem 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .sidebar__nav-link:hover {
    border-left-color: transparent;
  }

  .sidebar__nav-link.active {
    border-left: none;
    color: #F0F3F6;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
  }

  /* Hide bottom links — they're in the contact section */
  .sidebar__bottom {
    display: none;
  }

  /* Compact sticky header — hides profile, keeps nav */
  .sidebar__top {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
    opacity: 1;
  }

  .sidebar--compact .sidebar__top {
    max-height: 0;
    opacity: 0;
    margin: 0;
  }

  .sidebar--compact .sidebar__inner {
    padding: 0.5rem 1.25rem;
  }

  .sidebar--compact .sidebar__nav {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }

  .content {
    margin-left: 0;
    padding-top: 1rem;
  }

  /* Larger tap targets for mobile */
  .paper__abstract-toggle,
  .paper__link {
    padding: 0.6rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .about__lead {
    font-size: 1.1rem;
  }

  .about__fields {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .paper {
    padding: 1.25rem 1.5rem;
  }

  .paper__title {
    font-size: 1.15rem;
  }

  .teaching__course {
    padding: 1.25rem 1.5rem;
  }

  .teaching__course-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cv__card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .about__lead {
    font-size: 1rem;
  }

  .sidebar__photo {
    width: 60px;
    height: 60px;
  }

  .sidebar__name {
    font-size: 1.2rem;
  }

  .sidebar__nav-link {
    font-size: 0.68rem;
    padding: 0.35rem 0.5rem;
  }

  .about__fields {
    gap: 2rem;
  }
}


/* ═══════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════ */

@media print {
  .sidebar {
    display: none;
  }

  .content {
    margin-left: 0;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .paper__abstract {
    max-height: none !important;
    opacity: 1 !important;
  }
}
