/* ==========================================================================
   Paul Obike — portfolio
   Plain CSS, mobile-first. Tokens live in :root; change them to re-theme.
   ========================================================================== */

:root {
  --ink: #0d1218;
  --surface: #151c25;
  --surface-2: #1b2430;
  --line: #243040;
  --line-strong: #3a4a5e;
  --text: #e8edf3;
  --text-2: #c6d0db;
  --muted: #93a1b2;
  --accent: #f5b544;
  --pro: #7fb0ff;
  --ok: #7fd1b9;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --radius: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --curve: 140px; /* footer curve height; js shrinks it on scroll */
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--text); }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.disp {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 500;
}
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--accent); color: var(--ink); padding: 12px 18px;
  border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }
.accent { color: var(--accent); }
.italic { font-style: italic; }

/* ---------- shared pieces ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.dot--pro { background: var(--pro); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; border-radius: 999px; background: var(--surface);
  font-size: 13px; font-weight: 600; color: #b4c0ce;
}
.card .chip, .feature .chip { background: var(--ink); }

.btn {
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .3s, color .3s, transform .3s var(--ease);
}
.btn svg { flex: none; }
.btn--solid { background: var(--accent); color: var(--ink); }
.btn--solid:hover { color: var(--ink); background: #ffc766; }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { background: #1c2532; color: var(--text); }
.btn--text { padding: 0 6px; border: 0; background: none; color: var(--text); }

.round {
  width: 132px; height: 132px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font-size: 15px; font-weight: 700; text-decoration: none;
  transition: transform .35s var(--ease), background .3s;
  will-change: transform;
}
.round--light { background: var(--text); color: var(--ink); }
.round--light:hover { color: var(--ink); background: #fff; }
.round--accent { background: var(--accent); color: var(--ink); }
.round--accent:hover { color: var(--ink); background: #ffc766; }

.shot { overflow: hidden; background: var(--surface-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
@media (hover: hover) { .shot:hover img { transform: scale(1.04); } }

/* ---------- nav ---------- */
.nav {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px var(--gutter); position: relative; z-index: 5;
}
.brand { font-size: 17px; font-weight: 700; text-decoration: none; }
.nav__links { display: none; gap: 40px; font-weight: 600; }
.nav__links a { text-decoration: none; position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; width: 6px; height: 6px;
  margin-left: -3px; border-radius: 50%; background: var(--accent);
  transform: scale(0); transition: transform .25s var(--ease);
}
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scale(1); }
.icon-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--text);
}
.icon-btn--accent { background: var(--accent); }

/* mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--ink);
  display: flex; flex-direction: column; padding: 22px var(--gutter) 40px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu__top { display: flex; justify-content: space-between; align-items: center; }
.menu__links { display: flex; flex-direction: column; gap: 4px; margin-top: 56px; }
.menu__links a { font-size: 48px; text-decoration: none; padding: 6px 0; }
.menu__foot { margin-top: auto; display: flex; gap: 24px; }
body.menu-open { overflow: hidden; }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero__row {
  display: flex; flex-direction: column; gap: 24px;
  padding: 8px var(--gutter) 0;
}
.loc {
  display: inline-flex; align-items: center; gap: 16px; width: fit-content;
  padding: 10px 10px 10px 24px; margin-left: calc(-1 * var(--gutter));
  background: var(--surface); border-radius: 0 999px 999px 0;
  text-decoration: none; font-size: 15px; font-weight: 600; line-height: 1.35;
  transition: background .3s;
}
.loc:hover { background: #1c2532; color: var(--text); }
.loc__globe {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.globe { animation: spin 9s linear infinite; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #b4c0ce; }
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(127, 209, 185, .18); }
.hero__left { display: flex; flex-direction: column; gap: 14px; }

.portrait {
  width: 100%; max-width: 320px; aspect-ratio: 4 / 5; height: auto; margin: 8px auto 0;
  object-fit: cover; border-radius: 220px 220px 32px 32px;
}
.role__title { margin-top: 18px; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.15; font-weight: 400; }
.role__proof { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--muted); }

.marquee { position: relative; z-index: 2; white-space: nowrap; overflow: hidden; margin-top: 8px; }
.marquee__track {
  display: inline-flex; font-size: clamp(76px, 14vw, 220px); line-height: 1.05; letter-spacing: -.03em;
  animation: marquee 40s linear infinite;
}
.marquee__track span { padding-right: .35em; }
.marquee.is-reversed .marquee__track { animation-direction: reverse; }
.motion-off .marquee__track, .motion-off .globe { animation-play-state: paused; }
.motion-toggle {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero__tools { display: flex; justify-content: flex-end; padding: 8px var(--gutter) 16px; }

/* ---------- intro ---------- */
.intro {
  display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-start;
  padding-block: clamp(56px, 9vw, 120px) clamp(56px, 8vw, 110px);
}
.intro__lead { flex: 999 1 520px; font-size: clamp(26px, 3vw, 40px); line-height: 1.3; font-weight: 400; }
.intro__side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 28px; }
.intro__side p { font-size: 17px; line-height: 1.65; color: var(--muted); }
.intro__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- section heads ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.section-head h2 { margin-top: 14px; font-size: clamp(44px, 6vw, 80px); letter-spacing: -.02em; line-height: 1; }
.section-head p { max-width: 360px; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ---------- professional ---------- */
.jobs { padding-bottom: 40px; }
.job {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  padding-block: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line);
}
.job .shot { border-radius: var(--radius); aspect-ratio: 4 / 3; }
.job__body { display: flex; flex-direction: column; gap: 14px; }
.job__meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: var(--muted); }
.job__company { font-size: clamp(32px, 4vw, 46px); line-height: 1.05; letter-spacing: -.01em; }
.job__role { font-size: 17px; font-weight: 700; color: var(--pro); }
.job__summary { font-size: 17px; line-height: 1.6; color: var(--text-2); }
.stat {
  display: flex; align-items: baseline; gap: 14px; padding: 16px 20px;
  border-radius: 18px; background: var(--surface);
}
.stat__num { font-size: 40px; font-weight: 600; line-height: 1; color: var(--accent); flex: none; }
.stat__label { font-size: 15px; line-height: 1.45; color: #b4c0ce; }
.job__details { display: flex; flex-direction: column; gap: 10px; }
.job__details[hidden] { display: none; }
.job__details li { display: flex; gap: 12px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.job__details li::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--line-strong); margin-top: 10px;
}
.job__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.job__actions .btn { min-height: 46px; }

/* ---------- personal ---------- */
.projects { padding-top: clamp(80px, 10vw, 140px); padding-bottom: 40px; }
.projects .section-head { margin-bottom: 36px; }

.feature {
  display: grid; grid-template-columns: 1fr; background: var(--surface);
  border-radius: 32px; overflow: hidden; margin-bottom: 24px;
}
.feature__body { padding: clamp(24px, 3.5vw, 44px); display: flex; flex-direction: column; gap: 16px; }
.feature__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.feature__head h3 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; }
.feature__body > p { font-size: 17px; line-height: 1.6; color: var(--text-2); }
.feature__list { display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--muted); }
.feature__list li::before { content: "→ "; color: var(--accent); }
.pill {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }

/* Ask Paul demo */
.ask {
  background: #10161e; padding: clamp(20px, 3vw, 32px);
  display: flex; flex-direction: column; gap: 14px; min-height: 440px;
}
.ask__who { display: flex; align-items: center; gap: 12px; }
.ask__avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.ask__name { font-size: 15px; font-weight: 700; display: block; }
.ask__sub { font-size: 12px; color: var(--muted); }
.ask__log {
  flex-grow: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  max-height: 340px; overflow-y: auto; scroll-behavior: smooth;
}
.ask__hello { font-size: 26px; line-height: 1.25; color: #b4c0ce; }
.msg { max-width: 92%; padding: 12px 16px; font-size: 15px; line-height: 1.6; }
.msg--q { align-self: flex-end; background: var(--line); border-radius: 18px 18px 4px 18px; }
.msg--a { background: var(--surface-2); border-radius: 18px 18px 18px 4px; color: #d5dde6; }
.trace { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--accent); }
.ask__prompts { display: flex; gap: 8px; flex-wrap: wrap; }
.prompt {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
}
.prompt[aria-pressed="true"] { border-color: var(--accent); background: var(--line); }
.ask__form { display: flex; gap: 8px; }
.ask__form input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--ink); color: var(--text);
  font: inherit; font-size: 15px;
}
.ask__form input::placeholder { color: #7d8b9c; }
.ask__send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer; flex: none; display: flex; align-items: center; justify-content: center; }

.grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.card { background: var(--surface); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; }
.card .shot { aspect-ratio: 4 / 3; }
.card__body { padding: clamp(20px, 2.5vw, 28px); display: flex; flex-direction: column; gap: 14px; flex-grow: 1; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card__head h3 { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.1; }
.card__body > p { font-size: 15px; line-height: 1.6; color: #b4c0ce; }

/* ---------- toolbox & background ---------- */
.toolbox { padding-top: clamp(80px, 10vw, 130px); }
.background { padding-top: clamp(64px, 8vw, 100px); padding-bottom: clamp(160px, 16vw, 220px); }
.toolbox h2, .background h2 { margin-bottom: 28px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.tile { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.tile h3 { font-size: 22px; }
.tile p { font-size: 15px; line-height: 1.7; color: var(--muted); }
.tile--filled { background: var(--surface); border-color: transparent; }

/* ---------- footer ---------- */
.footer { position: relative; background: var(--surface); overflow: hidden; }
.footer__curve {
  position: absolute; left: -5%; right: -5%; top: 0; height: var(--curve);
  background: var(--ink); border-radius: 0 0 50% 50% / 0 0 100% 100%;
  transition: height .1s linear;
}
.footer__inner { position: relative; padding-top: clamp(140px, 16vw, 230px); padding-bottom: 32px; }
.footer__hello { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer__hello img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.footer__hello h2 { font-size: clamp(48px, 8vw, 108px); letter-spacing: -.03em; line-height: 1; }
.footer__rule { position: relative; margin-top: clamp(80px, 9vw, 110px); border-top: 1px solid var(--line); }
.footer__rule .round { position: absolute; right: var(--gutter); top: -66px; }
.footer__contacts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: clamp(110px, 12vw, 140px); }
.footer__contacts .btn { min-height: 52px; font-size: 16px; overflow-wrap: anywhere; }
.footer__bar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap;
  margin-top: clamp(72px, 10vw, 130px); font-size: 15px;
}
.footer__bar dl { display: flex; gap: 40px; flex-wrap: wrap; margin: 0; }
.footer__bar dt, .footer__label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.footer__bar dd { margin: 0; }
.socials { display: flex; gap: 24px; }

/* ---------- case study pages ---------- */
.case-hero { padding-block: clamp(40px, 7vw, 96px) clamp(32px, 5vw, 56px); }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; text-decoration: none; color: var(--muted); }
.case-hero h1 { margin-top: 24px; font-size: clamp(48px, 8vw, 104px); line-height: 1; letter-spacing: -.03em; }
.case-hero .lead { margin-top: 20px; max-width: 760px; font-size: clamp(19px, 2vw, 24px); line-height: 1.5; color: var(--text-2); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-weight: 600; }
.case-figure { margin: 0; }
.case-figure img { width: 100%; border-radius: 28px; aspect-ratio: 4 / 3; object-fit: cover; }
.case-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.case-body { display: grid; gap: 56px; padding-block: clamp(48px, 7vw, 96px); max-width: 820px; }
.case-body h2 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 14px; }
.case-body p { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.case-body ul { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.case-body li { display: flex; gap: 12px; font-size: 17px; line-height: 1.65; color: var(--text-2); }
.case-body li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--pro); margin-top: 11px; }
.todo { color: var(--accent); font-style: italic; }
.next-case { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; padding-block: 40px 120px; border-top: 1px solid var(--line); }
.next-case a { font-size: clamp(30px, 4vw, 48px); text-decoration: none; }

/* ---------- animations ---------- */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Larger screens
   ========================================================================== */
@media (min-width: 761px) {
  .nav { padding-block: 28px; }
  .nav__links { display: flex; }
  .icon-btn--menu { display: none; }

  .hero__row {
    flex-direction: row; justify-content: space-between; align-items: flex-start;
    min-height: 520px; padding-top: 16px; position: relative;
  }
  .hero__left { margin-top: 110px; z-index: 2; }
  .portrait {
    position: absolute; left: 50%; top: 0; transform: translateX(-50%);
    width: 340px; max-width: none; height: 440px; aspect-ratio: auto; margin: 0; z-index: 1;
  }
  .role { max-width: 320px; margin-top: 110px; z-index: 2; }
  .marquee { margin-top: -40px; }

  .round { width: 160px; height: 160px; font-size: 17px; }
  .footer__rule .round { width: 192px; height: 192px; top: -96px; right: 12%; font-size: 18px; }

  .job { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1081px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .globe, .typing::after { animation: none; }
  .shot img, .round, .reveal { transition: none; }
  .js .reveal { opacity: 1; transform: none; }
}
