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

:root {
  --ink: #111111;
  --paper: #ffffff;
  --muted: #6f6f6f;
  --line: #e6e6e6;
  --wash: #f5f5f2;
  --wash-2: #ededea;

  /* Logo + accent colors */
  --pink: #ff3e9a;
  --sun: #f5a300;
  --leaf: #1fa866;
  --sky: #2a7fff;
  --grape: #8b3dff;
  --coral: #ff6b3d;

  /* Same fonts as lucyraemcfadin.com: Arial for text, Helvetica Neue for headings */
  --sans: Arial, Helvetica, sans-serif;
  --display: "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --edge: max(16px, 2vw); /* page side margin on Work, About and category pages */
  --max: 1280px;
  --round: 20px; /* how rounded the project pictures' corners are (like jamesjunk.co) */
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; font-family: var(--display); font-weight: 400; letter-spacing: -.03em; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Logo ---------- */
/* Set your logo image in js/site.js (SITE.logo). It fits inside this box, lined up on the left.
   The box is wide because the ANGELIC ★ COX logo is long and thin (about 10 : 1).
   To make the logo bigger or smaller, change the width line. */
.logo {
  display: block;
  flex-shrink: 1;
  min-width: 0;
  width: clamp(150px, 13vw, 230px);
  height: 62px;
  text-decoration: none;
}
.logo img { width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.logo-ph { height: 100%; padding: 0; }
.logo-ph strong { font-size: 11px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
}
/* Full width: logo in the top-left corner, nav in the top-right */
.bar {
  padding: 10px clamp(16px, 2vw, 32px) 10px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav { display: flex; align-items: center; gap: 12px; }

/* Menu buttons: simple outlined pills, filled black on hover and on the current page */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  border: 1px solid #000;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition: background .15s, color .15s;
}.btn:hover,
.btn[aria-current="page"] { background: #000; color: #fff; }

.has-menu { position: relative; padding: 10px 0; margin: -10px 0; }
.dropdown {
  position: absolute;
  top: 100%;
  right: -16px;
  min-width: 150px;
  margin: 0;
  padding: 10px;
  list-style: none;
  text-align: right;
  background: var(--paper);
  border: 1px dotted #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s, visibility .15s;
}
.has-menu:hover .dropdown,
.has-menu:focus-within .dropdown { opacity: 1; visibility: visible; }
.dropdown a { display: block; padding: 10px; font-size: 14px; line-height: 1.4; white-space: nowrap; color: #000; text-decoration: none; }
.dropdown a:hover { opacity: .6; }
.menu-toggle, .menu-close {
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 700 13px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.menu-toggle { width: 46px; height: 42px; }
.burger, .burger::before, .burger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.menu-close { display: inline-flex; padding: 12px 14px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--paper);
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-nav { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 24px var(--gutter) 48px; }
.mobile-nav .btn { width: 220px; height: 52px; font-size: 18px; }
.mobile-nav .sub { display: grid; justify-items: center; gap: 4px; margin: -4px 0 8px; }
.mobile-nav .sub a { padding: 6px 0; font-size: 18px; text-decoration: none; }

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- Placeholders (swap these for your real photos) ---------- */
.ph {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--wash) 0 14px, var(--wash-2) 14px 28px);
  border: 2px dashed #b9b9b4;
}
.ph strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ph span { display: block; max-width: 34ch; margin: 6px auto 0; font-size: 15px; line-height: 1.4; }

/* ---------- Home: first screen has the words over the photo; your projects follow below ---------- */
body[data-page="home"] {
  --ph: max(100vh, 602px);           /* first screen's height (at least 602px) */
  --hd: max(56.25vw, var(--ph));     /* how tall hero.jpg shows once it covers the screen */
  /* where the picture's top edge sits: pinned to the bottom, but slid down when needed so the top of your
     head is at least 160px from the top of the screen (room for the two top roles above it) */
  --img-top: min(0px, max(calc(var(--ph) - var(--hd)), calc(160px - .21 * var(--hd))));
}
/* The menu stays at the top of the screen. Over the first screen it's see-through; once that scrolls away,
   js/site.js adds .is-solid and it turns white, so your projects slide out of sight under it. */
body[data-page="home"] .site-header { position: fixed; top: 0; left: 0; right: 0; background: transparent; }
body[data-page="home"] .site-header.is-solid { background: var(--paper); }

/* The first screen. The 82px at the top makes room for the menu (62px logo + 20px padding). */
.home-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 82px;
}
/* Hero design (images/hero.jpg, 2560 × 1440) fills the whole first screen, behind the menu too.
   It's zoomed to cover any screen shape and stays pinned to the bottom, so you stay on the bottom edge.
   #d1d2d2 is the paper's grey, shown while the picture loads. */
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #d1d2d2 url("../images/hero.jpg") center var(--img-top) / cover no-repeat;
}
.stage { position: relative; flex: 1; min-height: 520px; overflow: hidden; }
/* On big screens the hero shows as the background above, so this copy only appears on phones */
.stage-photo { display: none; }

/* "Hi, I'm a…" (left) and "Based in SF Bay Area" (right) are handwriting images that mirror each other:
   same letter height, same distance from the edge, and centered on the same line (30% down).
   "Based in" is two lines, so it's 1.5× as wide as "Hi" to make its letters about the same size.
   To make both bigger or smaller, change 13vw and 19.5vw together (vw = % of the screen width). */
.stage-hi { position: absolute; z-index: 1; left: 4.75%; top: 30%; transform: translateY(-50%); width: clamp(180px, 13vw, 340px); height: auto; }
.ph.stage-hi { aspect-ratio: 250 / 72; padding: 0; }
.ph.stage-hi strong { font-size: 11px; }
.stage-based { position: absolute; z-index: 1; right: 4.75%; top: 30%; transform: translateY(-50%); width: clamp(260px, 19.5vw, 510px); height: auto; }
.ph.stage-based { aspect-ratio: 466 / 118; padding: 0; }
.ph.stage-based strong { font-size: 11px; }

/* Each role floats at its own spot, with a star under it.
   Positions go in order of the roles list in js/site.js: the four roles make a halo around your head,
   mirrored on either side of it (your head is 47.5% across): roles 1 and 2 arch above it, roles 3 and 4 sit lower,
   level with your shoulders. `left` is where the middle of the word goes. */
.roles { list-style: none; margin: 0; padding: 0; }
.roles li { position: absolute; z-index: 1; transform: translateX(-50%); }
.roles li:nth-child(1) { left: 36%; top: 11%; }
.roles li:nth-child(2) { left: 59%; top: 11%; }
.roles li:nth-child(3) { left: 26%; top: 40%; }
.roles li:nth-child(4) { left: 69%; top: 40%; }
.roles a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* Same type as the site's headings (Work list, About intro): Helvetica Neue, regular weight */
  font-family: var(--display);
  font-size: clamp(16px, 1.35vw, 21px);
  font-weight: 400;
  letter-spacing: -.03em;
  white-space: nowrap;
  text-decoration: none;
  transition: color .3s ease, transform .3s ease;
}
.roles a::after { content: "\2605"; font-size: .8em; line-height: 1; }
/* Hover grow: the word takes its category's color and grows a little */
.roles a:hover, .roles a:focus-visible { color: var(--c); transform: scale(1.1); }

