/* ===========================================================================
   STEPHEN PEASLEY — ACTOR ONE-PAGER  ·  styles.css
   ---------------------------------------------------------------------------
   Warm near-monochrome palette, typography-forward, single column.
   Change the values in :root to retune the whole page.
   =========================================================================== */

:root {
  /* --- Color (warm, near-monochrome) --- */
  --bg:        #faf8f3;   /* page background — warm ivory */
  --bg-panel:  #f2efe7;   /* recessed panels (résumé, reel) */
  --ink:       #211e1a;   /* primary text — warm near-black */
  --muted:     #6c655b;   /* secondary text */
  --faint:     #726c5c;   /* labels, meta — AA: 4.9:1 on --bg */
  --line:      #e3ddd1;   /* hairlines */
  --accent:    #9c5a3c;   /* the single subtle accent — used sparingly */

  /* --- Type --- */
  --serif: 'Ovo', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* --- Layout --- */
  --maxw: 1080px;   /* outer shell */
  --readw: 680px;   /* comfortable reading column */
  --pad: clamp(1.25rem, 5vw, 3rem);
}

/* --- Reset-ish --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* --- Keyboard focus: visible ring on every interactive element --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Skip link: hidden until focused --- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 50;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.7rem 1.1rem;
  border-radius: 2px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.75rem; }

/* Shared inner-width helper for sections */
.section__body,
.hero,
.topbar__inner,
.footer { width: 100%; }

/* ===========================================================================
   TOP NAV — slim, quiet, sticky
   =========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem var(--pad);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.topbar__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.topbar__nav {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.8rem);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar__nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.topbar__nav a:hover { color: var(--ink); border-color: var(--accent); }

/* ===========================================================================
   HERO
   =========================================================================== */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6.5rem) var(--pad) clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-areas: "text photo";
  align-items: center;
}
.hero__text  { grid-area: text; }
.hero__photo { grid-area: photo; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1.1rem;
}
.hero__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 1.1rem;
}
.hero__tagline {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.4;
  color: var(--muted);
  font-style: italic;
  max-width: 26ch;
  margin: 0 0 2rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.hero__status {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--faint);
  margin: 0;
}

.hero__photo {
  margin: 0;
}
.hero__photo-caption {
  margin-top: 0.85rem;
  text-align: right;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.hero__photo-caption a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.hero__photo-caption a:hover { color: var(--accent); border-color: var(--accent); }
.hero__photo-caption .dl-icon {
  flex: none;
  transition: transform 0.2s ease;
}
.hero__photo-caption a:hover .dl-icon { transform: translateY(1px); }
.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  /* very soft, classy lift — not a glossy card shadow */
  box-shadow: 0 1px 0 rgba(33,30,26,0.04), 0 24px 48px -28px rgba(33,30,26,0.35);
}

/* ===========================================================================
   BUTTONS
   =========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  padding: 0.8rem 1.4rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid var(--ink);
  min-height: 44px; /* comfortable touch target */
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.btn--sm { padding: 0.6rem 1rem; font-size: 0.78rem; }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }

/* ===========================================================================
   SECTIONS — single column, label on top, body below
   =========================================================================== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad);
  border-top: 1px solid var(--line);
  display: grid;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  grid-template-columns: 180px 1fr;
}
.section__label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0.35rem 0 0;
}
.section__body { max-width: var(--readw); }

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

/* ===========================================================================
   CREDITS
   =========================================================================== */
