/* Portfolio styles. Colours are roles, defined once per theme; the brand blue and leaf green
   are NdalamoPDF's. Plain CSS, no framework. */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Manrope', 'Inter', system-ui, sans-serif;
  --radius: 14px;
  --max: 1080px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root, [data-theme="dark"] {
  --bg: #0B1220;
  --surface: #111A2E;
  --surface-2: #17223A;
  --border: #22304D;
  --text: #E6EAF2;
  --text-soft: #B8C1D3;
  --muted: #8B95AA;
  --accent: #6F8FFF;
  --accent-strong: #5B7FF2;
  --accent-soft: rgba(111, 143, 255, .12);
  --green: #6FD195;
  --on-accent: #FFFFFF;
  --shadow: 0 20px 50px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F6F7FA;
  --surface: #FFFFFF;
  --surface-2: #EEF1F6;
  --border: #DFE3EA;
  --text: #16181D;
  --text-soft: #3A3F49;
  --muted: #5C626E;
  --accent: #2F5BEA;
  --accent-strong: #2F5BEA;
  --accent-soft: rgba(47, 91, 234, .08);
  --green: #1E8A4C;
  --on-accent: #FFFFFF;
  --shadow: 0 20px 50px -28px rgba(22, 24, 29, .25);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-soft);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { color: var(--text); line-height: 1.15; margin: 0; font-family: var(--display); letter-spacing: -.02em; }
