/* Chris Irwin portfolio
   Locked direction: light theme, #F6F6F5 ground, white cards, Space Grotesk + Work Sans,
   Sharp Yellow #FFE600 accent.
   ACCENT RULE: yellow fails contrast as text. Only ever use it as a fill behind dark text
   (chips) or as an underline/border under dark text. Never `color: var(--accent)`. */

:root {
  --bg: #F6F6F5;
  --card: #FFFFFF;
  --ink: #141412;        /* headings */
  --body: #4A4A44;       /* body copy */
  --muted: #6B6B63;      /* nav, labels */
  --meta: #9B9B91;       /* credits, fine print */
  --line: rgba(0, 0, 0, 0.08);
  --accent: #FFE600;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Work Sans', system-ui, sans-serif;

  --max: 1280px;
  --gutter: 40px;
  --gap: 24px;
  --radius: 4px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); color: var(--ink); }
p { margin: 0; }

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

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--accent); color: var(--ink); padding: 8px 12px; border-radius: 2px;
  font-family: var(--font-display); font-weight: 600;
}
.skip:focus { top: 16px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- shared bits ---------- */

.chip {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
}
.chip--lg { font-size: 13px; padding: 5px 10px; }

.section-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.underline { border-bottom: 2px solid var(--accent); padding-bottom: 2px; color: var(--ink); }
.underline:hover { border-bottom-color: var(--ink); }

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

.nav {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding-top: 32px; padding-bottom: 8px;
}
.nav__name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.nav nav { display: flex; gap: 32px; font-size: 14px; color: var(--muted); }
.nav nav a { padding: 4px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */

.hero { padding-top: 96px; padding-bottom: 80px; }
.hero .chip { margin-bottom: 24px; }
.hero__headline {
  font-weight: 700;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin-bottom: 28px;
  text-wrap: balance;
}
.hero__lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--body); max-width: 620px; }

/* ---------- work grid ---------- */

.work { padding-top: 72px; border-top: 1px solid var(--line); }
.work .section-label { margin-bottom: 32px; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }

.card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card:hover img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .card img { transition: none; } .card:hover img { transform: none; } }

/* Campaign cards: image + text */
.card--case { background: var(--card); border: 1px solid var(--line); }
.card__media { position: relative; aspect-ratio: var(--ratio); overflow: hidden; background: #ECECEA; }
.card__tag {
  position: absolute; left: 16px; bottom: 16px;
  font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.04em;
  color: #fff; background: rgba(0, 0, 0, 0.55); padding: 4px 8px; border-radius: 2px;
}
.card__body { flex: 1; padding: 28px; }
.card__body .chip { margin-bottom: 14px; }
.card__title { font-weight: 600; font-size: 20px; line-height: 1.25; }
.card__title span {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 3px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .3s ease;
}
.card:hover .card__title span, .card:focus-visible .card__title span { background-size: 100% 3px; }
.card__summary { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--body); }
.card__note { margin-top: 18px; font-size: 13px; color: var(--meta); }

.card--md .card__body { padding: 32px; }
.card--md .card__title { font-size: 24px; }
.card--md .card__summary { font-size: 15px; margin-top: 14px; }
.card--md .chip { font-size: 12px; padding: 4px 9px; margin-bottom: 16px; }

.card--lg .card__body { padding: 36px; }
.card--lg .card__title { font-size: 28px; letter-spacing: -0.01em; }
.card--lg .card__summary { font-size: 16px; margin-top: 14px; max-width: 520px; }
.card--lg .chip { font-size: 12px; padding: 4px 9px; margin-bottom: 16px; }

/* Visual-only cards: image fills the cell, label over a soft gradient.
   The ::before spacer sets the natural height from --ratio; in a row with taller cards
   the card stretches to fill (aspect-ratio on the card itself would widen it instead). */
.card--visual { background: #ECECEA; }
.card--visual::before { content: ''; display: block; aspect-ratio: var(--ratio); }
.card--visual img { position: absolute; inset: 0; }
.card__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 20px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  color: #fff; font-size: 14px; font-weight: 500;
}

/* ---------- about ---------- */

