/* ==========================================================================
   CHAZ — brutalist industrial. White, black hairlines, heavy grotesk,
   safety orange only on numbers, labels and hover. No radii, no shadows.
   Same system as the private portfolio so both read as one body of work.
   ========================================================================== */

:root {
  --black: #000;
  --white: #fff;
  --orange: #ff4d00;
  --rule: 1px;
  --sans: "Helvetica Neue", "Archivo", "Inter", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--black);
  font-family: var(--sans); font-weight: 500;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--orange); color: var(--white); }

.u-mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.u-num { font-family: var(--mono); color: var(--orange); font-size: 11px; letter-spacing: 0.08em; font-weight: 600; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--orange); border: var(--rule) solid var(--orange);
  padding: 2px 6px; line-height: 1.1;
}
.tag--black { color: var(--black); border-color: var(--black); }

.frame {
  border-left: var(--rule) solid var(--black); border-right: var(--rule) solid var(--black);
  max-width: 1680px; margin: 0 auto; min-height: 100vh;
}

/* ---------- top bar (every page) ---------- */
.bar {
  display: flex; align-items: center; gap: 16px; padding: 14px var(--gutter);
  border-bottom: var(--rule) solid var(--black); position: sticky; top: 0;
  background: var(--white); z-index: 10;
}
.bar__name { font-weight: 900; letter-spacing: -0.04em; text-transform: uppercase; font-size: 16px; }
.bar__nav { margin-left: auto; display: flex; gap: 20px; }
.bar a:hover { color: var(--orange); }

/* ---------- masthead ---------- */
.masthead { padding: var(--gutter); border-bottom: var(--rule) solid var(--black); }
.masthead__name {
  font-size: clamp(56px, 13vw, 220px); font-weight: 900; letter-spacing: -0.055em;
  line-height: 0.82; text-transform: uppercase; margin: 0;
}
.masthead__positioning {
  font-size: clamp(17px, 2.2vw, 32px); font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.15; max-width: 30ch; margin: 28px 0 0;
}

/* ---------- identity band: bio | record | services+contact ---------- */
.band { display: grid; grid-template-columns: 1.4fr 1fr 1fr; border-bottom: var(--rule) solid var(--black); }
.band__cell { padding: var(--gutter); border-right: var(--rule) solid var(--black); min-width: 0; }
.band__cell:last-child { border-right: 0; }
.band__label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 14px;
}
.band__bio { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.45; max-width: 58ch; margin: 0 0 14px; }
.band__bio:last-child { margin-bottom: 0; }
.record { list-style: none; margin: 0; padding: 0; }
.record li {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 7px 0;
  border-top: var(--rule) solid var(--black); font-size: 13px; line-height: 1.35;
}
.record li:first-child { border-top: 0; padding-top: 0; }
.record__k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.5; padding-top: 2px; }
.services { list-style: none; margin: 0 0 28px; padding: 0; }
.services li {
  display: flex; gap: 12px; align-items: baseline; padding: 7px 0;
  border-top: var(--rule) solid var(--black); font-size: 17px; font-weight: 800;
  letter-spacing: -0.02em; text-transform: uppercase;
}
.services li:first-child { border-top: 0; padding-top: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.contact-list a { border-bottom: var(--rule) solid var(--black); }
.contact-list a:hover { color: var(--orange); border-color: var(--orange); }

/* ---------- section head ---------- */
.section__head {
  display: flex; align-items: baseline; gap: 16px; padding: 18px var(--gutter);
  border-bottom: var(--rule) solid var(--black);
}
.section__num { font-family: var(--mono); font-size: 12px; color: var(--orange); letter-spacing: 0.08em; font-weight: 600; }
.section__name { font-size: clamp(26px, 4.4vw, 62px); font-weight: 900; letter-spacing: -0.045em; text-transform: uppercase; line-height: 1; margin: 0; }
.section__count { margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- project grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); border-bottom: var(--rule) solid var(--black); }
.cell { border-right: var(--rule) solid var(--black); border-bottom: var(--rule) solid var(--black); display: flex; flex-direction: column; }
.grid .cell:nth-child(2n) { border-right: 0; }
.grid .cell:nth-last-child(-n+2) { border-bottom: 0; }
.cell__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--white); }
.cell__media img { width: 100%; height: 100%; object-fit: cover; transition: opacity 90ms linear; }
.cell__media img.is-alt { position: absolute; inset: 0; opacity: 0; }
.cell:hover .cell__media img.is-alt { opacity: 1; }
.cell__index { position: absolute; top: 10px; left: 10px; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--orange); letter-spacing: 0.08em; z-index: 2; }
.cell__flags { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 6px; }
.cell__body { padding: 14px var(--gutter) 18px; border-top: var(--rule) solid var(--black); display: flex; flex-direction: column; gap: 6px; }
.cell__title { font-size: clamp(18px, 2vw, 26px); font-weight: 800; letter-spacing: -0.03em; text-transform: uppercase; line-height: 1.05; margin: 0; }
.cell__meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.55; }
.cell:hover .cell__title { color: var(--orange); }

