/* ==========================================================================
   DAVID AGBAYEWA — PORTFOLIO
   senior.css  (loaded after style.css on every page)

   The senior-brand-designer layer (rebuilt 2026-10-03):
   - the homepage (.sr-*), and
   - the project-facts block on case studies (.cs-facts).

   Same system as the CV: Manrope, near-monochrome, one deep green accent
   (#2F5D46, the colour on the CV's name). The work carries the colour;
   the frame stays quiet.
   ========================================================================== */

:root {
  --sr-paper: #f3f4f1;
  --sr-ink: #15171b;
  --sr-graphite: #4b5058;
  --sr-mute: #7b8088;
  --sr-rule: #d8dad4;
  --sr-green: #2f5d46;
  --sr-green-deep: #234635;
}

body[data-page="home"] {
  background-color: var(--sr-paper);
  color: var(--sr-ink);
}

body[data-page="home"] .site-header.is-scrolled {
  background-color: var(--sr-paper);
  border-bottom-color: var(--sr-rule);
}

.sr a:focus-visible,
.sr button:focus-visible,
.cs-facts a:focus-visible {
  outline: 2px solid var(--sr-green);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-link {
  color: var(--sr-ink);
  text-decoration: underline;
  text-decoration-color: var(--sr-green);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.sr-link:hover {
  color: var(--sr-green);
}

.sr-section {
  padding-block: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--sr-rule);
}

.sr-section__title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 clamp(32px, 5vw, 56px);
  max-width: 22ch;
}

/* ---------- Buttons ---------- */

.sr-btn {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid var(--sr-ink);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.sr-btn--solid {
  background: var(--sr-ink);
  color: var(--sr-paper);
}

.sr-btn--solid:hover {
  background: var(--sr-green);
  border-color: var(--sr-green);
  color: #fff;
}

.sr-btn--line {
  background: transparent;
  color: var(--sr-ink);
}

.sr-btn--line:hover {
  border-color: var(--sr-green);
  color: var(--sr-green);
}

/* ---------- Hero ---------- */

.sr-hero {
  padding-block: clamp(48px, 9vw, 120px) clamp(40px, 6vw, 72px);
}

.sr-hero__role {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--sr-green);
  margin: 0 0 20px;
}

.sr-hero__title {
  font-size: clamp(2.6rem, 7.4vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  max-width: 13ch;
  margin: 0 0 clamp(28px, 4vw, 44px);
}

.sr-hero__body {
  display: grid;
  gap: 32px;
  align-items: end;
}

.sr-hero__lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: var(--sr-graphite);
  max-width: 58ch;
  margin: 0;
}

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

.sr-hero__open {
  margin: 16px 0 0;
  font-size: 1rem;
  color: var(--sr-ink);
  font-weight: 600;
}

