/*
 * Saidu Bello: portfolio.
 * The foundations come from the Bayan design system: its colour tokens (css/tokens.css), Neue Montreal for every word,
 * a fixed type hierarchy, fills never outlines, no drop shadows. The layout is its own: a white page, numbered
 * sections on hairlines, the section name on the left and the content on the right.
 */

@import url("tokens.css");

@font-face { font-family: "Neue Montreal"; src: url("../fonts/NeueMontreal-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("../fonts/NeueMontreal-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }

:root {
  --g: 24px;
  --gap: 128px;
  --max: 1200px;
  --r: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Neue Montreal", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Lenis smooth scroll (lenis@1.3.20/dist/lenis.css) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
html.lenis { scroll-behavior: auto; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 32px; scrollbar-gutter: stable; }
html.panel-open { overflow: hidden; }
body {
  margin: 0; background: var(--black); color: var(--ink);
  font: 400 18px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
/* a section that takes focus after an in-page link shows no ring around the whole section */
[tabindex="-1"]:focus { outline: none; }
::selection { background: var(--ink); color: var(--black); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--black); }
.skip:focus { top: 16px; }
.wrap { width: min(var(--max), 100% - 2 * var(--g)); margin-inline: auto; }

/* ---------- type: the hero heading is the largest; then the statement, the closing line, the section leads, body ---------- */
h1 { font-weight: 500; font-size: clamp(44px, 6.6vw, 88px); line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance; }
h2 { font-weight: 500; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
h3 { font-weight: 500; font-size: 17px; line-height: 1.3; }
.body { color: var(--soft); font-size: clamp(18px, 1.5vw, 20px); line-height: 1.5; text-wrap: pretty; }
.small { color: var(--mute); font-size: 15px; line-height: 1.4; }

/* ---------- buttons: solid fills, never outlined ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 58px; padding: 0 28px; border-radius: 999px;
  font-weight: 500; font-size: 18px; line-height: 1; white-space: nowrap;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
.btn svg { width: 20px; height: 20px; margin-left: -4px; }
.btn.solid { background: var(--ink); color: var(--black); }
.btn.quiet { background: var(--panel2); color: var(--ink); }
.btn.sm { height: 40px; padding: 0 16px; font-size: 16px; gap: 7px; }
.btn.sm svg { width: 15px; height: 15px; margin: 0 -2px 0 0; }
.btn:active { transform: scale(0.97); }
@media (hover: hover) { .btn:hover { opacity: 0.86; } }

/* ---------- hero: the words on the left, the portrait on the right ---------- */
.hero { padding: 72px 0 var(--gap); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 72px; align-items: center; }
.kicker { display: flex; flex-direction: column; gap: 2px; font-size: 17px; }
.kicker b { font-weight: 500; }
.kicker span { color: var(--mute); }
.hero h1 { margin-top: 64px; max-width: 12ch; }
.lede { margin-top: 28px; max-width: 30em; color: var(--soft); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; text-wrap: pretty; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
/* the portrait: the photo in black and white, the current role under it */
.portrait .frame { overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--r); background: var(--fill); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: grayscale(1); }
.portrait figcaption { display: flex; gap: 10px; margin-top: 14px; font-size: 15px; color: var(--ink); }
.portrait figcaption span { color: var(--mute); }

/* ---------- sections: a hairline, the number and name on the left, the content on the right ---------- */
.sec { padding: 0 0 var(--gap); }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px 48px; padding-top: 28px; border-top: 1px solid var(--line); }
/* the section's name is its h2, set small: the hierarchy is carried by the hero and the lead lines */
.label { position: sticky; top: 32px; align-self: start; display: flex; gap: 14px; font-weight: 500; font-size: 16px; line-height: 1.5; letter-spacing: 0; text-wrap: wrap; }
.label span { color: var(--mute); font-variant-numeric: tabular-nums; }
.statement { max-width: 24ch; font-weight: 500; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -0.033em; text-wrap: balance; }
.lead-h { max-width: 26ch; margin-bottom: 48px; font-weight: 500; font-size: clamp(24px, 2.5vw, 32px); line-height: 1.2; letter-spacing: -0.025em; text-wrap: balance; }

/* ---------- experience: a role per row; open one to read it ---------- */
.roles { border-top: 1px solid var(--line); }
.role { border-bottom: 1px solid var(--line); }
.role summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; grid-template-areas: "what when pm";
  align-items: center; gap: 6px 32px; padding: 24px 0;
}
.role summary::-webkit-details-marker { display: none; }
.role-what { grid-area: what; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.role-what b { font-weight: 500; font-size: clamp(20px, 1.9vw, 24px); line-height: 1.2; letter-spacing: -0.02em; transition: opacity .2s; }
.role-what span { color: var(--mute); font-size: 16px; }
.role-when { grid-area: when; color: var(--mute); font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (hover: hover) { .role summary:hover .role-what b { opacity: .62; } }
/* plus, and minus once it's open (it turns at once, before the role closes) */
.pm { grid-area: pm; position: relative; display: block; width: 20px; height: 20px; }
.pm::before, .pm::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px; background: var(--ink); transition: transform .3s var(--ease); }
.pm::after { transform: rotate(90deg); }
.role[open]:not(.closing) .pm::after { transform: rotate(0deg); }
.role-body { overflow: hidden; }
.role-in { display: grid; gap: 20px; padding: 0 52px 32px 0; }

/* a list of points: a small dot in the muted ink, the text on one left edge */
.points { display: grid; gap: 12px; max-width: 46em; }
.points li { position: relative; padding-left: 22px; color: var(--read); font-size: 18px; line-height: 1.55; text-wrap: pretty; }
.points li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--mute); }
/* "leads": the name on its own line, the explanation beneath */
.points.leads { gap: 18px; }
.points.leads li b { display: block; color: var(--ink); font-weight: 500; }
/* the tools, as a quiet line */
.tools { display: flex; flex-wrap: wrap; row-gap: 4px; color: var(--mute); font-size: 15px; }
/* the dot ends an item, so a wrapped line never starts with one */
.tools li:not(:last-child)::after { content: "·"; margin: 0 9px; }

