/* =====================================================================
   Sakhawat Ali portfolio, v2
   Dark chrome + home page; case-study reports sit on a light canvas.
   ===================================================================== */

/* ---------- tokens ---------- */
:root {
  /* report (light) palette, used by the case-study components */
  --navy-900: #0a1b38;
  --navy-800: #0d2447;
  --navy-700: #0d366b;
  --blue-600: #184f95;
  --blue-500: #2a78d6;
  --blue-300: #6da7ec;
  --blue-200: #9ec5f4;
  --blue-100: #cde2fb;
  --ink: #14202e;
  --ink-2: #4a5666;
  --ink-3: #6b7686;
  --line: #e3e8ef;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --good: #0a8a0a;
  --good-fill: #0ca30c;
  --warn: #b4460f;
  --warn-fill: #ec835a;
  --shadow: 0 1px 2px rgba(13, 36, 71, .05), 0 8px 24px rgba(13, 36, 71, .06);

  /* dark site palette */
  --d-bg: #0b1220;            /* page: deep slate-navy, not pure black */
  --d-bg-2: #0e1729;          /* alternate bands */
  --d-card: #131d33;
  --d-card-2: #19263f;
  --d-line: rgba(255, 255, 255, .10);
  --d-line-2: rgba(255, 255, 255, .18);
  --d-text: #e6edf8;          /* body text, 13:1 on the page */
  --d-muted: #b0bed6;         /* secondary text, 9:1 */
  --d-dim: #8d9dba;           /* labels, 6:1 */
  --head: #f8fafd;            /* headings */
  --sky: #8dbbff;             /* italic accent words, stat numbers */
  --sky-2: #5c9bf0;
  --accent: #ff8a4c;          /* buttons (dark text, 8:1) */
  --accent-dark: #f57632;
  --on-accent: #0b1220;
  --amber: #ffb98a;           /* eyebrow labels */

  --radius: 16px;
  --font-head: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; font-family: var(--font-body); color: var(--d-text); background: var(--d-bg); line-height: 1.7; font-size: 17px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--sky); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 14px; z-index: 200; border-radius: 6px; }
.skip-link:focus { left: 8px; }
em { font-style: italic; }