.credits__group + .credits__group { margin-top: 2.25rem; }
.credits__cat {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.credits { list-style: none; margin: 0; padding: 0; }
.credit {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title role"
    "company role";
  column-gap: 1rem;
  row-gap: 0.1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.credit:last-child { border-bottom: none; }
.credit__title {
  grid-area: title;
  font-size: 1.15rem;
  font-weight: 500;
}
.credit__company {
  grid-area: company;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}
.credit__role {
  grid-area: role;
  align-self: center;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  text-align: right;
}

/* ===========================================================================
   RÉSUMÉ
   =========================================================================== */
.resume__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.resume__note {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
.resume__frame {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  border-radius: 2px;
  overflow: hidden;
}
.resume__pdf {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 520px;
  border: 0;
}
.resume__fallback {
  display: none; /* desktop shows the embedded iframe; mobile swaps to this */
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 3rem 1.5rem;
  text-align: center;
}
.resume__fallback p {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

.resume__hint {
  margin: 0.9rem 0 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}
.resume__hint a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.resume__hint a:hover { color: var(--accent); border-color: var(--accent); }

/* ===========================================================================
   REEL
   =========================================================================== */
.reel__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  overflow: hidden;
}
.reel__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.reel__embed--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg,
      #efeae0 0 14px, #e8e2d6 14px 28px);
  border: 1px solid var(--line);
}
.reel__placeholder-label {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #615b4d; /* AA: 5.6:1 on the striped placeholder */
}

/* ===========================================================================
   CONTACT
   =========================================================================== */
.contact { margin: 0; }
.contact__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.contact__row:last-child { border-bottom: none; }
.contact dt {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 0.15rem;
}
.contact dd {
  margin: 0;
  font-size: 1.1rem;
  overflow-wrap: anywhere; /* long URLs wrap instead of forcing horizontal scroll */
}
.contact a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact a:hover { color: var(--accent); border-color: var(--accent); }
.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  visibility: hidden;
}

.contact-form {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.25rem;
}
.contact-form__row {
  display: grid;
  gap: 0.45rem;
}
.contact-form label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); }
.contact-form input:hover,
.contact-form textarea:hover { border-color: #d6cfc0; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.contact-form button[type="submit"] {
  justify-self: start;
  margin-top: 0.25rem;
  cursor: pointer;
}
.contact-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: default;
}

.contact-form__success {
  margin-top: 2.5rem;
  padding: 2rem 1.75rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--bg-panel);
  border-radius: 2px;
}
.contact-form__success[hidden] { display: none; }
.contact-form__success:focus { outline: none; }
.contact-form__success h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
}
.contact-form__success p {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

/* ===========================================================================
   FOOTER
   =========================================================================== */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.footer span, .footer__top { white-space: nowrap; }
.footer__top {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer__top:hover { color: var(--accent); }

/* ===========================================================================
   REVEAL — one-time gentle fade-up on load. Pure CSS, self-completing.
   Gated on html.js so that if the (tiny) head script doesn't run, content
   simply shows with no hidden state. Reduced-motion users skip it.
   To make the page 100% static: delete the <script> in index.html's <head>
   and remove these rules.
   =========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.js .reveal {
  opacity: 0;
  animation: fadeUp 0.7s ease both;
}
.js .hero__photo.reveal { animation-delay: 0.1s; }
.js .section.reveal     { animation-delay: 0.05s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; animation: none; }
  html { scroll-behavior: auto; }
}

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */
@media (max-width: 760px) {
  body { font-size: 1.06rem; }

  /* Hero stacks: photo first (anchors the page), then text */
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "text";
    text-align: left;
    padding-top: clamp(2rem, 8vw, 3rem);
  }
  .hero__photo { max-width: 320px; }
  .hero__photo-caption { text-align: left; }

  /* Sections stack: label above body */
  .section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .topbar__nav { gap: 0.95rem; }
  .contact__row { grid-template-columns: 1fr; gap: 0.2rem; }

  /* Let long role text wrap instead of forcing the row wider than the screen */
  .credit__role { white-space: normal; }

  /* Embedded PDF viewers are unreliable on mobile — show a tap-through panel */
  .resume__pdf { display: none; }
  .resume__fallback { display: flex; }
}

@media (max-width: 460px) {
  /* Keep all four nav links; drop the redundant name to make room */
  .topbar__name { display: none; }
  .topbar__inner { justify-content: center; }
  .topbar__nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.1rem;
  }

  .credit {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "company" "role";
  }
  .credit__role { text-align: left; margin-top: 0.2rem; }
}
