/* ============================================================
   Hope K. McCoy, Ph.D. — hopekmccoy.com
   Foundation stylesheet. Design tokens, reset, a11y, base type.
   Visual composition (hero, cards, page layouts) layered on top
   after the inspiration scan lands.
   ============================================================ */

/* ---- Design tokens ---------------------------------------- */
:root {
  /* Palette (from build spec) */
  --ink:        #1B1B1B;
  --paper:      #FAF7F2;   /* warm off-white */
  --oxblood:    #6E1423;   /* links, rules, small-caps labels */
  --gold:       #B8860B;   /* award markers, hover accents — sparingly */

  /* Tinted neutrals derived from paper/ink (never pure black/white) */
  --ink-soft:   #3a3735;   /* secondary text */
  --ink-muted:  #6b6660;   /* captions, meta */
  --rule:       #e3ddd3;   /* hairline dividers on paper */
  --paper-2:    #f3eee5;   /* faint card / band tint */
  --oxblood-deep:#56101c;  /* link hover */

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid type scale (refined after inspiration scan) */
  --step--1: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --step-0:  clamp(1.0625rem, 1.02rem + 0.22vw, 1.175rem);  /* 17–18.8px body */
  --step-1:  clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-2:  clamp(1.6rem, 1.4rem + 1vw, 2.25rem);
  --step-3:  clamp(2.1rem, 1.7rem + 2vw, 3.25rem);
  --step-4:  clamp(2.7rem, 2rem + 3.4vw, 4.75rem);
  --step-5:  clamp(3.1rem, 2rem + 5.2vw, 6.25rem);          /* hero name */

  /* Spacing (8px rhythm) */
  --sp-1: 0.5rem;  --sp-2: 1rem;   --sp-3: 1.5rem;  --sp-4: 2rem;
  --sp-5: 3rem;    --sp-6: 4rem;   --sp-7: 6rem;    --sp-8: 8rem;

  /* Widths */
  --measure: 42rem;     /* ~720px prose */
  --wide:    69rem;     /* ~1100px hero / grids */

  --radius: 2px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--oxblood-deep); }

/* ---- Typography base -------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 460;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-optical-sizing: auto;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { max-width: var(--measure); }
p + p { margin-top: var(--sp-3); }

/* Small-caps eyebrow label (oxblood) */
.eyebrow {
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oxblood);
}

/* Pull quote — Fraunces italic */
.pullquote {
  font-family: var(--display);
  font-style: italic;
  font-weight: 380;
  font-size: var(--step-2);
  line-height: 1.28;
  letter-spacing: -0.01em;
}

/* ---- Layout helpers --------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }
.prose { width: min(100% - 2.5rem, var(--measure)); margin-inline: auto; }
.section { padding-block: clamp(var(--sp-5), 7vw, var(--sp-7)); }
.rule { border: 0; border-top: 1px solid var(--rule); }

/* ---- Accessibility ---------------------------------------- */
.skip-link {
  position: absolute; left: var(--sp-2); top: -100%;
  background: var(--ink); color: var(--paper);
  padding: var(--sp-1) var(--sp-2); border-radius: var(--radius);
  z-index: 100; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--sp-2); }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; border-radius: var(--radius); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- Scroll reveal (sparing) ------------------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---- Optical sizing by role ------------------------------- */
.display-xl { font-variation-settings: "opsz" 144, "wght" 460, "SOFT" 0, "WONK" 0; }
h1, h2 { font-variation-settings: "opsz" 144, "wght" 460, "SOFT" 0, "WONK" 0; }
h3, h4 { font-variation-settings: "opsz" 72, "wght" 480, "SOFT" 0, "WONK" 0; }

