/* ============================================================
   Aliyah Westbrook — Portfolio
   ------------------------------------------------------------
   One accent color drives every interactive element (links,
   nav, buttons, overlays, focus rings). Change it once here.
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #1a1a18;          /* body text */
  --muted: #67675f;        /* secondary text */
  --line: #e8e8e2;         /* hairlines */
  --well: #efefea;         /* image placeholder ground */
  --accent: #1e3dbe;       /* the single interactive color */
  --accent-deep: #16309b;  /* hover/active state of the accent */
  --error: #a3271e;        /* form validation only */

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --w-page: 70rem;   /* 1120px — overall page width */
  --w-wide: 58rem;   /* heroes, meta rows, media */
  --w-text: 42rem;   /* reading measure: centered, left-aligned */
}

/* ---------- Reset-lite ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.75;             /* generous leading */
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1.15em; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Links: one color, everywhere ---------- */

a { color: var(--accent); text-decoration-thickness: 0.06em; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-deep); }

a, button { transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease; }

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

/* Quiet links: nav, brand, back links — underline appears on hover */
.quiet { text-decoration: none; }
.quiet:hover { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.35em; }

/* ---------- Utilities ---------- */

.wrap {
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.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;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--accent); color: #fff;
  padding: 0.6em 1em; border-radius: 4px;
  text-decoration: none; z-index: 10;
}
.skip-link:focus { top: 1rem; color: #fff; }

.kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.muted { color: var(--muted); }

/* ---------- Header / navigation ---------- */

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-block: 1.5rem;
  column-gap: 2rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }

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

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.25rem;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"],
.site-nav a.is-active {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}

/* Hamburger — hidden on desktop, shown on mobile only */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  margin-right: -0.5rem;
  cursor: pointer;
}
.nav-toggle .bars { display: grid; gap: 5px; }
.nav-toggle .bars span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Main ---------- */

main {
  animation: page-in 0.28s ease-out both;
  padding-bottom: 1rem;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* Text blocks: centered as a block, left-aligned, comfortable measure */
.prose {
  max-width: var(--w-text);
  margin-inline: auto;
}
.prose h2 {
  font-size: 1.625rem;
  margin: 2.6em 0 0.7em;
}
.prose .lede {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--muted);
}

.page-head { margin-top: clamp(3rem, 7vw, 5rem); }

.page-head h1,
.project-head h1 {
  font-size: clamp(2.125rem, 4.5vw, 3.125rem);
  margin-bottom: 0.55em;
}

/* ---------- Portfolio grid ---------- */

.work { margin-top: clamp(3rem, 6vw, 4.5rem); }

.work-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.25rem 2.25rem;
}

.work-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--well);
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* The signature moment: a quiet grid, then a full ultramarine
   flood with a serif whisper on rollover. */
.thumb .overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.thumb .overlay span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: #fff;
}
.work-card a:hover .overlay,
.work-card a:focus-visible .overlay { opacity: 0.94; }

.work-card h2 {
  font-size: 1.375rem;
  margin: 1.1rem 0 0.35rem;
}
.work-card a:hover h2 { color: var(--accent); }
.work-card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ---------- Project pages ---------- */

.back-row { margin-top: clamp(2.25rem, 5vw, 3.25rem); }
.back-row a { font-size: 0.9rem; font-weight: 500; }

.project-head { margin-top: 1.75rem; }

.meta {
  max-width: var(--w-wide);
  margin: 2.75rem auto 0;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.meta div { margin: 0; }
.meta dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta dd {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.media {
  max-width: var(--w-wide);
  margin: 3rem auto;
}
.media img { width: 100%; }
.media figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.7rem;
}
.media.hero { margin-top: 3.25rem; }

.media-pair {
  max-width: var(--w-wide);
  margin: 3rem auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.media-pair figure { margin: 0; }
.media-pair figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.7rem;
}

figure { margin: 0; }

/* Placeholder for an embedded motion reel */
.video-embed {
  aspect-ratio: 16 / 9;
  background: var(--well);
  border: 1px dashed #cfcfc7;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
}
.video-embed p { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 34ch; }

/* Previous / next project */
.project-nav {
  max-width: var(--w-wide);
  margin: 5rem auto 0;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}
.pn {
  display: grid;
  gap: 0.35rem;
  text-decoration: none;
  max-width: 45%;
}
.pn-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.pn-title {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  color: var(--ink);
  line-height: 1.35;
}
.pn:hover .pn-title { color: var(--accent); }
.pn.next { text-align: right; margin-left: auto; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.7em 1.4em;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent); color: #fff; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2rem 0 0.5rem;
}

/* ---------- About ---------- */

.about-grid {
  max-width: var(--w-wide);
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: minmax(0, 20rem) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--well);
}
.about-text { max-width: var(--w-text); }
.fineprint { font-size: 0.9rem; margin-top: 1.75rem; }

/* ---------- Contact ---------- */

.contact-direct {
  font-size: 1.1875rem;
  line-height: 2;
  margin-top: 1.5rem;
}

.contact-form { margin-top: 1rem; }

.field { margin-bottom: 1.5rem; }
.field label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
}
.req { color: var(--accent); }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d5d5cd;
  border-radius: 4px;
  padding: 0.7em 0.9em;
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); }

.error-msg {
  display: none;
  font-size: 0.875rem;
  color: var(--error);
  margin: 0.4rem 0 0;
}
.error-msg.show { display: block; }

.req-note { font-size: 0.875rem; margin: -0.25rem 0 1.75rem; }

.form-status { margin-top: 1.25rem; font-size: 0.95rem; }

/* Honeypot — hidden from people, visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer: contact info on every page ---------- */

.site-footer {
  margin-top: clamp(4.5rem, 9vw, 7.5rem);
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}
.site-footer p { margin: 0.3rem 0; }
.foot-name { color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; }
.foot-copy { font-size: 0.85rem; margin-top: 0.9rem; }

/* ---------- Responsive ---------- */

@media (max-width: 60em) {           /* ~960px */
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 44em) {           /* ~704px */
  .meta { grid-template-columns: 1fr; gap: 1.25rem; }
  .media-pair { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 20rem; }
}

@media (max-width: 40em) {           /* ~640px — mobile nav */
  .work-grid { grid-template-columns: 1fr; gap: 2.75rem; }

  .nav-toggle { display: inline-flex; }

  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 0.75rem;
  }
  .site-nav li a {
    display: block;
    padding: 0.8rem 0;
    font-size: 1.05rem;
    border-top: 1px solid var(--line);
  }
  .site-nav a[aria-current="page"] { text-underline-offset: 0.35em; }

  .project-nav { flex-direction: column; gap: 1.75rem; }
  .pn, .pn.next { max-width: 100%; text-align: left; margin-left: 0; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
