:root {
  --ink: #111214;
  --paper: #f1f0eb;
  --white: #fbfaf5;
  --gray: #a8adb0;
  --line: #ced0cd;
  --red: #d12c24;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:hover { color: var(--red); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 20; padding: .75rem 1rem; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.masthead {
  height: 4.5rem;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.masthead__mark { font-size: 1rem; font-weight: 700; }
.masthead__mark span { color: var(--red); }
.masthead nav { display: flex; gap: clamp(1rem, 4vw, 3rem); }
.masthead nav a { text-decoration: none; }

.hero {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  grid-template-columns: minmax(17rem, .78fr) 1.22fr;
  gap: clamp(2rem, 7vw, 8rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 7rem) var(--pad);
  border-bottom: 1px solid var(--ink);
}
.portrait-wrap { position: relative; max-width: 34rem; padding: .75rem; background: var(--white); box-shadow: 0 1rem 3rem #1112; transform: rotate(-1deg); }
.portrait { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.08); }
.exposure-note, .kicker, .evidence-label { margin: .7rem 0 0; font: .66rem/1.35 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.crop { position: absolute; width: 2rem; height: 2rem; z-index: 2; border-color: var(--red); }
.crop--tl { left: -.7rem; top: -.7rem; border-left: 2px solid var(--red); border-top: 2px solid var(--red); }
.crop--br { right: -.7rem; bottom: -.7rem; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); }
.hero__copy { max-width: 55rem; }
.hero h1 { max-width: 9ch; margin: .22em 0 .12em; font-size: clamp(4rem, 10vw, 10rem); font-weight: 800; letter-spacing: -.075em; line-height: .82; }
.role { max-width: 28em; margin: 1.5rem 0 2.5rem; font-size: clamp(1.05rem, 2vw, 1.45rem); }
.summary { max-width: 45rem; padding-left: clamp(1rem, 4vw, 4rem); border-left: 1px solid var(--ink); font-size: clamp(1rem, 1.5vw, 1.18rem); }
.summary p { margin: 0 0 1rem; }
.contact-line { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 2.5rem; font-family: var(--mono); font-size: .78rem; }

.work { padding: clamp(4rem, 8vw, 8rem) var(--pad); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 3rem; }
.section-head h2 { margin: .2rem 0 0; font-size: clamp(2.6rem, 6vw, 6rem); letter-spacing: -.06em; line-height: .9; }
.section-instruction { max-width: 25rem; margin: 0; font: .72rem/1.5 var(--mono); }
.contact-sheet { border-top: 1px solid var(--ink); counter-reset: frame; }
.case { border-bottom: 1px solid var(--ink); }
.frame { display: grid; grid-template-columns: 3.5rem minmax(11rem, .72fr) 1.1fr auto; gap: clamp(1rem, 3vw, 3rem); align-items: stretch; min-height: 12rem; padding: 1rem 0; cursor: pointer; list-style: none; }
.frame::-webkit-details-marker { display: none; }
.frame__number { padding-top: .3rem; font: .7rem var(--mono); color: #5e6264; }
.frame__visual { position: relative; overflow: hidden; min-height: 10rem; background: var(--ink); isolation: isolate; }
.frame__visual::before { content: ""; position: absolute; inset: 10% 8%; border: 1px solid #ffffff4d; background: linear-gradient(145deg, #35393c, #141517 55%); }
.frame__visual::after { content: ""; position: absolute; left: 18%; top: 22%; width: 54%; height: 44%; border: 1px solid var(--gray); box-shadow: 1.2rem 1rem 0 -1px #111, 1.2rem 1rem 0 0 #777; transform: rotate(-2deg); }
.frame__visual i { position: absolute; z-index: 2; height: 1px; background: #e7e4d1; opacity: .65; }
.frame__visual i:nth-child(1) { left: 25%; top: 32%; width: 30%; }
.frame__visual i:nth-child(2) { left: 25%; top: 40%; width: 42%; }
.frame__visual i:nth-child(3) { left: 25%; top: 48%; width: 20%; }
.frame__visual i:nth-child(4) { right: 8%; bottom: 12%; width: 28%; background: var(--red); opacity: 1; transform: rotate(-5deg); }
.frame__visual i:nth-child(5) { right: 17%; bottom: 20%; width: 1px; height: 35%; background: #fff; }
.frame__caption { align-self: center; display: grid; grid-template-columns: minmax(10rem, 1fr) 1fr; gap: .25rem 2rem; }
.frame__company { grid-column: 1 / -1; font-size: clamp(1.8rem, 4vw, 4rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.frame__title, .frame__date, .frame__action { font: .72rem/1.4 var(--mono); }
.frame__date { color: #5e6264; }
.frame__action { align-self: end; padding-bottom: .4rem; white-space: nowrap; }
.frame__action b { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-left: .5rem; border: 1px solid; color: var(--red); font-size: 1rem; }
.case[open] { background: var(--white); margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
.case[open] .frame__action b { transform: rotate(45deg); }
.case[open] .frame__visual { outline: 3px solid var(--red); outline-offset: -8px; }
.case__evidence { display: grid; grid-template-columns: minmax(14rem, .72fr) 1.1fr; gap: clamp(2rem, 8vw, 8rem); padding: 2rem 0 4rem 5.5rem; }
.case__meta > a { display: inline-block; margin: 1.5rem 0; font-weight: 700; }
.tech-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; list-style: none; }
.tech-list li { border: 1px solid var(--line); padding: .35rem .55rem; font: .65rem var(--mono); }
.case__notes { max-width: 52rem; font-size: clamp(1.05rem, 1.7vw, 1.35rem); }
.case__notes p:not(.evidence-label) { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }

.notes { padding: clamp(4rem, 8vw, 8rem) var(--pad); background: var(--ink); color: var(--white); }
.section-head--dark { border-color: var(--gray); }
.notes-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(3rem, 10vw, 10rem); }
.notes h3 { margin: .25rem 0 2rem; font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -.05em; }
.skill-list { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: skills; border-top: 1px solid #ffffff50; }
.skill-list li { counter-increment: skills; display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #ffffff50; font-size: clamp(1rem, 2vw, 1.5rem); }
.skill-list li::before { content: counter(skills, decimal-leading-zero); color: var(--red); font: .65rem var(--mono); }
.credentials { display: grid; align-content: start; gap: 4rem; }
.credential { padding: 1.5rem 0; border-top: 1px solid var(--gray); }
.credential p { margin: .2rem 0; }
.credential p:first-child { font-size: 1.2rem; font-weight: 700; }
.credential p:last-child { color: var(--gray); }

.references { padding: clamp(4rem, 8vw, 8rem) var(--pad); overflow: hidden; }
.reference-strip { display: grid; grid-template-columns: repeat(4, minmax(18rem, 1fr)); gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.reference-strip figure { margin: 0; padding: clamp(1.5rem, 3vw, 3rem); background: var(--paper); }
.reference-strip blockquote { margin: 0 0 3rem; font: clamp(1rem, 1.5vw, 1.25rem)/1.55 Georgia, serif; }
.reference-strip figcaption { display: flex; flex-direction: column; font-size: .78rem; }
.reference-strip figcaption span { color: #676b6d; font-family: var(--mono); }

footer { display: grid; grid-template-columns: 1fr 1fr auto; gap: 2rem; padding: 2rem var(--pad); background: var(--red); color: var(--white); font: .7rem var(--mono); text-transform: uppercase; }
footer p { margin: 0; }
footer div { display: flex; gap: 1.5rem; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; }
  .portrait-wrap { width: min(80%, 25rem); }
  .frame { grid-template-columns: 2.5rem 7rem 1fr; min-height: 9rem; }
  .frame__visual { min-height: 7rem; }
  .frame__action { grid-column: 3; }
  .case__evidence { grid-template-columns: 1fr; padding-left: 3.5rem; }
  .notes-grid { grid-template-columns: 1fr; }
  .reference-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .masthead nav a:nth-child(2) { display: none; }
  .hero h1 { font-size: clamp(3.6rem, 20vw, 6rem); }
  .section-head { align-items: start; flex-direction: column; }
  .frame { grid-template-columns: 2rem 1fr; }
  .frame__visual { grid-column: 2; min-height: 11rem; }
  .frame__caption { grid-column: 2; grid-template-columns: 1fr; }
  .frame__action { grid-column: 2; }
  .case__evidence { padding-left: 2rem; }
  .skill-list, .reference-strip { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .frame__visual, .frame__action b, a { transition: color .2s ease, outline-color .2s ease, transform .2s ease; }
  .frame:hover .frame__visual { transform: rotate(.5deg) scale(1.01); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