/* ---- Header / nav ----------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.nav {
  width: min(100% - 2.5rem, var(--wide)); margin-inline: auto;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-3); padding-block: var(--sp-3);
}
.wordmark {
  font-family: var(--display);
  font-size: var(--step-1);
  font-variation-settings: "opsz" 72, "wght" 500;
  letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.nav-links { display: flex; gap: clamp(var(--sp-2), 2.5vw, var(--sp-4)); list-style: none; padding: 0; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--body); font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.02em; color: var(--ink-soft); text-decoration: none;
  padding-block: 2px; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--oxblood); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--oxblood); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--ink); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: var(--sp-1); color: var(--ink); }
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: var(--sp-2) 1.25rem var(--sp-3);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav-links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { display: block; padding-block: var(--sp-2); font-size: var(--step-0); border-top: 1px solid var(--rule); }
  .nav-links a::after { display: none; }            /* no animated underline in stacked menu */
  .nav-links a[aria-current="page"] { color: var(--oxblood); }
  .nav-links li:first-child a { border-top: 0; }
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--body); font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.85em 1.5em; border-radius: var(--radius); text-decoration: none;
  border: 1px solid var(--oxblood); transition: all 0.25s var(--ease); cursor: pointer;
}
.btn--primary { background: var(--oxblood); color: var(--paper); }
.btn--primary:hover { background: var(--oxblood-deep); color: var(--paper); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--oxblood); }
.btn--ghost:hover { background: var(--oxblood); color: var(--paper); }

/* ---- Hero ------------------------------------------------- */
.hero { padding-block: clamp(var(--sp-5), 9vw, var(--sp-7)) clamp(var(--sp-6), 9vw, var(--sp-8)); }
.hero-grid {
  display: grid; gap: clamp(var(--sp-4), 5vw, var(--sp-6)); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero-name {
  font-size: min(8.5vw, 3rem); line-height: 1.05; letter-spacing: -0.02em;
  white-space: nowrap;                 /* keep the full name on one line */
  margin: var(--sp-2) 0 var(--sp-3);
}
@media (min-width: 860px) {
  /* in the two-column hero, size to fit the text column on one line */
  .hero-name { font-size: clamp(2.4rem, 3.3vw, 3.2rem); }
}
.hero-positioning {
  font-family: var(--display); font-style: italic; font-variation-settings: "opsz" 40;
  font-size: var(--step-1); line-height: 1.4; color: var(--ink-soft);
  margin-top: var(--sp-3); max-width: 30ch;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }

/* ---- Portrait / figure ------------------------------------ */
.portrait { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait--hero { aspect-ratio: 4 / 5; max-width: 25rem; justify-self: end; width: 100%; }
.portrait--about { aspect-ratio: 5 / 6; }
figure { margin: 0; }
figcaption { font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--sp-2); font-style: italic; }

/* Placeholder slot (shown until a real photo is dropped in) */
.img-placeholder {
  display: grid; place-content: center; text-align: center; gap: 0.4rem;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, color-mix(in srgb, var(--rule) 40%, transparent) 22px 23px),
    var(--paper-2);
  color: var(--ink-muted); padding: var(--sp-4);
}
.img-placeholder span { font-family: var(--body); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; }
.img-placeholder em { font-family: var(--display); font-style: italic; font-size: var(--step-0); color: var(--ink-soft); }

/* ---- Anchor / pull quote band ----------------------------- */
.quote-band { background: var(--ink); color: var(--paper); }
.quote-band .wrap { padding-block: clamp(var(--sp-6), 11vw, var(--sp-8)); }
.quote-band blockquote {
  font-family: var(--display); font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 380;
  font-size: var(--step-3); line-height: 1.24; letter-spacing: -0.015em;
  max-width: 24ch; margin: 0;
}
.quote-band cite { display: block; font-family: var(--body); font-style: normal; font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--paper) 70%, var(--ink)); margin-top: var(--sp-3); }

/* ---- Eyebrow + section heading ---------------------------- */
.section-head { margin-bottom: var(--sp-4); }
.section-head .eyebrow { display: block; margin-bottom: var(--sp-2); }
.section-head h2 { font-size: var(--step-2); }

