/* sam.okafor — Developer résumé template
   Theme tokens: override these to recolour the whole site. Dark values live under [data-theme="dark"]. */
:root {
  --brand: #047857;
  --accent: #6d28d9;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #0f172a;
  --muted: #526071;
  --line: #dde3ea;
  --term-bg: #0b1220;
  --term-text: #cbd5e1;
  --radius: 14px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #34d399;
  --accent: #a78bfa;
  --bg: #0a0f1a;
  --surface: #111827;
  --surface-2: #1a2334;
  --text: #e5e9f0;
  --muted: #9aa6b8;
  --line: #243044;
  --term-bg: #060a13;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #34d399;
    --accent: #a78bfa;
    --bg: #0a0f1a;
    --surface: #111827;
    --surface-2: #1a2334;
    --text: #e5e9f0;
    --muted: #9aa6b8;
    --line: #243044;
    --term-bg: #060a13;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.65 var(--font-body); -webkit-font-smoothing: antialiased; transition: background-color .3s, color .3s; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul[role="list"], ol { list-style: none; margin: 0; padding: 0; }
svg { flex-shrink: 0; }
.mono { font-family: var(--font-mono); }
.print-name { display: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 1rem; }
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.25rem; border-radius: 10px; font: 600 .95rem var(--font-body); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .2s var(--ease), background .2s, border-color .2s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); background: var(--brand); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--text); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.logo { font: 500 .98rem var(--font-mono); text-decoration: none; margin-right: auto; }
.logo-prompt { color: var(--brand); }
.nav-menu ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-menu a { text-decoration: none; font-size: .92rem; color: var(--muted); font-weight: 500; transition: color .2s; }
.nav-menu a:hover, .nav-menu a[aria-current="true"] { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: .25rem; }
.theme-toggle, .nav-toggle { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: none; border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: none; } :root:not([data-theme="light"]) .i-moon { display: block; } }
html:not(.js) .theme-toggle { display: none; }
.nav-toggle { display: none; border: 0; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .3s var(--ease); }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
.status { display: inline-flex; align-items: center; gap: .6rem; font: 500 .82rem var(--font-mono); color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: .4rem .8rem; border-radius: 999px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin: 1.4rem 0 1.2rem; font-weight: 700; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.8rem 0 1.5rem; }
.contact-inline { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font: 400 .85rem var(--font-mono); color: var(--muted); }
.contact-inline a { text-decoration: none; }
.contact-inline a:hover { color: var(--brand); text-decoration: underline; }

