/* ===== Colors and fonts (change these to restyle the whole site) ===== */
:root {
  --paper: #ffffff;      /* main background */
  --paper-alt: #eef4f8;  /* pale blue band behind Publications */
  --ink: #123a9c;        /* main text: dark bright blue */
  --ink-soft: #5f6b75;   /* secondary text */
  --accent: #3a6f92;     /* blue for small headings, rules and hover */
  --line: #dbe4ea;       /* thin divider lines */

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "EB Garamond", Georgia, serif;
  --font-ui: "Jost", "Segoe UI", sans-serif;

  --header-height: 64px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ===== Top navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  gap: clamp(1rem, 5vw, 3rem);
  padding: 0 16px;
}

.nav a {
  font-family: var(--font-ui);
  font-size: clamp(0.68rem, 2.6vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Five links need tighter spacing to fit on a phone. */
@media (max-width: 520px) {
  .nav { gap: 0.75rem; padding: 0 12px; }
  .nav a { font-size: 0.62rem; letter-spacing: 0.1em; }
}

@media (max-width: 360px) {
  .nav { gap: 0.45rem; padding: 0 8px; }
}

/* ===== Home ===== */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 16px;
}

.eyebrow,
.hero-sub {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 1.5rem 0 0;
}

.rule {
  width: 56px;
  height: 1px;
  background: var(--accent);
  margin: 2rem auto;
}

.scroll-cue {
  margin-top: 4rem;
  font-family: var(--font-ui);
  font-size: 1.25rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}

.scroll-cue:hover {
  color: var(--accent);
  transform: translateY(4px);
}

/* ===== Sections ===== */
.section {
  padding: clamp(4rem, 12vw, 7.5rem) 16px;
  border-top: 1px solid var(--line);
}

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

.container { margin: 0 auto; }
.container.narrow { max-width: 640px; }
.center { text-align: center; }

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 3rem);
  line-height: 1.2;
  text-align: center;
  margin: 0 0 2.5rem;
}

h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 1.25rem auto 0;
}

h3 {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 3rem 0 0.5rem;
}

p { margin: 0 0 1.25rem; }

.lead { font-size: 1.4rem; line-height: 1.6; }

/* ===== About ===== */
.container.about { max-width: 640px; }

.portrait {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto 2rem;
  /* Same frame as the Contact photos: white mat, blue border, soft shadow. */
  padding: 6px;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 0 8px 20px rgba(18, 58, 156, 0.18);
}

.bio p:last-child { margin-bottom: 0; }

/* On wide screens the photo sits to the left of the bio. */
@media (min-width: 760px) {
  .container.about {
    max-width: 860px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0 3rem;
    align-items: center;
  }

  .container.about h2 { grid-column: 1 / -1; }
  .portrait { margin: 0; }
}

/* ===== Publications ===== */
.pubs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pubs li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.pubs a {
  font-size: 1.35rem;
  text-decoration: none;
  transition: color 0.2s;
}

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

.venue {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

/* ===== Subscribe ===== */
.button {
  display: inline-block;
  margin: 1rem 0 2rem;
  padding: 1rem 2.25rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: background 0.2s, border-color 0.2s;
}

.button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.contact-button { margin-bottom: 0; }

/* ===== Contact: two tilted, blue-framed photos around the button ===== */
.contact-collage {
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2.5rem 0;
}

.contact-body {
  grid-column: 1 / -1;
  order: -1; /* on phones the text and button come first, photos below */
}

.snap {
  display: block;
  width: 100%;
  max-width: 170px;
  height: auto;
  padding: 6px;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 0 8px 20px rgba(18, 58, 156, 0.18);
}

.snap-left {
  justify-self: end;
  transform: rotate(-5deg) translateX(10px);
}

.snap-right {
  justify-self: start;
  border-color: var(--accent);
  transform: rotate(4deg) translate(-10px, 14px);
}

/* On wide screens the photos sit either side of the button. */
@media (min-width: 760px) {
  .contact-collage {
    grid-template-columns: 200px 1fr 200px;
    gap: 0 2rem;
  }

  .contact-body {
    grid-column: auto;
    order: 0;
  }

  .snap { max-width: 200px; }
  .snap-left { transform: rotate(-5deg) translateY(-12px); }
  .snap-right { transform: rotate(4deg) translateY(16px); }
}

.social { color: var(--ink-soft); }

.social a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

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

/* ===== Footer ===== */
.site-footer {
  padding: 2.5rem 16px;
  text-align: center;
  border-top: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