/* ---- "Currently" cards ------------------------------------ */
.currently { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .currently { grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); } }
.now-card { padding-top: var(--sp-3); border-top: 2px solid var(--oxblood); }
.now-card h3 { font-size: var(--step-1); font-variation-settings: "opsz" 72, "wght" 500; }
.now-card .role { font-size: var(--step--1); color: var(--ink-muted); margin-top: 0.35rem; letter-spacing: 0.02em; }
.now-card p { font-size: var(--step-0); margin-top: var(--sp-2); }

/* ---- Book feature ----------------------------------------- */
.book {
  display: grid; gap: clamp(var(--sp-4), 5vw, var(--sp-6)); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .book { grid-template-columns: 0.8fr 1.2fr; } }
.book-cover { box-shadow: 0 18px 40px -22px rgba(27,27,27,0.45); border-radius: var(--radius); align-self: start; max-width: 320px; }
.book .award { display: inline-flex; align-items: center; gap: 0.5em; font-size: var(--step--1); color: var(--gold); font-weight: 600; letter-spacing: 0.03em; margin-top: var(--sp-3); }
.book .award::before { content: ""; width: 1.4em; height: 1px; background: var(--gold); }
.book h2 { font-style: italic; font-size: var(--step-2); }

/* ---- Credentials strip ------------------------------------ */
.creds { background: var(--paper-2); border-block: 1px solid var(--rule); }
.creds .wrap { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); justify-content: center; padding-block: var(--sp-4); text-align: center; }
.creds span { font-family: var(--body); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.creds span + span { position: relative; }
.creds b { color: var(--oxblood); font-weight: 600; }

/* ---- Publication / work list ------------------------------ */
.works { display: grid; gap: 0; }
.work { display: grid; gap: 0.3rem 1.5rem; padding-block: var(--sp-4); border-top: 1px solid var(--rule); grid-template-columns: 1fr; }
@media (min-width: 680px) { .work { grid-template-columns: 5.5rem 1fr; } }
.work:last-child { border-bottom: 1px solid var(--rule); }
.work .yr { font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); padding-top: 0.4rem; }
.work h3 { font-size: var(--step-1); font-variation-settings: "opsz" 72, "wght" 480; }
.work .desc { font-size: var(--step-0); color: var(--ink-soft); margin-top: 0.4rem; }
.work .meta { font-size: var(--step--1); color: var(--ink-muted); margin-top: 0.4rem; }
.work .meta a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 2px; }
.work .meta a:hover { color: var(--oxblood); text-decoration-color: var(--oxblood); }
.work.is-progress h3 { font-style: italic; }

/* ---- Fieldwork strip -------------------------------------- */
.fieldwork { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; text-align: center; }
@media (min-width: 720px) { .fieldwork { grid-template-columns: repeat(3, 1fr); } }
.fieldwork .place { font-family: var(--display); font-size: var(--step-1); font-variation-settings: "opsz" 72; }
.fieldwork .when { display: block; font-family: var(--body); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-top: 0.5rem; }

/* ---- Talks / press list ----------------------------------- */
.talks { display: grid; gap: 0; }
.talk { padding-block: var(--sp-4); border-top: 1px solid var(--rule); }
.talk:last-child { border-bottom: 1px solid var(--rule); }
.talk h3 { font-size: var(--step-1); font-variation-settings: "opsz" 72, "wght" 470; }
.talk .where { font-size: var(--step-0); color: var(--ink-soft); margin-top: 0.35rem; }
.talk .where a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 2px; }
.talk .where a:hover { color: var(--oxblood); text-decoration-color: var(--oxblood); }
.talk .when { font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-top: 0.25rem; }

/* ---- Music -------------------------------------------------*/
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); margin-top: var(--sp-4); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.streaming { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }

/* ---- Contact links ---------------------------------------- */
.contact-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-4); }
.contact-links a { font-size: var(--step-0); font-weight: 500; }
.email-link { font-family: var(--display); font-size: var(--step-2); font-style: italic; word-break: break-word; }

