/* =========================================================================
   Erin Woolf — portfolio
   Clean, modern, centered. White background, near-black text.
   Theme tokens (:root) are overridden at runtime from content/site.json.
   ========================================================================= */

:root {
  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --color-bg: #ffffff;
  --color-text: #141414;
  --color-muted: #8a8a8a;
  --color-accent: #141414;     /* minimal: accent ~ text, used for hover underlines */
  --color-line: #ececec;
  --color-card-bg: #f4f4f4;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
p { margin: 0 0 1.1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 720px; }

/* ---------- header / nav (split: brand left, links right) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--color-line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1.15rem;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.brand .name { font-family: var(--font-heading); font-weight: 500; font-size: 1.45rem; letter-spacing: -0.01em; }
.brand .subtitle { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--color-muted); margin-top: .3rem; }
.nav-links { display: flex; gap: clamp(1rem, 2.4vw, 2.2rem); align-items: center; }
.nav-links a {
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--color-text);
  padding-bottom: 3px; border-bottom: 1px solid transparent; transition: border-color .2s, opacity .2s;
}
.nav-links a:hover, .nav-links a.active { border-bottom-color: var(--color-text); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-text); margin: 5px 0; transition: .2s; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: center; gap: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 70vh; }
  .nav-links a { width: 100%; text-align: center; padding: .95rem var(--gutter); border-bottom: 1px solid var(--color-line); }
}

/* ---------- homepage hero (centered) ---------- */
.hero { padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem); text-align: center; }
.hero .kicker { font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 1.5rem; }
.hero .tagline { font-family: var(--font-heading); font-weight: 400; font-size: clamp(1.7rem, 4.2vw, 3rem); line-height: 1.18; max-width: 18ch; margin: 0 auto; letter-spacing: -0.02em; }
.hero-image { margin: clamp(2rem,5vw,3.5rem) auto 0; max-width: 1000px; border-radius: var(--radius); overflow: hidden; }
.hero-image img { width: 100%; height: auto; object-fit: cover; }

/* ---------- project grid (home) ---------- */
.work-grid {
  display: grid; gap: clamp(1.75rem, 3.5vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding-block: clamp(1rem, 3vw, 2.5rem) clamp(4rem, 8vw, 6rem);
}
.card { display: block; color: inherit; text-align: center; }
.card-thumb {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius);
  background: var(--color-card-bg); position: relative;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-thumb img { transform: scale(1.035); }
.card-thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--color-muted); font-family: var(--font-heading); font-size: 1.15rem; padding: 1rem; }
.card-title { font-family: var(--font-heading); font-weight: 500; font-size: 1.2rem; margin: 1rem 0 .2rem; }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 3px; }
.card-tag { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); }

/* ---------- project page (centered) ---------- */
.project-hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.project-hero .eyebrow { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 1rem; }
.project-hero h1 { margin-bottom: .35rem; }
.project-hero .subtitle { font-size: 1.15rem; color: var(--color-muted); max-width: 56ch; margin: 0 auto; }
.project-hero-image { margin: clamp(2rem,5vw,3rem) auto; max-width: 1000px; border-radius: var(--radius); overflow: hidden; }

.project-body { padding-block: clamp(0.7rem, 2vw, 1.4rem); text-align: center; }
/* ~20% smaller than before, wider column (smaller side margins) so it's less condensed */
.project-intro { font-size: 0.96rem; line-height: 1.65; max-width: 860px; margin: 0 auto; }
.section-block { padding-block: clamp(1.75rem, 4vw, 3rem); }
.section-block h2, .section-block h3 { margin-bottom: .4rem; }
.section-block .section-text { max-width: 60ch; margin: 0 auto; color: var(--color-text); }
.section-block .caption { color: var(--color-muted); font-size: .92rem; max-width: 56ch; margin: .6rem auto 0; }

/* masonry gallery: all assets visible at a glance, centered container */
.gallery { columns: 3 300px; column-gap: clamp(1rem, 2vw, 1.5rem); margin: 1.75rem auto 0; max-width: 1100px; text-align: center; }
.gallery.cols-2 { columns: 2 380px; }
.gallery figure { break-inside: avoid; margin: 0 0 clamp(1rem, 2vw, 1.5rem); border-radius: var(--radius); overflow: hidden; background: var(--color-card-bg); }
.gallery img { width: 100%; height: auto; cursor: zoom-in; transition: opacity .2s; }
.gallery img:hover { opacity: .9; }
.gallery figcaption { font-size: .82rem; color: var(--color-muted); padding: .6rem .7rem .8rem; text-align: center; }
.gallery .ph { display: grid; place-items: center; aspect-ratio: 4/3; color: var(--color-muted); font-family: var(--font-heading); padding: 1rem; font-size: .95rem; }
.gallery figure video { width: 100%; height: auto; display: block; }
.gallery .media-audio { background: var(--color-card-bg); padding: 1rem 1rem 1.1rem; }
.gallery .media-audio audio { width: 100%; display: block; }
video, audio { max-width: 100%; }

