/* ===== Variables ===== */
:root {
  --navy: #0f2744;
  --navy-light: #1a3a5c;
  --gold: #c9a227;
  --gold-light: #e8c84a;
  --cream: #f8f6f1;
  --white: #ffffff;
  --text: #2c3e50;
  --text-muted: #5a6a7a;
  --border: #e2ddd3;
  --shadow: 0 4px 24px rgba(15, 39, 68, 0.08);
  --shadow-lg: 0 12px 48px rgba(15, 39, 68, 0.15);
  --radius: 12px;
  --transition: 0.3s ease;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
}

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

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

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

.container {
  width: min(1140px, 92vw);
  margin-inline: auto;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--navy);
}

.nav__menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__menu a {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.nav__menu a:hover {
  color: var(--navy);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #2a5080 100%);
  z-index: 0;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(201, 162, 39, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  padding-block: 4rem;
}

.hero__tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 540px;
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--gold);
  color: var(--navy);
}

.btn--primary:hover {
  background: var(--gold-light);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.35);
}

.btn--outline {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.btn--outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.hero__photo {
  position: relative;
}

.hero__photo::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  opacity: 0.6;
}

.hero__photo img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: var(--shadow-lg);
}

/* ===== Sections ===== */
.section {
  padding: 6rem 0;
}

.section--alt {
  background: var(--white);
}

.section--dark {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
}

.section__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section__header--light h2,
.section__header--light .section__label {
  color: var(--white);
}

.section__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section__header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--navy);
  font-weight: 700;
}

.section--dark .section__header h2 {
  color: var(--white);
}

/* ===== About ===== */
.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.about__text p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 3.2rem;
  float: left;
  line-height: 1;
  margin: 0.1rem 0.5rem 0 0;
  color: var(--gold);
  font-weight: 700;
}

.about__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.about__gallery img:first-child {
  grid-column: 1 / -1;
  border-radius: var(--radius);
  height: 200px;
  object-fit: cover;
}

.about__gallery img:not(:first-child) {
  border-radius: var(--radius);
  height: 140px;
  object-fit: cover;
}

/* ===== Timeline ===== */
.timeline {
  display: grid;
  gap: 0;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--border));
}

.timeline__item {
  position: relative;
  padding: 1.75rem 0 1.75rem 2rem;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 2.1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--gold);
  transform: translateX(-5px);
}

.timeline__year {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(201, 162, 39, 0.12);
  padding: 0.2rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.5rem;
}

.timeline__item h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.timeline__inst {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.timeline__item p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.timeline__item em {
  color: var(--text);
  font-style: italic;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.section:not(.section--alt) .card {
  background: var(--cream);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.card__period {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.card p:last-child {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== Research ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.tags span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--transition);
}

.tags span:hover {
  background: rgba(201, 162, 39, 0.2);
  border-color: var(--gold);
}

.subsection-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  text-align: center;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: background var(--transition);
}

.project:hover {
  background: rgba(255, 255, 255, 0.1);
}

.project h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.project p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

/* ===== Publications ===== */
.pub-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.pub-tab {
  background: none;
  border: 2px solid var(--border);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.pub-tab.active,
.pub-tab:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.pub-panel {
  display: none;
}

.pub-panel.active {
  display: block;
}

.pub-list {
  list-style: none;
  display: grid;
  gap: 1.25rem;
}

.pub-list li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow);
}

.section--alt + .section .pub-list li,
.section:not(.section--alt) .pub-list li {
  background: var(--white);
}

.pub-year {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold);
}

.pub-list p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pub-list strong {
  color: var(--navy);
}

.pub-note {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pub-note a {
  font-weight: 600;
}

/* ===== Teaching ===== */
.teaching {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.teaching__col {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 2rem;
  border-top: 3px solid var(--gold);
}

.section--alt .teaching__col {
  background: var(--cream);
}

.teaching__col h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.teaching__col ul {
  list-style: none;
}

.teaching__col li {
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

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

.teaching__col li::before {
  content: '▸';
  color: var(--gold);
  margin-right: 0.5rem;
}

.teaching__note {
  text-align: center;
  margin-top: 2.5rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ===== Contact ===== */
.contact {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact__item {
  margin-bottom: 1.75rem;
}

.contact__item strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}

.contact__item p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.98rem;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  color: var(--white);
  font-weight: 600;
  transition: all var(--transition);
}

.contact__link:hover {
  background: rgba(201, 162, 39, 0.2);
  border-color: var(--gold);
  color: var(--white);
  transform: translateX(4px);
}

/* ===== Footer ===== */
.footer {
  background: #0a1a2e;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.footer__update {
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__links {
    justify-content: center;
  }

  .hero__photo {
    justify-self: center;
    order: -1;
  }

  .hero__photo img {
    width: 220px;
    height: 220px;
  }

  .about {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }

  .nav__menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__menu li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

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

  .pub-list li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .section {
    padding: 4rem 0;
  }
}