.sr-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (min-width: 992px) {
  .sr-hero__body {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* ---------- The ecosystem strip (the one memorable moment) ---------- */

.sr-eco {
  padding-bottom: clamp(56px, 8vw, 96px);
}

.sr-eco__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(6px, 0.8vw, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sr-eco__item {
  margin: 0;
}

.sr-eco__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  background: #1b1d21;
}

.sr-eco__item figcaption {
  margin-top: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.sr-eco__item figcaption span {
  display: block;
  font-weight: 400;
  color: var(--sr-mute);
  font-size: 0.875rem;
}

.sr-eco__caption {
  margin: clamp(20px, 3vw, 32px) 0 0;
  max-width: 64ch;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--sr-graphite);
}

.sr-eco__caption a {
  white-space: nowrap;
}

@media (max-width: 767px) {
  .sr-eco__row {
    grid-template-columns: repeat(5, 62vw);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .sr-eco__item {
    scroll-snap-align: start;
  }
}

/* ---------- Selected work ---------- */

.sr-work {
  display: grid;
  gap: clamp(72px, 10vw, 136px);
}

.sr-case {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

@media (min-width: 992px) {
  .sr-case {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .sr-case--flip {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .sr-case--flip .sr-case__media {
    order: 2;
  }
}

.sr-case__media {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #e4e5e0;
}

.sr-case__media img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sr-case__media:hover img {
  transform: scale(1.015);
}

.sr-case__mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: var(--sr-paper);
}

.sr-case__mosaic img {
  aspect-ratio: 1;
  object-fit: cover;
}

.sr-case__org {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sr-green);
  margin: 0 0 12px;
}

.sr-case__title {
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 16px;
  max-width: 20ch;
}

.sr-case__summary {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--sr-graphite);
  margin: 0 0 24px;
  max-width: 52ch;
}

.sr-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 20px;
  margin: 0 0 24px;
  padding: 20px 0;
  border-top: 1px solid var(--sr-rule);
  border-bottom: 1px solid var(--sr-rule);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.sr-facts dt {
  color: var(--sr-mute);
  font-weight: 500;
}

.sr-facts dd {
  margin: 0;
  color: var(--sr-ink);
}

.sr-case__did {
  margin: 0 0 28px;
  padding-left: 1.1em;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--sr-graphite);
}

.sr-case__did li + li {
  margin-top: 8px;
}

.sr-case__did li::marker {
  color: var(--sr-green);
}

/* ---------- More work ---------- */

.sr-more {
  display: grid;
  gap: clamp(32px, 4vw, 40px);
}

@media (min-width: 768px) {
  .sr-more {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .sr-more {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.sr-more__item a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.sr-more__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 14px;
  background: #e4e5e0;
}

.sr-more__item h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.sr-more__item a:hover h3 {
  color: var(--sr-green);
}

.sr-more__item p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--sr-graphite);
}

.sr-tag {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sr-graphite);
  border: 1px solid var(--sr-rule);
  border-radius: 999px;
  padding: 2px 10px;
}

/* ---------- Experience ---------- */

.sr-xp {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 1040px;
}

.sr-xp__item {
  display: grid;
  gap: 4px 32px;
  padding: 24px 0;
  border-top: 1px solid var(--sr-rule);
}

.sr-xp__item:last-child {
  border-bottom: 1px solid var(--sr-rule);
}

@media (min-width: 768px) {
  .sr-xp__item {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}

.sr-xp__dates {
  font-size: 0.9375rem;
  color: var(--sr-mute);
  font-variant-numeric: tabular-nums;
}

.sr-xp__role {
  font-size: 1.1875rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.sr-xp__role span {
  font-weight: 400;
  color: var(--sr-graphite);
}

.sr-xp__item p {
  margin: 0;
  max-width: 68ch;
  line-height: 1.55;
  color: var(--sr-graphite);
}

/* ---------- How I work ---------- */

.sr-principles {
  display: grid;
  gap: 40px;
}

@media (min-width: 992px) {
  .sr-principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
  }
}

.sr-principles h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.sr-principles p {
  margin: 0;
  line-height: 1.6;
  color: var(--sr-graphite);
  max-width: 44ch;
}

/* ---------- About ---------- */

.sr-about {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

@media (min-width: 992px) {
  .sr-about {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  }
}

.sr-about__photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  filter: grayscale(1);
}

.sr-about__text p {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--sr-graphite);
  max-width: 62ch;
  margin: 0 0 20px;
}

.sr-about__text p:first-child {
  font-size: clamp(1.3rem, 2vw, 1.5rem);
  line-height: 1.45;
  color: var(--sr-ink);
  font-weight: 600;
}

.sr-about__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 24px;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--sr-rule);
  font-size: 0.9875rem;
  line-height: 1.5;
}

.sr-about__list dt {
  color: var(--sr-mute);
}

.sr-about__list dd {
  margin: 0;
}

/* ---------- Contact ---------- */

.sr-contact {
  background: var(--sr-ink);
  color: var(--sr-paper);
  padding-block: clamp(80px, 12vw, 160px);
}

.sr-contact__lead {
  font-size: 1.125rem;
  color: #b9bcc2;
  margin: 0 0 16px;
  max-width: 52ch;
}

.sr-contact__email {
  display: inline-block;
  font-size: clamp(1.75rem, 5.4vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--sr-paper);
  text-decoration: none;
  border-bottom: 3px solid var(--sr-green);
  overflow-wrap: anywhere;
}

.sr-contact__email:hover,
.sr-contact__email:focus-visible {
  color: #a8cdb9;
}

.sr-contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.sr-contact .sr-btn--line {
  color: var(--sr-paper);
  border-color: rgba(243, 244, 241, 0.45);
}

.sr-contact .sr-btn--line:hover {
  border-color: #a8cdb9;
  color: #a8cdb9;
}

/* ==========================================================================
   Case studies: the project-facts block (sits inside the dark .cs-hero)
   ========================================================================== */

.cs-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 24px;
  margin: 8px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9875rem;
  line-height: 1.5;
  max-width: 720px;
}

.cs-facts dt {
  color: rgba(255, 255, 255, 0.5);
}

.cs-facts dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.cs-facts + .cs-hero__meta {
  border-top: 0;
  padding-top: var(--space-md);
}

@media (prefers-reduced-motion: reduce) {
  .sr-case__media img,
  .sr-btn {
    transition: none;
  }

  .sr-case__media:hover img {
    transform: none;
  }
}

.sr-case__mosaic--tall {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sr-case__mosaic--tall img {
  aspect-ratio: 4 / 5;
}