/* earlier roles and education: one line each */
.earlier { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; margin-top: 72px; }
.earlier h3 { color: var(--mute); font-size: 16px; margin-bottom: 12px; }
.rows { border-top: 1px solid var(--line); }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rows span { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--mute); font-size: 15px; line-height: 1.4; }
.rows b { color: var(--ink); font-weight: 500; font-size: 17px; }
.rows .when { color: var(--mute); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- projects: cards of one fill; the first in ink. Each opens its panel ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.proj {
  display: flex; flex-direction: column; min-height: 280px; padding: 28px; border-radius: var(--r);
  background: var(--fill); color: var(--ink); text-align: left;
  transition: background-color .3s var(--ease), transform .25s var(--ease);
}
.proj.feature, .proj.wide { grid-column: 1 / -1; }
.proj.feature { min-height: 340px; background: var(--ink); color: var(--black); }
.proj-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: auto; }
.proj-kind { color: var(--mute); font-size: 15px; font-weight: 500; }
.proj .go { width: 20px; height: 20px; color: var(--mute); transition: transform .35s var(--ease), color .2s; }
.proj-title { margin-top: 56px; font-weight: 500; font-size: clamp(30px, 3vw, 42px); line-height: 1.02; letter-spacing: -0.03em; }
.proj-line { margin-top: 12px; max-width: 30em; color: var(--soft); font-size: 18px; line-height: 1.45; text-wrap: pretty; }
.proj.feature .proj-kind, .proj.feature .proj-line, .proj.feature .go { color: rgba(var(--ground-rgb), .72); }
.proj:active { transform: scale(.99); }
@media (hover: hover) {
  .proj:hover { background: var(--field); }
  .proj.feature:hover { background: var(--ink); }
  .proj:hover .go { transform: translate(3px, -3px); color: var(--ink); }
  .proj.feature:hover .go { color: var(--black); }
}

/* ---------- skills: four groups, two columns ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.skill h3 { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
/* two columns while there's room, one when they'd get narrow; a wrapped name sits tighter than the gap between names */
.list { columns: 2 200px; column-gap: 24px; }
.list li { break-inside: avoid; padding-block: 5px; color: var(--soft); font-size: 17px; line-height: 1.35; }

