/* ==========================================================================
   Tobi Fadolapo — portfolio stylesheet
   --------------------------------------------------------------------------
   You rarely need to touch this file. To change WORDS, edit the .html files.
   To change COLOURS, edit the hex codes in the ":root" block directly below.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COLOURS AND TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* Three campaign accents sit on a warm, quiet neutral foundation. */
  --paper:      #F8F7F2;
  --surface:    #FFFefa;
  --surface-2:  #F0EEE7;
  --ink:        #202822;
  --ink-2:      #4E5A52;
  --line:       #CDD1C9;
  --line-soft:  #E2E3DC;
  --forest:     #245C4A;
  --rust:       #92594E;
  --blue:       #5F8193;
  --accent:     var(--forest);
  --accent-ink: #FFFFFF;
  --gradient-wash:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 7%, transparent), transparent 58%),
    linear-gradient(315deg, color-mix(in srgb, var(--rust) 5%, transparent), transparent 54%);
  --texture-overlay: repeating-linear-gradient(135deg, rgba(32, 40, 34, .012) 0 1px, transparent 1px 4px);
  --motion-fast: .22s;
  --motion-standard: .48s;
  --shadow:     0 1px 2px rgba(20, 25, 34, .06), 0 8px 24px rgba(20, 25, 34, .07);

  /* Type */
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --text:    "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing + measure */
  --gutter: 1.25rem;
  --max:    74rem;   /* ~1184px */
  --wide:   94rem;
  --measure: 36em;

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  background-image: var(--texture-overlay), var(--gradient-wash);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

a:hover { text-decoration-color: var(--accent); }

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.15rem; }
li { margin-bottom: .4em; max-width: var(--measure); }

strong { font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-wide {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .75rem 1.25rem;
  z-index: 100;
  font-weight: 600;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. HEADER AND NAVIGATION
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark img { width: 2rem; height: 2rem; flex: none; border-radius: 7px; }

.wordmark:hover { color: var(--accent); }

.home-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: .9rem;
  margin-right: auto;
  color: var(--ink-2);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.home-link svg { width: 1rem; height: 1rem; }
.home-link:hover { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2.4vw, 1.9rem);
}

.nav a {
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
}

.nav a:hover, .nav a[aria-current="page"], .nav a[aria-current="location"] { color: var(--ink); }

/* On a phone the header only has room for the essentials. Both sections are
   still reachable by scrolling, and from the footer. */
@media (max-width: 47.99rem) {
  .nav__more { display: none; }
}

@media (max-width: 24rem) {
  .wordmark { font-size: .9375rem; }
  .wordmark img { width: 1.75rem; height: 1.75rem; }
  .nav { gap: .75rem; }
}

/* --------------------------------------------------------------------------
   4. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1.4rem;
  font-family: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 3px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 84%, var(--ink)); }

.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--onaccent { background: var(--accent-ink); color: var(--accent); }
.btn--onaccent:hover { background: color-mix(in srgb, var(--accent-ink) 88%, var(--accent)); }

.btn--outline-onaccent { border-color: color-mix(in srgb, var(--accent-ink) 55%, transparent); color: var(--accent-ink); }
.btn--outline-onaccent:hover { background: color-mix(in srgb, var(--accent-ink) 14%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   5. HERO
   -------------------------------------------------------------------------- */

.hero { padding: clamp(2.25rem, 5.5vw, 4.25rem) 0 clamp(2rem, 4vw, 3rem); }

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  font-optical-sizing: auto;
  letter-spacing: 0;
  line-height: 1.12;
  max-width: 15ch;
  margin-bottom: clamp(1.4rem, 2.4vw, 1.9rem);
}

.hero h1 .line {
  display: block;
  overflow: visible;
}

.hero h1 .line > span {
  display: block;
  animation: rise .75s cubic-bezier(.19, 1, .22, 1) backwards;
}

.hero h1 .line:nth-child(1) > span { animation-delay: .04s; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .20s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(.3em); }
  to   { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .line > span { animation: none; }
}

.hero__lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 47ch;
}

.hero__lede strong { color: var(--ink); font-weight: 600; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

/* Full-bleed strip of three campaign visuals, directly under the hero text. */
.kv-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .625rem;
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
}

.kv-strip figure { margin: 0; }

.kv-strip img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface-2);
}