.about { padding-top: 120px; }
.about > .section-label { margin-bottom: 32px; }
.about__grid { display: grid; grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
.about__grid--solo { grid-template-columns: 3fr 9fr; }
.about__grid--solo .about__text { grid-column: 2; }
.about__aside { position: sticky; top: 32px; }
.about__photo { width: 100%; border-radius: var(--radius); }
.about__headline { font-weight: 700; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 24px; }
.about__opener { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.35; color: var(--ink); margin-bottom: 28px; }
.about__text { max-width: 680px; }
.about__text p { font-size: 17px; line-height: 1.65; color: var(--body); }
.about__text p + p, .about__text ol + p { margin-top: 20px; }
.about__proud { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: proud; }
.about__proud li {
  counter-increment: proud;
  position: relative;
  padding: 14px 0 14px 48px;
  border-top: 1px solid var(--line);
  font-size: 16px; line-height: 1.55; color: var(--body);
}
.about__proud li:last-child { border-bottom: 1px solid var(--line); }
.about__proud li::before {
  content: counter(proud);
  position: absolute; left: 0; top: 14px;
  min-width: 26px; text-align: center;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; line-height: 24px;
  background: var(--accent); color: var(--ink); border-radius: 2px;
}

/* ---------- project page ---------- */

.project-head { padding-top: 88px; padding-bottom: 48px; }
.project-head .chip { margin-bottom: 24px; }
.project-head__title {
  font-weight: 700; font-size: clamp(40px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.02em;
  max-width: 1000px; text-wrap: balance;
}
.project-head__lede { margin-top: 24px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--body); max-width: 680px; }
.project-head__meta { margin-top: 20px; font-size: 15px; color: var(--meta); }

.project-hero > * { width: 100%; border-radius: var(--radius); background: #000; }
.project-hero img { background: #ECECEA; }

.story { padding-top: 80px; padding-bottom: 32px; }
.story__row { display: grid; grid-template-columns: 3fr 9fr; gap: var(--gap); padding: 28px 0; border-top: 1px solid var(--line); }
.story__row:first-child { border-top: 0; padding-top: 0; }
.story__label { font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.story__text { max-width: 720px; font-size: 18px; line-height: 1.65; color: var(--body); }
.story__text--full { grid-column: 2; }
.story__text ul { margin: 0; padding: 0; list-style: none; }
.story__text li { position: relative; padding-left: 22px; }
.story__text li + li { margin-top: 10px; }
.story__text li::before { content: ''; position: absolute; left: 0; top: .7em; width: 10px; height: 3px; background: var(--ink); }

.credits { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px 32px; max-width: 720px; }
.credits dt { font-size: 13px; color: var(--meta); }
.credits dd { margin: 2px 0 0; font-size: 16px; color: var(--ink); font-weight: 500; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); padding-top: 48px; }
.gallery__item { margin: 0; }
.gallery__item--wide { grid-column: 1 / -1; }
.gallery__item > * { width: 100%; border-radius: var(--radius); background: #ECECEA; }
.gallery__item video { background: #000; }

.next {
  margin-top: 120px; padding-top: 40px; padding-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  border-top: 1px solid var(--line);
}
.next__link { display: flex; flex-direction: column; gap: 10px; }
.next__title {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.015em;
  border-bottom: 3px solid var(--accent); align-self: flex-start; padding-bottom: 4px;
}
.next__link:hover .next__title { border-bottom-color: var(--ink); }
.next__thumb { flex: 0 0 240px; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; }
.next__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- footer ---------- */

.footer {
  margin-top: 120px; padding-top: 48px; padding-bottom: 64px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  border-top: 1px solid var(--line);
}
.footer__copy { font-size: 14px; color: var(--meta); }
.footer__cta {
  font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--ink);
  border-bottom: 2px solid var(--accent); padding-bottom: 3px;
}
.footer__cta:hover { border-bottom-color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  :root { --gutter: 24px; --gap: 16px; }
  .span-3, .span-4, .span-5 { grid-column: span 6; }
  .span-6, .span-7 { grid-column: span 12; }
  .card--visual::before { aspect-ratio: 4/5; }
  .about__grid, .about__grid--solo { grid-template-columns: 1fr; gap: 32px; }
  .about__grid--solo .about__text { grid-column: 1; }
  .about__aside { position: static; max-width: 360px; }
  .story__row { grid-template-columns: 1fr; gap: 10px; }
  .story__text--full { grid-column: 1; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav nav { gap: 20px; }
  .hero { padding-top: 64px; padding-bottom: 56px; }
  .work { padding-top: 48px; }
  .grid > * { grid-column: span 12; }
  .card--visual::before { aspect-ratio: var(--ratio); }
  .card__body, .card--md .card__body, .card--lg .card__body { padding: 24px; }
  .card--lg .card__title, .card--md .card__title { font-size: 22px; }
  .project-head { padding-top: 56px; }
  .story { padding-top: 48px; }
  .story__text { font-size: 17px; }
  .gallery { grid-template-columns: 1fr; }
  .next { flex-direction: column; align-items: flex-start; margin-top: 80px; }
  .next__thumb { display: none; }
  .footer { flex-direction: column; margin-top: 80px; }
}