.terminal { background: var(--term-bg); border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(2, 6, 23, .45), 0 0 0 1px rgba(148, 163, 184, .15); overflow: hidden; min-width: 0; }
.term-bar { display: flex; align-items: center; gap: .45rem; padding: .8rem 1rem; background: rgba(148, 163, 184, .08); border-bottom: 1px solid rgba(148, 163, 184, .12); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar span:nth-child(2) { background: #febc2e; }
.term-bar span:nth-child(3) { background: #28c840; }
.term-bar em { margin-left: auto; margin-right: auto; font: normal 400 .75rem var(--font-mono); color: #8391a7; padding-right: 3rem; }
.term-body { margin: 0; padding: 1.3rem 1.4rem 1.6rem; font: 400 clamp(.74rem, 1.4vw, .9rem)/1.75 var(--font-mono); color: var(--term-text); overflow-x: auto; min-height: 21.5em; }
.term-body .p { color: #34d399; }
.term-body .o { color: #e2e8f0; }
.term-body .k { color: #93c5fd; }
.term-body .s { color: #fcd34d; }
.cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: #34d399; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Section labels */
.section-label { display: flex; align-items: center; gap: .8rem; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 2rem; }
.section-label span { font: 500 .85rem var(--font-mono); color: var(--brand); border: 1px solid var(--line); border-radius: 6px; padding: .15rem .45rem; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Summary */
.summary-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: start; }
.summary-text { font-size: 1.15rem; color: var(--text); margin: 0; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; }
.kpis div { background: var(--surface); padding: 1.1rem 1.2rem; display: flex; flex-direction: column-reverse; }
.kpis dt { font-size: .8rem; color: var(--muted); }
.kpis dd { margin: 0; font: 700 1.9rem/1.1 var(--font-display); }

/* Timeline */
.timeline { position: relative; }
.job { display: grid; grid-template-columns: 11rem 1fr; gap: 2rem; position: relative; padding-bottom: 2.5rem; }
.job-when { font: 400 .82rem/1.6 var(--font-mono); color: var(--muted); padding-top: .2rem; text-align: right; }
.job-body { position: relative; padding-left: 2rem; border-left: 1px solid var(--line); }
.job-body::before { content: ""; position: absolute; left: -6px; top: .45rem; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--brand); }
.job:first-child .job-body::before { background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); }
.job h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.job .at { color: var(--brand); font-weight: 600; }
.job-body > p { color: var(--muted); }
.job-body > ul:not(.tags) { margin: 0 0 1rem; padding-left: 1.1rem; }
.job-body > ul:not(.tags) li { margin-bottom: .4rem; }
.job-body > ul:not(.tags) li::marker { color: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { font: 500 .75rem var(--font-mono); padding: .25rem .6rem; border-radius: 6px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.project:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 20px 40px -24px rgba(2, 6, 23, .35); }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.project-top svg { width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 14%, transparent); stroke: var(--brand); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.project-link { font: 500 .82rem var(--font-mono); color: var(--muted); text-decoration: none; }
.project-link:hover { color: var(--brand); }
.project h3 { font: 600 1.25rem var(--font-mono); margin-bottom: .5rem; letter-spacing: -.01em; }
.project p { color: var(--muted); flex: 1; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.skill-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.skill-group h3 { font-size: 1rem; margin-bottom: 1rem; }
.skill-group li:has(meter) { display: grid; grid-template-columns: 7rem 1fr; align-items: center; gap: 1rem; margin-bottom: .7rem; font-size: .92rem; }
meter { width: 100%; height: 8px; border-radius: 99px; background: var(--surface-2); border: 0; -webkit-appearance: none; appearance: none; }
meter::-webkit-meter-bar { background: var(--surface-2); border-radius: 99px; border: 0; height: 8px; }
meter::-webkit-meter-optimum-value { background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; }
meter::-moz-meter-bar { background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; }

/* Open source */
.oss { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.25rem; }
.oss-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 0; }
.oss-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column-reverse; }
.oss-stats dt { color: var(--muted); font-size: .82rem; }
.oss-stats dd { margin: 0; font: 700 1.8rem var(--font-display); }
.heatmap-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; min-width: 0; }
.heatmap-card figcaption { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.heatmap-card strong { color: var(--text); }
.heatmap { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; min-height: 96px; }
.heatmap i, .heat-legend i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--surface-2); }
.heatmap .l1, .heat-legend .l1 { background: color-mix(in srgb, var(--brand) 30%, var(--surface-2)); }
.heatmap .l2, .heat-legend .l2 { background: color-mix(in srgb, var(--brand) 55%, var(--surface-2)); }
.heatmap .l3, .heat-legend .l3 { background: color-mix(in srgb, var(--brand) 80%, var(--surface-2)); }
.heatmap .l4, .heat-legend .l4 { background: var(--brand); }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: .75rem; font-size: .75rem; color: var(--muted); }
.heat-legend i { width: 11px; }
.contribs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.contribs li { border-left: 2px solid var(--brand); padding: .2rem 0 .2rem 1rem; color: var(--muted); font-size: .95rem; }
.contribs strong { color: var(--text); }

/* Education */
.edu li { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.edu span { color: var(--muted); font-size: .92rem; }

/* Contact */
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.4); padding: clamp(1.5rem, 5vw, 3rem); position: relative; overflow: hidden; }
.contact-card::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 420px; height: 420px; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent), transparent 65%); pointer-events: none; }
.contact-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .8rem; position: relative; }
.contact-card > p { color: var(--muted); max-width: 52ch; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.75rem; position: relative; }
.field { display: grid; gap: .35rem; }
.field.full, .full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem; width: 100%; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.form-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-status { margin: 0; color: var(--brand); font-weight: 500; }

