/* Portfolio — public site styles. v2.0 Aurora design (light and dark): colours come from /theme.css. */
:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #475569;
  --accent: #4F46E5;
  --accent-ink: #3730A3;
  --accent-soft: #EEF2FF;
  --accent-line: #C7D2FE;
  --chip: #F1F5F9;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --container: 1200px;
  --header-bg: #FFFFFF;
  --footer-bg: #FFFFFF;
  --band-bg: #FFFFFF;
  --btn-text: #FFFFFF;
  --highlight: #4F46E5;
  --heading-weight: 700;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; transition: background-color .3s, color .3s; }
body > main { flex: 1 0 auto; } /* v1.7 (REQ-096): footer sits at the bottom of the window on short pages */
img, video { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
h1, h2, h3 { font-family: var(--display); font-weight: var(--heading-weight); letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--surface); padding: .75rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
.center { text-align: center; justify-content: center; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.mono-muted { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.eyebrow { font-family: var(--mono); font-size: .85rem; font-weight: 600; color: var(--accent); }
.eyebrow-muted { font-family: var(--mono); font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.row-tight { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.accent { color: var(--highlight); }

/* Header */
.site-header { background: color-mix(in srgb, var(--header-bg) 86%, transparent); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.4) blur(10px); }
.nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding-block: .9rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: var(--btn-text); display: grid; place-items: center; font-family: var(--display); font-weight: 700; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
@media (min-width: 900px) { .nav-links { margin-left: auto; padding: .3rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); } .nav-links .btn { border-radius: 999px; } }
.nav-link { padding: .55rem 1rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav-link:hover { background: var(--chip); color: var(--ink); }
.nav-link.is-active { color: var(--ink); background: var(--line); font-weight: 600; }
/* v1.6 — phone / tablet menu (REQ-084). Collapses only once site.js has run (.has-menu); otherwise links wrap as before. */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--header-ink, var(--ink)); font: inherit; font-weight: 600; cursor: pointer; }
.nav-toggle:hover { border-color: var(--accent-line); }
.nav-toggle[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); } /* v1.7 (REQ-092): icon only, highlighted when open */
@media (max-width: 899px) {
  .has-menu .nav { flex-wrap: nowrap; }
  .has-menu .brand { min-width: 0; }
  .has-menu .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .has-menu .nav-toggle { display: inline-flex; margin-left: auto; flex: none; }
  .has-menu .nav-links { display: none; }
  .has-menu.menu-open .nav { flex-wrap: wrap; }
  .has-menu.menu-open .nav-links { display: flex; flex-direction: column; align-items: stretch; flex-basis: 100%; gap: .15rem; padding: .5rem 0 .75rem; border-top: 1px solid var(--line); }
  .has-menu.menu-open .nav-link { min-height: 48px; display: flex; align-items: center; padding: 0 .9rem; }
  .has-menu.menu-open .nav-links .btn { margin-top: .5rem; justify-content: center; min-height: 48px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .75rem 1.3rem; border-radius: 12px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.btn-sm { min-height: 40px; padding: .55rem 1rem; }
.btn-primary { background: var(--accent); color: var(--btn-text); }
.btn-primary:hover { background: var(--accent-ink); color: var(--btn-text); }
.btn-dark { background: var(--ink); color: var(--surface); }
.btn-dark:hover { background: var(--accent-ink); color: var(--btn-text); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-block { width: 100%; }
.btn-grow { flex: 1 1 0; padding-inline: .75rem; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.link-strong { font-weight: 600; text-decoration: none; padding-block: .6rem; display: inline-block; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background-color: var(--bg); }
.hero-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-frame { display: none; } }
.hero-inner { display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; justify-content: center; padding-block: 5.5rem 5rem; }
.hero-text { flex: 1 1 100%; max-width: 56rem; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.4rem; }
.hero-text .row, .hero-text .row-tight { justify-content: center; }
.pill { align-self: center; font-size: .85rem; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--line); padding: .3rem .8rem; border-radius: 999px; }
.display { font-size: clamp(2.2rem, 5.2vw, 3.7rem); line-height: 1.07; letter-spacing: -0.03em; font-weight: var(--heading-weight); }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--muted); max-width: 42rem; }
.lead-sm { font-size: 1.08rem; line-height: 1.65; color: var(--muted); }
.photo-frame { width: 100%; max-width: 360px; aspect-ratio: 1; border-radius: calc(var(--radius) * 1.25); border: 1px solid var(--line); background: var(--surface); padding: 12px; }
.photo-frame.tall { max-width: 380px; aspect-ratio: 4 / 5; padding: 10px; }
.photo { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.ph { background: repeating-linear-gradient(135deg, var(--accent-soft) 0 12px, var(--accent-line) 12px 24px); }

/* Sections */
.section { padding-block: 4.5rem; display: flex; flex-direction: column; gap: 2rem; }
.section-tight { padding-block: 0 5rem; }
.section-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; }
.section-head > div { display: flex; flex-direction: column; gap: .5rem; }
.h1 { font-size: clamp(2.1rem, 4vw, 2.9rem); line-height: 1.1; letter-spacing: -0.02em; }
.h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.h3 { font-size: 1.55rem; }
.band { background: transparent; }
.band > .split { background: var(--band-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem; margin-block: 0 1rem; }
.split { display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; padding-block: 4.5rem; }
.band > .split.container { max-width: calc(var(--container) - 3rem); }
.split-main { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.split-side { flex: 1 1 300px; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill-soft { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--accent-soft); font-size: .88rem; color: var(--accent); }
.empty { padding: 4rem 1rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty[hidden] { display: none; }

/* Cards */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-3px); }
.card[hidden] { display: none; }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--accent-soft); }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; inset-inline-end: 12px; /* REQ-104: top-right corner */ background: var(--ink); color: var(--surface); font-size: .75rem; font-weight: 600; padding: .3rem .6rem; border-radius: var(--radius-xs); }
.card-body { padding: 1.4rem; display: flex; flex-direction: column; gap: .7rem; }
.card-meta { display: flex; justify-content: space-between; gap: .5rem; }
.card-meta .eyebrow { font-size: .8rem; padding: .15rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--accent-soft); }
.card-title { font-size: 1.3rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font-size: .8rem; padding: .22rem .7rem; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--line); color: var(--accent); }
.chip-tag { font-size: .85rem; padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--accent-line); color: var(--accent-ink); text-decoration: none; }
.chip-tag:hover { background: var(--accent-soft); }

