/* ------------------------------------------------------------------
   Sarah Bick. Portfolio styles
   Minimal, all sans-serif, generous whitespace, responsive grid.
   ------------------------------------------------------------------ */

:root {
  --bg: #f6f4f0;
  --bg-elev: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #595959;
  --ink-mute: #8a8a8a;
  --rule: #e4e0d8;
  --accent: #1a1a1a;

  --max: 1320px;
  --gutter: clamp(18px, 4vw, 56px);
  --section-y: clamp(64px, 10vw, 140px);
  --header-h: 84px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue",
               Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 860px) {
  :root { --header-h: 72px; }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.brand:hover, .brand:focus-visible { text-decoration: none; }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 14px var(--gutter);
  background: rgba(246, 244, 240, 0.9);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.brand-name {
  font-size: clamp(1.35rem, 1.7vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.brand-role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  margin-top: 6px;
}

.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.site-nav a { padding: 10px 2px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 60;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  margin: 6px auto;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 40;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  padding: 24px;
}
.mobile-nav a { padding: 14px 20px; }
.mobile-nav[hidden] { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(90px, 11vw, 180px) var(--gutter) clamp(120px, 14vw, 180px);
  min-height: clamp(620px, 62vw, 960px);
  margin: 0;
  background-image: url("hero.jpg");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  background-color: #efece5;
}
.hero > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.hero h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(2.2rem, 6.4vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero-eyebrow {
  display: block;
  font-size: clamp(0.7rem, 1vw, 0.78rem);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.hero-line { display: block; }
.hero-line.muted { color: var(--ink-mute); }

.hero-sub {
  max-width: 56ch;
  margin: clamp(28px, 4vw, 40px) 0 0;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */

.work-section,
.about-section,
.contact-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  border-top: 1px solid var(--rule);
}

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

.section-head h2 {
  margin: 0;
  font-size: clamp(0.78rem, 1.05vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: var(--ink-soft);
}

.section-intro {
  margin: 14px 0 0;
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ---------- Project card ---------- */

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(64px, 9vw, 120px);
}
.project:last-child { margin-bottom: 0; }

.project-media {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.project-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.project-meta { padding-top: 4px; }

.project-meta h3 {
  margin: 0 0 22px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.project-meta dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 24px;
  row-gap: 10px;
  font-size: 0.95rem;
}
.project-meta dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  padding-top: 3px;
  white-space: nowrap;
}
.project-meta dd {
  margin: 0;
  color: var(--ink);
}

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

.about-bio { max-width: 80ch; }
.about-bio p { margin: 0 0 18px; font-size: 1.02rem; color: var(--ink); }
.about-bio .lede {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 28px;
}
.about-bio .lede em { font-style: italic; color: var(--ink-soft); }
.about-bio .meta-line { font-size: 0.9rem; color: var(--ink-soft); }

.credit-grid {
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.list-block h3 {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--ink);
}
.list-block .creds {
  margin: 0 0 16px;
  font-size: 0.8rem;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.cred-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 24px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- News ---------- */

.news-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  border-top: 1px solid var(--rule);
}
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  max-width: 880px;
}
.news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.news-item:first-child { border-top: 0; padding-top: 0; }
.news-item time {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  padding-top: 3px;
  white-space: nowrap;
}
.news-body { display: flex; flex-direction: column; gap: 16px; }
.news-body p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.55;
}
.news-figure {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  padding: 8px;
  max-width: 640px;
  transition: opacity 0.2s ease;
}
.news-figure:hover { opacity: 0.9; text-decoration: none; }
.news-figure img { display: block; width: 100%; height: auto; }

@media (max-width: 520px) {
  .news-item { grid-template-columns: 1fr; gap: 6px; }
  .news-list { max-width: none; }
}

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

.contact-section { text-align: left; }
.contact-lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.contact-email {
  margin: 18px 0 0;
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  font-weight: 500;
}
.contact-email a {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  display: inline-block;
}
.contact-email a:hover { text-decoration: none; color: var(--ink-soft); border-color: var(--ink-soft); }

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

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) 60px;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.site-footer p { margin: 0; }

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

@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-toggle { display: block; }

  .hero h1 { font-size: clamp(2rem, 9vw, 3.4rem); }

  .hero {
    min-height: 0;
    padding: clamp(40px, 8vw, 80px) var(--gutter) 0;
    background-image: none;
    background-color: var(--bg);
  }
  .hero::after {
    content: "";
    display: block;
    margin: clamp(28px, 5vw, 48px) calc(-1 * var(--gutter)) 0;
    aspect-ratio: 1040 / 800;
    background-image: url("hero.jpg");
    background-size: cover;
    background-position: center;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 72px;
  }
  .project-meta { padding-top: 0; }
  .project-meta h3 { font-size: 1.3rem; margin-bottom: 16px; }
  .project-meta dl { grid-template-columns: auto 1fr; column-gap: 18px; row-gap: 8px; font-size: 0.92rem; }

  .credit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .credit-grid .list-block:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .credit-grid .list-block:nth-child(2) { grid-column: 2; grid-row: 2; }
  .credit-grid .list-block:nth-child(3) { grid-column: 2; grid-row: 1; }
  .about-bio .lede { font-size: 1.2rem; }

  .section-head { margin-bottom: 36px; }
  .contact-email { font-size: clamp(1.4rem, 7vw, 2.2rem); word-break: break-word; }
}

@media (max-width: 520px) {
  .credit-grid { grid-template-columns: 1fr; }
  .credit-grid .list-block:nth-child(1),
  .credit-grid .list-block:nth-child(2),
  .credit-grid .list-block:nth-child(3) { grid-column: auto; grid-row: auto; }
  .brand-role { display: none; }
  .brand-name { font-size: 1.2rem; }
  .hero h1 { font-size: clamp(1.9rem, 10vw, 2.8rem); }
  .hero-eyebrow { margin-bottom: 18px; letter-spacing: 0.22em; }
  .project-meta dl { grid-template-columns: 1fr; }
  .project-meta dt { padding-top: 8px; }
  .project-meta dt:first-of-type { padding-top: 0; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