.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: .85rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.footer-inner p { margin: 0; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 960px) {
  .hero, .summary-grid, .oss { grid-template-columns: 1fr; }
  .contribs { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: grid; }
  .nav-menu { position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1.25rem; display: none; }
  .nav-menu.open { display: block; }
  .nav-menu ul { flex-direction: column; gap: 0; }
  .nav-menu a { display: block; padding: .8rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  html:not(.js) .nav-menu { position: static; display: block; }
  html:not(.js) .nav { flex-wrap: wrap; height: auto; padding-block: .75rem; }
}
@media (max-width: 680px) {
  .job { grid-template-columns: 1fr; gap: .4rem; padding-bottom: 2rem; }
  .job-when { text-align: left; padding-left: 2rem; border-left: 1px solid var(--line); }
  .projects, .skills, .form { grid-template-columns: 1fr; }
  .oss-stats { grid-template-columns: 1fr 1fr; }
  .term-bar em { display: none; }
  .term-body { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print: a clean 1–2 page CV ---------- */
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  :root:not(#print) { --bg: #fff; --surface: #fff; --surface-2: #f1f3f5; --text: #111; --muted: #444; --line: #d0d5db; --brand: #065f46; --accent: #065f46; color-scheme: light; }
  html { font-size: 9.6pt; }
  body { background: #fff !important; color: #111; line-height: 1.45; }
  .skip-link, .site-header, .terminal, .hero-cta, .contact, .site-footer, .heatmap-card, .project-link, .status, .project-top svg { display: none !important; }
  .container { width: 100%; }
  .section { padding-block: 0 1.1rem; }
  .hero { display: block; padding: 0 0 1rem; border-bottom: 2px solid #111; margin-bottom: 1.1rem; }
  .hero h1 { font-size: 1.6rem; margin: 0 0 .4rem; }
  .print-name { display: block !important; font: 700 2.3rem/1.1 var(--font-display); margin: 0 0 .2rem; }
  .lead { font-size: 1rem; max-width: none; margin-bottom: .5rem; }
  .contact-inline { font-size: .85rem; color: #111; }
  .section-label { font-size: 1.15rem; margin-bottom: .6rem; break-after: avoid; }
  .section-label span { display: none; }
  .summary-grid { grid-template-columns: 1fr; gap: .6rem; }
  .summary-text { font-size: 1rem; }
  .kpis { grid-template-columns: repeat(4, 1fr); border-radius: 0; }
  .kpis div { padding: .4rem .6rem; }
  .kpis dd { font-size: 1.2rem; }
  .job { grid-template-columns: 8.5rem 1fr; gap: 1rem; padding-bottom: .9rem; break-inside: avoid; }
  .job-body { padding-left: 1rem; }
  .job h3 { font-size: 1.05rem; margin-bottom: .2rem; }
  .job-body > p, .job-body > ul:not(.tags) { margin-bottom: .35rem; }
  .job-body > ul:not(.tags) li { margin-bottom: .15rem; }
  .tags li { font-size: .72rem; padding: .05rem .4rem; background: none; }
  .projects, .skills { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .project, .skill-group, .oss-stats div { padding: .6rem .8rem; border-radius: 6px; box-shadow: none; transform: none; break-inside: avoid; }
  .project-top { margin: 0; }
  .project h3 { font-size: 1rem; margin-bottom: .2rem; }
  .project p { margin-bottom: .4rem; }
  .skill-group h3 { margin-bottom: .4rem; }
  .skill-group li:has(meter) { margin-bottom: .2rem; }
  meter { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .oss { grid-template-columns: 1fr; gap: .6rem; }
  .oss-stats { grid-template-columns: repeat(4, 1fr); gap: .6rem; }
  .oss-stats dd { font-size: 1.2rem; }
  .contribs { grid-template-columns: 1fr; gap: .2rem; }
  .edu li { padding: .35rem 0; }
  a { text-decoration: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
