/* ===== CSS Variables ===== */
:root {
  --burgundy: #7B2D3B;
  --burgundy-light: #9E4A5A;
  --burgundy-dark: #5C1F2B;
  --bg: #FAFAF7;
  --bg-card: #FFFFFF;
  --text: #2D2D2D;
  --text-light: #6B6B6B;
  --border: #E8E4DF;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.1);
  --max-width: 960px;
  --nav-height: 64px;
  --transition: 0.25s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--burgundy);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--burgundy-light);
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: 2.4rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.6rem; margin-bottom: 1rem; margin-top: 2.5rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.75rem; margin-top: 1.5rem; }

p { margin-bottom: 1rem; }

ul, ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: auto;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.nav-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-name:hover {
  color: var(--burgundy);
}

.nav-affiliation {
  font-size: 0.8rem;
  color: var(--burgundy);
  letter-spacing: 0.04em;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--burgundy);
  transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--burgundy);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all var(--transition);
  border-radius: 1px;
}

/* ===== Main Content ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ===== Hero Section (Homepage) ===== */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  padding: 2.5rem 0 3.5rem;
}

.hero-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 220px;
}

.hero-photo {
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.hero-photo img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border);
}

.hero-subtitle {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  line-height: 1.5;
}


.hero-welcome {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  margin-top: 0;
  color: var(--text);
}

.hero-bio {
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 0.85rem;
}

.hero-bio:last-of-type {
  margin-bottom: 0;
}

.hero-bio a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.hero-bio a:hover {
  text-decoration-color: var(--burgundy-light);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  list-style: none;
  padding: 0;
  justify-content: center;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all var(--transition);
}

.hero-links a:hover {
  color: var(--burgundy);
  border-color: var(--burgundy);
  background: rgba(123, 45, 59, 0.04);
}

.hero-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ===== Section Styles ===== */
.section {
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 1.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--burgundy);
  margin-bottom: 1.5rem;
  display: inline-block;
}


.section-divider {
  width: 60px;
  border: none;
  border-top: 2px solid var(--burgundy);
  margin: 3rem auto;
  opacity: 0.4;
}

/* ===== Page Header ===== */
.page-header {
  padding: 2rem 0 1.5rem;
}

.page-header h1 {
  font-size: 2.2rem;
  display: inline-block;
  padding-bottom: 0.35rem;
  border-bottom: 3px solid var(--burgundy);
}

.page-header p {
  color: var(--text-light);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* ===== Research Publications ===== */
.pub-list {
  list-style: none;
  padding: 0;
}

.pub-item {
  position: relative;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.pub-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
}

.pub-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
  flex: 1;
}

.pub-title .authors {
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.pub-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.75rem;
  transition: all var(--transition);
}

.pub-toggle:hover {
  border-color: var(--burgundy);
  color: var(--burgundy);
}

.pub-toggle svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
}

.pub-toggle.open svg {
  transform: rotate(180deg);
}

.pub-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 0;
  margin-top: 0;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.75;
  transition: max-height 0.4s cubic-bezier(0.19, 1, 0.22, 1),
              opacity 0.3s ease,
              padding-top 0.4s ease,
              margin-top 0.4s ease;
}

.pub-details.open {
  max-height: 600px;
  opacity: 1;
  padding-top: 1rem;
  margin-top: 0.75rem;
}

.pub-venue {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  font-style: italic;
}

.pub-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.pub-links a {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--burgundy);
  transition: all var(--transition);
}

.pub-links a:hover {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
}

/* ===== Expand All Button ===== */
.expand-all-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--burgundy);
  background: none;
  border: 1px solid var(--burgundy);
  border-radius: 4px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.expand-all-btn:hover {
  background: var(--burgundy);
  color: #fff;
}

/* ===== Policy Publications (Simple) ===== */
.pub-item--simple {
  padding: 0.85rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 0;
}

.pub-item--simple:hover {
  box-shadow: none;
  transform: none;
  background: rgba(123, 45, 59, 0.02);
}

.pub-item--simple:last-child {
  border-bottom: none;
}

.pub-item--simple .pub-title {
  font-size: 0.95rem;
}

/* ===== Education List ===== */
.edu-list {
  list-style: none;
  padding: 0;
}

.edu-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.edu-item:last-child {
  border-bottom: none;
}