/* small per-project credits footer */
.project-credits {
  font-size: .8rem; line-height: 1.6; color: var(--color-muted);
  max-width: 760px; margin: clamp(1.75rem, 4vw, 2.75rem) auto 0;
  padding-top: 1.25rem; border-top: 1px solid var(--color-line);
}

/* video embeds */
.video-wrap { position: relative; padding-top: 56.25%; margin: 1.5rem auto; max-width: 1000px; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-wrap iframe, .video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* project nav strip */
.project-strip { border-top: 1px solid var(--color-line); margin-top: clamp(2.5rem,6vw,4rem); padding-block: clamp(2rem,4vw,3rem) clamp(3.5rem,7vw,5rem); text-align: center; }
.project-strip h4 { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 1.25rem; }
.strip-links { display: flex; flex-wrap: wrap; gap: .55rem 1.1rem; justify-content: center; }
.strip-links a { font-size: .82rem; letter-spacing: .04em; color: var(--color-muted); }
.strip-links a:hover, .strip-links a.active { color: var(--color-text); }

/* ---------- generic pages ---------- */
.page { padding-block: clamp(3rem, 7vw, 5rem); text-align: center; }
.page h1 { margin-bottom: 1.4rem; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; max-width: 980px; margin: 0 auto; text-align: left; }
.about-grid img { border-radius: var(--radius); }
@media (max-width: 760px){ .about-grid { grid-template-columns: 1fr; text-align: center; } }
.about-text p { font-size: 1.2rem; line-height: 1.7; }
.social-list { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; padding: 0; margin: 1.5rem auto; list-style: none; justify-content: center; }
.social-list a { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid var(--color-line); padding-bottom: 3px; }
.social-list a:hover { border-bottom-color: var(--color-text); }
.btn {
  display: inline-block; background: var(--color-text); color: #fff;
  padding: .75rem 1.6rem; border-radius: 999px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  margin-top: .75rem; transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.resume-img { max-width: 860px; margin: 0 auto; box-shadow: 0 6px 30px rgba(0,0,0,.07); border-radius: var(--radius); }

.contact-form { max-width: 520px; margin: 1.75rem auto 0; text-align: left; }
.contact-form label { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); margin: 1.1rem 0 .4rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .75rem .9rem; border: 1px solid var(--color-line);
  border-radius: var(--radius); font: inherit; background: var(--color-bg); color: var(--color-text);
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .btn { border: 0; cursor: pointer; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--color-line); padding-block: 2.5rem 3rem; color: var(--color-muted); font-size: .76rem; letter-spacing: .08em; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; align-items: center; text-transform: uppercase; }
.site-footer a { border-bottom: 1px solid transparent; }
.site-footer a:hover { border-bottom-color: var(--color-text); }

/* ---------- lightbox ---------- */
.lb-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.97); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 4vh 4vw; }
.lb-overlay.open { display: flex; }
.lb-overlay img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; border-radius: 2px; box-shadow: 0 10px 40px rgba(0,0,0,.18); }
.lb-cap { position: fixed; bottom: 16px; left: 0; right: 0; text-align: center; color: #555; font-size: .85rem; padding: 0 1rem; }
.lb-btn { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.06); color: #111; border: 0; cursor: pointer; width: 50px; height: 50px; border-radius: 50%; font-size: 1.6rem; line-height: 1; transition: background .2s; }
.lb-btn:hover { background: rgba(0,0,0,.14); }
.lb-prev { left: 2.5vw; } .lb-next { right: 2.5vw; }
.lb-close { position: fixed; top: 20px; right: 26px; background: none; border: 0; color: #111; font-size: 2.2rem; cursor: pointer; line-height: 1; }
@media (max-width:600px){ .lb-btn{ width:42px;height:42px;font-size:1.3rem; } }

.loading { padding: 5rem 0; text-align: center; color: var(--color-muted); }