/* ---------- contact ---------- */
.closing { max-width: 15ch; font-weight: 500; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.contact .body { margin-top: 20px; max-width: 30em; }
.contact .ctas { margin-top: 36px; }
.elsewhere { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; }
.elsewhere a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 17px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; transition: text-decoration-color .2s; }
.elsewhere svg { width: 15px; height: 15px; color: var(--mute); }
@media (hover: hover) { .elsewhere a:hover { text-decoration-color: var(--ink); } }

/* ---------- footer: the name across the bottom, outlined from Neue Montreal Medium (img/wordmark.svg) ---------- */
.footer { padding: 0 0 40px; }
/* the mask is on the shape inside the link, so the link's focus ring still shows */
.bigmark { display: block; }
.bigmark-shape { display: block; width: 100%; aspect-ratio: 4403 / 745; background: var(--ink);
  -webkit-mask: url("../img/wordmark.svg") center / contain no-repeat; mask: url("../img/wordmark.svg") center / contain no-repeat; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- a project's panel: white, on a dimmed page ---------- */
dialog.panel {
  width: min(640px, 100% - 24px); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 0;
  border-radius: 24px; background: var(--panel); color: var(--ink); overflow: hidden;
  opacity: 0; translate: 0 24px; transition: opacity .3s var(--ease), translate .45s var(--ease);
}
dialog.panel.open { opacity: 1; translate: 0 0; }
dialog.panel::backdrop { background: var(--backdrop); opacity: 0; transition: opacity .3s var(--ease); }
dialog.panel.open::backdrop { opacity: 1; }
.panel-in { max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 36px 40px 40px; }
.close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--fill); color: var(--ink); transition: background-color .2s, transform .16s ease-out; }
.close svg { width: 20px; height: 20px; }
.close:active { transform: scale(.94); }
@media (hover: hover) { .close:hover { background: var(--raised); } }
.panel-kind { color: var(--mute); font-size: 15px; font-weight: 500; padding-right: 48px; }
.panel h2 { margin-top: 8px; padding-right: 48px; font-size: clamp(32px, 4vw, 44px); }
.panel .points { margin-top: 26px; }
.panel .tools { margin-top: 22px; }
.panel-link { margin-top: 28px; }

/* ---------- motion: gentle, and still under reduced motion ---------- */
.rise { animation: rise 1s var(--ease) both; }
.hero-copy .rise:nth-child(2) { animation-delay: 0.06s; }
.hero-copy .rise:nth-child(3) { animation-delay: 0.12s; }
.hero-copy .rise:nth-child(4) { animation-delay: 0.18s; }
.portrait.rise { animation-delay: 0.14s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.grid .reveal:nth-child(3) { transition-delay: 0.08s; }
.skill-grid .reveal:nth-child(2n) { transition-delay: 0.08s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  dialog.panel, dialog.panel::backdrop, .proj, .proj .go, .pm::before, .pm::after { transition: none; }
}

/* ---------- printing, and Windows contrast themes ---------- */
@media print {
  .js .reveal, .rise { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .label { position: static; }
}
@media (forced-colors: active) {
  .pm::before, .pm::after, .bigmark-shape { background: CanvasText; forced-color-adjust: none; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .earlier { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 900px) {
  :root { --gap: 104px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero h1 { margin-top: 48px; }
  .portrait { max-width: 440px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .label { position: static; }
}
@media (max-width: 640px) {
  :root { --g: 16px; --gap: 88px; }
  body { font-size: 17px; }
  .hero { padding-top: 40px; }
  .hero h1 { margin-top: 40px; }
  .lede { margin-top: 20px; }
  .btn { height: 56px; }
  .ctas { flex-direction: column; align-items: stretch; max-width: 340px; }
  .lead-h { margin-bottom: 36px; }
  .role summary { grid-template-columns: minmax(0, 1fr) 20px; grid-template-areas: "what pm" "when pm"; padding: 20px 0; }
  .role-when { font-size: 15px; }
  .role-in { padding-right: 0; }
  .points li { font-size: 17px; }
  .earlier { margin-top: 56px; }
  .rows li { flex-direction: column; gap: 4px; }
  .grid { grid-template-columns: 1fr; }
  .proj { min-height: 240px; padding: 24px; }
  .proj.feature { min-height: 280px; }
  .proj-title { margin-top: 40px; }
  .skill-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .panel-in { padding: 28px 22px 32px; }
}