/* Projects page */
.page-head { padding-block: 4rem 2rem; display: flex; flex-direction: column; gap: 1rem; }
.filterbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; margin-top: .75rem; }
.chip-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chip { min-height: 44px; padding: 0 1rem; border-radius: 999px; font: inherit; font-weight: 500; cursor: pointer; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.filter-chip:hover { border-color: var(--accent-line); }
.filter-chip.is-on { background: var(--accent); color: var(--btn-text); border-color: var(--accent); }
.search { flex: 0 1 340px; min-width: 220px; display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 .75rem; background: var(--bg); color: var(--muted); }
.search:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; height: 44px; font: inherit; color: var(--ink); outline: none; }
.filter-status { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.tag-filter { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; padding: .25rem .4rem .25rem .75rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.tag-filter button { border: 0; background: transparent; color: inherit; width: 28px; height: 28px; border-radius: 999px; cursor: pointer; font-size: 1.1rem; }

/* Project detail */
.preview-bar { background: #FEF3C7; color: #78350F; text-align: center; padding: .7rem 1rem; font-weight: 600; border-bottom: 1px solid #FCD34D; }
.article { padding-block: 2rem 5rem; display: flex; flex-direction: column; gap: 2.5rem; }
.back { align-self: flex-start; text-decoration: none; font-weight: 500; padding: .6rem 0; color: var(--muted); }
.article-head { display: flex; flex-direction: column; gap: 1rem; max-width: 54rem; }
.tag-cat { font-family: var(--mono); font-size: .78rem; color: var(--accent); background: var(--accent-soft); padding: .35rem .7rem; border-radius: var(--radius-xs); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; }
.cover { border-radius: calc(var(--radius) * 1.25); overflow: hidden; border: 1px solid var(--line); background: var(--accent-soft); }
.cover-img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; } /* v1.7 (REQ-093): whole image, height follows width */
.article-grid { display: flex; flex-wrap: wrap; gap: 3rem; align-items: flex-start; }
.article-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 2.75rem; }
.side-card { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 1.5rem; position: sticky; top: 90px; }
.side-block { display: flex; flex-direction: column; gap: .6rem; padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.side-block:last-child { border-bottom: 0; }
.prose { display: flex; flex-direction: column; gap: 1rem; color: var(--ink-2); font-size: 1.05rem; line-height: 1.75; }
.prose-lg { font-size: 1.15rem; }
.prose h2, .prose h3 { color: var(--ink); margin-top: .5rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: .35rem; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--chip); padding: .1rem .35rem; border-radius: 4px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .75rem; }
.link-card { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); min-height: 72px; }
.link-card:hover { border-color: var(--accent-line); color: var(--ink); }
.link-icon { width: 40px; height: 40px; flex: none; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.link-text { display: flex; flex-direction: column; min-width: 0; }
.link-label { font-weight: 600; overflow-wrap: anywhere; }
.video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--ink); overflow: hidden; }
.video iframe { width: 100%; height: 100%; border: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.shot { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--accent-soft); cursor: zoom-in; aspect-ratio: 16 / 10; }
.shot-img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgba(15,23,42,.85); }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--radius-sm); margin: 0 auto; }
.lightbox-close { position: fixed; top: 1rem; right: 1rem; width: 48px; height: 48px; border-radius: 999px; border: 0; background: var(--surface); color: var(--ink); font-size: 1.6rem; cursor: pointer; }
.pager { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 2rem; }
.pager a { text-decoration: none; display: flex; flex-direction: column; gap: .25rem; padding-block: .5rem; }
.pager-next { align-items: flex-end; text-align: right; }
.pager-title { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }

/* About */
.about { display: flex; flex-wrap: wrap; gap: 3.5rem; align-items: flex-start; padding-block: 4rem; }
.about-side { flex: 1 1 300px; max-width: 380px; display: flex; flex-direction: column; gap: 1rem; }
.about-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 2.5rem; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.skill-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.skill-card .eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--footer-bg); margin-top: 3rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; padding-block: 2.5rem; color: var(--footer-ink); font-size: .95rem; }
.footer-id { display: flex; flex-direction: column; gap: .4rem; }
.footer-name { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--footer-head); }
.footer-contact { font-style: normal; display: flex; flex-direction: column; gap: .1rem; }
.footer-contact .eyebrow-muted { padding-bottom: .25rem; }
.contact-line { display: flex; align-items: center; gap: .6rem; min-height: 44px; text-decoration: none; color: var(--footer-ink); overflow-wrap: anywhere; }
.site-footer .eyebrow-muted { color: var(--footer-head); }
.contact-line:hover { color: var(--footer-head); text-decoration: underline; }

@media (max-width: 640px) {
  .hero-inner { padding-block: 3.5rem 3rem; }
  .nav { gap: .5rem; }
  .nav-link { padding: .6rem .7rem; }
  .side-card { position: static; }
  .search { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
}

.brand-logo { height: 36px; width: auto; max-width: 180px; object-fit: contain; }

/* v1.5 — Experience timeline (About) and current role (Home) */
.about-section { padding-block: 0 4.5rem; display: flex; flex-direction: column; gap: 1.75rem; } /* v1.6: Skills, Experience, Education share one left edge (REQ-083) */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-item { position: relative; display: flex; gap: 1.25rem; padding-bottom: 2rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-note { margin: 0; color: var(--muted); font-size: .92rem; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 23px; top: 56px; bottom: 0; width: 2px; background: var(--line); }
.exp-logo { flex: none; width: 48px; height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); object-fit: contain; box-sizing: border-box; }
.exp-initial { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); font-family: var(--display); font-weight: var(--heading-weight); font-size: 1.15rem; }
.tl-card { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; }
.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; }
.tl-head .h4 { margin: 0; font-family: var(--display); font-weight: var(--heading-weight); font-size: 1.2rem; }
.tl-dates { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.tl-company { margin: 0; font-weight: 500; color: var(--muted); }
.tl-desc { margin: 0; color: var(--ink-2); line-height: 1.7; }
.tl-highlights { margin: 0; padding-left: 1.1rem; color: var(--ink-2); line-height: 1.7; display: flex; flex-direction: column; gap: .2rem; }
.current-role { align-self: flex-start; display: inline-flex; align-items: center; gap: .7rem; padding: .45rem .9rem .45rem .45rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; max-width: 100%; }
.current-role:hover { border-color: var(--accent-line); }
.current-role .exp-logo { width: 30px; height: 30px; border-radius: 999px; font-size: .8rem; }
.current-label { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
@media (max-width: 600px) { .tl-item { gap: .75rem; } .tl-item:not(:last-child)::before { left: 19px; top: 46px; } .exp-logo { width: 40px; height: 40px; } .tl-card { padding: 1rem 1.1rem; } }

/* ---- v2.0 Aurora additions ------------------------------------------------------------------------- */
.hero::before, .page-glow::before { z-index: 0; }
.page-glow { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-glow > .container { position: relative; z-index: 1; }
.page-glow > .page-head { padding-block: 3rem 2.5rem; }
.page-glow + .section-tight { padding-top: 2rem; }
.page-glow > .about { padding-block: 3.5rem; }
.page-glow + .about-section, .page-glow + .container.about-section { padding-top: 3.5rem; }
.current-role { align-self: center; }
/* Light / dark button (REQ-122): sun shows in dark mode, moon in light. Hidden until site.js runs. */
.mode-btn { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; }
.mode-btn[hidden] { display: none; }
.mode-btn:hover { border-color: var(--accent); }
.mode-btn .i-sun { display: none; }
html[data-mode="dark"] .mode-btn .i-sun { display: block; }
html[data-mode="dark"] .mode-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-mode="light"]) .mode-btn .i-sun { display: block; }
  html:not([data-mode="light"]) .mode-btn .i-moon { display: none; }
}
@media (min-width: 900px) { .nav .mode-btn { order: 3; } .nav-links { order: 2; } }
@media (max-width: 899px) { .has-menu .mode-btn { margin-left: auto; } .has-menu .mode-btn + .nav-toggle { margin-left: .5rem; } }
/* Contact band (Home) */
.section-cta { padding-block: 1rem 1rem; }
.cta-band { border-radius: calc(var(--radius) * 1.3); padding: 2.4rem; display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; justify-content: space-between; align-items: center; background: linear-gradient(120deg, var(--cta-1), var(--cta-2)); color: #FFFFFF; }
.cta-band .h2 { color: inherit; }
.cta-text { display: flex; flex-direction: column; gap: .5rem; }
.cta-text p { opacity: .92; }
.btn-light { background: #FFFFFF; color: #0E1A2F; }
.btn-light:hover { background: #E8EEF8; color: #0E1A2F; }
.btn-ghost-light { background: transparent; color: #FFFFFF; border-color: rgba(255,255,255,.65); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #FFFFFF; }
/* Certificates (REQ-112) */
.cert-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.2rem; }
.cert-card { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.cert-body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.cert-body .h4 { margin: 0; font-family: var(--display); font-weight: var(--heading-weight); font-size: 1.08rem; }
.cert-issuer, .cert-dates, .cert-id { margin: 0; color: var(--muted); }
.cert-dates, .cert-id { font-size: .9rem; }
.tag-expired { display: inline-block; margin-left: .3rem; padding: .05rem .5rem; border-radius: 6px; background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: .82rem; }
.cert-links { margin: .25rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.cert-links a { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; text-decoration: none; min-height: 32px; }
.cert-links a:hover { text-decoration: underline; }
/* References (REQ-115) */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 1.2rem; }
.ref-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.ref-quote { margin: 0; font-size: 1.1rem; line-height: 1.65; color: var(--ink); }
.ref-quote::before { content: "“"; } .ref-quote::after { content: "”"; }
.ref-person { display: flex; gap: .8rem; align-items: center; }
.ref-photo { width: 48px; height: 48px; flex: none; border-radius: 999px; object-fit: cover; }
.ref-initials { display: grid; place-items: center; background: linear-gradient(135deg, var(--cta-1), var(--cta-2)); color: #FFFFFF; font-weight: 600; }
.ref-who { display: flex; flex-direction: column; } .ref-who span { color: var(--muted); font-size: .92rem; }
.ref-contact { display: flex; flex-direction: column; gap: .2rem; border-top: 1px solid var(--line); padding-top: .8rem; margin: 0; }
.ref-contact a { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; min-height: 32px; overflow-wrap: anywhere; }
.ref-contact a:hover { text-decoration: underline; }
.ref-request { color: var(--muted); font-size: .92rem; }