/* Phones (and any tall, narrow screen): stack the words instead of scattering them.
   The background turns to plain paper (images/hero-paper.jpg) and the hero shows under the words,
   trimmed around you and fading in at the top. */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .home-hero::before { background-image: url("../images/hero-paper.jpg"); background-position: center; }
  .stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
    min-height: 0;
    padding: 40px var(--gutter) 0;
  }
  /* 47% = where you stand across the picture; change it if a new design puts you elsewhere */
  .stage-photo {
    display: block;
    order: 1;
    width: calc(100% + 2 * var(--gutter));
    max-width: none;
    height: min(125vw, 62vh);
    margin: auto calc(-1 * var(--gutter)) 0;
    object-fit: cover;
    object-position: 47% 100%;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%);
    mask-image: linear-gradient(to bottom, transparent, #000 22%);
  }
  .roles li { position: static; transform: none; }
  .stage-hi, .stage-based { position: static; transform: none; }
  /* the four roles in two rows of two */
  .roles { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 20px 40px; }
}

/* Under the first screen: each role's big colored title (sized by js/site.js to fill the width), then its project cards.
   Clicking a role on the first screen glides down to its title, which lands just under the menu (82px). */
html:has(body[data-page="home"]) { scroll-padding-top: 82px; }
.home-work > section { padding-top: clamp(24px, 3vw, 48px); }
.home-work > section + section { margin-top: clamp(48px, 7vw, 110px); }

