/* ===========================
   Google Fonts Import
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

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

:root {
  --dark: #2b2b2b;
  --mid: #555555;
  --light: #888888;
  --accent: #4a7c8e;
  --accent-hover: #3a6070;
  --border: #e0e0e0;
  --bg: #ffffff;
  --bg-subtle: #f8f8f8;
  --max-width: 860px;
  --font-sans: 'Lato', Helvetica, Arial, sans-serif;
  --font-serif: 'Libre Baskerville', Georgia, serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--dark);
  background: var(--bg);
  line-height: 1.8;
  font-weight: 300;
}

em {
  font-style: italic;
  font-weight: 300;
}

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

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

/* ===========================
   Layout
   =========================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2.5rem;
}

main {
  padding: 4rem 0 6rem;
}

/* ===========================
   Header / Nav
   =========================== */
header {
  background: var(--bg);
  padding: 0;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2.5rem 0;
  text-align: right;
}

.site-title {
  font-family: var(--font-sans);
  font-size: 1.85rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #007BA7;
  margin-bottom: 0.1rem;
}

.site-title a {
  color: #007BA7;
  text-decoration: none;
}

.site-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-subtitle {
  font-size: 0.88rem;
  color: var(--light);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0;
  justify-content: flex-end;
}

nav li {
  margin-right: 0;
}

nav a {
  display: block;
  color: var(--light);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 0.65rem 0 0.65rem 1.25rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover {
  color: var(--mid);
  text-decoration: none;
}

nav a.active {
  color: #007BA7;
  border-bottom-color: #007BA7;
  text-decoration: none;
}

/* ===========================
   Page Header
   =========================== */
.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
}

/* ===========================
   About Page
   =========================== */
.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.headshot-wrapper {
  text-align: center;
}

.headshot-wrapper img {
  width: 340px;
  height: auto;
  display: block;
  margin: 0 auto 1.25rem;
}

.headshot-placeholder {
  width: 190px;
  height: 230px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--light);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.4;
}

.contact-list {
  list-style: none;
  font-size: 0.82rem;
  color: var(--light);
  text-align: left;
}

.contact-list li {
  margin-bottom: 0.4rem;
  padding-left: 0;
}

.contact-list a {
  color: var(--mid);
}

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

.about-bio p {
  margin-bottom: 1.1rem;
  font-size: 0.97rem;
  color: var(--dark);
}

.about-bio p:first-child {
  margin-top: 0;
}

/* ===========================
   Research Page
   =========================== */
.research-intro {
  margin-bottom: 2.5rem;
  font-size: 0.97rem;
}

.research-areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.research-card {
  position: relative;
  overflow: hidden;
  height: 200px;
  border-top: 2px solid var(--accent);
  background: #3a6070;
}

.research-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Title label visible by default at bottom */
.research-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.25rem 1.1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-family: var(--font-sans);
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* Full overlay revealed on hover */
.research-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 55, 65, 0.88);
  color: #fff;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
}

.research-card:hover .research-card-overlay {
  opacity: 1;
}

.research-card:hover .research-card-img {
  transform: scale(1.05);
}

.research-card:hover .research-card-label {
  opacity: 0;
}

.research-card-overlay h3 {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.research-card-overlay p {
  font-size: 0.86rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.project-list {
  list-style: none;
}

.project-list li {
  padding: 1.25rem 0;
}

.project-list strong {
  display: block;
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.97rem;
}

.project-list p {
  font-size: 0.9rem;
  color: var(--mid);
}

/* ===========================
   Publications Page
   =========================== */
.pub-section {
  margin-bottom: 3rem;
}

.pub-list {
  list-style: none;
}

.pub-list li {
  padding: 1.1rem 0;
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--dark);
}

.pub-venue {
  font-style: italic;
  color: var(--mid);
}

.pub-links {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.pub-links a {
  display: inline-block;
  margin-right: 0.6rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 1px 9px;
  border-radius: 2px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
}

.pub-links a:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ===========================
   Writing Page — Image Cards
   =========================== */
.pub-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.pub-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: start;
}

.pub-card-img {
  display: block;
  width: 180px;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border);
  transition: opacity 0.2s;
}

.pub-card-img:hover {
  opacity: 0.85;
}

.pub-card-info {
  padding-top: 0.25rem;
}

.pub-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.pub-card-meta {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

@media (max-width: 680px) {
  .pub-card {
    grid-template-columns: 1fr;
  }

  .pub-card-img {
    width: 140px;
  }
}

/* ===========================
   Teaching Page
   =========================== */
.teaching-intro {
  margin-bottom: 2.5rem;
}

.teaching-intro p {
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

.course-list {
  list-style: none;
  margin-bottom: 3rem;
}

.course-item {
  padding: 1.1rem 0;
}

.course-name {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.15rem;
  font-size: 0.97rem;
}

.course-meta {
  font-size: 0.83rem;
  color: var(--light);
}

.course-desc {
  font-size: 0.9rem;
  color: var(--mid);
  margin-top: 0.4rem;
}

/* ===========================
   CV Page
   =========================== */
.cv-page {
  text-align: center;
  padding: 4rem 0;
}

.cv-page p {
  color: var(--mid);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  background: var(--dark);
  color: #fff;
  padding: 0.7rem 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ===========================
   Footer
   =========================== */
footer {
  text-align: center;
  padding: 1.75rem 2rem;
  font-size: 0.78rem;
  color: var(--light);
  letter-spacing: 0.04em;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 680px) {
  .header-inner {
    padding: 1.75rem 1.5rem 0;
  }

  .site-title {
    font-size: 1.4rem;
  }

  nav a {
    padding-left: 0.75rem;
    font-size: 0.72rem;
  }

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

  .headshot-wrapper {
    text-align: center;
  }

  .headshot-wrapper img {
    width: 100%;
    height: auto;
  }

  .contact-list {
    text-align: center;
  }

  .research-areas {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 1.5rem;
  }

  main {
    padding: 2.5rem 0 4rem;
  }
}