@media (max-width: 46rem) {
  .kv-strip {
    display: flex;
    gap: .625rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: .5rem;
    scrollbar-width: thin;
  }
  .kv-strip figure {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
}

/* --------------------------------------------------------------------------
   6. SECTIONS
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

.section--rule { border-top: 1px solid var(--line); }

.section__title {
  font-size: 2.25rem;
  margin-bottom: 2.5rem;
}

.section__intro {
  color: var(--ink-2);
  max-width: 48ch;
  margin-top: -1.5rem;
  margin-bottom: 2.75rem;
}

/* --------------------------------------------------------------------------
   7. WORK LISTING
   -------------------------------------------------------------------------- */

.project { display: block; text-decoration: none; }

.project__media {
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.project:hover .project__media img,
.project:focus-visible .project__media img { transform: scale(1.025); }

@media (prefers-reduced-motion: reduce) {
  .project__media img { transition: none; }
  .project:hover .project__media img { transform: none; }
}

.project__body {
  display: grid;
  gap: .75rem 2.5rem;
  margin-top: 1.5rem;
}

.project__title {
  font-size: 2rem;
}

.project:hover .project__title { color: var(--accent); }

.project__idea {
  color: var(--ink-2);
  font-size: 1.0625rem;
  margin: 0;
  max-width: 46ch;
}

.project__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
  margin-top: .3rem;
}

.tag {
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1;
  padding: .4rem .6rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-2);
  white-space: nowrap;
}

.tag--kind {
  border-color: transparent;
  background: var(--ink);
  color: var(--paper);
}

.project__cue {
  font-weight: 600;
  color: var(--accent);
  font-size: .9375rem;
  margin: 0;
}

/* Lead project gets the widest image and a two-column caption. */
.project--lead .project__media img { aspect-ratio: 16 / 8.2; }

@media (min-width: 52rem) {
  .project--lead .project__body {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
  }
  .project--lead .project__title { grid-column: 1; }
  .project--lead .project__idea  { grid-column: 1; }
  .project--lead .project__side  { grid-column: 2; grid-row: 1 / span 3; }
}

.project-pair {
  display: grid;
  gap: clamp(2.75rem, 6vw, 4rem);
  margin-top: clamp(3rem, 7vw, 5rem);
}

.project-pair .project { display: flex; flex-direction: column; height: 100%; }
.project-pair .project__body { flex: 1; align-content: start; }

@media (min-width: 52rem) {
  .project-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; align-items: start; }
}

.project--b .project__media img { aspect-ratio: 4 / 3; }
.project--c .project__media img { aspect-ratio: 4 / 3; }

/* --------------------------------------------------------------------------
   8. CAPABILITIES
   -------------------------------------------------------------------------- */

.capabilities {
  display: grid;
  gap: 2.25rem 2.5rem;
}

@media (min-width: 40rem) { .capabilities { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .capabilities { grid-template-columns: repeat(3, 1fr); } }

.capability { border-top: 2px solid var(--ink); padding-top: 1rem; }

.capability h3 {
  font-size: 1.1875rem;
  letter-spacing: 0;
  margin-bottom: .55rem;
}

.capability p {
  margin: 0;
  color: var(--ink-2);
  font-size: .9688rem;
  line-height: 1.6;
}

.capability--quiet { border-top-color: var(--line); }

/* Tool and certificate lists */
.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.inline-list li { margin: 0; }

/* --------------------------------------------------------------------------
   9. BACKGROUND / CREDENTIALS
   -------------------------------------------------------------------------- */

.facts { display: grid; gap: 2rem 3rem; }

@media (min-width: 48rem) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.fact h3 {
  font-size: 1.0625rem;
  margin-bottom: .85rem;
}

.fact dl { margin: 0; }

.fact dt {
  font-weight: 600;
  font-size: .9688rem;
  margin-top: .9rem;
}

.fact dt:first-child { margin-top: 0; }

.fact dd {
  margin: .1rem 0 0;
  color: var(--ink-2);
  font-size: .9375rem;
}

/* --------------------------------------------------------------------------
   10. CONTACT BAND — the one saturated moment on the page
   -------------------------------------------------------------------------- */

.contact {
  background: var(--accent);
  color: var(--accent-ink);
}

.contact__inner { padding-block: clamp(3.5rem, 8vw, 6rem); }

.contact h2 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 0;
  max-width: 17ch;
  margin-bottom: 1.25rem;
}

