/* ============================================================
   oluwoleoke.com
   Dark instrument panel: committed near-black ground, one steel-blue
   accent family, serif display over sans body, mono for data labels.
   ============================================================ */

/* ---------- fonts (self-hosted latin subsets) ---------- */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/source-serif-4-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/source-serif-4-italic-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/public-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/public-sans-600.woff2') format('woff2');
}

/* ---------- tokens ---------- */
:root {
  --ground: #101216;
  --deep: #0c0e12;
  --panel: #14171c;
  --panel-raised: rgba(20, 23, 29, 0.94);
  --line: #23262f;
  --line-faint: #1c1f27;
  --line-strong: #2e323d;

  --bright: #fbfbf9;
  --ink: #ecebe6;
  --body: #b2b4bb;
  --muted: #9a9ca4;
  --faint: #8a8d96;          /* lifted from #7d8088: 5.6:1 on ground */

  --accent: #9fb1d6;
  --accent-2: #8fa0bd;
  --accent-3: #7c93c4;
  --accent-dim: #6b7793;
  --chip-active: #3a4a63;
  --green: #5fbf93;

  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Public Sans', -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;

  --r-s: 3px;
  --r-m: 5px;
  --r-l: 6px;

  --pad-x: clamp(20px, 4.5vw, 40px);
  --measure: 58ch;

  /* z scale */
  --z-nav: 50;
  --z-card: 5;
  --z-pin-active: 6;
}

/* ---------- reset-ish ---------- */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
@media (max-width: 600px) {
  html { scroll-padding-top: 108px; }  /* nav wraps to two rows on narrow screens */
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
::selection { background: #3a4a63; color: #fff; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--bright);
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
a { color: var(--accent); }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--r-s);
  text-decoration: none;
  transition: top 0.15s ease-out;
}
.skip-link:focus-visible { top: 12px; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* data labels: floor 11.5px, AA contrast */
.label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  background: var(--ink);
  color: var(--ground);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  border: 0;
  border-radius: var(--r-s);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #fff; }
.button--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.button--ghost:hover { background: var(--panel); border-color: #3a3f4c; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  backdrop-filter: blur(12px);
  background: rgba(16, 18, 22, 0.85);
  border-bottom: 1px solid var(--line);
}
.site-nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.wordmark {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 0;
}
.site-nav__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.site-nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 10px 8px;
  border-radius: var(--r-s);
}
.site-nav__links a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: clamp(44px, 7vw, 68px) 0 36px; }
.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw + 0.7rem, 3.4rem);
  line-height: 1.06;
  letter-spacing: 0.004em;
  max-width: 21ch;
  margin-bottom: 20px;
}
.hero__lede {
  color: var(--body);
  max-width: var(--measure);
  margin-bottom: 28px;
}
.hero__cta { margin-bottom: 44px; }

/* ---------- map ---------- */
.map-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.hint-narrow { display: none; }
@media (max-width: 600px) {
  .hint-wide { display: none; }
  .hint-narrow { display: inline; }
}
.map-hint::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex: none;
}

.map-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--deep);
  overflow: hidden;
}
.map-frame svg { display: block; width: 100%; height: auto; }

/* the stage is exactly the SVG's box: pin percentages must resolve against
   the map, never against the frame (which can also contain the in-flow card) */
.map-stage { position: relative; }
.map-pins { position: absolute; inset: 0; }

.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 147, 196, 0.2), 0 0 12px rgba(159, 177, 214, 0.55);
  cursor: pointer;
  z-index: 4;
}
.pin::after {                 /* enlarged hit area regardless of dot size;
                                 36px keeps close pin pairs (Riyadh/Dubai) separable */
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.pin--footprint {
  width: 7px;
  height: 7px;
  background: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(107, 119, 147, 0.2);
  z-index: 2;
}
.pin:hover { background: #c9d5ec; }
.pin[aria-pressed='true'] { z-index: var(--z-pin-active); }
.pin[aria-pressed='true']::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(159, 177, 214, 0.16);
  border: 1px solid rgba(159, 177, 214, 0.4);
}
.pin__name {
  position: absolute;
  left: 15px;
  top: -4px;
  display: none;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #eef0f4;
  text-shadow: 0 1px 5px var(--deep), 0 0 3px var(--deep);
  pointer-events: none;
}
.pin[aria-pressed='true'] .pin__name { display: block; }

/* city index: on small screens the tappable list replaces dense-pin hunting */
.city-index { display: none; }
@media (max-width: 600px) {
  .city-index {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
  }
  .pin--footprint {            /* footprint pins become passive dots on phones */
    pointer-events: none;
  }
  .pin--footprint::after { display: none; }
}

/* city card: in-flow below the map by default; floats top-right on wide screens */
.city-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-m);
  background: var(--panel);
  padding: 20px 22px;
  margin-top: 12px;
}
.city-card__tag { margin-bottom: 9px; color: var(--accent-2); }
.city-card__title {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.14;
  color: var(--bright);
  margin-bottom: 6px;
}
.city-card__value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}
.city-card__blurb {
  font-size: 13px;
  line-height: 1.55;
  color: var(--body);
}
.city-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #2a2e38;
}
.city-card__count {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.city-card__count strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--bright);
}
.city-card__link {
  background: none;
  border: 0;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.city-card__link:hover { color: #c9d5ec; }

@media (min-width: 1060px) {
  .city-card {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 310px;
    margin-top: 0;
    background: var(--panel-raised);
    z-index: var(--z-card);
  }
}

/* ---------- track record ---------- */
.track {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--deep);
  margin-top: 48px;
}
.track__inner {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: 24px 64px;
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
.track h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.1;
}
.track__note {
  color: var(--faint);
  font-size: 12.5px;
  margin-top: 12px;
  max-width: 30ch;
}
.track__list {
  display: grid;
  gap: 0;
}
.track__row {
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr;
  gap: 6px 28px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-faint);
}
.track__row:last-child { border-bottom: 0; }
.track__figure {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
  color: var(--bright);
  white-space: nowrap;
}
.track__line { color: var(--body); font-size: 14px; max-width: 52ch; }