/* ---------- Homepage role titles ---------- */
/* Each role's huge title; its size is set by js/site.js so it fills the page width. */
.cat-title { margin: 16px var(--edge) 72px; line-height: 1.15; white-space: nowrap; }
.cat-title span { display: inline-block; }

/* Filled-in projects (homepage), laid out like jamesjunk.co: one after another down the page,
   centered, each with its name and skills above its picture. Each picture keeps its own shape (nothing cropped),
   has rounded corners, and is at most 65% of the page width and 55% of the screen height
   (change 65% and 55vh to make them bigger or smaller). */
.feed { display: grid; gap: clamp(48px, 5vw, 80px); padding: 10px var(--edge) 0; }
.feed-item { display: block; min-width: 0; color: inherit; text-align: center; text-decoration: none; }
.feed-title { font: 400 clamp(24px, 2.2vw, 36px)/1.1 var(--display); letter-spacing: -.03em; transition: color .2s ease; }
.feed-item > .skills { justify-content: center; margin-top: 16px; }
/* The picture's box hugs the picture, so the rounded corners sit on the picture itself */
.feed-media { width: fit-content; max-width: 65%; margin: 20px auto 0; border-radius: var(--round); overflow: hidden; isolation: isolate; }
.feed-media img, .feed-media video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 55vh;
  transition: transform .5s ease;
}
.feed-media:empty, .feed-media.ph { width: 65%; aspect-ratio: 16 / 9; }
.feed-media:empty { background: #f2f2f2; }
.feed-media.ph { padding: 12px; border-width: 1px; }
.feed-media.ph strong { font-size: 11px; }
.feed-item:hover .feed-media img, .feed-item:hover .feed-media video { transform: scale(1.02); }
.feed-item:hover .feed-title, .feed-item:focus-visible .feed-title { color: var(--c); }

/* `layout: "cross"` in js/site.js (Digital Marketer): sets of four, each picture at its own shape with rounded corners,
   its name and skills centered under it. The 1st sits on top, centered over the 3rd and as wide as the side ones;
   below it the 2nd (left), the 3rd (tall, middle) and the 4th (right). The side columns are 34 parts wide and the
   middle one 24: change those numbers (in both places) to make the middle picture bigger or smaller. */
.cross-set {
  --gap: clamp(16px, 3.6vw, 56px);
  display: grid;
  grid-template-columns: 34fr 24fr 34fr;
  align-items: start;
  gap: clamp(28px, 3.4vw, 52px) var(--gap);
}
.cross-set > :nth-child(1) { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: calc((100% - 2 * var(--gap)) * 34 / 92); }
.cross-set > :nth-child(2) { grid-column: 1; grid-row: 2; }
.cross-set > :nth-child(3) { grid-column: 2; grid-row: 2; }
.cross-set > :nth-child(4) { grid-column: 3; grid-row: 2; }
.cross-piece { display: block; min-width: 0; color: inherit; text-align: center; text-decoration: none; }
.cross-media { border-radius: var(--round); overflow: hidden; isolation: isolate; }
.cross-media img, .cross-media video { display: block; width: 100%; height: auto; transition: transform .5s ease; }
.cross-media.ph { padding: 12px; border-width: 1px; }
.cross-media.ph strong { font-size: 11px; }
.cross-piece:hover .cross-media img, .cross-piece:hover .cross-media video { transform: scale(1.02); }
.cross-title { margin: 14px 0 0; font: 400 clamp(15px, 1.25vw, 19px)/1.25 var(--display); letter-spacing: -.01em; transition: color .2s ease; }
.cross-piece > .skills { justify-content: center; margin-top: 10px; gap: 6px; }
/* With three skills, the middle one sits exactly under the middle of the picture and the other two hug it,
   so a short badge on one side doesn't pull the row off center */
.cross-piece > .skills:has(> li:nth-child(3):last-child) { display: grid; grid-template-columns: 1fr auto 1fr; }
.cross-piece > .skills:has(> li:nth-child(3):last-child) > li:first-child { justify-self: end; }
.cross-piece > .skills:has(> li:nth-child(3):last-child) > li:last-child { justify-self: start; }
.cross-piece > .skills li { padding: 4px 10px; font-size: 11px; }
.cross-piece:hover .cross-title, .cross-piece:focus-visible .cross-title { color: var(--c); }
.cross-piece:hover .skills li, .cross-piece:focus-visible .skills li { color: var(--c); border-color: var(--c); }
/* Phones: one after another, the tall one a little narrower */
@media (max-width: 700px) {
  .cross-set { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cross-set > :nth-child(n) { grid-column: 1; grid-row: auto; width: 100%; }
  .cross-set > :nth-child(3) { justify-self: center; width: 72%; }
}

/* Art categories (`layout: "grid"` in js/site.js): sets of four, with rounded corners and a small caption under each.
   The 1st and 4th pieces stand tall on the left and right at their own shape; the 2nd and 3rd stack in the middle,
   trimmed to fill exactly the height of the tall ones, so the set lines up top and bottom.
   The middle column is narrower (.8fr), which trims the middle pieces less; make it wider to trim them more. */
.art-grid { display: grid; gap: clamp(48px, 7vw, 104px); }
.art-set {
  display: grid;
  grid-template-columns: 1fr .8fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: clamp(16px, 2.4vw, 36px) clamp(20px, 4.2vw, 64px);
}
.art-set > :nth-child(1) { grid-column: 1; grid-row: 1 / 3; align-self: start; }
.art-set > :nth-child(2) { grid-column: 2; grid-row: 1; }
.art-set > :nth-child(3) { grid-column: 2; grid-row: 2; }
.art-set > :nth-child(4) { grid-column: 3; grid-row: 1 / 3; align-self: start; }
.art-piece { display: block; min-width: 0; color: inherit; text-decoration: none; }
.art-piece img, .art-piece video, .art-piece .ph { display: block; width: 100%; height: auto; border-radius: var(--round); transition: opacity .2s ease; }
/* The middle pieces fill their half of the set's height, trimmed at the edges (object-fit: cover) */
.art-set > :nth-child(2), .art-set > :nth-child(3) { display: flex; flex-direction: column; }
.art-set > :nth-child(2) > :first-child, .art-set > :nth-child(3) > :first-child { flex: 1 1 0; min-height: 0; height: 0; object-fit: cover; }
.art-piece:hover img, .art-piece:hover video { opacity: .85; }
.art-caption { flex: none; margin: 14px 0 0; font-size: 13.7px; line-height: 1.8; transition: color .2s ease; }
/* Captions under the tall pieces and the lower middle one hang just below the picture without taking up room,
   so the bottoms of those pictures line up whether or not they have a caption (the set leaves space for them) */
.art-set { padding-bottom: 40px; }
.art-set > :nth-child(1), .art-set > :nth-child(3), .art-set > :nth-child(4) { position: relative; }
.art-set > :nth-child(1) > .art-caption, .art-set > :nth-child(3) > .art-caption, .art-set > :nth-child(4) > .art-caption {
  position: absolute;
  top: 100%;
  left: 0;
}
.art-piece:hover .art-caption, .art-piece:focus-visible .art-caption { color: var(--c); }
/* Phones: the two tall pieces side by side, then the two middle ones side by side, all at their own shape */
@media (max-width: 700px) {
  .art-grid { gap: 32px; }
  .art-set { grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: 24px 12px; }
  .art-set > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .art-set > :nth-child(4) { grid-column: 2; grid-row: 1; }
  .art-set > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .art-set > :nth-child(3) { grid-column: 2; grid-row: 2; }
  .art-set > :nth-child(2) > :first-child, .art-set > :nth-child(3) > :first-child { flex: none; height: auto; }
  .art-set { padding-bottom: 0; }
  .art-set > :nth-child(1) > .art-caption, .art-set > :nth-child(3) > .art-caption, .art-set > :nth-child(4) > .art-caption { position: static; }
  .art-caption { margin-top: 8px; font-size: 12.5px; line-height: 1.5; }
}

/* Skills (`tags` in js/site.js): little outlined pills, like the menu buttons but smaller.
   They take the category's color along with the project's name on hover. */
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.skills li {
  padding: 5px 12px;
  border: 1px solid #000;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.feed-item:hover .skills li, .feed-item:focus-visible .skills li { color: var(--c); border-color: var(--c); }

@media (max-width: 700px) {
  :root { --round: 14px; }
  .feed-media { max-width: 100%; }
  .feed-media:empty, .feed-media.ph { width: 100%; }
}

/* ---------- Project page ---------- */
/* Name and year on the left; Instagram post and/or slides on the right */
.project-page { display: grid; grid-template-columns: 8fr 16fr; align-items: start; padding: 58px var(--edge) 0; }
.back-link { grid-column: 1 / -1; justify-self: start; margin-bottom: 30px; font-size: 14px; font-weight: 700; text-decoration: none; }
.back-link:hover { opacity: .6; }
.project-head h1 { font-size: clamp(22px, 1.55vw, 34px); line-height: 1.2; }
.project-head p { margin: 36px 0 0; font-size: 14px; }
.project-head .project-about { max-width: 420px; margin-top: 20px; font-size: 16px; line-height: 1.6; }
.project-about:empty { display: none; }
.project-media { display: grid; gap: 40px; min-width: 0; }
/* `copy: false` in js/site.js: no words, just the post or picture, centered on the page */
.project-page.is-bare { grid-template-columns: minmax(0, 1fr); }
.project-page.is-bare .project-media { justify-items: center; }
.project-media .instagram-media { width: 100%; max-width: 540px; min-width: 300px; margin: 0 !important; }
.project-photo, .project-media > .ph { max-width: 540px; }
.project-photo { margin: 0; }
.project-photo img, .project-photo video { display: block; width: 100%; }
.project-photo figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
/* `link` in js/site.js: a link to a page somewhere else, under the few sentences */
.project-link { display: inline-block; margin-top: 20px; font-size: 14px; color: #000; text-underline-offset: 3px; }
.slides-block { max-width: 960px; }
.slides { width: 100%; aspect-ratio: 16 / 10; }
iframe.slides { display: block; border: 1px solid #dbdbdb; }
.slides-link { display: inline-block; margin-top: 10px; font-size: 14px; color: #000; text-underline-offset: 3px; }
@media (max-width: 820px) {
  .project-page { grid-template-columns: 1fr; }
  .project-head { margin-bottom: 32px; }
}

/* ---------- Project write-up pages (e.g. digital-marketer-project-1.html) ---------- */
/* One centered column: title, a slideshow, then sections of writing and pictures.
   Same type as the rest of the site: Helvetica Neue headings, Arial text. */
.write-up { padding: 58px var(--edge) 0; }
.write-up-head { max-width: 760px; margin: 24px auto 0; text-align: center; }
.write-up-head h1 { font-size: clamp(36px, 4.6vw, 76px); line-height: 1.05; }
.write-up-meta { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
/* The short summary under the title: the site's regular text (Arial, 17px) */
.write-up-note { max-width: 620px; margin: 16px auto 0; font-size: 17px; line-height: 1.55; }

/* Slideshow: every slide is the same height (change 600px to resize), one shows at a time */
.carousel { --slide-h: min(64vh, 600px); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; max-width: 1100px; margin: 48px auto 0; }
.carousel > .slide { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; max-width: 100%; margin: 0; }
.carousel.is-ready > .slide:not(.on) { opacity: 0; visibility: hidden; }
/* Fade between slides only once someone clicks an arrow, so the page doesn't flash every slide as it loads */
.carousel.is-live > .slide { transition: opacity .45s ease, visibility .45s; }
.carousel > .slide > img, .carousel > .slide > video { height: var(--slide-h); width: auto; max-width: 100%; object-fit: contain; }
.carousel > .slide > .ph { height: var(--slide-h); max-width: 100%; }
.slide figcaption, .write-up figure figcaption { margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--muted); text-align: center; }
.carousel-nav { grid-area: 2 / 1; display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.carousel-nav button, .zoom-nav button, .lightbox-nav button {
  width: 40px;
  height: 40px;
  border: 1px solid #000;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: 16px/1 var(--sans);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.carousel-nav button:hover, .carousel-nav button:focus-visible,
.zoom-nav button:hover, .zoom-nav button:focus-visible,
.lightbox-nav button:hover, .lightbox-nav button:focus-visible { background: #000; color: #fff; }
.carousel-count { min-width: 3.5em; font-size: 13px; color: var(--muted); text-align: center; }

/* Zoomable picture (data-zoom, e.g. the full poster): the whole picture fits in a rounded frame
   (change 85vh and 900px to make the frame taller or shorter); js/site.js handles zooming and dragging */
.write-up [data-zoom] { max-width: 960px; margin: 40px auto; }
.zoom-stage { position: relative; height: min(85vh, 900px); overflow: hidden; border-radius: var(--round); background: var(--wash); touch-action: pan-y; user-select: none; }
.zoom-stage.is-zoomed { touch-action: none; cursor: grab; }
.zoom-stage.is-zoomed:active { cursor: grabbing; }
.zoom-stage img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; }
.zoom-nav { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.zoom-nav [data-zoom-fit] { width: auto; padding: 0 16px; font-size: 14px; }
.write-up .zoom-hint { margin: 10px auto 0; font-size: 13px; color: var(--muted); text-align: center; }

/* Sections: a centered heading, then text (680px wide) and pictures (up to 960px) */
.write-up-section { max-width: 960px; margin: clamp(72px, 9vw, 120px) auto 0; }
.write-up-section h2 { max-width: 760px; margin: 0 auto 28px; font-size: clamp(28px, 2.6vw, 42px); text-align: center; }
.write-up-section p { max-width: 680px; margin: 0 auto 18px; font-size: 16px; line-height: 1.65; }
.write-up-section ul { max-width: 680px; margin: 0 auto 18px; padding-left: 1.2em; font-size: 16px; line-height: 1.65; }
.write-up-section li { margin-bottom: 10px; }
/* Key terms: the word on the left, what it means on the right (stacked on phones) */
.write-up-terms { max-width: 680px; margin: 0 auto 18px; font-size: 15px; line-height: 1.5; }
.write-up-terms > div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.write-up-terms > div:last-child { border-bottom: 1px solid var(--line); }
.write-up-terms dt { font-weight: 700; }
.write-up-terms dd { margin: 0; }
.write-up figure { margin: 40px auto; }
.write-up figure > img, .write-up figure > video { width: 100%; height: auto; }
/* A tall picture, like a chart, can be narrower: <figure class="narrow"> */
.write-up figure.narrow { max-width: 640px; }
/* Two or three pictures side by side */
.write-up-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; margin: 40px 0; }
.write-up-row figure { margin: 0; }
/* Big numbers, in the category's color */
.write-up-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; max-width: 760px; margin: 8px auto 36px; text-align: center; }
.write-up-stats strong { display: block; font: 400 clamp(36px, 4vw, 56px)/1 var(--display); letter-spacing: -.03em; color: var(--c, #000); }
.write-up-stats span { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }
/* Instagram post and slides */
.write-up [data-instagram] { display: flex; justify-content: center; margin: 40px auto; max-width: 420px; }
.write-up [data-instagram] > * { width: 100%; }
.write-up [data-instagram] .instagram-media { min-width: 300px !important; margin: 0 !important; }
.write-up [data-slides] { margin: 40px auto; }
.write-up-end { display: inline-block; margin-top: clamp(72px, 9vw, 120px); }
@media (max-width: 760px) {
  .carousel { --slide-h: min(56vh, 440px); }
  .zoom-stage { height: min(70vh, 560px); }
  .write-up-section p, .write-up-section ul { font-size: 15px; }
  .write-up-note { font-size: 16px; }
  .write-up-terms > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Project showcase pages (e.g. social-designer-project-1.html), laid out like jamesjunk.co/impact ---------- */
/* The name and a short intro in big type, both centered, then the designs */
.showcase-head { margin-top: 24px; text-align: center; }
.showcase-head h1 { font-size: clamp(52px, 7vw, 110px); line-height: .95; }
.showcase-intro { max-width: 1040px; margin: clamp(40px, 5vw, 72px) auto 0; text-align: center; }
.showcase-intro p { margin: 0 0 .8em; font: 400 clamp(20px, 1.8vw, 28px)/1.35 var(--display); letter-spacing: -.01em; }
/* The designs, staggered: in each group of three, the 1st on the top left, the 2nd on the top right,
   the 3rd centered below them. Each is 36% of the page wide (9 of 25 columns); tapping one opens it full screen. */
.tap-grid { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr)); row-gap: clamp(28px, 3.4vw, 52px); margin-top: clamp(56px, 7vw, 104px); }
.tap-piece:nth-child(3n + 1) { grid-column: 2 / span 9; }
.tap-piece:nth-child(3n + 2) { grid-column: 16 / span 9; }
.tap-piece:nth-child(3n) { grid-column: 9 / span 9; }
.tap-piece { display: block; min-width: 0; color: inherit; text-decoration: none; cursor: zoom-in; }
.tap-piece img { display: block; width: 100%; height: auto; border-radius: clamp(12px, 1.6vw, 22px); transition: transform .35s ease, box-shadow .35s ease; }
.tap-piece:hover img, .tap-piece:focus-visible img { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0, 0, 0, .18); }
.tap-caption { display: block; margin-top: 12px; font: 400 clamp(16px, 1.4vw, 20px)/1.25 var(--display); letter-spacing: -.01em; transition: color .2s ease; }
.tap-piece:hover .tap-caption, .tap-piece:focus-visible .tap-caption { color: var(--c); }
/* tap-pairs: the designs two by two instead, each 44% of the page wide (11 of 25 columns), e.g. the IXL page */
.tap-pairs .tap-piece:nth-child(odd) { grid-column: 2 / span 11; }
.tap-pairs .tap-piece:nth-child(even) { grid-column: 14 / span 11; }
.tap-pairs .tap-caption { text-align: center; }
@media (max-width: 760px) {
  .tap-grid { grid-template-columns: minmax(0, 1fr); }
  .tap-piece:nth-child(n), .tap-pairs .tap-piece:nth-child(n) { grid-column: 1; }
}

/* Full-screen viewer for pictures people tap into (data-lightbox in the page, set up in js/site.js):
   the name and a Close button along the top, the zoomable picture filling the rest, arrows on either side */
.lightbox { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; padding: 14px var(--edge) 18px; background: var(--paper); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.lightbox-title { margin: 0; font-size: 14px; }
.lightbox-view { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.lightbox-view .zoom-stage { flex: 1 1 0; height: auto; min-height: 0; background: var(--paper); }
.lightbox-nav { position: absolute; top: 50%; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 calc(var(--edge) + 12px); pointer-events: none; transform: translateY(-50%); }
.lightbox-nav button { pointer-events: auto; }

/* ---------- About ---------- */
/* Intro on the left; photo and contact form share the middle-right column */
.about-top, .contact {
  display: grid;
  grid-template-columns: 8fr 1fr 10fr 5fr;
  align-items: start;
  padding: 0 var(--edge);
}
.about-top { padding-top: 50px; }
.about-intro { grid-column: 1; }
.about-text { font-size: clamp(20px, 1.5vw, 30px); line-height: 1.4; }
/* "Reach out!" is an image of handwriting; a PNG with a see-through background works best */
.reach-out { width: clamp(200px, 14.55vw, 380px); height: auto; margin: 70px 0 0 11px; }
.ph.reach-out { aspect-ratio: 291 / 77; padding: 0; }
.ph.reach-out strong { font-size: 11px; }
.about-intro .socials { margin: 48px 0 0 33px; }
/* The about photo shows whole, in its own shape, in black & white. Delete `filter: grayscale(1);` to keep it in color.
   The grey striped placeholder (no photo yet) keeps the wide 794 × 407 shape. */
.about-photo { grid-column: 3; width: 100%; height: auto; filter: grayscale(1); }
.ph.about-photo { aspect-ratio: 794 / 407; }
.contact { padding-top: clamp(80px, 10vw, 200px); }
.contact-form { grid-column: 3; }
@media (max-width: 820px) {
  .about-top, .contact { grid-template-columns: 1fr; gap: 40px; }
  .about-photo, .contact-form { grid-column: 1; }
  .contact { padding-top: 48px; }
}

.socials { list-style: none; display: flex; gap: 14px; margin: 0; padding: 0; }
.socials a { display: block; color: #000; }
.socials a:hover { opacity: .6; }
/* LinkedIn icon size on the About page */
.socials svg { display: block; width: 36px; height: 36px; }

/* ---------- Thank-you page (thanks.html), after the contact form is sent ---------- */
.thanks { display: grid; justify-items: center; gap: 20px; padding: clamp(80px, 12vw, 180px) var(--edge) 0; text-align: center; }
.thanks h1 { font-size: clamp(44px, 6vw, 96px); }
.thanks p { margin: 0 0 8px; font-size: clamp(18px, 1.5vw, 22px); }

/* ---------- Contact form ---------- */
.contact-form { font-size: 14px; }
.field { min-width: 0; margin: 0 0 28px; padding: 0; border: 0; }
.field legend { float: left; width: 100%; margin: 0 0 14px; padding: 0; }
.field legend + * { clear: both; }
.field-label { display: block; margin: 0 0 4px; }
.req { margin-left: 4px; font-size: 9.5px; color: #555; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sub-label { display: block; margin-bottom: 4px; font-size: 10px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  display: block;
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #a9a9a9;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: inherit;
}
.contact-form textarea { height: 100px; resize: vertical; }
.check { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 10px; cursor: pointer; }
.check input { appearance: none; flex: none; width: 15px; height: 15px; margin: 0; border: 1px solid #a9a9a9; background: #fff; cursor: pointer; }
.check input:checked { background: #000; box-shadow: inset 0 0 0 3px #fff; }
.checks .check { margin: 0 0 22px; }
.checks .check:last-child { margin-bottom: 0; }
.submit {
  min-width: 80px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid #000;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: 14px var(--sans);
  cursor: pointer;
}
.submit:hover { background: #000; color: #fff; }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(120px, 20vw, 400px); padding: 35px var(--edge) 60px; font-size: 14px; }
/* Work | About, Contact | Connect | big logo */
.footer-grid {
  display: grid;
  grid-template-columns: 5fr 5fr 5fr 9fr;
  gap: 0 20px;
  align-items: start;
}
.footer-head { margin: 0 0 6px; font-weight: 700; }
.footer-grid a:not(.logo) { display: block; color: #000; line-height: 26px; text-decoration: none; }
.footer-grid a:not(.logo):hover { opacity: .6; }
.footer-pages a:not(.logo) { margin-bottom: 18px; font-weight: 700; line-height: 20px; }
/* A bigger copy of the logo from the top-left corner */
/* The footer copy keeps the logo's own shape */
.footer-logo { width: 100%; max-width: 715px; height: auto; }
.footer-logo img { height: auto; }
.footer-logo .logo-ph { aspect-ratio: 176 / 62; }
.footer-logo .logo-ph strong { font-size: 13px; }
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-logo { grid-column: 1 / -1; max-width: 360px; }
}

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