/* ---------- colophon ---------- */
.colophon { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: var(--gutter); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.colophon span { opacity: 0.55; }
.colophon a { margin-left: auto; color: var(--orange); }
.colophon a:hover { color: var(--black); }

/* ==========================================================================
   PROJECT PAGE
   ========================================================================== */
.detail-head { padding: var(--gutter); border-bottom: var(--rule) solid var(--black); }
.detail-head__title { font-size: clamp(34px, 8vw, 132px); font-weight: 900; letter-spacing: -0.05em; line-height: 0.86; text-transform: uppercase; margin: 0; }
.detail-head__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }

/* the three-line block: role / work / outcome. Always above the images. */
.brief { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: var(--rule) solid var(--black); }
.brief__cell { padding: var(--gutter); border-right: var(--rule) solid var(--black); min-width: 0; }
.brief__cell:last-child { border-right: 0; }
.brief__k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.brief__v { margin: 0; font-size: clamp(15px, 1.35vw, 19px); line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; }

.piece-head { display: flex; align-items: baseline; gap: 12px; padding: 12px var(--gutter); border-bottom: var(--rule) solid var(--black); border-top: var(--rule) solid var(--black); }
.piece-head:first-child { border-top: 0; }
.piece-head__name { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; margin: 0; }
.piece-head__note { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.55; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); }
.gallery--2 { grid-template-columns: repeat(2, 1fr); }
.gallery--4 { grid-template-columns: repeat(4, 1fr); }
.gallery--8 { grid-template-columns: repeat(8, 1fr); }
.gallery--8 .gallery__item:nth-child(8n) { border-right: 0; }
.gallery--8 .gallery__item:nth-child(3n), .gallery--8 .gallery__item:nth-child(4n) { border-right: var(--rule) solid var(--black); }
.gallery--8 .gallery__item:nth-child(8n) { border-right: 0 !important; }
.gallery__item { position: relative; margin: 0; border-right: var(--rule) solid var(--black); border-bottom: var(--rule) solid var(--black); aspect-ratio: 1 / 1; overflow: hidden; }
.gallery--2 .gallery__item:nth-child(2n), .gallery:not(.gallery--2):not(.gallery--4) .gallery__item:nth-child(3n), .gallery--4 .gallery__item:nth-child(4n) { border-right: 0; }
.gallery__item--wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; border-right: 0; }
.gallery__item--tall { aspect-ratio: 4 / 5; }
.gallery__item.gallery__item--contain img { object-fit: contain !important; padding: 6%; }
.gallery__item img, .gallery__item video { width: 100%; height: 100%; object-fit: cover; }
.gallery__num { position: absolute; top: 10px; left: 10px; font-family: var(--mono); font-size: 10px; color: var(--orange); letter-spacing: 0.08em; font-weight: 600; z-index: 2; }

