/* Carlton Osinde Makini — portfolio styles */
:root {
  --ink: #1a2337;
  --ink-2: #3b4458;
  --muted: #667085;
  --line: #e4e7ec;
  --bg: #ffffff;
  --navy-1: #270093;
  --navy-2: #284c96;
  --orange: rgb(242, 125, 75);
  --grey: rgb(227, 230, 232);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .10);
  --shadow-lg: 0 18px 36px -12px rgba(16, 24, 40, .35);
  --maxw: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid #4f6bed; outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 20px; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

.gradient-text {
  background-image: linear-gradient(45deg, var(--navy-1), var(--navy-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--navy-1);
}
.dark-blue { color: var(--ink); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid rgba(0,0,0,.05); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 500; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.nav-links a:hover { background: #f2f4f7; }
.nav-links a[aria-current="page"] { color: var(--navy-1); }
.nav-resume { border: 1px solid var(--line); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .25s; }
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px -16px rgba(0,0,0,.3); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.btn-dark:hover { background: #0f1626; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #c5cad3; }
.btn-light { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { border-color: #fff; }

/* ---------- Hero ---------- */
.hero { padding-top: 88px; padding-bottom: 72px; }
.eyebrow { display: inline-block; font-weight: 600; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-1); background: #eef0ff; padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.hero-title { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; max-width: 20ch; margin-bottom: 22px; }
.hero-body { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 62ch; }
.hero-body strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr 1fr; gap: 10px; } .stat-num { font-size: 1.35rem; } }
.hero-stats { margin-top: 48px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); }
.stat-num { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--navy-1); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-size: .88rem; color: var(--muted); margin-top: 6px; line-height: 1.35; }

/* ---------- Bands ---------- */
.band { padding: 72px 0; }
.featured { background: linear-gradient(47deg, var(--orange) 0%, var(--grey) 100%); }
.dark { background: linear-gradient(38deg, #2f2f2f 0%, #000 100%); color: #fff; }
.section-h { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700; margin-bottom: 28px; color: var(--ink); }
.dark .section-h { color: #fff; }
.sub-h { font-size: 1.05rem; font-weight: 600; margin: 40px 0 14px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative; display: flex; flex-direction: column; min-height: 22rem; padding: 22px;
  border-radius: var(--radius); color: #fff; text-decoration: none; overflow: hidden;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: 0 0 5px 0 rgba(0,0,0,.25);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-name { font-size: .95rem; font-weight: 400; color: #eaeaea; }
.card-role { font-size: 1.45rem; font-weight: 600; line-height: 1.15; margin-top: 4px; letter-spacing: -0.01em; text-shadow: 0 1px 12px rgba(0,0,0,.2); }
.card-desc {
  margin-top: auto; font-size: .92rem; font-weight: 400; line-height: 1.45; padding: 12px; border-radius: 8px;
  background: rgba(0,0,0,.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(14px); transition: opacity .3s ease, transform .3s ease;
}
.card-cta { position: absolute; right: 18px; bottom: 14px; font-size: .8rem; font-weight: 600; opacity: 0; transition: opacity .3s; }
.card:hover .card-desc, .card:focus-visible .card-desc { opacity: 1; transform: none; }
.card:hover .card-desc { margin-bottom: 18px; }
.card:hover .card-cta, .card:focus-visible .card-cta { opacity: .9; }
@media (hover: none), (max-width: 560px) {
  .card { min-height: 15rem; }
  .card-desc { opacity: 1; transform: none; }
  .card-cta { display: none; }
}

.earlier { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.earlier a { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 18px; background: rgba(255,255,255,.78); border-radius: 10px; text-decoration: none; transition: background .2s; }
.earlier a:hover { background: #fff; }
.er-role { font-weight: 600; }
.er-org { color: var(--ink-2); }
.er-date { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .earlier a { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Detail pages ---------- */
.page-hero { background: rgb(var(--c)); color: #fff; padding: 64px 0 0; overflow: hidden; }
.page-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; }
.page-hero-grid > div:first-child { padding-bottom: 64px; }
.page-date { font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; opacity: .9; margin-bottom: 8px; }
.page-org { font-size: 1.05rem; opacity: .85; margin-bottom: 6px; }
.page-title { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; margin-bottom: 18px; }
.page-sub { font-size: 1.15rem; opacity: .95; max-width: 52ch; margin-bottom: 26px; }
.page-art img { border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 78%; }
@media (max-width: 860px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 0; }
  .page-hero-grid > div:first-child { padding-bottom: 36px; }
  .page-art img { aspect-ratio: 16 / 7; }
}

.details-grid { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .details-grid { grid-template-columns: 1fr; gap: 28px; } }
.facts { margin: 0; background: rgba(255,255,255,.82); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.fact + .fact { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.fact dt { font-weight: 700; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 4px 0 0; font-size: .98rem; }
.lead { font-size: 1.15rem; color: var(--ink); max-width: 68ch; }
.impact { margin-top: 28px; }
.impact-h { font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }

.detail-row { display: grid; grid-template-columns: 300px 1fr; gap: 48px; padding: 32px 0; border-top: 1px solid var(--line); }
.detail-row:first-child { border-top: 0; padding-top: 0; }
.detail-h { font-size: 1.35rem; font-weight: 700; color: #1f6121; }
.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.bullets li { position: relative; padding: 16px 18px 16px 44px; background: #f8f9fb; border: 1px solid var(--line); border-radius: 10px; font-size: 1.02rem; color: var(--ink-2); }
.bullets li::before { content: ""; position: absolute; left: 18px; top: 24px; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(45deg, var(--orange), #f6b28f); }
@media (max-width: 860px) { .detail-row { grid-template-columns: 1fr; gap: 16px; } }

.next { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.next-label { text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; opacity: .7; margin-bottom: 6px; }
.next-link { font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 700; text-decoration: none; }
.next-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.next-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- About ---------- */
.glance .lead { max-width: 70ch; }
.glance .lead { font-size: 1.2rem; }
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.about-grid p { font-size: 1.08rem; color: var(--ink-2); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } .headshot { max-width: 300px; } }
.headshot { position: relative; margin: 0; }
.headshot img { position: relative; z-index: 1; width: 100%; border-radius: 16px; box-shadow: var(--shadow-lg); aspect-ratio: 1 / 1; object-fit: cover; }
.headshot-glow { position: absolute; z-index: 0; inset: 32% -7% -7% 32%; border-radius: 50%; background: linear-gradient(214deg, rgb(228, 74, 7) 0%, rgb(227, 230, 232) 100%); filter: blur(2px); opacity: .85; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); display: grid; gap: 6px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -30px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--orange); }
.timeline a { display: grid; grid-template-columns: 170px 1fr auto; gap: 18px; align-items: baseline; padding: 16px 18px; border-radius: 10px; text-decoration: none; transition: background .2s; }
.timeline a:hover { background: #f5f6f8; }
.tl-date { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.tl-title { font-weight: 600; font-size: 1.05rem; }
.tl-org { color: var(--ink-2); }
@media (max-width: 700px) { .timeline a { grid-template-columns: 1fr; gap: 2px; } }

.ec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .ec-grid { grid-template-columns: 1fr; } }
.ec { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ec li { background: rgba(255,255,255,.85); border-radius: 10px; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; box-shadow: var(--shadow); }
.ec-title { font-weight: 600; }
.ec-org { grid-column: 1; color: var(--ink-2); font-size: .95rem; }
.ec-date { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: .88rem; color: var(--muted); white-space: nowrap; }

.skill-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.skill-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.skill-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-card li { background: #f2f4f7; border-radius: 999px; padding: 6px 12px; font-size: .9rem; }

.notfound { min-height: 50vh; }

/* ---------- Footer ---------- */
.footer { position: relative; padding: 56px 0 40px; border-top: 1px solid var(--line); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-h { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-cols { grid-template-columns: 1fr 1fr; column-gap: 20px; }
.footer-list a { text-decoration: none; color: var(--ink-2); }
.footer-list a:hover { color: var(--navy-1); text-decoration: underline; text-underline-offset: 3px; }
.footer-note { margin-top: 18px; color: var(--muted); font-size: .85rem; }
.footer-bar { height: 10px; margin-top: 36px; background: linear-gradient(45deg, rgb(227, 238, 255), rgb(183, 233, 255)); }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .card-desc { transition: none; }
}
