/* ── Garrett Hinck · Academic Site v2 ── */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&family=Inter:wght@400;500&display=swap');

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

:root {
  --navy:       #1B2A4A;
  --navy-mid:   #2C4470;
  --gold:       #8B6914;
  --slate:      #4A5568;
  --text:       #2D3748;
  --bg:         #FAFAF8;
  --white:      #FFFFFF;
  --border:     #D8D4CC;
  --serif:      'Source Serif 4', Georgia, serif;
  --sans:       'Inter', system-ui, -apple-system, sans-serif;
  --measure:    42em;
}

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--serif);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

/* ── Navigation bar ── */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
}

.site-header.solid {
  position: relative;
  background: var(--navy);
}

.header-inner {
  max-width: 56em;
  margin: 0 auto;
  padding: 1.4rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-name:hover {
  color: #fff;
}

.site-nav {
  display: flex;
  gap: 1.8rem;
  align-items: baseline;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  color: rgba(255, 255, 255, 0.95);
}

/* ── Hero banner (home page) ── */
.hero {
  position: relative;
  height: 420px;
  overflow: hidden;
  background: var(--navy) url('hero.jpg') center 30% / cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 18, 36, 0.72) 0%,
    rgba(10, 18, 36, 0.35) 50%,
    rgba(10, 18, 36, 0.15) 100%
  );
}

.hero-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 56em;
  margin: 0 auto;
  padding: 0 2rem 3.5rem;
}

.hero-text h1 {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.hero-text .subtitle {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* ── Page header (interior pages) ── */
.page-header {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 18, 36, 0.75) 0%,
    rgba(10, 18, 36, 0.35) 100%
  );
}

.page-header-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 56em;
  margin: 0 auto;
  padding: 0 2rem 1.8rem;
}

.page-header-text h1 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.015em;
}

.page-header.research  { background-image: url('header-research.jpg'); }
.page-header.publications { background-image: url('header-publications.jpg'); }
.page-header.teaching  { background-image: url('header-teaching.jpg'); }

/* ── Main content ── */
main {
  max-width: 56em;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── Home page bio ── */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 3rem;
  align-items: start;
}

.home-bio .affiliation {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 1.8rem;
  line-height: 1.55;
}

.home-bio p {
  margin-bottom: 1.1rem;
  max-width: var(--measure);
}

.home-bio .contact {
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--slate);
}

.home-bio .contact a {
  color: var(--navy-mid);
  text-decoration: none;
}

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

.headshot {
  width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 3px;
  background: var(--border);
}

/* ── Section headings ── */
.section-heading {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.section-heading:first-of-type {
  margin-top: 0;
}

/* ── Research page ── */
.research-item {
  margin-bottom: 2rem;
  max-width: var(--measure);
}

.research-item h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.research-item p {
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.65;
}

.research-item .coauthor {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--slate);
  margin-bottom: 0.3rem;
}

/* ── Publications page ── */
.pub-list {
  list-style: none;
  max-width: var(--measure);
}

.pub-list li {
  margin-bottom: 1.3rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.pub-list .pub-title a {
  color: var(--navy-mid);
  text-decoration: none;
}

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

.pub-list .pub-venue {
  font-style: italic;
}

/* ── Teaching page ── */
.teaching-list {
  list-style: none;
  max-width: var(--measure);
}

.teaching-list li {
  margin-bottom: 1.1rem;
  line-height: 1.55;
}

.teaching-list .course-name {
  font-weight: 600;
  color: var(--text);
}

.teaching-list .course-detail {
  font-size: 0.92rem;
  color: var(--slate);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--slate);
  background: var(--white);
}

/* ── Links ── */
main a {
  color: var(--navy-mid);
  text-decoration: none;
}

main a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
  }

  .site-nav {
    gap: 1.2rem;
    flex-wrap: wrap;
  }

  main {
    padding: 2rem 1.2rem 3rem;
  }

  .hero {
    height: 320px;
  }

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

  .hero-text {
    padding-bottom: 2rem;
  }

  .page-header {
    height: 150px;
  }

  .home-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .headshot {
    width: 180px;
    order: -1;
  }
}