.contact p {
  color: color-mix(in srgb, var(--accent-ink) 86%, var(--accent));
  max-width: 44ch;
  font-size: 1.0625rem;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.contact a:not(.btn) { color: var(--accent-ink); }

/* --------------------------------------------------------------------------
   11. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.25rem 2.75rem;
  font-size: .9063rem;
  color: var(--ink-2);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* --------------------------------------------------------------------------
   12. CASE STUDY PAGES
   -------------------------------------------------------------------------- */

.cs-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.75rem, 4vw, 2.75rem); }

.backlink {
  display: inline-block;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 1.75rem;
}

.backlink:hover { color: var(--accent); }

.cs-head h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 0;
  max-width: 17ch;
}

.cs-head__idea {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--accent);
  margin: 1.1rem 0 0;
  max-width: 28ch;
}

.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
  margin-top: 1.75rem;
}

.cs-hero {
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
}

.cs-hero img {
  width: 100%;
  border-radius: 5px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
}

/* "At a glance" — rules, not boxes */
.glance {
  display: grid;
  gap: 1.75rem 2.5rem;
  margin: 0 0 clamp(3rem, 6vw, 4.5rem);
}

@media (min-width: 38rem) { .glance { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .glance { grid-template-columns: repeat(4, 1fr); } }

.glance > div { border-top: 2px solid var(--ink); padding-top: .9rem; }

.glance dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: .4rem;
}

.glance dd {
  margin: 0;
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.55;
}

/* Long-form case study body */
.cs-body { display: grid; gap: clamp(2.75rem, 6vw, 4.25rem); }

.cs-section > h2 {
  font-size: 2rem;
  margin-bottom: 1.1rem;
}

.cs-section > h3 {
  font-size: 1.1875rem;
  margin: 2rem 0 .6rem;
}

.cs-section p, .cs-section li { color: var(--ink-2); }
.cs-section p strong, .cs-section li strong { color: var(--ink); }

.pull {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.34;
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 2rem 0;
  color: var(--ink);
  max-width: 34ch;
}

.pull cite {
  display: block;
  font-family: var(--text);
  font-size: .875rem;
  font-weight: 400;
  font-style: normal;
  color: var(--ink-2);
  margin-top: .75rem;
}

/* Figures and galleries */
figure { margin: 0; }

.figure { margin: 2rem 0; }

.figure img {
  width: 100%;
  border-radius: 5px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
}

figcaption {
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin-top: .7rem;
  max-width: 54ch;
}

.gallery { display: grid; gap: 1rem; margin: 2rem 0; }

@media (min-width: 42rem) { .gallery--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 42rem) { .gallery--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .gallery--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 42rem) { .gallery--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .gallery--4 { grid-template-columns: repeat(4, 1fr); } }

.gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
}

/* Wide tiles for 16:9 campaign frames. */
.gallery--wide img { aspect-ratio: 16 / 9; }

/* Show the whole artwork instead of cropping it, while keeping tiles level.
   Used where pieces in one row are different shapes. */
.gallery--contain img {
  object-fit: contain;
  background: var(--surface);
  aspect-ratio: 4 / 3;
}

/* A single upright piece — a poster, a storyboard, a sell sheet. */
.figure--portrait { max-width: 24rem; }
.figure--portrait img { width: 100%; }

@media (min-width: 52rem) {
  .figure--portrait { max-width: 27rem; }
}

.gallery figcaption { margin-top: .55rem; font-size: .8438rem; }

/* Deliverables table-like list */
.spec { margin: 1.5rem 0 0; }

.spec > div {
  display: grid;
  gap: .25rem 1.5rem;
  padding: .9rem 0;
  border-top: 1px solid var(--line-soft);
}

.spec > div:last-child { border-bottom: 1px solid var(--line-soft); }

@media (min-width: 40rem) {
  .spec > div { grid-template-columns: 13rem minmax(0, 1fr); }
}

.spec dt { font-weight: 600; font-size: .9688rem; }
.spec dd { margin: 0; color: var(--ink-2); font-size: .9688rem; }