@media (max-width: 720px) {
  .track__inner { grid-template-columns: 1fr; gap: 8px; }
  .track__row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- explorer ---------- */
.explorer { padding: clamp(48px, 7vw, 72px) 0 24px; }
.explorer__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.explorer h2, .work h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.08; }
.explorer__note {
  font-size: 13px;
  color: var(--muted);
  max-width: 34ch;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: flex-start;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.filter-group__name { display: block; margin-bottom: 8px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  min-height: 34px;
  padding: 6px 14px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: #aeb0b8;
  background: transparent;
  border: 1px solid #33373f;
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { border-color: #4a5060; color: var(--ink); }
.chip[aria-pressed='true'] {
  background: var(--chip-active);
  border-color: var(--chip-active);
  color: #fff;
}
.chip--clear {
  border-style: dashed;
  color: var(--muted);
}
@media (pointer: coarse) {
  .chip { min-height: 44px; padding: 9px 16px; }
}

/* KPI row */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.kpi {
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--panel);
  padding: 18px 20px;
}
.kpi .label { display: block; margin-bottom: 10px; }
.kpi__value {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1;
  color: var(--bright);
}

/* chart + list */
.explorer__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .explorer__grid { grid-template-columns: 1fr; }
}

.chart, .plist {
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--panel);
}
.chart { padding: 20px 24px 16px; }
.chart__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.chart__title { font-weight: 600; font-size: 13px; color: var(--ink); }
.chart__rows { display: grid; gap: 12px; }
.chart-row {
  display: grid;
  grid-template-columns: 92px 1fr 64px;
  align-items: center;
  gap: 12px;
}
.chart-row__label { font-size: 12px; color: var(--muted); }
.chart-row__track {
  height: 14px;
  border-radius: 2px;
  background: #191d24;
  overflow: hidden;
}
.chart-row__bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.chart-row__value {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  text-align: right;
  white-space: nowrap;
}
.chart-row.is-zero .chart-row__label,
.chart-row.is-zero .chart-row__value { color: #565a63; }

.plist { padding: 4px 20px; max-height: 296px; overflow: auto; }
.plist::after {               /* scroll cue: fade at the bottom of the inner scroll */
  content: '';
  position: sticky;
  bottom: -4px;
  display: block;
  height: 26px;
  margin-top: -26px;
  background: linear-gradient(transparent, var(--panel));
  pointer-events: none;
}
@media (max-width: 900px) {   /* on small screens the evidence list shows in full */
  .plist { max-height: none; }
  .plist::after { display: none; }
}
.plist__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #1d2027;
}
.plist__row:last-child { border-bottom: 0; }
.plist__name { font-weight: 600; font-size: 13px; color: var(--ink); }
.plist__meta { margin-top: 3px; letter-spacing: 0.03em; text-transform: none; }
.plist__value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}
.plist__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- selected work ---------- */
.work { padding: clamp(40px, 6vw, 56px) 0 24px; }
.work__intro { color: var(--muted); font-size: 13.5px; max-width: var(--measure); margin: 10px 0 28px; }
.work__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}
.work-card {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--panel);
}
.work-card__media { aspect-ratio: 16 / 10; background: #191d24; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; }
.work-card__body { padding: 20px 22px 24px; }
.work-card__meta { margin-bottom: 8px; color: var(--accent-2); }
.work-card__title {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.15;
  color: var(--bright);
  margin-bottom: 8px;
}
.work-card__desc { font-size: 13px; line-height: 1.55; color: var(--body); }

.work__more { margin-top: 36px; }
.work__more-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 40px;
}
.ledger__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-faint);
}
.ledger__name { font-weight: 600; font-size: 13px; color: var(--ink); }
.ledger__meta { white-space: nowrap; }

/* ---------- contact ---------- */
.contact {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: var(--deep);
}
.contact__inner { padding-top: clamp(48px, 7vw, 72px); padding-bottom: 40px; }
.contact h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.08;
  max-width: 22ch;
  margin-bottom: 28px;
}
.contact__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-bottom: 24px;
}
.avatar {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.contact__who { min-width: 220px; }
.contact__name { font-weight: 600; font-size: 15px; color: var(--bright); }
.contact__meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.contact__creds { font-size: 13px; color: var(--body); margin-top: 3px; }
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 48px;
}
.contact__linkedin { font-size: 13px; color: var(--accent); text-decoration: none; }
.contact__linkedin:hover { color: #fff; text-decoration: underline; }

.site-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line-faint);
}
.site-foot .wordmark { color: #c3c5cc; }
.site-foot__note {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--faint);
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