.edu-info {
  flex: 1;
}

.edu-degree {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
}

.edu-school {
  color: var(--text-light);
  font-size: 0.9rem;
  display: block;
  margin-top: 0.1rem;
}

.edu-year {
  color: var(--burgundy);
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ===== Awards ===== */
.awards-group {
  margin-bottom: 2.5rem;
}

.awards-group h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--burgundy);
  display: inline-block;
}

.award-item {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-radius: 4px;
  transition: background var(--transition);
}

.award-item:hover {
  background: rgba(123, 45, 59, 0.03);
}

.award-item:last-child {
  border-bottom: none;
}

.award-name {
  font-size: 0.95rem;
  flex: 1;
}

.award-year {
  font-size: 0.85rem;
  color: var(--text-light);
  flex-shrink: 0;
}

/* ===== Teaching ===== */
.teaching-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.teaching-item:last-child {
  border-bottom: none;
}

.teaching-role {
  font-weight: 600;
  font-size: 0.95rem;
}

.teaching-course {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

/* ===== CV Page ===== */
.cv-embed {
  margin-top: 1.5rem;
}

.cv-embed iframe {
  width: 100%;
  height: 700px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem auto 0;
  text-align: center;
  padding: 0.6rem 1.25rem;
  background: var(--burgundy);
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.cv-download:hover {
  background: var(--burgundy-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 45, 59, 0.25);
}

/* ===== Research Interests Tags ===== */
.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.interests li {
  padding: 0.4rem 1rem;
  background: rgba(123, 45, 59, 0.07);
  color: var(--burgundy);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0;
  transition: background var(--transition), color var(--transition);
  cursor: default;
}

.interests li:hover {
  background: var(--burgundy);
  color: #fff;
}

/* ===== Funding ===== */
.funding {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-light);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--text-light);
  transition: color var(--transition), transform var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--burgundy);
  transform: translateY(-2px) scale(1.1);
}

.footer-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ===== Utility ===== */
.hidden { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }

  .container {
    padding: 1.5rem 1.25rem 3rem;
  }

  .nav-inner {
    padding: 0.75rem 1.25rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .nav-name {
    font-size: 1.15rem;
  }

  .nav-affiliation {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(250, 250, 247, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    margin-bottom: 0;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    flex-direction: column;
    align-items: center;
  }

  .hero-left {
    width: 100%;
  }

  .hero-photo img {
    width: 160px;
    height: 160px;
  }

  .hero-text {
    text-align: left;
  }

  .hero-welcome {
    text-align: center;
  }

  .hero-links {
    justify-content: center;
  }

  .hero-links a {
    font-size: 0.82rem;
    padding: 0.4rem 0.65rem;
  }

  .hero-bio {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .pub-item {
    padding: 1rem 1.15rem;
  }

  .pub-title {
    font-size: 0.95rem;
  }

  .pub-toggle {
    width: 26px;
    height: 26px;
    font-size: 1rem;
  }

  .pub-details {
    font-size: 0.85rem;
  }

  .edu-item {
    flex-direction: column;
    gap: 0.15rem;
    align-items: flex-start;
  }

  .award-item {
    flex-direction: column;
    gap: 0.15rem;
  }

  .teaching-item {
    padding: 1rem 0;
  }

  .cv-embed iframe {
    height: 450px;
  }

  .cv-download {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    padding: 0 1.25rem;
  }

  .section {
    margin-bottom: 2rem;
  }

  .section-divider {
    margin: 2rem auto;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }

  .container {
    padding: 1.25rem 1rem 2.5rem;
  }

  .hero-photo img {
    width: 140px;
    height: 140px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .pub-item {
    padding: 0.85rem;
  }

  .hero-links {
    gap: 0.5rem;
  }

  .hero-links a {
    font-size: 0.78rem;
    padding: 0.35rem 0.55rem;
  }

  .interests li {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }

  .cv-embed iframe {
    height: 350px;
  }
}

/* ===== Focus Indicators ===== */
*:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== Profile Photo Polish ===== */
.hero-photo img {
  box-shadow: 0 8px 24px rgba(123, 45, 59, 0.1),
              0 2px 6px rgba(123, 45, 59, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-photo img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(123, 45, 59, 0.14),
              0 4px 8px rgba(123, 45, 59, 0.1);
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