/* ---- Placeholder flag (⏳ pending items) ------------------- */
.pending {
  background: linear-gradient(transparent 60%, color-mix(in srgb, var(--gold) 28%, transparent) 0);
  padding: 0 0.1em; border-radius: 1px;
}
.pending-note { display: inline-block; font-size: var(--step--1); font-style: italic; color: var(--ink-muted); background: color-mix(in srgb, var(--gold) 16%, var(--paper)); border: 1px dashed color-mix(in srgb, var(--gold) 55%, var(--rule)); padding: 0.15em 0.6em; border-radius: var(--radius); }

/* ---- Footer ----------------------------------------------- */
.site-footer { background: var(--ink); color: color-mix(in srgb, var(--paper) 80%, var(--ink)); margin-top: var(--sp-7); }
.site-footer .wrap { display: grid; gap: var(--sp-4); padding-block: var(--sp-6) var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.site-footer .f-name { font-family: var(--display); font-size: var(--step-2); color: var(--paper); font-variation-settings: "opsz" 144; }
.site-footer .f-tag { font-size: var(--step--1); color: color-mix(in srgb, var(--paper) 64%, var(--ink)); margin-top: var(--sp-2); max-width: 36ch; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.site-footer nav a { color: color-mix(in srgb, var(--paper) 78%, var(--ink)); text-decoration: none; font-size: var(--step--1); letter-spacing: 0.04em; }
.site-footer nav a:hover { color: var(--paper); }
.site-footer .f-base { grid-column: 1 / -1; border-top: 1px solid color-mix(in srgb, var(--paper) 18%, var(--ink)); margin-top: var(--sp-3); padding-top: var(--sp-3); display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); justify-content: space-between; font-size: var(--step--1); color: color-mix(in srgb, var(--paper) 55%, var(--ink)); }

/* ---- Page intro (interior pages) -------------------------- */
.page-intro { padding-block: clamp(var(--sp-5), 8vw, var(--sp-7)) var(--sp-4); }
.page-intro h1 { font-size: var(--step-4); }
.page-intro .lede { font-family: var(--display); font-style: italic; font-variation-settings: "opsz" 40; font-size: var(--step-1); color: var(--ink-soft); margin-top: var(--sp-3); max-width: 34ch; }

/* ---- About bio prose -------------------------------------- */
.bio p { font-size: var(--step-0); }
.bio .pullquote { margin-block: var(--sp-5); color: var(--oxblood); max-width: 20ch; }

/* ---- Testimonials ----------------------------------------- */
.section-head .head-note { display: block; margin-top: var(--sp-2); font-family: var(--body); font-size: var(--step--1); color: var(--ink-muted); letter-spacing: 0.02em; text-transform: none; max-width: 48ch; }
.quotes-grid { display: grid; gap: var(--sp-4) var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 760px) { .quotes-grid { grid-template-columns: 1fr 1fr; } }
.tquote { padding-top: var(--sp-3); border-top: 1px solid var(--rule); }
.tquote blockquote { margin: 0; font-family: var(--display); font-style: italic; font-variation-settings: "opsz" 72, "wght" 380; font-size: var(--step-1); line-height: 1.42; letter-spacing: -0.01em; color: var(--ink); }
.tquote .src { display: block; margin-top: var(--sp-2); font-family: var(--body); font-style: normal; font-size: var(--step--1); letter-spacing: 0.04em; color: var(--ink-muted); }
.tquote.feature { grid-column: 1 / -1; border-top: 2px solid var(--oxblood); }
.tquote.feature blockquote { font-size: var(--step-2); line-height: 1.3; max-width: 32ch; }

/* ---- Affiliations marks ----------------------------------- */
.creds .wrap { flex-direction: column; gap: var(--sp-3); }
.affiliations { font-family: var(--body); font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); text-align: center; line-height: 1.9; }
.affiliations b { color: var(--ink-soft); font-weight: 600; }
.creds-line { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); justify-content: center; }

/* ---- Fieldwork photo band --------------------------------- */
.field-photos { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; margin-bottom: var(--sp-5); }
@media (min-width: 680px) { .field-photos { grid-template-columns: 1fr 1fr; } }
.field-photos .portrait { aspect-ratio: 4 / 3; }
.field-photos figcaption { text-align: center; }
