/* ------------------------------------------------------------
   Tamara Lynne — site styles
   Restrained, gallery-first, mobile-first.
   ------------------------------------------------------------ */

:root {
  --ink: #1d1c1a;
  --muted: #6b6760;
  --rule: #dcd8d0;
  --paper: #fbfaf7;
  --accent: #7a3b2e;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --measure: 38rem;
  --wide: 72rem;
  --gutter: 1rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--serif);
}

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

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 0.5rem 1rem;
}
.skip-link:focus { left: var(--gutter); }

/* ---------- Header & nav ---------- */

.site-header {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 1rem;
  border-bottom: 1px solid var(--rule);
}

.site-title {
  font: 400 1.5rem/1.2 var(--sans);
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.mainnav > ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.mainnav a {
  font: 0.75rem/1.8 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
}
.mainnav a:hover,
.mainnav a[aria-current="page"] { color: var(--ink); }
.mainnav a[aria-current="page"] { border-bottom: 1px solid var(--ink); }

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

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
}

.page-title {
  font: 400 1.75rem/1.25 var(--sans);
  margin: 0 0 1rem;
}

.prose { max-width: var(--measure); }
.prose p, .prose ul { margin: 0 0 1em; }
.prose h2 { font: 400 1.25rem/1.3 var(--sans); margin: 2rem 0 0.5rem; }

/* ---------- Home ---------- */

.home-hero { margin: 0 0 2rem; }
.home-hero img { width: 100%; max-height: 70vh; object-fit: cover; }

/* ---------- Project grid ---------- */

.project-grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 1.5rem;
}

.project-grid a { display: block; color: var(--ink); text-decoration: none; }
.project-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--rule);
  margin-bottom: 0.6rem;
  transition: opacity 0.2s;
}
.project-grid a:hover img { opacity: 0.85; }

.tile-title { display: block; font: 1rem/1.3 var(--sans); }
.tile-meta {
  display: block;
  font: 0.75rem/1.6 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

@media (min-width: 40rem) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 64rem) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Project page ---------- */

.project-meta {
  font: 0.8rem/1.6 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: -0.5rem 0 1.5rem;
}

.back {
  margin-top: 2.5rem;
  font: 0.8rem/1.6 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Gallery ---------- */

.gallery { margin: 0 0 2rem; }

.gallery-stage { position: relative; }

.gallery-slide { margin: 0; display: none; }
.gallery-slide.is-active { display: block; }
.gallery-stage { background: #f1efea; }
/* Show images at their natural size (never stretched), centred */
.gallery-slide img {
  width: auto;
  max-width: 100%;
  max-height: 75vh;
  margin: 0 auto;
}
.gallery-slide figcaption { padding: 0 0.25rem; }
.gallery-slide figcaption {
  font: 0.8rem/1.5 var(--sans);
  color: var(--muted);
  margin-top: 0.5rem;
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  font: 0.8rem/1 var(--sans);
  color: var(--muted);
}
.gallery-controls button {
  font: 1rem/1 var(--sans);
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
.gallery-controls button:hover { border-color: var(--ink); }

/* No-JS fallback: show every image stacked */
.no-js .gallery-slide { display: block; margin-bottom: 1rem; }
.no-js .gallery-controls { display: none; }

/* ---------- Video ---------- */

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0 0 2rem;
  background: #000;
}
.video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

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

.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--rule);
  font: 0.75rem/1.6 var(--sans);
  color: var(--muted);
}

/* ---------- Page details ---------- */

.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

.land, .signoff {
  font-size: 0.9rem;
  color: var(--muted);
}
.signoff { font-style: italic; }

.wide-figure { margin: 0 0 2rem; max-width: var(--wide); }
.wide-figure figcaption {
  font: 0.8rem/1.5 var(--sans);
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Presentations: headings followed by a subtitle line */
.prose h2 + p { margin-top: -0.25rem; color: var(--muted); }

/* CV: year first, entries hang-indented */
.cv .prose { max-width: 46rem; }
.cv .prose ul { list-style: none; padding: 0; }
.cv .prose li {
  padding-left: 6.5rem;
  text-indent: -6.5rem;
  margin-bottom: 0.4rem;
}
.cv .prose li > strong:first-child {
  display: inline-block;
  width: 6.5rem;
  text-indent: 0;
  font: 400 0.85rem/1.6 var(--sans);
  color: var(--muted);
}
@media (max-width: 30rem) {
  .cv .prose li { padding-left: 0; text-indent: 0; }
  .cv .prose li > strong:first-child { display: block; width: auto; }
}

/* Native video files share the 16:9 frame */
.video video { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Home */
.home .gallery { margin-bottom: 2rem; }
.home-intro { font-size: 1.15rem; margin-bottom: 2.5rem; }

/* About */
.prose img.portrait { max-width: 18rem; margin: 0 0 1.5rem; }
@media (min-width: 48rem) {
  .prose img.portrait { float: right; margin: 0.3rem 0 1rem 2rem; }
}
.prose img { margin: 1.5rem 0 0.25rem; }
.prose img + em, .prose p > em:only-child { font: 0.8rem/1.5 var(--sans); color: var(--muted); font-style: normal; }

/* Group Process focus areas */
.area-grid li img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; margin-bottom: 0.6rem; }
.area-grid { margin-bottom: 2.5rem; }

/* Presentations */
.talk { max-width: 46rem; margin: 0 0 3rem; }
.talk h2 { font: 400 1.25rem/1.3 var(--sans); margin: 0; }
.talk-sub { color: var(--muted); margin: 0.2rem 0 1rem; }
