/* Rebecca Caithamer — site styles
   Design system: see CLAUDE.md. One accent color only. */

:root {
  --paper:  #F7F8F6;
  --paper-t:rgba(247,248,246,.90);
  --ink:    #1A2621;
  --green:  #2F5D50;
  --muted:  #5C6A63;
  --rule:   #CFD6D0;   /* quiet dividers — footer, etc. */
  --rule-strong: #A9B3AC;  /* dividers that need to actually register, e.g. sticky header */
  --bar:    3.2rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar) + 1rem);  /* anchors clear the sticky bar */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 18px;
  line-height: 1.68;
}

a { color: var(--green); }

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 1px;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ---------- Title page block (homepage only) ---------- */

.imprint-wrap { padding-top: 5rem; }

.imprint { text-align: center; }

.imprint .name {
  font-family: "EB Garamond", Garamond, serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 3.9rem);
  line-height: 1.05;
  margin: 0;
}

.imprint .field {
  font-family: "EB Garamond", Garamond, serif;
  font-style: italic;
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  color: var(--green);
  margin: .9rem 0 0;
}

.imprint .affiliation {
  font-size: .95rem;
  color: var(--muted);
  margin: 1.6rem 0 2.6rem;
}

/* Homepage headshot, sitting beside the field/affiliation block. Slight
   rounding rather than a full circle or a sharp square — a deliberate
   one-off exception to the site's normal "no border-radius" rule,
   made after testing several alternatives directly. */
.imprint-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.75rem;
}
.imprint-meta-row .imprint-photo {
  width: 6rem;
  height: 6rem;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 12px;
}
.imprint-meta-row .imprint-meta-text { text-align: left; }
.imprint-meta-row .field { margin: 0 0 .5rem !important; }
.imprint-meta-row .affiliation { margin: 0 !important; }
@media (max-width: 32rem) {
  .imprint-meta-row { gap: 1rem; }
  .imprint-meta-row .imprint-photo { width: 5rem; height: 5rem; }
}

/* ---------- Sticky navigation bar ----------
   .navbar carries the base (unstuck) look. .navbar.stuck is the pinned,
   labeled state — added by build for interior pages, added by JS on
   scroll for the homepage. Same class either way, so the CSS doesn't
   care which put it there. */

#nav-sentinel { display: block; height: 1px; margin-bottom: -1px; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .22s ease, border-color .22s ease;
}

.navbar-inner {
  position: relative;   /* containing block for the name while it's absolute */
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.75rem;
  min-height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Unstuck (homepage top): taken out of flow entirely, so it has zero
   effect on centering the nav — this is what the old visibility:hidden
   version got wrong, since a hidden flex item still reserves its width
   and pushed the nav off-center.
   Stuck: back in normal flow, flex-start of a space-between row. */
.navbar-name {
  font-family: "EB Garamond", Garamond, serif;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease;
}

.navbar-name:hover { color: var(--green); }

.navbar.stuck {
  background: var(--paper-t);
  backdrop-filter: saturate(1.3) blur(9px);
  -webkit-backdrop-filter: saturate(1.3) blur(9px);
  border-bottom-color: var(--rule-strong);
}

.navbar.stuck .navbar-inner { justify-content: space-between; gap: 1.5rem; }
.navbar.stuck .navbar-name {
  position: static;
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .2rem 1.65rem;
}

nav a {
  font-variant: small-caps;
  letter-spacing: .05em;
  font-size: 1.02rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

nav a:hover { border-bottom-color: var(--green); }
nav a[aria-current="page"] {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .navbar, .navbar-name { transition: none; }
}

/* ---------- Body ---------- */

.page-title {
  font-family: "EB Garamond", Garamond, serif;
  font-weight: 400;
  font-size: 2.1rem;
  margin: 3rem 0 0;
}

main { margin-top: 3rem; }
.page-title + main { margin-top: 2.25rem; }

/* A hairline between sections, not just whitespace — matters most on the
   long pages (CV, Research) where several sections run together. */
section + section {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 2px solid var(--muted);
}

h2 {
  font-family: "EB Garamond", Garamond, serif;
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--green);
  margin: 0 0 1rem;
}

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

.lede { font-size: 1.08rem; }

.greek {
  font-family: "EB Garamond", Garamond, serif;
  font-weight: 500;
  font-size: 1.05em;
}

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

footer {
  margin-top: 4.5rem;
  padding: 1.75rem 0 3rem;
  border-top: 1px solid var(--rule);
  font-size: .92rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem;
}

footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }
footer p { margin: 0; }

@media (max-width: 32rem) {
  :root { --bar: 2.9rem; }
  .imprint-wrap { padding-top: 3rem; }
  /* Name and all four nav links no longer share one row — that's what
     was causing the cramped wrap (CV dropping to its own line). Stack
     name above nav instead, both centered, each on a full-width row
     with room to breathe. */
  .navbar-inner {
    flex-direction: column;
    padding: .6rem 1.25rem;
    gap: .4rem;
  }
  .navbar.stuck .navbar-inner { justify-content: center; }
  .navbar.stuck .navbar-name { font-size: .95rem; }
  nav ul { gap: .2rem 1.15rem; }
  nav a { font-size: .96rem; }
  .page { padding: 0 1.25rem; }
}

@media print {
  .navbar { display: none; }
}

.entry{margin-bottom:1.75rem}
.entry:last-child{margin-bottom:0}
.entry-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:.15rem 1.5rem}
.entry-title{font-weight:600;margin:0;flex:1 1 19rem}
.entry-date{font-size:.86rem;color:var(--muted);white-space:nowrap}
.entry-meta{color:var(--muted);margin:.15rem 0 0}
.entry-body{margin:.6rem 0 0}
.entry ul{margin:.4rem 0 0;padding-left:1.15rem}
.entry li{margin-bottom:.3rem}
.courses{margin:.55rem 0 0;font-size:.93rem;color:var(--muted);line-height:1.55}
.placeholder{color:var(--muted);font-style:italic}
.grid{margin:0;display:grid;grid-template-columns:10rem 1fr;gap:.5rem 1.25rem}
.grid dt{font-style:italic;color:var(--muted)}
.grid dd{margin:0}
@media(max-width:32rem){.grid{grid-template-columns:1fr;gap:.15rem}.grid dd{margin-bottom:.7rem}}
@media print{.tag{display:none}}
