@import url('https://fonts.googleapis.com/css2?family=Cardo:ital,wght@0,400;0,700;1,400&family=Urbanist:wght@300;400;500;600&display=swap');

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

:root {
  --orange: #bf5700;
  --dark: #111111;
  --bg: #f9f9f9;
  --muted: #666666;
  --border: #e0e0e0;
  --max-width: 680px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--dark);
  font-family: 'Urbanist', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER / NAV ── */
header {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 2rem;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-title {
  font-family: 'Cardo', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-headshot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  flex-shrink: 0;
}

.site-title:hover {
  color: var(--orange);
}

nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.15s;
}

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

/* ── MAIN ── */
main {
  flex: 1;
  padding: 3.5rem 2rem 5rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.container-wide {
  max-width: 900px;
  margin: 0 auto;
}

/* ── HOME PAGE ── */
.home-hero {
  display: flex;
  gap: 4.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.headshot {
  width: 320px;
  height: 400px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

.headshot-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: #d9d9d9;
  flex-shrink: 0;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.hero-text h1 {
  font-family: 'Cardo', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark);
}

.hero-text p {
  color: #333;
  margin-bottom: 0.85rem;
}

.hero-text p:last-of-type {
  margin-bottom: 1.25rem;
}

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

.btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background-color 0.15s, color 0.15s;
}

.btn-primary {
  background-color: var(--orange);
  color: #fff;
}

.btn-primary:hover {
  background-color: #a34800;
}

.btn-outline {
  border: 1.5px solid var(--orange);
  color: var(--orange);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--orange);
  color: #fff;
}

/* ── PAGE HEADINGS ── */
.page-title {
  font-family: 'Cardo', serif;
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--orange);
  display: inline-block;
}

/* ── RESEARCH PAGE ── */
.section-year {
  font-family: 'Cardo', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--orange);
  margin: 2.5rem 0 1.25rem;
  padding-top: 1.5rem;
  border-top: 2px solid #555;
}

.section-year:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.paper {
  margin-bottom: 2rem;
}

.paper-title {
  font-family: 'Cardo', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.paper-title a {
  color: var(--orange);
  text-decoration: none;
}

.paper-title a:hover {
  text-decoration: underline;
}

.paper-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.paper-meta em {
  font-style: italic;
}

.paper-journal {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.paper-award {
  font-size: 0.82rem;
  color: var(--orange);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.paper-abstract-toggle {
  margin-top: 0.5rem;
}

.paper-abstract-toggle summary {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
  width: fit-content;
}

.paper-abstract-toggle summary::-webkit-details-marker {
  display: none;
}

.paper-abstract-toggle summary::before {
  content: '▶';
  font-size: 0.6rem;
  transition: transform 0.2s;
  color: var(--muted);
}

.paper-abstract-toggle[open] summary::before {
  transform: rotate(90deg);
}

.paper-abstract-toggle summary:hover,
.paper-abstract-toggle summary:hover::before {
  color: var(--orange);
}

.paper-abstract {
  font-size: 0.92rem;
  color: #444;
  line-height: 1.65;
  margin-top: 0.6rem;
}

/* ── TEACHING PAGE ── */
.institution {
  margin-bottom: 2.5rem;
}

.institution-name {
  font-family: 'Cardo', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.course {
  margin-bottom: 1.25rem;
}

.course-title {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.15rem;
}

.course-detail {
  font-size: 0.875rem;
  color: var(--muted);
}

.role-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* ── CV PAGE ── */
.cv-content {
  font-size: 1rem;
  line-height: 1.8;
}

/* ── GLOBAL CONTENT LINKS ── */
a {
  color: var(--orange);
}

.cv-content a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
}

.cv-content a:hover {
  text-decoration: underline;
}

/* ── BIRDS PAGE ── */
.birds-intro {
  margin-bottom: 2rem;
  color: #444;
}

.bird-grid {
  columns: 3;
  column-gap: 1.5rem;
}

.bird-grid .bird-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

.bird-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.bird-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.bird-card img {
  width: 100%;
  height: auto;
  display: block;
}

.bird-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.bird-caption {
  padding: 0.75rem 1rem;
}

.bird-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
}

.bird-location {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* ── FOOTER ── */
footer {
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: var(--orange);
}

.footer-contact {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.footer-contact a {
  color: var(--orange);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-social a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--orange);
}

/* ── PAPER DETAIL PAGE ── */
main.paper-detail-main {
  padding: 0;
}

.paper-hero {
  background-color: var(--dark);
  padding: 3.5rem 2rem 2.75rem;
}

.paper-hero .container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.paper-hero-title {
  font-family: 'Cardo', serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.paper-hero-rule {
  border: none;
  border-top: 2px solid var(--orange);
  margin-bottom: 1.1rem;
}

.paper-hero-authors {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #ccc;
}

.paper-hero-authors a {
  color: var(--orange);
  text-decoration: none;
}

.paper-hero-authors a:hover {
  text-decoration: underline;
}

.paper-hero-year {
  font-size: 0.95rem;
  color: #aaa;
}

.paper-hero-year strong {
  color: #fff;
  font-weight: 700;
  margin-right: 1rem;
}

.paper-body {
  padding: 2.5rem 2rem 5rem;
}

.paper-body .container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.paper-meta-table {
  width: 100%;
  border-collapse: collapse;
}

.paper-meta-table tr {
  border-bottom: 1px solid var(--border);
}

.paper-meta-table tr:last-child {
  border-bottom: none;
}

.paper-meta-table th {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  text-align: left;
  padding: 1rem 2rem 1rem 0;
  width: 130px;
  vertical-align: top;
  white-space: nowrap;
}

.paper-meta-table td {
  font-size: 0.95rem;
  color: #333;
  padding: 1rem 0;
  vertical-align: top;
  line-height: 1.7;
}

.paper-meta-table td .paper-award {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.paper-doc-link {
  display: inline-block;
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  margin-right: 1.25rem;
  margin-bottom: 0.2rem;
}

.paper-doc-link:hover {
  text-decoration: underline;
}

.paper-back-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.75rem;
  letter-spacing: 0.01em;
}

.paper-back-link:hover {
  color: var(--orange);
}

/* ── RESEARCH PAGE – inline paper links ── */
.paper-links {
  font-size: 0.875rem;
  margin-top: 0.3rem;
  margin-bottom: 0.5rem;
}

.paper-links a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
  margin-right: 1rem;
}

.paper-links a:hover {
  text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .home-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.78rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .bird-grid {
    columns: 1;
  }

  .header-inner {
    height: auto;
    padding: 0.5rem 0;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .site-title {
    font-size: 1rem;
    line-height: 1.2;
  }
}