/* Honesty / evidence note */
.note {
  background: var(--surface-2);
  border-left: 3px solid var(--ink-2);
  padding: 1.25rem 1.4rem;
  border-radius: 0 4px 4px 0;
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 46rem;
}

.note > *:last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }

/* Results figures */
.results {
  display: grid;
  gap: 1.25rem;
  margin: 1.75rem 0 1.25rem;
}

@media (min-width: 38rem) { .results { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 58rem) { .results { grid-template-columns: repeat(4, 1fr); } }

.results > div { border-top: 2px solid var(--accent); padding-top: .85rem; }

.results .value {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: 0;
}

.results .label {
  display: block;
  margin-top: .5rem;
  font-size: .875rem;
  line-height: 1.45;
  color: var(--ink-2);
}

/* Next project */
.next {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}

.next a {
  display: inline-block;
  text-decoration: none;
  max-width: 100%;
}

.next .eyebrow {
  display: block;
  font-size: .9375rem;
  color: var(--ink-2);
  margin-bottom: .5rem;
}

.next .title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: 0;
  line-height: 1.05;
  display: block;
}

.next a:hover .title { color: var(--accent); }

/* --------------------------------------------------------------------------
   13. 404
   -------------------------------------------------------------------------- */

.center-page {
  min-height: 60vh;
  display: grid;
  align-content: center;
  padding-block: 4rem;
}

.center-page h1 { font-size: 3rem; margin-bottom: 1rem; }

@media (max-width: 40rem) {
  .hero h1, .cs-head h1 { font-size: 2.4rem; }
  .hero__lede, .cs-head__idea, .pull { font-size: 1.125rem; }
  .section__title, .cs-section > h2 { font-size: 1.65rem; }
  .project__title, .results .value { font-size: 1.75rem; }
  .contact h2 { font-size: 2.25rem; }
  .next .title { font-size: 1.8rem; }
  .center-page h1 { font-size: 2rem; }
}

/* --------------------------------------------------------------------------
   14. PORTFOLIO REDESIGN
   -------------------------------------------------------------------------- */

:root { --gutter: clamp(1rem, 4vw, 3.5rem); --max: 82rem; --wide: 100rem; }

@view-transition { navigation: auto; }

::view-transition-old(root) { animation: page-out .16s ease-in both; }
::view-transition-new(root) { animation: page-in .24s ease-out both; }

@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

.hero { padding-block: clamp(2.5rem, 5vw, 5rem) clamp(2rem, 4vw, 3.5rem); }
.hero__inner { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__copy { max-width: 43rem; }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 700; text-transform: uppercase; margin-bottom: 1.25rem; }
.hero h1 { max-width: none; font-size: 3.25rem; margin-bottom: 1.5rem; }
.hero__lede { max-width: 39ch; font-size: 1.15rem; }
.hero__proof { max-width: 42ch; color: var(--ink-2); font-size: .95rem; margin: 0; }
.hero__actions { margin-top: 1.5rem; }
.hero h1 em { color: var(--rust); font-style: normal; }

@media (max-width: 57.99rem) { .hero h1 { font-size: 3rem; } }
@media (max-width: 40rem) { .hero h1 { font-size: 2.4rem; } }

