/* =========================================================
   Olanrewaju Dada — portfolio
   Change colours here and they update across the whole site.
   ========================================================= */
:root {
  --blue: #1F4FA3;          /* main accent — try #2563C9 (brighter) or #0F2A5C (navy) */
  --blue-deep: #0F2A5C;     /* contact section, portrait frame */
  --blue-hover: #183F85;
  --blue-tint: #E8EEF8;     /* image areas, chips */
  --blue-tint-2: #DAE4F4;
  --blue-highlight: #CFDDF5;
  --ground: #F2F5FA;        /* projects background */
  --surface: #FFFFFF;
  --line: #E3E7EC;
  --line-2: #C9D1DA;
  --ink: #0B1F33;
  --text-2: #3B4A5C;
  --muted: #5A6878;

  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Public Sans', system-ui, sans-serif;

  --radius: 10px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--blue); }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff; padding: 10px 16px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 16px; top: 16px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.section { padding-top: 88px; padding-bottom: 88px; }
.section-tight { padding-top: 72px; padding-bottom: 80px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.section-head-row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.section-head-row > div { display: flex; flex-direction: column; gap: 12px; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.eyebrow-light { color: #A9C2F0; }
.h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 4vw, 42px); line-height: 1.1; letter-spacing: -.01em; color: var(--ink); }

/* Placeholders — replace every one before sharing the link */
.ph { display: inline-block; border: 1.5px dashed #9AA8B6; background: #fff; color: var(--text-2); border-radius: 4px; padding: 3px 9px; font-size: 13px; font-weight: 600; line-height: 1.4; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 13px 24px; border-radius: 6px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid transparent; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn-sm { min-height: 42px; padding: 9px 18px; font-size: 15px; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-hover); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-white { background: #fff; color: var(--ink); font-weight: 700; }
.btn-white:hover { background: var(--blue-tint); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(6px); }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 17px; }
.brand-mark { width: 40px; height: 40px; border-radius: 8px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn) { color: var(--text-2); text-decoration: none; padding: 10px 0; }
.nav-links a:not(.btn):hover { color: var(--blue); }

/* ---------- Hero ---------- */
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; padding-top: 44px; padding-bottom: 32px; }
.hero-text { flex: 999 1 580px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 5.2vw, 60px); line-height: 1.06; letter-spacing: -.02em; }
.highlight { font-style: italic; color: var(--blue); background: linear-gradient(transparent 62%, var(--blue-highlight) 62%); padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.bio { font-size: 18px; line-height: 1.65; color: var(--text-2); max-width: 610px; }
.bio strong { color: var(--ink); }
.focus { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; }
.focus-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.focus-text { font-weight: 600; background: var(--blue-tint); padding: 5px 10px; border-radius: 4px; }

.hero-visual { flex: 1 1 320px; display: flex; justify-content: center; }
.portrait-wrap { position: relative; width: 330px; max-width: 100%; padding-bottom: 36px; }
.portrait-offset { position: absolute; left: 22px; top: 22px; right: -22px; bottom: 58px; border-radius: var(--radius); background: var(--blue-tint); }
.portrait { position: relative; width: 100%; height: 380px; border-radius: var(--radius); background: var(--blue-deep); display: flex; align-items: center; justify-content: center; object-fit: cover; }
.badge { position: absolute; left: -28px; right: 28px; bottom: 0; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 10px 30px rgba(11,31,51,.10); }
.badge-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; background: var(--blue); display: flex; align-items: center; justify-content: center; }
.badge-icon svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.badge-text strong { font-size: 13.5px; }
.badge-text span { font-size: 12.5px; color: var(--muted); }