/* ---------- shared type ---------- */
.eyebrow { font-family: var(--font-mono); font-weight: 500; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin: 0 0 16px; }
.section-title { font-size: clamp(2.25rem, 4.6vw, 3.4rem); line-height: 1.12; color: var(--head); max-width: 18em; }
.section-title em, .hero h1 em, .banner h2 em { color: var(--sky); font-weight: 400; }
.section-sub { color: var(--d-muted); margin-top: 16px; max-width: 44rem; font-size: 1.125rem; }
.chip { display: inline-block; font-family: var(--font-mono); font-size: 13px; color: var(--d-muted); padding: 6px 13px; border: 1px solid var(--d-line-2); border-radius: 999px; background: rgba(255,255,255,.02); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: 15px; padding: 13px 24px; border-radius: 10px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, border-color .2s, color .2s; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { color: var(--d-text); border-color: var(--d-line-2); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--sky); color: #fff; }
.btn-small { padding: 9px 16px; font-size: 13.5px; }
.btn-ghost-dark { color: var(--navy-700); border-color: var(--line); background: #fff; }
.btn-ghost-dark:hover { border-color: var(--blue-500); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(11, 18, 32, .86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--d-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 100%; }
.brand { font-family: var(--font-head); font-size: 1.4rem; font-weight: 600; color: #fff; text-decoration: none; white-space: nowrap; }
.primary-nav { display: flex; gap: 2px; margin-left: auto; }
.primary-nav a { font-family: var(--font-mono); font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--d-dim); text-decoration: none; padding: 24px 12px 22px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.primary-nav a:hover { color: #fff; }
.primary-nav a.active { color: var(--amber); border-bottom-color: var(--amber); }
.header-cta { padding: 9px 18px; font-size: 13.5px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(800px 500px at 12% 8%, rgba(76,147,230,.22), transparent 65%),
    radial-gradient(700px 500px at 92% 60%, rgba(235,104,52,.10), transparent 65%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 44px; align-items: center; padding: 36px 0 48px; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1.08; color: var(--head); letter-spacing: -.012em; }
.hero-lead { color: var(--d-muted); font-size: 1.2rem; max-width: 34rem; margin: 18px 0 20px; }
.hero-lead b { color: #fff; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.report-card { background: linear-gradient(180deg, var(--d-card-2), var(--d-card)); border: 1px solid var(--d-line); border-radius: 22px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.report-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.12); }
.report-tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: rgba(255,255,255,.035); border: 1px solid var(--d-line); border-radius: 14px; padding: 16px 16px 14px; }
.tile small { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--d-dim); }
.tile strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: 2.05rem; color: var(--head); line-height: 1.15; margin: 6px 0 2px; }
.tile > span { display: block; line-height: 1.4; font-family: var(--font-mono); font-size: 12.5px; color: #7fd6a8; }
.tile.wide { grid-column: 1 / -1; }
.fcbars { display: flex; align-items: flex-end; gap: 3px; height: 96px; margin: 14px 0 10px; }
.fcbars i { flex: 1; min-width: 0; height: 0; border-radius: 3px 3px 1px 1px; background: var(--sky); transition: height .8s cubic-bezier(.2,.8,.2,1); }
.fcbars i.f { background: linear-gradient(180deg, #ffb182, var(--accent)); opacity: .92; }
.fc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--font-mono); font-size: 12px; color: var(--d-dim); }
.fc-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.fc-legend .k-act { background: var(--sky); }
.fc-legend .k-fc { background: var(--accent); }

/* ---------- sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--d-line); position: relative; }
.section-head { margin-bottom: 28px; }

/* about */
.about-grid { display: grid; grid-template-columns: 290px 1fr; gap: 36px; align-items: start; }
.portrait { margin: 0; position: relative; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 12%; border-radius: 22px; border: 1px solid var(--d-line-2); filter: saturate(.95); }
.portrait::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--d-line-2); border-radius: 22px; z-index: -1; }
.about-text .lead { color: var(--d-text); font-size: 1.15rem; margin-top: 14px; }
.about-text p { color: var(--d-muted); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 0; }
.stat-grid div { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 14px; padding: 14px 16px; }
.stat-grid dt { font-family: var(--font-head); font-weight: 600; font-size: 1.95rem; color: var(--head); line-height: 1.1; }
.stat-grid dd { margin: 6px 0 0; font-size: 15px; color: var(--d-muted); line-height: 1.45; }

/* case study cards */
.hl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hl-card { display: flex; flex-direction: column; background: var(--d-card); border: 1px solid var(--d-line); border-radius: 20px; overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.hl-card:hover { transform: translateY(-4px); border-color: rgba(125,180,245,.45); box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.hl-thumb { display: block; aspect-ratio: 16/9; background: #e9eef6; overflow: hidden; border-bottom: 1px solid var(--d-line); }
.hl-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .5s; }
.hl-card:hover .hl-thumb img { transform: scale(1.04); }
.hl-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.hl-label { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }
.hl-card h3 { font-size: 1.65rem; line-height: 1.2; color: var(--head); margin-bottom: 12px; }
.hl-desc { color: var(--d-muted); font-size: 15.5px; margin-bottom: 14px; }
.hl-stats { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 0; }
.hl-stats li { display: grid; grid-template-columns: minmax(92px, auto) 1fr; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--d-line); }
.hl-stats strong { font-family: var(--font-head); font-weight: 600; font-size: 1.55rem; color: var(--sky); line-height: 1.1; }
.hl-stats li > span { font-size: 14.5px; color: var(--d-muted); line-height: 1.4; }
.hl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.hl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

/* skills */
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.skill { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 18px; padding: 18px 20px; }
.skill small { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.skill h3 { font-size: 1.4rem; color: var(--head); margin: 8px 0 14px; }
.skill ul { list-style: none; padding: 0; margin: 0; }
.skill li { font-size: 15.5px; color: var(--d-muted); padding: 6px 0; border-bottom: 1px solid var(--d-line); }
.skill li:last-child { border-bottom: 0; }

/* certifications */
.cert-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cert-grid li { display: flex; }
.cert { display: grid; grid-template-columns: 190px 1fr; align-items: stretch; text-align: left; width: 100%; font: inherit; color: inherit; cursor: pointer; background: var(--d-card); border: 1px solid var(--d-line); border-radius: 18px; padding: 0; overflow: hidden; transition: transform .2s, border-color .2s; }
.cert:hover, .cert:focus-visible { transform: translateY(-3px); border-color: rgba(125,180,245,.45); }
.cert-thumb { background: #fff; display: grid; place-items: center; position: relative; overflow: hidden; min-height: 120px; }
.cert-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cert-thumb .icon { width: 40px; height: 40px; color: var(--sky-2); }
.cert-thumb .cert-tag { display: none; }
.cert-info { padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; }
.cert-kind { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.cert-info h3 { font-size: 1.3rem; color: var(--head); margin-bottom: 8px; line-height: 1.25; }
.cert-info p { margin: 0; font-size: 14px; color: var(--d-dim); font-family: var(--font-mono); }
.cert-foot { margin-top: 20px; color: var(--d-dim); font-size: 15px; }

/* experience */
.timeline { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--d-line-2); }
.job { position: relative; padding: 0 0 28px; }
.job:last-child { padding-bottom: 0; }
.job::before { content: ""; position: absolute; left: -30px; top: 9px; width: 13px; height: 13px; border-radius: 50%; background: var(--d-bg); border: 2px solid var(--amber); }
.job:first-child::before { background: var(--amber); box-shadow: 0 0 0 5px rgba(240,168,119,.16); }
.job h3 { font-size: 1.75rem; color: var(--head); }
.job-meta { font-family: var(--font-mono); font-size: 14px; color: var(--d-dim); margin: 6px 0 12px; }
.job-meta b { color: var(--amber); font-weight: 500; }
.job ul { margin: 0; padding-left: 1.2em; color: var(--d-muted); }
.job li { margin-bottom: 6px; }
.job li strong { color: var(--head); font-weight: 600; }
.job > p { color: var(--d-muted); margin: 0 0 12px; }

/* consulting banner */
.banner-wrap { padding: 4px 0 56px; }
.banner { position: relative; overflow: hidden; border-radius: 24px; padding: 34px 40px 32px; border: 1px solid var(--d-line-2);
  background: radial-gradient(700px 300px at 85% 0%, rgba(76,147,230,.30), transparent 65%), linear-gradient(160deg, #101c3a, #0a1226); }
.banner h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); line-height: 1.12; color: var(--head); max-width: 16em; }
.banner-sub { color: var(--d-muted); margin: 12px 0 20px; max-width: 36rem; font-size: 1.1rem; }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-bottom: 24px; }
.offers h3 { font-size: 1.35rem; color: var(--head); margin-bottom: 8px; }
.offers p { margin: 0; color: var(--d-muted); font-size: 15.5px; }

/* resume */
.resume-card { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 20px; padding: 24px 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.resume-card h3 { font-size: 1.95rem; color: var(--head); }
.resume-card p { color: var(--d-muted); margin: 10px 0 0; max-width: 34rem; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.panel { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 20px; padding: 26px 28px; }
.panel h3 { font-size: 1.75rem; color: var(--head); margin-bottom: 12px; }
.panel > p { color: var(--d-muted); }
.contact-rows { list-style: none; padding: 0; margin: 16px 0 0; }
.contact-rows li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--d-line); }
.contact-rows small { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--d-dim); }
.contact-rows span { color: var(--d-text); word-break: break-all; }
.contact-rows a.go { font-family: var(--font-mono); font-size: 13.5px; color: var(--amber); text-decoration: none; white-space: nowrap; }
.contact-rows a.go:hover { text-decoration: underline; }
.contact-form { display: grid; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--d-dim); }
.contact-form input, .contact-form textarea { font: inherit; font-size: 15px; letter-spacing: 0; text-transform: none; color: #fff; background: rgba(255,255,255,.04); border: 1px solid var(--d-line-2); border-radius: 10px; padding: 12px 14px; width: 100%; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--sky); border-color: transparent; }
.contact-form .btn { justify-self: start; }
.form-status { margin: 0; font-size: 13.5px; color: #9fe0bd; min-height: 1.4em; }
.form-status.err { color: #ffb69b; }
.site-footer { border-top: 1px solid var(--d-line); color: var(--d-dim); font-size: 13px; font-family: var(--font-mono); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 20px 0; }
.footer-inner p { margin: 0; }
.footer-inner ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.footer-inner a { color: var(--d-muted); text-decoration: none; }
.footer-inner a:hover { color: #fff; text-decoration: underline; }

/* modal (certificates) */
.modal { position: fixed; inset: 0; z-index: 300; background: rgba(3, 7, 15, .82); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-panel { position: relative; background: var(--d-card-2); border: 1px solid var(--d-line-2); border-radius: 20px; padding: 28px; width: min(820px, 100%); max-height: 90vh; overflow: auto; }
.modal-panel h3 { padding-right: 40px; color: var(--head); font-size: 1.6rem; }
.modal-panel p { color: var(--d-dim); font-family: var(--font-mono); font-size: 13px; margin: 8px 0 18px; }
.modal-panel img { width: 100%; border-radius: 10px; }
.modal-close { position: absolute; top: 16px; right: 16px; border: 1px solid var(--d-line-2); background: rgba(255,255,255,.06); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: #fff; }
.modal .placeholder { border: 2px dashed var(--d-line-2); border-radius: 10px; padding: 28px; color: var(--d-dim); font-size: 14px; text-align: center; }

/* ---------- case-study pages ---------- */
.page-head { position: relative; overflow: hidden; padding: 30px 0 26px; border-bottom: 1px solid var(--d-line); }
.page-head::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(700px 320px at 15% 0%, rgba(76,147,230,.22), transparent 70%); }
.page-head .wrap { position: relative; }
.page-head h1 { color: var(--head); font-size: clamp(2.3rem, 4.8vw, 3.5rem); line-height: 1.1; max-width: 18em; }
.page-obj { color: var(--d-muted); margin: 10px 0 14px; max-width: 44rem; font-size: 1.15rem; }
.crumbs { font-family: var(--font-mono); font-size: 13.5px; color: var(--d-dim); margin-bottom: 14px; }
.crumbs a { color: var(--d-muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cs-switch { position: sticky; top: var(--header-h); z-index: 50; background: rgba(11,18,32,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--d-line); }
.cs-switch-inner { display: flex; gap: 8px; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
.cs-switch a { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13.5px; font-weight: 500; color: var(--d-muted); text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 1px solid transparent; }
.cs-switch a:hover { border-color: var(--d-line-2); color: #fff; }
.cs-switch a span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--d-line-2); font-size: 11.5px; }
.cs-switch a.active { color: #fff; background: rgba(255,255,255,.07); border-color: var(--d-line-2); }
.cs-switch a.active span { background: var(--accent); color: var(--on-accent); }
.cs-page { background: var(--bg-alt); color: var(--ink); }
.cs-page h1, .cs-page h2, .cs-page h3, .cs-page h4, .cs-page h5 { color: var(--navy-800); }
.cs-page a { color: var(--blue-600); }
.cs-page .cs { border-bottom: 0; padding-top: 26px; padding-bottom: 20px; }
.cs-pager { display: flex; justify-content: space-between; gap: 16px; padding: 28px 0 44px; }
.pager-link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; padding: 18px 22px; border: 1px solid var(--d-line-2); border-radius: 16px; min-width: 240px; transition: border-color .2s, transform .2s; }
.pager-link:hover { border-color: var(--sky); transform: translateY(-2px); }
.pager-link small { color: var(--d-dim); font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; }
.pager-link strong { font-family: var(--font-head); font-weight: 600; color: var(--head); font-size: 1.25rem; }
.pager-link.next { text-align: right; margin-left: auto; }

/* ---------- report components (light canvas) ---------- */
.cs { padding: 64px 0 32px; border-bottom: 1px solid var(--line); }
.cs:last-of-type { border-bottom: 0; }
.cs-head { margin-bottom: 28px; }
.cs-head h3 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
.cs-obj { color: var(--ink-2); margin-top: 8px; }

.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.sum-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.sum-card:last-child { border-color: var(--blue-200); background: linear-gradient(180deg, #f2f8ff, #fff); }
.sum-card h4 { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-600); margin-bottom: 8px; }
.sum-card p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.55; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.filter-bar label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
select { font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); padding: 8px 32px 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 140px; max-width: 220px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7686' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.range-wrap { display: flex; align-items: center; gap: 12px; min-height: 38px; }
input[type="range"] { width: 180px; accent-color: var(--blue-500); }
output { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--navy-800); text-transform: none; letter-spacing: 0; min-width: 3.4em; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi-label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.kpi-value { font-family: var(--font-head); font-weight: 700; font-size: 1.65rem; color: var(--navy-800); margin: 4px 0 2px; }
.kpi-sub { font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.kpi-hist { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.delta { font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--good); }
.delta.down { color: var(--warn); }
.delta.flat { color: var(--ink-3); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); min-width: 0; }
.grid-2 > .card { margin-bottom: 0; }
.card h4 { font-size: 1.2rem; }
.card h5 { font-size: .9rem; margin-bottom: 10px; color: var(--navy-700); }
.card h5.mt { margin-top: 26px; }
.card-sub { font-size: 13px; color: var(--ink-3); margin: 4px 0 14px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.chart-box { position: relative; height: 320px; }
.chart-box.short { height: 260px; }
.chart-box.tall { height: 480px; }
.chart-box.scatter { height: 520px; }
.callout { margin: 14px 0 0; padding: 10px 14px; background: #f2f8ff; border-left: 3px solid var(--blue-500); border-radius: 0 8px 8px 0; font-size: 13.5px; color: var(--ink-2); }
.callout:empty { display: none; }
.callout b { color: var(--navy-800); }

.seg { display: inline-flex; background: var(--bg-alt); border-radius: 9px; padding: 3px; }
.seg button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: transparent; color: var(--ink-2); padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--navy-800); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.insight-box { background: var(--navy-800); color: #dfe8f7; border-radius: var(--radius); padding: 26px 28px; margin-bottom: 18px; }
.insight-box h4 { color: #fff; font-size: 1.1rem; margin-bottom: 14px; }
.insight-box ul { margin: 0; padding-left: 1.2em; }
.insight-box li { margin-bottom: 8px; }
.insight-box b { color: #fff; }
.headline-stat { font-family: var(--font-head); font-size: clamp(1.05rem, 2vw, 1.35rem); color: #fff; line-height: 1.4; margin: 0 0 20px; }
.headline-stat em { font-style: normal; color: #7fd6a8; }
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.insight { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 16px; }
.insight small { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-200); margin-bottom: 6px; }
.insight strong { display: block; font-family: var(--font-head); color: #fff; font-size: 1.05rem; margin-bottom: 4px; }
.insight span { font-size: 13px; line-height: 1.5; display: block; }
.method-note { font-size: 13px; color: var(--ink-3); max-width: 62rem; margin: 6px 0 0; }

.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-alt); border-radius: 10px; font-size: 14px; }
.rank .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy-800); color: #fff; font-size: 12px; font-weight: 700; }
.rank .v { font-weight: 700; color: var(--good); }
.rank small { display: block; color: var(--ink-3); font-size: 12px; }
.top5 { margin-top: 18px; }
.win-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.win-list li { background: #f0faf3; border-left: 3px solid var(--good-fill); border-radius: 0 8px 8px 0; padding: 10px 14px; font-size: 14px; color: var(--ink-2); }
.win-list li.watch { background: #fff6f0; border-color: var(--warn-fill); }
.win-list b { color: var(--navy-800); }
.quad-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
.quad-legend b { color: var(--navy-800); }

.funnels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.funnel { border: 1px solid var(--line); border-radius: 12px; padding: 16px; transition: opacity .25s; }
.funnel.dim { opacity: .45; }
.funnel h5 { display: flex; justify-content: space-between; align-items: baseline; font-size: 1rem; margin-bottom: 12px; }
.funnel h5 small { font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--ink-3); }
.stage { margin-bottom: 10px; }
.stage-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 3px; color: var(--ink-2); }
.stage-top b { color: var(--navy-800); font-variant-numeric: tabular-nums; }
.bar { height: 18px; background: var(--bg-alt); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.stage-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.funnel-end { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; }
.funnel-end b { font-family: var(--font-head); color: var(--navy-800); }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .primary-nav a { padding-inline: 8px; }
  .hero-inner { gap: 32px; }
  /* case-study cards stay in ONE row on tablets: compact version */
  .hl-grid { gap: 14px; }
  .hl-body { padding: 14px 14px 16px; }
  .hl-label { font-size: 11.5px; margin-bottom: 6px; }
  .hl-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
  .hl-desc, .hl-tags { display: none; }
  .hl-stats { margin-bottom: 12px; }
  .hl-stats li { grid-template-columns: 1fr; gap: 0; padding: 7px 0; }
  .hl-stats strong { font-size: 1.25rem; }
  .hl-stats li > span { font-size: 13px; line-height: 1.35; }
  .hl-actions { flex-direction: column; gap: 8px; }
  .hl-actions .btn { width: 100%; justify-content: center; }
}
@media (max-width: 900px) {
  /* tablet: copy on top, highlights card directly underneath as one compact row of tiles */
  .hero-inner { grid-template-columns: 1fr; gap: 24px; padding: 28px 0 36px; }
  .report-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .tile { padding: 12px 12px 10px; }
  .tile strong { font-size: 1.7rem; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .funnels { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-toggle { display: block; order: 3; }
  .header-cta { margin-left: auto; }
  .primary-nav { position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; margin: 0; background: rgba(11,18,32,.98); padding: 8px 20px 18px; border-bottom: 1px solid var(--d-line); display: none; }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 14px 4px; border-bottom: 1px solid var(--d-line); }
  .primary-nav a.active { border-bottom-color: var(--d-line); }
  .section { padding: 52px 0; }
  .about-grid { grid-template-columns: 230px 1fr; gap: 26px; }
  .contact-grid { grid-template-columns: 1fr; gap: 16px; }
  .cert { grid-template-columns: 150px 1fr; }
  .offers { grid-template-columns: 1fr; gap: 16px; }
  .banner { padding: 26px 24px; }
  .resume-card { padding: 22px 24px; }
}
@media (max-width: 700px) {
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 22px; }
  .portrait { max-width: 240px; }
  .cert-grid { grid-template-columns: 1fr; }
  /* phones: cards stack again, full detail */
  .hl-grid { grid-template-columns: 1fr; gap: 18px; }
  .hl-body { padding: 18px 18px 20px; }
  .hl-desc { display: block; }
  .hl-tags { display: flex; }
  .hl-card h3 { font-size: 1.5rem; }
  .hl-stats li { grid-template-columns: minmax(92px, auto) 1fr; gap: 14px; }
  .hl-stats li > span { font-size: 14.5px; }
  .hl-actions { flex-direction: row; }
  .hl-actions .btn { width: auto; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .skill-grid, .summary-grid, .stat-grid { grid-template-columns: 1fr; }
  .cert { grid-template-columns: 1fr; }
  .cert-thumb { min-height: 0; aspect-ratio: 10/7; }
  .brand { font-size: 1.1rem; }
  .header-cta { padding: 8px 12px; font-size: 12.5px; }
  .report-grid { grid-template-columns: 1fr; }
  .panel { padding: 22px; }
  .filter-bar label, select { width: 100%; max-width: none; }
  .chart-box.tall { height: 440px; }
  .chart-box.scatter { height: 440px; }
  .card { padding: 16px; }
  input[type="range"] { width: 150px; }
  .pager-link { min-width: 0; flex: 1; }
}

/* ---------- print / save as PDF (case-study pages) ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; color: #000; }
  .site-header, .cs-switch, .filter-bar, .page-actions, .cs-pager, .site-footer, .seg, .crumbs { display: none !important; }
  .page-head { background: none; border-bottom: 1px solid #ccc; padding: 0 0 12px; }
  .page-head::before { display: none; }
  .page-head h1 { color: #000; font-size: 24pt; }
  .page-head .eyebrow, .page-obj { color: #444; }
  .chip { color: #333; border-color: #999; background: none; }
  .cs-page { background: #fff; }
  .card, .kpi, .sum-card, .insight-box, .funnel { break-inside: avoid; box-shadow: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .insight-box { background: #f0f3f9 !important; color: #000 !important; border: 1px solid #ccc; }
  .insight-box h4, .insight-box b, .headline-stat, .insight strong { color: #000 !important; }
  .insight { background: #fff !important; border-color: #ccc !important; }
  .insight small, .insight span, .insight-box li { color: #333 !important; }
}
.resume-card .eyebrow { margin: 0 0 12px; }

/* dark-theme finishing */
#case-studies, #certifications { background: var(--d-bg-2); }
.hl-card, .skill, .cert, .stat-grid div, .panel, .resume-card { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset; }
.btn-ghost:hover { background: rgba(255,255,255,.06); }

/* case study 1: recommended actions */
.actions { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.actions li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 14px 16px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; }
.actions .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-800); color: #fff; font-weight: 700; font-size: 14px; }
.actions h5 { font-size: 1.1rem; margin: 2px 0 6px; color: var(--navy-800); }
.actions .tag { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: #e3edfc; color: var(--blue-600); font-family: var(--font-body); font-size: 11.5px; font-weight: 600; vertical-align: 2px; }
.actions p { margin: 0 0 4px; font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.actions .validate { font-size: 13.5px; color: var(--ink-3); }
.actions-note { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-3); }
@media print { .actions li { break-inside: avoid; } }