.kv-strip { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 0; }
.kv-strip__link { position: relative; display: block; min-width: 0; overflow: hidden; background: var(--surface-2); border-radius: 4px; text-decoration: none; transition: transform var(--motion-fast) cubic-bezier(.2, .7, .3, 1), box-shadow var(--motion-fast) ease; }
.kv-strip__link--lead { grid-column: 1 / -1; }
.kv-strip__link img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform var(--motion-standard) cubic-bezier(.2, .7, .3, 1); }
.kv-strip__link--lead img { aspect-ratio: 16 / 9; }
.kv-strip__link:hover img, .kv-strip__link:focus-visible img { transform: scale(1.025); }
.kv-strip__link:hover, .kv-strip__link:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(32, 40, 34, .12); }
.kv-strip__link > span { position: absolute; inset: auto 0 0; padding: 2.5rem .85rem .75rem; color: #fff; font-family: var(--display); font-size: 1rem; font-weight: 700; background: linear-gradient(transparent, rgba(12, 20, 16, .82)); }
.kv-strip__link > span span { display: block; font-family: var(--text); font-size: .72rem; font-weight: 500; }

.section--work { padding-top: clamp(2rem, 4vw, 3rem); }
.section__title { max-width: 18ch; }
.section__intro { max-width: 54ch; }
.project { --project-bg: var(--surface); padding: clamp(1rem, 2.5vw, 2rem); background: var(--project-bg); border-radius: 4px; transition: transform var(--motion-fast) cubic-bezier(.2, .7, .3, 1), box-shadow var(--motion-fast) ease; }
.project[data-project="kilishi"] { --project-bg: color-mix(in srgb, var(--rust) 13%, var(--paper)); }
.project[data-project="stirling"] { --project-bg: color-mix(in srgb, var(--forest) 9%, var(--paper)); }
.project[data-project="genai"] { --project-bg: color-mix(in srgb, var(--blue) 14%, var(--paper)); }
.project--prototype { display: grid; grid-template-columns: 8rem minmax(0, 1fr); align-items: center; gap: 1.5rem; max-width: 58rem; margin-top: clamp(2rem, 4vw, 3rem); --project-bg: color-mix(in srgb, var(--blue) 10%, var(--paper)); cursor: default; }
.project--prototype .project__body { margin: 0; }
.project__prototype-mark { display: grid; place-items: center; aspect-ratio: 1; color: var(--surface); background: var(--blue); border-radius: 2px; font-family: var(--display); font-size: 3.5rem; font-weight: 700; }
.project--prototype .project__title { margin-top: .65rem; }
.project:hover, .project:focus-visible { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(32, 40, 34, .1); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .project:hover { transform: perspective(1000px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translateY(-4px); }
}
.project__media { border: 0; border-radius: 2px; }
.project__body { margin-top: 1.1rem; }
.project__title { font-size: 2.25rem; }
.project__cue { display: inline-flex; align-items: center; gap: .4rem; }
.project__cue::after { content: "→"; transition: transform .2s ease; }
.project:hover .project__cue::after { transform: translateX(.2rem); }
.project-pair { gap: clamp(1rem, 2vw, 2rem); }

.section--tint { border: 0; }
.section--green { background-color: color-mix(in srgb, var(--forest) 10%, var(--paper)); }
.section--blue { background-color: color-mix(in srgb, var(--blue) 12%, var(--paper)); }
.section--coral { background-color: color-mix(in srgb, var(--rust) 11%, var(--paper)); }
.section--green, .section--blue, .section--coral, .project {
  background-image: var(--texture-overlay), var(--gradient-wash);
}
.capabilities { gap: 0 clamp(2rem, 5vw, 5rem); }
.capability { padding-block: 1.25rem; border-top-color: color-mix(in srgb, var(--ink) 48%, transparent); }
.facts { column-gap: clamp(2rem, 7vw, 7rem); row-gap: 2.75rem; }
.contact { background-color: color-mix(in srgb, var(--rust) 11%, var(--paper)); color: var(--ink); }
.contact p { color: var(--ink-2); }
.contact a:not(.btn) { color: var(--ink); }
.contact .btn--onaccent { background: var(--ink); color: var(--surface); }
.contact .btn--outline-onaccent { border-color: var(--ink); color: var(--ink); }
.contact .btn--outline-onaccent:hover { background: var(--ink); color: var(--surface); }

@media (min-width: 58rem) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(23rem, .92fr); }
  .project--lead { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
  .project--lead .project__media { grid-row: span 1; }
  .project--lead .project__body { grid-template-columns: 1fr; }
  .project-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .project--c { margin-top: 3rem; }
}

@media (max-width: 57.99rem) {
  .hero__inner { grid-template-columns: 1fr; }
  .kv-strip { max-width: 42rem; }
}

@media (max-width: 34rem) {
  .hero { padding-block: 1.5rem 1.25rem; }
  .hero h1 { max-width: 17ch; font-size: 2rem; }
  .hero__lede { font-size: 1rem; }
  .hero__proof { font-size: .82rem; }
  .hero__actions { margin-top: 1rem; }
  .hero__actions .btn { padding: .65rem .85rem; font-size: .9rem; }
  .kv-strip__link:not(.kv-strip__link--lead) { display: none; }
  .kv-strip { gap: .45rem; }
  .kv-strip__link--lead img { aspect-ratio: 16 / 7; }
  .kv-strip__link:not(.kv-strip__link--lead) img { aspect-ratio: 2 / 1; }
  .kv-strip__link > span { padding: 2rem .55rem .55rem; font-size: .84rem; }
  .kv-strip__link > span span { font-size: .64rem; }
  .project__title { font-size: 1.7rem; }
  .project--prototype { grid-template-columns: 4.5rem minmax(0, 1fr); gap: .85rem; }
  .project__prototype-mark { font-size: 2rem; }
  .kv-strip { gap: .5rem; }
  .kv-strip__link > span { padding-inline: .55rem; font-size: .88rem; }
  .kv-strip__link > span span { font-size: .66rem; }
  .project { padding: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .kv-strip__link, .kv-strip__link img, .project, .project__cue::after { transition: none; }
  .kv-strip__link:hover, .kv-strip__link:focus-visible,
  .kv-strip__link:hover img, .kv-strip__link:focus-visible img,
  .project:hover, .project:focus-visible,
  .project:hover .project__media img, .project:focus-visible .project__media img { transform: none; box-shadow: none; }
}

.nav a[aria-current="location"] { text-decoration: underline; text-decoration-color: var(--rust); text-underline-offset: .45rem; }

/* Case studies use their project tint as a persistent wayfinding cue. */
main[data-project="kilishi"] { --project-tint: color-mix(in srgb, var(--rust) 13%, var(--paper)); }
main[data-project="stirling"] { --project-tint: color-mix(in srgb, var(--forest) 9%, var(--paper)); }
main[data-project="genai"] { --project-tint: color-mix(in srgb, var(--blue) 14%, var(--paper)); }

main[data-project] .cs-head {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
  background: var(--project-tint);
  background-image: var(--texture-overlay), var(--gradient-wash);
}

.cs-head h1 { max-width: 20ch; }
.cs-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(15rem, .65fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4vw, 4rem);
}

.cs-hero { margin: 0; }
.cs-hero img { aspect-ratio: 16 / 10; object-fit: cover; }
.glance { grid-template-columns: 1fr; gap: 0; margin: 0; }
.glance > div { border-top: 1px solid var(--line); padding-block: .85rem; }
.glance > div:first-child { border-top: 2px solid var(--ink); }
.glance dd { max-width: 42ch; }

.cs-body { max-width: 68rem; gap: clamp(3.5rem, 8vw, 7rem); padding-block: 1rem clamp(4rem, 8vw, 7rem); }
.cs-section { width: min(100%, 49rem); }
.cs-section:nth-child(even) { justify-self: end; }
.cs-section > h2 { max-width: 22ch; }
.cs-head__idea, .pull { font-size: 1.5rem; }
.next .title { font-size: 2.5rem; }
.cs-section > p, .cs-section > ul, .cs-section > ol, .cs-section > dl, .cs-section > blockquote { max-width: 44rem; }
.cs-section > .gallery, .cs-section > .figure { width: calc(100% + clamp(2rem, 8vw, 7rem)); max-width: calc(100vw - 2 * var(--gutter)); }
.cs-section:nth-child(odd) > .gallery, .cs-section:nth-child(odd) > .figure { margin-left: calc(-1 * clamp(1rem, 4vw, 3.5rem)); }
.cs-section:nth-child(even) > .gallery, .cs-section:nth-child(even) > .figure { margin-left: auto; margin-right: calc(-1 * clamp(1rem, 4vw, 3.5rem)); }
.cs-section .gallery img, .cs-section .figure img { border-radius: 2px; }

main[data-project] .cs-hero img,
main[data-project] .gallery img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

@media (min-width: 58rem) {
  main[data-project="kilishi"] .gallery--2 { grid-template-columns: 1.2fr .8fr; }
  main[data-project="stirling"] .gallery--2 { grid-template-columns: .8fr 1.2fr; }
  main[data-project="genai"] .gallery--3 { grid-template-columns: 1.1fr .9fr .9fr; }
}

main[data-project="kilishi"] .next { --project-tint: color-mix(in srgb, var(--rust) 13%, var(--paper)); }
main[data-project="stirling"] .next { --project-tint: color-mix(in srgb, var(--forest) 9%, var(--paper)); }
main[data-project="genai"] .next { --project-tint: color-mix(in srgb, var(--blue) 14%, var(--paper)); }
main[data-project] .next { background-color: var(--project-tint); background-image: var(--texture-overlay), var(--gradient-wash); border: 0; }
main[data-project] + .next .wrap { max-width: var(--max); }

@media (max-width: 57.99rem) {
  .cs-overview { grid-template-columns: 1fr; }
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
  .cs-section, .cs-section:nth-child(even) { justify-self: center; }
  .cs-section > .gallery, .cs-section > .figure { width: 100%; max-width: 100%; margin-left: 0 !important; }
}

@media (max-width: 35rem) {
  .site-header__inner { gap: .5rem; }
  .nav { gap: .65rem; }
  .nav a { font-size: .84rem; }
  .wordmark { gap: .35rem; font-size: .87rem; }
  .wordmark img { width: 1.65rem; height: 1.65rem; }
  .home-link { gap: .2rem; margin-left: .35rem; font-size: .76rem; }
  .home-link svg { width: .9rem; height: .9rem; }
  .glance { grid-template-columns: 1fr; }
  .cs-head { padding-block: 2rem; }
  .cs-head h1 { font-size: 2.25rem; }
}

h1, h2, h3, h4, .wordmark, .results .value, .next .title { letter-spacing: 0; }

.has-reveal .reveal {
  opacity: 0;
  transform: translateY(.8rem);
  transition: opacity var(--motion-standard) ease var(--reveal-delay, 0s), transform var(--motion-standard) cubic-bezier(.2, .7, .3, 1) var(--reveal-delay, 0s), box-shadow var(--motion-fast) ease;
}

.has-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .has-reveal .project.reveal.is-visible:hover { transform: perspective(1000px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translateY(-4px); }
}

.results { grid-template-columns: 1fr; }
.results p { max-width: none; margin: 0; color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
.results .value { display: inline; margin-right: .2rem; font-size: 1.45rem; line-height: 1.2; white-space: nowrap; }

@media (min-width: 42rem) {
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .has-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .has-reveal .project.reveal.is-visible:hover,
  .has-reveal .project.reveal.is-visible:focus-visible { transform: none; box-shadow: none; }
}

main[data-project] .cs-progress {
  position: sticky;
  top: 4.25rem;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  background-image: var(--gradient-wash);
  backdrop-filter: blur(10px);
  border-block: 1px solid var(--line-soft);
}

.cs-progress__inner {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.cs-progress__inner::-webkit-scrollbar { display: none; }
.cs-progress a { flex: 0 0 auto; padding: .65rem .85rem; color: var(--ink-2); font-size: .875rem; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.cs-progress a:hover, .cs-progress a[aria-current="location"] { color: var(--ink); border-bottom-color: var(--rust); }
.cs-section [id] { scroll-margin-top: 8rem; }

main[data-project] .cs-section .gallery img,
main[data-project] .cs-section .figure img {
  cursor: zoom-in;
}

.lightbox {
  width: min(94vw, 78rem);
  max-width: none;
  max-height: 92vh;
  padding: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(20, 25, 34, .3);
}

.lightbox::backdrop { background: rgba(15, 22, 18, .78); backdrop-filter: blur(4px); }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; color: var(--ink-2); font-size: .875rem; }
.lightbox__stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; }
.lightbox__stage img { width: 100%; max-height: 76vh; object-fit: contain; }
.lightbox__caption { margin: .75rem 0 0; color: var(--ink-2); font-size: .9rem; }
.lightbox button { min-width: 2.75rem; min-height: 2.75rem; padding: .45rem .7rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; font: inherit; cursor: pointer; }
.lightbox button:hover { background: var(--surface-2); }

@media (max-width: 40rem) {
  .lightbox { padding: .65rem; }
  .lightbox__stage { grid-template-columns: auto minmax(0, 1fr) auto; gap: .35rem; }
  .lightbox__stage img { max-height: 72vh; }
  .lightbox button { min-width: 2.4rem; min-height: 2.6rem; padding: .35rem; font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .project, .kv-strip__link, .project__media img, .project__cue::after { transition: none; }
  .project:hover, .project:focus-visible, .kv-strip__link:hover, .kv-strip__link:focus-visible { transform: none; box-shadow: none; }
  .project:hover .project__media img, .project:focus-visible .project__media img,
  .kv-strip__link:hover img, .kv-strip__link:focus-visible img { transform: none; }
}
