/* =========================================================
   Amanda Haskins — academic site
   Design tokens: deep, muted blues (deliberately not
   pastel/"Carolina" blue) + a serif/sans pairing.
   ========================================================= */

:root {
  /* Color */
  --ink: #16233F;          /* headings, primary text */
  --ink-soft: #4C5A70;     /* secondary text, captions */
  --paper: #F5F8FB;        /* page background */
  --paper-raised: #FFFFFF; /* headshot mount, raised surfaces */
  --accent: #1D5B79;       /* links, active states — deep teal-blue */
  --accent-deep: #123449;  /* hover / pressed */
  --line: #D7E1EA;         /* hairline dividers */

  /* Type */
  --font-display: "Newsreader", "Iowan Old Style", serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --content-width: 760px;
  --wide-width: 920px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover, a:focus {
  border-bottom-color: currentColor;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 480; }
h2 { font-size: 1.5rem; margin-top: 2.4em; }
h3 { font-size: 1.15rem; font-weight: 600; font-family: var(--font-body); }

p { margin: 0 0 1.1em; max-width: 68ch; }

.eyebrow-none { /* deliberately no tracked-out eyebrow labels site-wide */ }

/* ---------- Layout shell ---------- */

.page {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
}

/* ---------- Nav ---------- */

.site-nav {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 28px var(--gutter) 20px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.site-nav .name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  border-bottom: none;
}
.site-nav .name:hover { color: var(--accent); }

/* Home page nav has no name/logo (the h1 below already carries it),
   so just push the menu to the right where it normally sits. */
.site-nav--home { justify-content: flex-end; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- Convergence / divergence divider ----------
   A small recurring motif: lines that meet at a point,
   then separate again. Used once per page, under the
   title — not repeated as decoration elsewhere. */

.converge-divider {
  width: 100%;
  max-width: 340px;
  height: 20px;
  margin: 18px 0 36px;
  display: block;
}
.converge-divider path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.55;
}

/* ---------- Hero (About page) ---------- */

.hero {
  position: relative;
  padding-top: clamp(40px, 9vw, 88px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 44px;
  align-items: start;
  margin-top: 8px;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--paper-raised);
  border: 1px solid var(--line);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-text .role {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin-bottom: 1.6em;
}

/* Faint scanpath, drawn on load: a single horizontal-ish trace that
   runs across the gap between the nav and the title. It's sized by
   width alone (height: auto), so it scales uniformly with the
   viewport at its viewBox's own aspect ratio — no independent x/y
   stretching, so the fixation circles never distort into ellipses.
   .hero's top padding (above) is sized to match, so it's confined
   to that gap and can't reach the nav or the title. */
.scanpath {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
  z-index: -1;
  opacity: 0.9;
  pointer-events: none;
  display: block;
}
.scanpath .fix {
  fill: var(--accent);
  opacity: 0.16;
}
.scanpath path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0.28;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-scanpath 2.4s ease-out 0.2s forwards;
}

@keyframes draw-scanpath {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .scanpath path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

@media (max-width: 640px) {
  .scanpath { display: none; }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-photo { max-width: 220px; }
}

/* ---------- Section blocks (Research) ---------- */

.project {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.project:first-of-type { border-top: none; padding-top: 0; }

.project-marker {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.project h3 { margin-bottom: 0.5em; }
.project .funding {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 0.9em;
}

.aims {
  margin: 1em 0 0;
  padding-left: 0;
  list-style: none;
}
.aims li {
  padding-left: 1.4em;
  position: relative;
  margin-bottom: 0.8em;
  max-width: 66ch;
}
.aims li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 1px;
  background: var(--ink-soft);
}
.aims strong { font-weight: 600; }

/* ---------- Publications ---------- */

.pub-year {
  font-family: var(--font-display);
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-top: 2em;
  margin-bottom: 0.6em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.3em;
}
.pub-year:first-of-type { margin-top: 1.2em; }

.pub-list {
  list-style: none;
  margin: 0 0 0.4em;
  padding: 0;
}
.pub-list li {
  margin-bottom: 1em;
  padding-left: 1.6em;
  text-indent: -1.6em;
  max-width: 72ch;
  line-height: 1.55;
}
.pub-list .me { font-weight: 600; }
.pub-list .venue { font-style: italic; }

/* ---------- CV page ---------- */

.cv-section {
  margin-bottom: 2.6em;
}
.cv-section h2 {
  margin-top: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35em;
}
.cv-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 0.9em;
  max-width: 76ch;
}
.cv-entry .desc { min-width: 0; }
.cv-entry .years {
  color: var(--ink-soft);
  font-size: 0.9rem;
  white-space: nowrap;
}
.cv-entry .sub {
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: block;
  margin-top: 2px;
}
.cv-list-plain {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cv-list-plain li {
  margin-bottom: 0.7em;
  max-width: 76ch;
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--wide-width);
  margin: 60px auto 0;
  padding: 24px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