[hidden] { display: none !important; }

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 18px max(16px, calc((100vw - var(--max)) / 2));
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--display); font-weight: 700; }
.brand:hover { text-decoration: none; }
.mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-strong); color: #fff; font-size: .9rem; font-weight: 800; letter-spacing: .02em;
}
.brand-name { font-size: 1rem; letter-spacing: -.01em; }
.nav nav { margin-left: auto; display: flex; gap: 22px; }
.nav nav a { color: var(--text-soft); font-size: .93rem; font-weight: 500; }
.nav nav a:hover { color: var(--accent); text-decoration: none; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
[data-theme="dark"] .theme-toggle .moon, [data-theme="light"] .theme-toggle .sun { display: none; }

/* ── Layout ── */
main { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 96px 0 24px; }
.section-title {
  display: flex; align-items: center; gap: 16px; font-size: 1.9rem; font-weight: 700; margin-bottom: 36px;
}
.section-title::after { content: ''; flex: 0 1 260px; height: 1px; background: var(--border); }
.sub { font-size: 1.1rem; margin: 40px 0 16px; }

/* ── Hero ── */
.hero { min-height: min(calc(100vh - 80px), 760px); display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 56px; align-items: center; padding: 48px 0; }
.hero-text { display: flex; flex-direction: column; min-width: 0; }
.hero-photo { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 5; background: var(--surface); box-shadow: 0 30px 60px -30px rgba(11,18,32,.45); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.hero-photo[hidden] { display: none; }
.status {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: .85rem; color: var(--text-soft); margin: 0 0 28px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hello { margin: 0 0 12px; color: var(--accent); font-weight: 600; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.035em; }
.role { font-size: clamp(1.3rem, 3.2vw, 2.1rem); color: var(--muted); font-weight: 600; margin-top: 12px; }
.intro { max-width: 560px; font-size: 1.08rem; margin: 22px 0 34px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: .95rem;
  transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.button:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.button.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.button.primary:hover { filter: brightness(1.08); }

/* ── About ── */
.about { display: block; }
.about-text p { margin: 0 0 16px; max-width: 620px; }
.photo { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 1; background: var(--surface); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.timeline strong { color: var(--text); font-weight: 600; }
.timeline .when { font-size: .85rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.timeline .place { color: var(--muted); font-size: .95rem; }

/* ── Experience ── */
.job { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; }
.job header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.job h3 { font-size: 1.15rem; }
.job h3 span { color: var(--accent); font-weight: 500; }
.job .when { font-size: .85rem; font-weight: 500; color: var(--muted); }
.job ul:not(.tags) { margin: 14px 0; padding-left: 0; list-style: none; }
.job ul:not(.tags) li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.job ul:not(.tags) li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { font-size: .8rem; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }

/* ── Skills ── */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.skill-group { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.skill-group h3 { font-size: 1rem; margin-bottom: 14px; }

/* ── Project cards ── */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: inherit; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.card .thumb { margin: -24px -24px 6px; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--border); background: var(--surface-2); overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card .thumb.empty { display: grid; place-items: center; color: var(--muted); font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.card h3 { font-size: 1.2rem; }
.card p { margin: 0; }
.card .badge { align-self: flex-start; font-size: .75rem; font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.card .badge.free { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.card .more { margin-top: auto; color: var(--accent); font-weight: 600; font-size: .92rem; }

/* ── NdalamoPDF spotlight ── */
.spotlight-card {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 36px; align-items: center; padding: 32px;
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--surface);
}
.lead { font-size: 1.15rem; color: var(--text); margin: 0 0 16px; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: ''; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft); }
.checks li::after { content: ''; position: absolute; left: 5px; top: .62em; width: 6px; height: 3px; border: solid var(--accent); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.downloads .button small { font-weight: 400; opacity: .8; }
.fine { font-size: .85rem; color: var(--muted); margin: 14px 0; }
.text-link { font-weight: 600; font-size: .95rem; }
.spotlight-shot { border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.reviews { margin-top: 8px; }
.rating { font-size: .95rem; color: var(--muted); font-weight: 500; margin-left: 8px; }
.review-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.review { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin: 0; }
.review .stars { color: #F5A524; letter-spacing: 2px; }
.review blockquote { margin: 10px 0 0; color: var(--text-soft); }
.review figcaption { margin-top: 10px; font-size: .8rem; color: var(--muted); }

/* ── Contact ── */
.contact-card {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; padding: 36px;
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--surface);
}
.contact-info .lead { margin-bottom: 20px; }
.contact-info .status { margin-bottom: 24px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list .icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; }
.contact-list .icon svg { width: 18px; height: 18px; fill: var(--accent); }
.contact-list small { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.contact-list a, .contact-list span:not(.icon) { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.copy { margin-left: auto; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-soft); font: 500 .8rem var(--font); cursor: pointer; }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.contact-form { display: grid; gap: 16px; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--text); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font: 400 .95rem var(--font); transition: border-color .2s, box-shadow .2s;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form .invalid { border-color: #E5534B; }
.contact-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot .button { border: 0; cursor: pointer; font-family: var(--font); }
.form-foot .button[disabled] { opacity: .6; cursor: default; transform: none; }
.form-status { margin: 0; font-size: .9rem; color: var(--muted); }
.form-status.ok { color: var(--green); }
.form-status.error { color: #E5534B; }
.footer { text-align: center; padding: 28px 16px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--border); }
.footer p { margin: 0; }
.footer .privacy { margin-top: 6px; font-size: .78rem; opacity: .8; }

/* ── Project page ── */
.project { padding-top: 56px; padding-bottom: 80px; }
.project .eyebrow { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; color: var(--accent); font-weight: 600; font-size: .9rem; }
.project h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
.project .tagline { font-size: 1.2rem; color: var(--muted); margin: 12px 0 24px; }
.project .links { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.project-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.project-grid .body p { margin: 0 0 16px; }
.project-grid h2 { font-size: 1.2rem; margin: 32px 0 14px; }
.facts { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); position: sticky; top: 96px; }
.facts h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.facts .tags { margin-bottom: 20px; }
.facts p { margin: 0 0 18px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.gallery button { padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; text-align: left; color: inherit; font: inherit; }
.gallery img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; object-position: top left; }
.gallery span { display: block; padding: 10px 12px; font-size: .85rem; color: var(--muted); }
.video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.video iframe, .video video { width: 100%; height: 100%; border: 0; }
.linkedin-post { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; max-width: 560px; }
.linkedin-post iframe { width: 100%; height: 600px; border: 0; }
.placeholder { padding: 28px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); text-align: center; font-size: .92rem; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5, 8, 15, .88); display: grid; place-items: center; padding: 32px; }
.lightbox img { max-height: 82vh; border-radius: 10px; }
.lightbox p { color: #E6EAF2; margin: 12px 0 0; text-align: center; }
.lightbox button { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; }

/* ── Gentle reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse { animation: none; }
}

/* ── Small screens ── */
@media (max-width: 860px) {
  .nav nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .project-page .nav nav { display: flex; }
  .about, .spotlight-card, .project-grid, .cards, .contact-card, .field-row { grid-template-columns: 1fr; }
  .contact-card { padding: 22px; }
  .brand-name { display: none; }
  .hero { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding-top: 32px; }
  .hero-photo { order: -1; max-width: 300px; width: 70%; }
  .spotlight-card { padding: 22px; }
  .section { padding-top: 72px; }
  .facts { position: static; }
}