/* Four roles — compact bar inside the hero */
.hero { padding-bottom: 56px; }
.roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--blue); border-radius: var(--radius); color: #fff; box-shadow: 0 8px 24px rgba(31,79,163,.18); }
.role-item { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-right: 1px solid rgba(255,255,255,.2); min-width: 0; }
.role-item:last-child { border-right: 0; }
.role-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; }
.role-icon svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.role-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.3; }
.role-text strong { font-size: 15px; font-weight: 700; }
.role-text > span { font-size: 13px; color: #DCE6F7; }
.ph-sm { font-size: 11.5px; padding: 1px 6px; color: var(--text-2) !important; align-self: flex-start; }

/* ---------- Organisations: continuously scrolling logo strip ---------- */
.orgs { background: #fff; border-top: 1px solid var(--line); padding: 40px 0 48px; }
.orgs-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 24px; }
.orgs-label { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.orgs-pause { font: 600 12px/1 var(--font-body); color: var(--muted); background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.orgs-pause:hover { color: var(--blue); border-color: var(--blue); }
.orgs-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); }
.orgs-track { display: flex; width: max-content; animation: orgs-scroll 80s linear infinite; }
.orgs-marquee:hover .orgs-track, .orgs.is-paused .orgs-track { animation-play-state: paused; }
.org-list { display: flex; align-items: center; gap: 20px; padding-right: 20px; }
.org { height: 76px; min-width: 170px; padding: 0 26px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.org span { font-size: 15px; font-weight: 700; color: #44536A; white-space: nowrap; letter-spacing: -.005em; }
.org img { max-height: 52px; max-width: 160px; width: auto; filter: grayscale(1) brightness(.8) contrast(1.35); opacity: .85; transition: filter .2s ease, opacity .2s ease; }
.org { transition: border-color .2s ease, box-shadow .2s ease; }
.org:hover { border-color: var(--blue); box-shadow: 0 6px 18px rgba(31,79,163,.15); }
.org:hover img { filter: none; opacity: 1; }
.org img.is-square { max-height: 64px; }
@keyframes orgs-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .orgs-track { animation: none; width: auto; }
  .orgs-marquee { -webkit-mask-image: none; mask-image: none; }
  .org-list { flex-wrap: wrap; justify-content: center; padding: 0 16px; }
  .org-list[aria-hidden="true"], .orgs-pause { display: none; }
}

/* ---------- Projects ---------- */
.projects-section { background: var(--ground); border-bottom: 1px solid var(--line); }
.count { font-size: 15px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { font-family: var(--font-body); font-size: 14px; font-weight: 600; min-height: 44px; padding: 10px 16px; border-radius: 6px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.filter:hover { border-color: var(--blue); }
.filter.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.card:hover { border-color: #B9C4CF; box-shadow: 0 8px 24px rgba(11,31,51,.08); transform: translateY(-2px); }
.card[hidden] { display: none; }
.card-img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--blue-tint); text-decoration: none; overflow: hidden; }
.card-img:hover { background: var(--blue-tint-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.view { position: absolute; right: 12px; bottom: 12px; background: var(--blue); color: #fff; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 4px; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.meta { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.2; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover { color: var(--blue); }
.role { font-size: 14px; line-height: 1.45; padding: 9px 12px; background: #F6F7F9; border-radius: 6px; }
.role b { color: var(--blue); font-weight: 700; margin-right: 4px; }
.summary { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 2px; }
.tags li { padding: 4px 10px; border-radius: 4px; background: var(--blue-tint); color: var(--blue); font-size: 12.5px; font-weight: 600; }
.swipe-hint { display: none; }
.more-row { display: flex; justify-content: center; margin-top: 32px; }
.more-row[hidden] { display: none; }
.more-btn { background: #fff; cursor: pointer; font-family: var(--font-body); }
.no-results { margin-top: 20px; color: var(--muted); }

/* ---------- Skills ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); border-top: 1px solid var(--line); margin-bottom: 36px; }
.steps li { padding: 20px 18px 4px 0; display: flex; flex-direction: column; gap: 6px; }
.step-num { font-family: var(--font-display); font-size: 28px; color: var(--blue); line-height: 1.2; }
.steps strong { font-size: 17px; }
.steps li > span:last-child { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 18px 20px; background: var(--blue); color: #fff; border-radius: var(--radius); }
.panel-label { font-weight: 700; font-size: 14px; margin-right: 6px; }
.panel-wide { grid-column: 1 / -1; }
.panel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-chips li { padding: 4px 10px; border-radius: 4px; background: rgba(255,255,255,.16); color: #fff; font-size: 12.5px; font-weight: 600; }

/* ---------- Gallery ---------- */
.gallery-section { border-top: 1px solid var(--line); }
.note { font-size: 14px; color: var(--muted); font-style: italic; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.photo, .gallery img { aspect-ratio: 4 / 3; width: 100%; border-radius: var(--radius); background: var(--blue-tint); display: flex; align-items: center; justify-content: center; object-fit: cover; }

/* Gallery with real photos and captions */
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--blue-tint); }
.gallery figcaption { font-size: 14px; line-height: 1.45; color: var(--muted); }
.gallery-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }

/* ---------- Contact / footer ---------- */
.contact { background: var(--blue-deep); color: #fff; }
.contact-inner { padding-top: 80px; padding-bottom: 80px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px; }
.contact-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.contact-text h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 4vw, 42px); line-height: 1.1; }
.contact-actions { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; font-size: 15px; font-weight: 600; }
.contact-links a { color: #D5DEE8; }
.contact-links a:hover { color: #fff; }
.footer-bar { border-top: 1px solid #2B4880; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; padding-bottom: 22px; font-size: 13px; color: #B9C9E6; }

/* ---------- Tablet: keep photo beside the text, smaller ---------- */
@media (min-width: 700px) and (max-width: 1040px) {
  .hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 36px; }
  .portrait-wrap { width: 240px; }
  .portrait { height: 290px; }
  .badge { left: -20px; right: 0; padding: 12px; }
  .badge-text strong { font-size: 12.5px; }
  .badge-text span { font-size: 11.5px; }
}

@media (max-width: 960px) {
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
  .role-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.2); }
  .role-item:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .section-tight { padding-top: 56px; padding-bottom: 64px; }
  .bio { font-size: 17px; }

  /* Compact one-row header: logo + CV button only */
  .nav { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
  .brand { font-size: 16px; gap: 10px; }
  .brand-mark { width: 36px; height: 36px; font-size: 16px; }
  .nav-links { flex-wrap: nowrap; }
  .nav-links a:not(.btn) { display: none; }
  .btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
}

/* Phone hero: photo first, compact, with the MSc badge underneath */
@media (max-width: 699px) {
  .hero-inner { padding-top: 32px; padding-bottom: 48px; gap: 28px; }
  .hero-visual { order: -1; flex-basis: 100%; justify-content: flex-start; }
  .portrait-wrap { width: 100%; padding-bottom: 0; display: flex; align-items: center; gap: 16px; }
  .portrait-offset { display: none; }
  .portrait { width: 112px; height: 132px; flex: 0 0 112px; border-radius: 8px; }
  .badge { position: static; flex: 1; box-shadow: none; padding: 12px; }
}

@media (max-width: 640px) {
  .hero { padding-bottom: 40px; }
  .role-item { padding: 12px; gap: 10px; }
  .role-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .role-icon svg { width: 16px; height: 16px; }
  .role-text strong { font-size: 13.5px; }
  .role-text > span { font-size: 12px; }

  /* Project cards become a swipeable row on phones */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; }
  .projects { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-left: -16px; margin-right: -16px; padding: 2px 16px 12px; scrollbar-width: none; }
  .projects::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 84%; scroll-snap-align: start; }
  .card:hover { transform: none; }
  .swipe-hint { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); text-align: right; }

  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery-3 { grid-template-columns: 1fr; gap: 18px; }
  .orgs { padding: 32px 0 36px; }
  .orgs-label { font-size: 11px; letter-spacing: .1em; }
  .org { height: 64px; min-width: 140px; padding: 0 18px; }
  .org span { font-size: 14px; }
  .org img { max-height: 42px; max-width: 130px; }
  .org img.is-square { max-height: 52px; }
  .orgs-track { animation-duration: 60s; }
  .photo .ph { font-size: 11px; padding: 2px 6px; }

  .contact-actions { flex-basis: 100%; }
}
@media (max-width: 360px) {
  .role-icon { display: none; }
  .hide-xs { display: none; }
  .brand { font-size: 15px; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; font-size: 14px; }
}
