/* ── Reset & Base ─────────────────────────────── */
html {
  margin: 0;
  padding: 0;
}

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

body {
  margin: 0;
  /* Use Quicksand site-wide (rounded display font). Quicksand is loaded in index.html */
  font-family: 'Quicksand', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: #222;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  opacity: 0.75;
}

/* ── Site Header / Navbar ─────────────────────── */
.site-header {
  /* Muted slate-blue for a more professional look */
  background: linear-gradient(135deg, #6f8fa8 0%, #4f6f86 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 56px;
}

.site-title {
  color: #fff;
  text-decoration: none;
  font-family: inherit; /* inherit Quicksand from body */
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.site-title:hover {
  opacity: 0.8;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  font-family: inherit; /* inherit Quicksand */
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover,
nav a.active {
  color: #fff;
  border-bottom-color: #fff;
  opacity: 1;
}

/* ── Hero Section ─────────────────────────────── */
.hero {
  width: 100%;
  min-height: 58vh;
  background-size: cover;
  background-position: center 20%;
  background-color: #444; /* fallback when no image */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* dark overlay to keep text readable over any image */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px;
}

.hero-name {
  /* softer, rounded look */
  font-family: 'Quicksand', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  /* even larger hero name; scales from 2.2rem up to 4.0rem */
  font-size: clamp(2.2rem, 8.5vw, 4.0rem);
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
  line-height: 1.05;
  padding: 10px 18px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px; /* pill */
  display: inline-block;
}

/* Intro styles: larger Hi and pill-like email link */
.intro-hi {
  font-family: 'Quicksand', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 0 6px;
}

.intro-pill {
  display: inline-block;
  padding: 6px 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.intro-pill:hover {
  background: rgba(255,255,255,0.12);
}

/* Utility classes to change name alignment and font */
.hero-name--left { text-align: left; }
.hero-name--center { text-align: center; }
.hero-name--right { text-align: right; }

.font-serif { font-family: Georgia, 'Times New Roman', serif; }
.font-sans { font-family: 'Helvetica Neue', Arial, sans-serif; }
.font-display { font-family: 'Oswald', 'Helvetica Neue', Arial, sans-serif; }

.hero-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-links a {
  color: #fff;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Content Section ──────────────────────────── */
.content-section {
  padding: 60px 0 60px 0;
}

.content-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 56px;
  align-items: flex-start; /* keep the profile aligned with the top of the bio text */
  padding: 0 32px 0 32px;
}

.profile-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-social {
  display: flex;
  flex-direction: row;
  gap: 14px;
  padding-top: 12px;
  justify-content: center;
}

.profile-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  color: #222;
  text-decoration: none;
  font-size: 0.93rem;
  line-height: 1.3;
  text-align: center;
}

.profile-email .fa-envelope {
  color: #555;
  font-size: 1.2rem;
}

.social-icon {
  font-size: 1.6rem; /* slightly larger icons */
  text-decoration: none;
  line-height: 1;
  transition: transform 0.12s ease, opacity 0.12s ease;
  color: inherit;
}

.social-icon:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.social-icon .fa-linkedin {
  color: #0a66c2;
}

.social-icon .fa-envelope {
  color: #555;
}

.social-icon:hover {
  opacity: 0.7;
}

.profile-photo {
  width: 380px;
  display: block;
  border-radius: 4px;
}

/* Make the profile image rounded and overlap the hero/banner */
.profile-photo--overlap {
  border-radius: 18px; /* rounded rectangle */
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  position: relative;
  transform: translateY(0);
  width: 320px; /* slightly smaller on desktop */
  margin-top: 0.25rem;
  margin-bottom: 0.2rem;
  transition: transform 0.2s ease;
}

/* On small screens, don't overlap too much and keep a circular crop */
@media (max-width: 700px) {
  .profile-photo--overlap {
    transform: translateY(-12px);
    width: 140px;
    border-radius: 50%;
  }
}

.bio-col {
  flex: 1;
  font-size: 1rem;
  padding-top: 0.15rem; /* slight upward lift to align with the image while keeping a small margin */
  /* Use the same rounded font for intro/body to match Hi */
  font-family: 'Quicksand', 'Helvetica Neue', Arial, sans-serif;
}

.bio-col p {
  margin-top: 0;
  margin-bottom: 1em;
}

@media (min-width: 701px) {
  .bio-col {
    transform: translateY(0);
  }
}

/* ── Inner page main (Research, Teaching) ─────── */
.page-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px;
}

.page-main h1 {
  font-size: 2rem;
  margin-top: 0;
}

/* ── Footer ─────────────────────────────────── */
.site-footer {
  width: 100%;
  background: linear-gradient(135deg, #7a8fa4 0%, #5d738a 100%);
  color: #fdfdfd;
  text-align: left;
  padding: 14px 20px 15px;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 32px;
}

.site-footer p {
  margin: 0;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 700px) {
  .content-inner {
    flex-direction: column;
    gap: 32px;
    padding: 0 24px;
  }

  .profile-photo {
    width: 100%;
    max-width: 320px;
  }

  .hero-links {
    flex-direction: column;
    gap: 12px;
  }

  .page-main {
    padding: 40px 24px;
  }

  .site-footer {
    padding: 16px 24px 18px;
  }
}

/* Teaching list styles */
.teaching-list h2 {
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
}

.positions {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.positions .pos {
  display: grid;
  grid-template-columns: 28px 140px 1fr; /* icon | year | description */
  gap: 8px 16px;
  align-items: start;
  padding: 6px 0;
}

.pos-year {
  color: #666;
  min-width: 120px;
  font-size: 0.95rem;
}

.pos-icon {
  color: #28527a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  width: 28px;
  height: 28px;
}

.pos-desc {
  display: block;
}

/* Small screens: switch back to stacked layout so items wrap nicely */
@media (max-width: 700px) {
  .positions .pos {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
  }

  .pos-icon { font-size: 0.95rem; }
  .pos-year { min-width: 90px; }
}

/* Research list styles */
.research-list h2 {
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
}

.research-block {
  margin-bottom: 1.25rem;
}

.research-block.non-econ {
  margin-top: 0;
}

.research-items {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.research-items li {
  padding: 6px 0;
}

.research-title {
  font-size: 0.98rem;
  font-weight: 400;
  color: #222;
  margin-bottom: 0.2rem;
}

.research-title::before {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  background-color: #28527a;
  margin-right: 0.5em;
  vertical-align: middle;
}

.research-meta {
  color: #666;
  font-size: 0.92rem;
  line-height: 1.5;
}