.pager { display: grid; grid-template-columns: 1fr 1fr; }
.pager__link { padding: 20px var(--gutter); border-right: var(--rule) solid var(--black); }
.pager__link:last-child { border-right: 0; text-align: right; }
.pager__link:hover { color: var(--orange); }
.pager__dir { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); display: block; margin-bottom: 6px; }
.pager__name { font-size: clamp(15px, 2vw, 24px); font-weight: 800; letter-spacing: -0.03em; text-transform: uppercase; line-height: 1.05; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .band { grid-template-columns: 1.2fr 1fr 1fr; } }
@media (max-width: 820px) {
  .gallery--8 { grid-template-columns: repeat(4, 1fr); }
  .gallery--8 .gallery__item:nth-child(8n) { border-right: var(--rule) solid var(--black) !important; }
  .gallery--8 .gallery__item:nth-child(4n) { border-right: 0 !important; }
  .band, .brief { grid-template-columns: 1fr; }
  .band__cell, .brief__cell { border-right: 0; border-bottom: var(--rule) solid var(--black); }
  .band__cell:last-child, .brief__cell:last-child { border-bottom: 0; }
  .gallery, .gallery--4 { grid-template-columns: repeat(2, 1fr); }
  .gallery .gallery__item:nth-child(3n), .gallery--4 .gallery__item:nth-child(4n) { border-right: var(--rule) solid var(--black); }
  .gallery .gallery__item:nth-child(2n) { border-right: 0; }
  .bar__nav { gap: 14px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid { grid-template-columns: 1fr; }
  .grid .cell { border-right: 0; }
  .grid .cell:nth-last-child(-n+2) { border-bottom: var(--rule) solid var(--black); }
  .grid .cell:last-child { border-bottom: 0; }
  /* galleries: photos stack, flats and crops stay in twos and fours */
  .gallery, .gallery--2 { grid-template-columns: 1fr; }
  .gallery .gallery__item, .gallery--2 .gallery__item { border-right: 0; }
  .gallery--4 { grid-template-columns: repeat(2, 1fr); }
  .gallery--4 .gallery__item { border-right: var(--rule) solid var(--black); }
  .gallery--4 .gallery__item:nth-child(2n) { border-right: 0; }
  .gallery--8 { grid-template-columns: repeat(4, 1fr); }
  .gallery--8 .gallery__item { border-right: var(--rule) solid var(--black) !important; }
  .gallery--8 .gallery__item:nth-child(4n) { border-right: 0 !important; }
  .gallery__item--wide { grid-column: 1 / -1; }
  .record li { grid-template-columns: 80px 1fr; }
  /* nav: drop the page counter and breadcrumb slash so the bar stays one line */
  .bar > .u-num, .bar > span.u-mono { display: none; }
  .bar { gap: 12px; }
  .bar__nav { gap: 12px; }
  /* section heads: note drops below the title */
  .piece-head { flex-wrap: wrap; gap: 4px 12px; }
  .piece-head__note { margin-left: 0; flex-basis: 100%; }
  .detail-head__sub .u-mono { flex-basis: 100%; }
}
}

/* ==========================================================================
   HOME v2: name left, bio right. Nav bar on every page.
   ========================================================================== */
.bar--home .bar__name { font-size: 16px; }
.masthead--split { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.masthead__left { padding: var(--gutter); border-right: var(--rule) solid var(--black); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.masthead__right { padding: var(--gutter); display: flex; flex-direction: column; gap: 18px; }
.masthead--split .masthead__name { font-size: clamp(44px, 7.6vw, 136px); }
.masthead--split .masthead__positioning { margin: 0; }
.masthead__right .band__bio { max-width: 60ch; font-size: clamp(15px, 1.25vw, 18px); }
.masthead__right a.inline { border-bottom: var(--rule) solid var(--black); }
.masthead__right a.inline:hover { color: var(--orange); border-color: var(--orange); }
.masthead__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.btn { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 9px 14px; border: var(--rule) solid var(--black); background: var(--white); color: var(--black); cursor: pointer; font-weight: 600; display: inline-block; }
.btn:hover { background: var(--black); color: var(--white); }
.btn--primary { background: var(--orange); border-color: var(--orange); color: var(--white); }
.btn--primary:hover { background: var(--black); border-color: var(--black); }

/* timeline record */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 7px 0; border-top: var(--rule) solid var(--black); font-size: 13px; line-height: 1.35; }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline__y { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); padding-top: 2px; font-weight: 600; }

/* ---------- services page ---------- */
.service { display: grid; grid-template-columns: 1fr 1fr; border-bottom: var(--rule) solid var(--black); }
.service__text { padding: var(--gutter); border-right: var(--rule) solid var(--black); min-width: 0; }
.service__num { font-family: var(--mono); font-size: 12px; color: var(--orange); letter-spacing: 0.08em; font-weight: 600; display: block; margin-bottom: 14px; }
.service__title { font-size: clamp(28px, 3.6vw, 54px); font-weight: 900; letter-spacing: -0.045em; text-transform: uppercase; line-height: 0.95; margin: 0 0 18px; }
.service__lead { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.45; font-weight: 600; margin: 0 0 18px; max-width: 52ch; }
.service__list { list-style: none; margin: 0 0 22px; padding: 0; }
.service__list li { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.6; padding-left: 16px; position: relative; }
.service__list li::before { content: "—"; position: absolute; left: 0; color: var(--orange); }
.service__for { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55; margin: 0 0 18px; line-height: 1.6; }
.service__media { display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
.service__media .gallery__item { aspect-ratio: 1 / 1; }
.service__media .gallery__item:nth-child(2n) { border-right: 0; }
.service__media .gallery__item--wide { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
.service__caption { display: block; padding: 10px var(--gutter); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: var(--rule) solid var(--black); }
.service__caption a { color: var(--orange); }
.service__caption a:hover { color: var(--black); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: var(--rule) solid var(--black); }
.step { padding: var(--gutter); border-right: var(--rule) solid var(--black); }
.step:last-child { border-right: 0; }
.step__num { font-family: var(--mono); font-size: 11px; color: var(--orange); letter-spacing: 0.08em; font-weight: 600; display: block; margin-bottom: 10px; }
.step__title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; margin: 0 0 8px; }
.step__text { margin: 0; font-size: 13px; line-height: 1.45; }

/* ---------- contact page ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; border-bottom: var(--rule) solid var(--black); }
.contact__side { padding: var(--gutter); border-right: var(--rule) solid var(--black); }
.contact__side p { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.45; font-weight: 600; margin: 0 0 18px; max-width: 40ch; }
.form { padding: var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.form__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form__field--full { grid-column: 1 / -1; }
.form label, .form legend { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }
.form input[type=text], .form input[type=email], .form input[type=url], .form select, .form textarea {
  font-family: var(--sans); font-size: 15px; font-weight: 500; padding: 10px 12px; border: var(--rule) solid var(--black); background: var(--white); color: var(--black); width: 100%;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--orange); outline-offset: -2px; }
.form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.form__checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 4px; }
.form__check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.form__check input { width: 16px; height: 16px; accent-color: var(--orange); margin: 0; }
.form__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 6px; border-top: var(--rule) solid var(--black); }
.form__status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); }
.form__hp { position: absolute; left: -9999px; }

@media (max-width: 900px) {
  .masthead--split, .service, .contact { grid-template-columns: 1fr; }
  .masthead__left, .service__text, .contact__side { border-right: 0; border-bottom: var(--rule) solid var(--black); }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2n) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: var(--rule) solid var(--black); }
}
@media (max-width: 640px) {
  .form { grid-template-columns: 1fr; }
  .form__checks { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: var(--rule) solid var(--black); }
  .step:last-child { border-bottom: 0; }
  .timeline li { grid-template-columns: 96px 1fr; }
}

/* narrative brief: one paragraph plus a details column */
.brief--story { grid-template-columns: 1.6fr 1fr; }
.brief__story { margin: 0; font-size: clamp(16px, 1.45vw, 21px); line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; max-width: 62ch; }
.brief__story + .brief__story { margin-top: 14px; }
.meta { list-style: none; margin: 0; padding: 0; }
.meta li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 0; border-top: var(--rule) solid var(--black); font-size: 13px; line-height: 1.35; }
.meta li:first-child { border-top: 0; padding-top: 0; }
.meta__k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.5; padding-top: 2px; }
@media (max-width: 820px) { .brief--story { grid-template-columns: 1fr; } }

/* phone landing: short bio with a toggle, tighter masthead so the first tile shows on screen one */
.band__bio--short, .bio-more { display: none; }
@media (max-width: 640px) {
  .masthead__left { padding: 16px; gap: 10px; }
  .masthead__right { padding: 16px; gap: 10px; }
  .masthead--split .masthead__name { font-size: 15vw; }
  .masthead--split .masthead__positioning { font-size: 16px; max-width: none; }
  .masthead__right .band__label { margin-bottom: 4px; }
  .masthead__right .band__bio { font-size: 14px; line-height: 1.4; }
  .band__bio--long { display: none; }
  .band__bio--short { display: block; }
  .bio-more { display: inline-block; }
  .masthead--split.is-open .band__bio--long { display: block; }
  .masthead--split.is-open .band__bio--short { display: none; }
  .masthead__cta { margin-top: 4px; gap: 8px; }
  .section__head { padding: 12px 16px; }
}
