/* ==========================================================================
   Mubarak Sabakada — analytics portfolio
   Design direction: editorial analytics studio — warm paper, deep emerald,
   restrained gold, layered dashboards, and a monospaced data vernacular.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --ground: #f4efe7;
  --ground-deep: #e7ded2;
  --surface: #fffdf9;
  --surface-2: #f7f2eb;
  --surface-3: #eee7dc;
  --ink: #132321;
  --ink-2: #4f5f5b;
  --ink-3: #8b9690;
  --rule: #ddd5ca;
  --rule-strong: #c9bfb2;

  --brand: #0b4a43;
  --brand-ink: #063730;
  --brand-soft: #dfeae5;
  --brand-line: #aac6bb;

  --signal: #c58a45;
  --signal-soft: #f3e2cd;

  --pos: #138267;
  --neg: #c0392b;

  --s1: #0b4a43;
  --s2: #c58a45;
  --s3: #2f7d6f;
  --s4: #66558d;
  --s5: #9b7740;

  --shadow-sm: 0 1px 2px rgba(16, 23, 40, .05);
  --shadow-md: 0 8px 28px -12px rgba(16, 23, 40, .22);
  --shadow-lg: 0 24px 60px -28px rgba(16, 23, 40, .35);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --display: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --shell: 1240px;
  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.08; letter-spacing: -.025em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); font-weight: 800; letter-spacing: -.038em; }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.5rem); }
h3 { font-size: 1.14rem; letter-spacing: -.015em; }
p { margin: 0 0 1rem; color: var(--ink-2); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
@media (max-width: 640px) { .shell { width: calc(100% - 1.75rem); } }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- shared type utilities ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: .69rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  display: block;
}
.lede { font-size: 1.06rem; color: var(--ink-2); max-width: 62ch; }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 90;
  height: var(--header-h);
  display: flex; align-items: center; gap: 1rem;
  padding-inline: max(1.25rem, calc((100vw - var(--shell)) / 2));
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--rule);
}

.mast-brand { display: flex; align-items: center; gap: .6rem; color: inherit; flex-shrink: 0; }
.mast-brand:hover { text-decoration: none; }
.monogram {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: .78rem; letter-spacing: .02em;
}
.mast-name { display: flex; flex-direction: column; line-height: 1.15; }
.mast-name b { font-family: var(--display); font-size: .95rem; letter-spacing: -.02em; }
.mast-name small { font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.mast-nav { display: flex; gap: .15rem; margin-inline: auto; }
.mast-nav a {
  position: relative;
  padding: .45rem .8rem;
  border-radius: 999px;
  font-size: .88rem; font-weight: 500;
  color: var(--ink-2);
  transition: color .18s, background .18s;
}
.mast-nav a:hover { color: var(--ink); background: var(--surface-3); text-decoration: none; }
.mast-nav a[aria-current='page'] { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

.mast-tools { display: flex; align-items: center; gap: .45rem; flex-shrink: 0; }

.kbd-btn {
  display: flex; align-items: center; gap: .5rem;
  height: 34px; padding: 0 .7rem;
  border: 1px solid var(--rule); border-radius: 9px;
  background: var(--surface); color: var(--ink-3);
  font-family: var(--body); font-size: .82rem; cursor: pointer; transition: .18s;
}
.kbd-btn:hover { color: var(--brand); border-color: var(--brand-line); }
.kbd-btn kbd {
  font-family: var(--mono); font-size: .66rem;
  background: var(--surface-3); border: 1px solid var(--rule);
  border-radius: 4px; padding: .1rem .3rem; color: var(--ink-2);
}
@media (max-width: 1080px) { .kbd-btn kbd { display: none; } }

.mast-burger { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .68rem 1.15rem; border-radius: 10px;
  background: var(--brand); color: #fff;
  border: 1px solid var(--brand);
  font-family: var(--body); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: .18s var(--ease);
}
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--surface); color: var(--brand); border-color: var(--brand-line); }
.btn-sm { padding: .45rem .8rem; font-size: .82rem; border-radius: 8px; }

.textlink {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 600; font-size: .88rem;
  border-bottom: 1px solid var(--brand-line); padding-bottom: 1px;
}
.textlink:hover { text-decoration: none; border-color: var(--brand); }

/* ---------- page frame ---------- */
.page { padding: 3rem 0 5rem; animation: pageIn .34s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.crumbs {
  display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--ink-3); margin-bottom: 1.5rem;
}
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--brand); }
.crumbs i { font-style: normal; opacity: .5; }
.crumbs b { color: var(--ink); font-weight: 500; }

.page-head { margin-bottom: 2.5rem; max-width: 74ch; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin: .6rem 0 .9rem; }
.page-head .lede { font-size: 1.08rem; }

.section { margin-top: 3.6rem; scroll-margin-top: calc(var(--header-h) + 68px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.section-head h2 { font-size: clamp(1.4rem, 2.4vw, 1.95rem); }
.section-head p { margin: .45rem 0 0; max-width: 58ch; font-size: .94rem; }

/* ---------- surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.35rem 1.45rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.panel-head h3 { margin-top: .25rem; }
.panel-head p { margin: .3rem 0 0; font-size: .85rem; }
.tag {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .07em; text-transform: uppercase;
  background: var(--surface-3); color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 999px; padding: .22rem .55rem;
  white-space: nowrap;
}
.tag-brand { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.tag-signal { background: var(--signal-soft); border-color: color-mix(in srgb, var(--signal) 35%, transparent); color: var(--signal); }

/* ---------- hero: the live query result (signature) ---------- */
.hero { padding: 3.2rem 0 1rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; } }

.hero-status {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .09em; text-transform: uppercase;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 999px;
  padding: .35rem .8rem .35rem .6rem; color: var(--ink-2); margin-bottom: 1.5rem;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 60%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero h1 { margin-bottom: 1.1rem; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { font-size: 1.1rem; margin-bottom: 1.7rem; }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 2rem; }

.hero-stats { display: flex; gap: 2.2rem; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 1.3rem; }
.hero-stats div { display: flex; flex-direction: column; gap: .1rem; }
.hero-stats b { font-family: var(--display); font-size: 1.5rem; letter-spacing: -.03em; }
.hero-stats span { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* the console */
.console {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.console-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem .85rem; border-bottom: 1px solid var(--rule); background: var(--surface-2);
}
.console-dots { display: flex; gap: .3rem; }
.console-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule-strong); }
.console-bar span { font-family: var(--mono); font-size: .68rem; color: var(--ink-3); letter-spacing: .04em; }
.console-bar .tag { margin-left: auto; }

.console-sql {
  font-family: var(--mono); font-size: .74rem; line-height: 1.85;
  padding: .95rem 1.1rem; margin: 0;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-2);
  overflow-x: auto; white-space: pre; color: var(--ink-2);
}
.console-sql .k { color: var(--brand); font-weight: 700; }
.console-sql .s { color: var(--signal); }
.console-sql .c { color: var(--ink-3); font-style: italic; }

.console-grid { overflow-x: auto; }
.console-grid table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .74rem; }
.console-grid th {
  text-align: left; padding: .5rem .85rem;
  font-weight: 500; font-size: .63rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); background: var(--surface-2);
  border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.console-grid td { padding: .48rem .85rem; border-bottom: 1px solid var(--rule); white-space: nowrap; font-variant-numeric: tabular-nums; }
.console-grid tbody tr { animation: rowIn .4s var(--ease) backwards; }
.console-grid tbody tr:nth-child(1) { animation-delay: .18s; }
.console-grid tbody tr:nth-child(2) { animation-delay: .27s; }
.console-grid tbody tr:nth-child(3) { animation-delay: .36s; }
.console-grid tbody tr:nth-child(4) { animation-delay: .45s; }
.console-grid tbody tr:nth-child(5) { animation-delay: .54s; }
.console-grid tbody tr:nth-child(6) { animation-delay: .63s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.console-grid .pos { color: var(--pos); }
.console-grid .strong { color: var(--ink); font-weight: 500; }

.console-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .6rem .95rem; background: var(--surface-2);
  font-family: var(--mono); font-size: .67rem; color: var(--ink-3);
}

/* ---------- marquee of tools ---------- */
.ribbon { border-block: 1px solid var(--rule); background: var(--surface); overflow: hidden; margin-top: 3rem; }
.ribbon-track { display: flex; gap: 2.4rem; padding: .8rem 0; width: max-content; animation: slide 42s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.ribbon-track span {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3); white-space: nowrap; display: flex; align-items: center; gap: 2.4rem;
}
.ribbon-track span::after { content: '◆'; font-size: .5rem; color: var(--brand-line); }

/* ---------- project cards ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 1.2rem; }

.proj-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.5rem 1.55rem 1.35rem; color: inherit; overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.proj-card::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--accent, var(--brand)); opacity: 0; transition: opacity .22s;
}
.proj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--rule-strong); text-decoration: none; }
.proj-card:hover::before { opacity: 1; }

.proj-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.proj-idx { font-family: var(--mono); font-size: .7rem; color: var(--ink-3); letter-spacing: .1em; }
.proj-card h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.proj-card > p { font-size: .9rem; margin-bottom: 1.1rem; }
.proj-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-bottom: 1.15rem; }
.proj-metrics div { background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .55rem .7rem; }
.proj-metrics small { font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: block; }
.proj-metrics b { font-family: var(--display); font-size: 1.02rem; letter-spacing: -.02em; }
.proj-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.proj-foot .chips { display: flex; gap: .3rem; flex-wrap: wrap; }
.proj-open { font-family: var(--mono); font-size: .72rem; color: var(--brand); font-weight: 500; white-space: nowrap; }

/* spark preview inside card */
.proj-spark { height: 46px; margin-bottom: 1.1rem; }
.proj-spark svg { width: 100%; height: 100%; overflow: visible; }

/* ---------- project detail ---------- */
.detail-head { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .detail-head { grid-template-columns: 1fr; gap: 1.6rem; } }
.detail-head h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); margin: .55rem 0 .85rem; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }

.q-card { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--signal); border-radius: var(--radius); padding: 1.2rem 1.35rem; }
.q-card .eyebrow { margin-bottom: .5rem; }
.q-card p { margin: 0; color: var(--ink); font-size: .97rem; }

.spec-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); margin-top: 1.5rem;
}
.spec-strip div { padding: .85rem 1.1rem; border-right: 1px solid var(--rule); }
.spec-strip div:last-child { border-right: 0; }
.spec-strip small { font-family: var(--mono); font-size: .61rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: .15rem; }
.spec-strip b { font-family: var(--display); font-size: 1.05rem; letter-spacing: -.02em; }

/* sticky in-page rail */
.rail {
  position: sticky; top: var(--header-h); z-index: 60;
  display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none;
  margin: 2.4rem 0 0; padding: .45rem 0;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.rail::-webkit-scrollbar { display: none; }
.rail button {
  flex-shrink: 0; padding: .42rem .85rem; border-radius: 999px;
  background: transparent; border: 1px solid transparent; color: var(--ink-2);
  font-family: var(--body); font-size: .84rem; font-weight: 500; cursor: pointer; transition: .18s;
}
.rail button:hover { background: var(--surface-3); color: var(--ink); }
.rail button.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); font-weight: 600; }

/* KPI row */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.05rem 1.15rem; }
.kpi small { font-family: var(--mono); font-size: .63rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: .35rem; }
.kpi b { font-family: var(--display); font-size: clamp(1.35rem, 2.4vw, 1.75rem); letter-spacing: -.03em; display: block; }
.kpi span { font-size: .78rem; color: var(--ink-3); }

/* ---------- charts ---------- */
.chart-wrap { position: relative; }
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--rule); stroke-width: 1; }
.chart .axis-txt { font-family: var(--mono); font-size: 9.5px; fill: var(--ink-3); }
.chart .val-txt { font-family: var(--mono); font-size: 10px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart .bar-lbl { font-family: var(--body); font-size: 11px; fill: var(--ink); }
.chart .bar { transition: opacity .18s; }
.chart .bar:hover { opacity: .78; }
.chart .dot { transition: r .15s; }

.legend { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: .9rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--ink-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.chart-note { font-size: .83rem; color: var(--ink-3); margin: .9rem 0 0; padding-top: .8rem; border-top: 1px solid var(--rule); }

.tt {
  position: fixed; z-index: 300; pointer-events: none; opacity: 0;
  background: var(--ink); color: var(--ground);
  border-radius: 8px; padding: .5rem .7rem;
  font-family: var(--mono); font-size: .72rem; line-height: 1.5;
  box-shadow: var(--shadow-md); transition: opacity .12s; max-width: 240px;
}
.tt.on { opacity: 1; }
.tt b { color: #fff; }

/* ---------- findings ---------- */
.findings { display: grid; gap: .75rem; }
.finding {
  display: grid; grid-template-columns: 30px 1fr; gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.05rem 1.25rem;
}
.finding i {
  font-style: normal; font-family: var(--mono); font-size: .7rem; font-weight: 700;
  color: var(--brand); background: var(--brand-soft); border-radius: 6px;
  width: 30px; height: 26px; display: grid; place-items: center;
}
.finding p { margin: 0; color: var(--ink); font-size: .94rem; }

/* ---------- schema ---------- */
.schema-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; }
.schema-tbl { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .85rem 1rem; }
.schema-tbl b { font-family: var(--mono); font-size: .82rem; color: var(--ink); display: block; margin-bottom: .25rem; }
.schema-tbl small { font-family: var(--mono); font-size: .7rem; color: var(--ink-3); line-height: 1.6; }
.rel-list { display: flex; flex-direction: column; gap: .45rem; margin-top: 1rem; }
.rel-list span { font-family: var(--mono); font-size: .76rem; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--rule); border-radius: 6px; padding: .4rem .65rem; }

/* ---------- SQL viewer ---------- */
.sql-box { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.sql-bar { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border-bottom: 1px solid var(--rule); background: var(--surface-2); flex-wrap: wrap; }
.sql-bar .file { font-family: var(--mono); font-size: .74rem; color: var(--ink-2); }
.sql-bar .spacer { margin-left: auto; }
.sql-code {
  margin: 0; padding: 1.1rem 1.25rem; max-height: 460px; overflow: auto;
  font-family: var(--mono); font-size: .76rem; line-height: 1.75; color: var(--ink-2);
  white-space: pre; tab-size: 2;
}
.sql-code .k { color: var(--brand); font-weight: 700; }
.sql-code .s { color: var(--signal); }
.sql-code .c { color: var(--ink-3); font-style: italic; }
.sql-code .n { color: var(--s3); }

/* ---------- dataset inspector (signature) ---------- */
.ds-list { display: grid; gap: .7rem; }

.ds {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  overflow: hidden; transition: border-color .18s, box-shadow .18s;
}
.ds:hover { border-color: var(--rule-strong); }
.ds.open { border-color: var(--brand-line); box-shadow: var(--shadow-md); }

.ds-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center;
  padding: .85rem 1.1rem; width: 100%; text-align: left;
  background: transparent; border: 0; cursor: pointer; font-family: inherit; color: inherit;
}
.ds-row:hover { background: var(--surface-2); }
.ds-main { min-width: 0; }
.ds-name { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.ds-name b { font-family: var(--mono); font-size: .85rem; font-weight: 500; color: var(--ink); }
.ds-row p { margin: .25rem 0 0; font-size: .82rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.ds-facts { display: flex; gap: 1.1rem; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); white-space: nowrap; }
.ds-facts b { color: var(--ink-2); font-weight: 500; }
@media (max-width: 720px) { .ds-facts { display: none; } }
.ds-acts { display: flex; align-items: center; gap: .4rem; }
.ds-caret { transition: transform .2s; color: var(--ink-3); font-size: .7rem; }
.ds.open .ds-caret { transform: rotate(180deg); }

.ds-body { border-top: 1px solid var(--rule); background: var(--surface-2); padding: 1rem 1.1rem 1.15rem; }
.ds-body h4 { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .55rem; font-weight: 500; }
.ds-cols { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.1rem; }
.ds-col {
  display: inline-flex; align-items: baseline; gap: .4rem;
  font-family: var(--mono); font-size: .71rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: .22rem .5rem;
}
.ds-col em { font-style: normal; color: var(--ink-3); font-size: .62rem; letter-spacing: .04em; }

.ds-preview { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface); }
.ds-preview table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: .7rem; }
.ds-preview th {
  position: sticky; top: 0; text-align: left; padding: .42rem .7rem;
  font-weight: 500; font-size: .61rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.ds-preview td { padding: .38rem .7rem; border-bottom: 1px solid var(--rule); white-space: nowrap; color: var(--ink-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ds-preview tr:last-child td { border-bottom: 0; }

.ds-warn {
  display: flex; align-items: flex-start; gap: .5rem; margin-top: .8rem;
  font-size: .8rem; color: var(--ink-2);
  background: var(--signal-soft); border: 1px solid color-mix(in srgb, var(--signal) 30%, transparent);
  border-radius: var(--radius-sm); padding: .55rem .75rem;
}
.ds-warn b { color: var(--ink); }

/* data page group header */
.dl-group { margin-bottom: 2.4rem; }
.dl-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; margin-bottom: .8rem;
}
.dl-head h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.dl-head p { margin: 0; font-size: .89rem; max-width: 56ch; }
.dl-head .meta { display: flex; gap: 1.2rem; margin-top: .8rem; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); flex-wrap: wrap; }
.dl-head .meta b { color: var(--ink-2); font-weight: 500; }
.dl-actions { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }

.dl-filter { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.dl-filter button {
  padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--surface); color: var(--ink-2);
  font-family: var(--body); font-size: .85rem; cursor: pointer; transition: .18s;
}
.dl-filter button:hover { border-color: var(--brand-line); color: var(--brand); }
.dl-filter button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- dashboard ---------- */
.filters {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .9rem 1.1rem; margin-top: 1.5rem;
}
.filters .fg { display: flex; flex-direction: column; gap: .25rem; }
.filters label { font-family: var(--mono); font-size: .61rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.filters select {
  font-family: var(--body); font-size: .87rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--rule); border-radius: 8px;
  padding: .4rem 2rem .4rem .65rem; cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.filters .status { margin-left: auto; font-family: var(--mono); font-size: .73rem; color: var(--ink-3); }

.seg { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 8px; padding: 2px; }
.seg button {
  flex-shrink: 0;
  border: 0; background: transparent; cursor: pointer; border-radius: 6px;
  padding: .32rem .7rem; font-family: var(--body); font-size: .79rem; color: var(--ink-2); transition: .15s;
}
.seg button.on { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: var(--shadow-sm); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.1rem; }
.grid-11 { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 1.1rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.rank { display: flex; flex-direction: column; gap: .55rem; margin-top: 1rem; }
.rank div { display: grid; grid-template-columns: 10px 1fr auto; gap: .6rem; align-items: center; font-size: .85rem; }
.rank i { width: 10px; height: 10px; border-radius: 3px; }
.rank b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .82rem; }

.dtable { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.dtable table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.dtable th {
  text-align: left; padding: .6rem .85rem; white-space: nowrap;
  font-family: var(--mono); font-size: .63rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--rule);
}
.dtable td { padding: .55rem .85rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover { background: var(--surface-2); }
.dtable .n { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.dtable .lbl { font-family: var(--mono); color: var(--ink); }

.funnel-step { display: grid; grid-template-columns: 96px 1fr; gap: .8rem; align-items: center; margin-bottom: .5rem; }
.funnel-step span { font-size: .81rem; color: var(--ink-2); }
.funnel-bar { position: relative; height: 34px; background: var(--surface-2); border-radius: 6px; overflow: hidden; border: 1px solid var(--rule); }
.funnel-bar i { position: absolute; inset: 0 auto 0 0; background: var(--brand); border-radius: 5px 0 0 5px; transition: width .5s var(--ease); }
.funnel-bar b { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: .76rem; color: var(--ink); }

.opp { display: flex; flex-direction: column; gap: .6rem; }
.opp div { border: 1px solid var(--rule); border-left: 3px solid var(--signal); border-radius: var(--radius-sm); padding: .7rem .9rem; background: var(--surface-2); }
.opp small { font-family: var(--mono); font-size: .68rem; color: var(--ink-3); display: block; }
.opp b { font-size: .92rem; }

.heat { display: grid; gap: 2px; overflow-x: auto; }
.heat-row { display: grid; grid-template-columns: 42px repeat(24, minmax(11px, 1fr)); gap: 2px; align-items: center; }
.heat-row span { font-family: var(--mono); font-size: .62rem; color: var(--ink-3); }
.heat-cell { aspect-ratio: 1; border-radius: 2px; background: var(--brand); }

.cohort { overflow-x: auto; }
.cohort table { border-collapse: separate; border-spacing: 2px; font-family: var(--mono); font-size: .68rem; }
.cohort th { color: var(--ink-3); font-weight: 500; padding: .25rem .4rem; white-space: nowrap; }
.cohort td { text-align: center; padding: .35rem .45rem; border-radius: 3px; color: var(--ink); min-width: 38px; }

.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.insight { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.insight .eyebrow { color: var(--signal); margin-bottom: .5rem; }
.insight h3 { margin-bottom: .5rem; }
.insight p { font-size: .88rem; margin: 0; }

.checks { display: flex; flex-direction: column; gap: .55rem; }
.check { display: grid; grid-template-columns: 18px 1fr auto; gap: .7rem; align-items: center; font-size: .86rem; }
.check i { width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--pos) 15%, transparent); color: var(--pos); display: grid; place-items: center; font-size: .62rem; font-style: normal; }
.check b { font-family: var(--mono); font-size: .78rem; color: var(--ink-2); }

.pipeline { display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.pipeline div { flex: 1 1 120px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .7rem .8rem; }
.pipeline small { font-family: var(--mono); font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); display: block; }
.pipeline b { display: block; font-size: .92rem; margin-top: .15rem; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 2rem; } }
.about-grid p { font-size: 1rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; }
.step { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.05rem 1.15rem; }
.step .eyebrow { color: var(--brand); margin-bottom: .4rem; }
.step h3 { font-size: 1rem; margin-bottom: .35rem; }
.step p { font-size: .86rem; margin: 0; }

.skill-list { display: grid; gap: 1.1rem; }
.skill { }
.skill-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem; }
.skill-top b { font-size: .92rem; font-weight: 600; }
.skill-top span { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }
.skill-bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.skill-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .8s var(--ease); }

.contact-card {
  background: var(--ink); color: var(--ground); border-radius: var(--radius-lg);
  padding: 2.4rem 2.6rem; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem; align-items: center; margin-top: 3.6rem;
}
@media (max-width: 820px) { .contact-card { grid-template-columns: 1fr; padding: 1.8rem; gap: 1.6rem; } }
.contact-card h2 { color: #fff; margin-bottom: .8rem; }
.contact-card p { color: color-mix(in srgb, var(--ground) 72%, transparent); margin: 0; }
.contact-card .eyebrow { color: var(--signal); }
.contact-links { display: flex; flex-direction: column; gap: .7rem; }
.contact-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px; padding: .8rem 1rem; color: #fff; transition: .18s;
}
.contact-links a:hover { background: rgba(255, 255, 255, .13); text-decoration: none; transform: translateX(2px); }
.contact-links small { font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; opacity: .6; display: block; }
.contact-links b { font-size: .93rem; font-weight: 600; }

/* ---------- command palette ---------- */
.palette-scrim {
  position: fixed; inset: 0; z-index: 400;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  backdrop-filter: blur(3px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 1.25rem 2rem;
  animation: fadeIn .16s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.palette {
  width: min(100%, 580px);
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: popIn .2s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.palette input {
  width: 100%; border: 0; border-bottom: 1px solid var(--rule);
  padding: 1rem 1.15rem; font-family: var(--body); font-size: 1rem;
  background: transparent; color: var(--ink);
}
.palette input:focus { outline: none; }
.palette-list { max-height: 46vh; overflow-y: auto; padding: .4rem; }
.palette-item {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  padding: .6rem .75rem; border-radius: 8px; border: 0; background: transparent;
  cursor: pointer; text-align: left; font-family: inherit; color: var(--ink);
}
.palette-item:hover, .palette-item.sel { background: var(--brand-soft); }
.palette-item .pi-kind {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--rule); border-radius: 4px; padding: .12rem .35rem; flex-shrink: 0;
}
.palette-item .pi-main { min-width: 0; flex: 1; }
.palette-item b { display: block; font-size: .89rem; font-weight: 500; }
.palette-item small { display: block; font-size: .76rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-foot {
  display: flex; gap: 1rem; padding: .55rem .9rem; border-top: 1px solid var(--rule);
  background: var(--surface-2); font-family: var(--mono); font-size: .65rem; color: var(--ink-3);
}
.palette-empty { padding: 1.6rem 1rem; text-align: center; color: var(--ink-3); font-size: .9rem; }

/* ---------- mobile drawer ---------- */
.drawer {
  position: fixed; inset: var(--header-h) 0 0; z-index: 80;
  background: var(--ground); padding: 1.5rem 1.5rem 2rem;
  display: flex; flex-direction: column; gap: .3rem;
  animation: pageIn .2s var(--ease);
  overflow-y: auto;
}
.drawer a {
  display: flex; align-items: center; justify-content: space-between;
  padding: .95rem .4rem; border-bottom: 1px solid var(--rule);
  font-family: var(--display); font-size: 1.35rem; color: var(--ink); letter-spacing: -.02em;
}
.drawer a:hover, .drawer a[aria-current='page'] { color: var(--brand); text-decoration: none; }
.drawer a span { font-family: var(--mono); font-size: .68rem; color: var(--ink-3); }
.drawer .btn { margin-top: 1.4rem; justify-content: center; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule); background: var(--surface);
  margin-top: 4rem; padding: 2.4rem 0 2rem;
}
.foot-in { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 780px) { .foot-in { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.foot h4 { font-family: var(--mono); font-size: .63rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .8rem; font-weight: 500; }
.foot-links { display: flex; flex-direction: column; gap: .45rem; }
.foot-links a { font-size: .88rem; color: var(--ink-2); }
.foot-links a:hover { color: var(--brand); }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: .7rem; color: var(--ink-3);
}
.foot p { font-size: .88rem; }

/* ---------- loading / empty ---------- */
.loader { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 5rem 1rem; }
.loader-bars { display: flex; gap: 4px; align-items: flex-end; height: 28px; }
.loader-bars i { width: 6px; background: var(--brand); border-radius: 2px; animation: bounce 1.1s infinite ease-in-out; }
.loader-bars i:nth-child(1) { height: 40%; animation-delay: 0s; }
.loader-bars i:nth-child(2) { height: 75%; animation-delay: .12s; }
.loader-bars i:nth-child(3) { height: 100%; animation-delay: .24s; }
.loader-bars i:nth-child(4) { height: 60%; animation-delay: .36s; }
@keyframes bounce { 0%, 100% { transform: scaleY(.45); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }
.loader p { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); margin: 0; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive header ---------- */
@media (max-width: 900px) {
  .mast-nav { display: none; }
  .kbd-btn { display: none; }
  .mast-tools { margin-left: auto; }
  .mast-tools .btn { display: none; }
  .mast-burger {
    display: grid; place-items: center;
    width: 34px; height: 34px; border: 1px solid var(--rule); border-radius: 9px;
    background: var(--surface); cursor: pointer; gap: 4px;
  }
  .mast-burger i { display: block; width: 15px; height: 1.5px; background: var(--ink); transition: .22s; }
  .mast-burger.on i:nth-child(1) { transform: translateY(2.75px) rotate(45deg); }
  .mast-burger.on i:nth-child(2) { transform: translateY(-2.75px) rotate(-45deg); }
  .mast-name small { display: none; }
}
@media (min-width: 901px) { .drawer { display: none !important; } }

/* touch: keep every control comfortably tappable */
@media (max-width: 900px) {
  .btn-sm { min-height: 42px; padding: .6rem 1rem; }
  .rail button { min-height: 40px; padding: .5rem 1rem; }
  .dl-filter button { min-height: 42px; }
  .seg button { min-height: 38px; padding: .5rem .9rem; }
  .mast-burger { width: 40px; height: 40px; }
  .ds-row { padding: 1rem 1.1rem; }
  .ds-acts { gap: .6rem; }
  .grid-11 { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 1.15rem 1.1rem 1.25rem; }
}

@media (max-width: 560px) {
  .hero-stats { gap: 1.4rem; }
  .proj-metrics { grid-template-columns: 1fr 1fr; }
  .page { padding: 2rem 0 3rem; }
  .contact-card { padding: 1.5rem; }
}


/* ==========================================================================
   Portfolio v3 — editorial analytics studio
   Inspired by clean dashboard presentations: warm paper, deep emerald,
   generous spacing, and product-style data interfaces.
   ========================================================================== */

body {
  background:
    radial-gradient(circle at 10% -10%, color-mix(in srgb, var(--signal-soft) 58%, transparent), transparent 29rem),
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--brand-soft) 70%, transparent), transparent 34rem),
    var(--ground);
}

.masthead { height: 72px; background: color-mix(in srgb, var(--ground) 91%, transparent); }
.monogram { background: var(--brand); border-radius: 50%; }
.mast-name small { letter-spacing: .075em; }
.mast-nav a { padding: .48rem .78rem; }
.btn { border-radius: 999px; padding-inline: 1.18rem; }
.btn-sm { border-radius: 999px; }

.portfolio-hero { padding: 4.2rem 0 4.5rem; overflow: hidden; }
.hero-shell { display: grid; grid-template-columns: minmax(0, .78fr) minmax(620px, 1.22fr); gap: 3.5rem; align-items: center; }
.hero-copy-block { position: relative; z-index: 2; }
.availability-line { display: inline-flex; align-items: center; gap: .55rem; padding: .42rem .72rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; font-family: var(--mono); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.availability-line span { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 5px color-mix(in srgb, var(--pos) 12%, transparent); }
.role-line { margin: 1.35rem 0 .45rem; color: var(--brand); font-weight: 700; letter-spacing: .025em; font-size: .82rem; text-transform: uppercase; }
.hero-copy-block h1 { max-width: 8.6ch; font-size: clamp(3.25rem, 5.3vw, 5.5rem); line-height: .96; letter-spacing: -.055em; margin-bottom: 1.35rem; }
.hero-lede { max-width: 58ch; font-size: 1.08rem; line-height: 1.7; margin-bottom: 1.7rem; }
.hero-proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-top: 1.2rem; }
.hero-proof div { min-width: 0; }
.hero-proof b { display: block; font-family: var(--display); font-size: 1.55rem; letter-spacing: -.04em; }
.hero-proof span { display: block; font-size: .72rem; color: var(--ink-3); line-height: 1.35; }

.hero-product { position: relative; min-width: 0; }
.product-window { background: var(--surface); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--rule)); border-radius: 25px; overflow: hidden; box-shadow: 0 34px 90px -45px color-mix(in srgb, var(--brand) 65%, transparent); transform: perspective(1400px) rotateY(-2.8deg) rotateX(1deg); transform-origin: left center; }
.product-topbar { height: 54px; display: grid; grid-template-columns: 180px 1fr 34px; gap: .85rem; align-items: center; padding: 0 1rem; border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--surface) 88%, var(--brand-soft)); }
.product-logo { display: flex; align-items: center; gap: .55rem; font-size: .77rem; }
.product-logo span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: var(--brand); color: #fff; font-family: var(--mono); font-size: .6rem; font-weight: 700; }
.product-search { height: 30px; display: flex; align-items: center; padding: 0 .8rem; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink-3); font-size: .68rem; background: var(--surface); }
.product-user { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--signal-soft); color: var(--brand); font-weight: 700; font-size: .72rem; }
.product-body { display: grid; grid-template-columns: 145px 1fr; min-height: 520px; }
.product-sidebar { background: var(--brand); color: white; padding: 1.25rem .85rem; display: flex; flex-direction: column; gap: .25rem; }
.product-sidebar strong { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; opacity: .55; margin: 0 .55rem .7rem; }
.product-sidebar a { color: rgba(255,255,255,.7); font-size: .68rem; padding: .55rem .6rem; border-radius: 7px; }
.product-sidebar a:hover, .product-sidebar a.on { text-decoration: none; color: #fff; background: rgba(255,255,255,.12); }
.sidebar-foot { margin-top: auto; font-size: .57rem; display: flex; align-items: center; gap: .4rem; opacity: .7; padding: .6rem; border-top: 1px solid rgba(255,255,255,.14); }
.sidebar-foot span { width: 6px; height: 6px; border-radius: 50%; background: #82e2bc; }
.product-main { padding: 1.25rem; background: var(--surface); min-width: 0; }
.product-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .9rem; }
.product-heading small, .chart-title small { display: block; color: var(--ink-3); font-size: .56rem; text-transform: uppercase; letter-spacing: .08em; }
.product-heading h2 { font-size: 1.18rem; margin-top: .18rem; }
.product-heading > span { font-size: .56rem; color: var(--ink-3); border: 1px solid var(--rule); padding: .3rem .5rem; border-radius: 999px; }
.product-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.product-kpis > div { padding: .75rem; border: 1px solid var(--rule); border-radius: 9px; background: var(--surface-2); }
.product-kpis small { display: block; color: var(--ink-3); font-size: .55rem; }
.product-kpis b { display: block; font-size: .88rem; margin: .16rem 0; }
.product-kpis em { display: block; color: var(--pos); font-style: normal; font-size: .5rem; }
.product-charts { display: grid; grid-template-columns: 1.45fr .8fr; gap: .6rem; margin-top: .6rem; }
.product-chart { min-width: 0; height: 196px; padding: .75rem; border: 1px solid var(--rule); border-radius: 9px; background: var(--surface); }
.chart-title { display: flex; justify-content: space-between; align-items: flex-start; }
.chart-title b { display: block; font-size: .68rem; }
.chart-title > span { font-size: .5rem; color: var(--ink-3); }
.hero-lines { position: relative; height: 105px; margin-top: .85rem; background: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, var(--rule) 26px); }
.hero-lines svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-lines svg:nth-child(2) { opacity: .8; transform: translateY(7px); }
.hero-legend { display: flex; gap: .85rem; font-size: .5rem; color: var(--ink-3); }
.hero-legend span { display: flex; align-items: center; gap: .3rem; }
.hero-legend i { width: 14px; height: 2px; background: var(--brand); }
.hero-legend span:nth-child(2) i { background: var(--signal); }
.mini-bars { display: flex; align-items: flex-end; justify-content: space-around; gap: .35rem; height: 128px; padding-top: .6rem; border-bottom: 1px solid var(--rule); }
.mini-bars > span { flex: 1; max-width: 20px; min-height: 20px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--brand) 78%, white); position: relative; }
.mini-bars > span:nth-child(even) { background: color-mix(in srgb, var(--signal) 74%, white); }
.mini-bars i { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .46rem; color: var(--ink-3); }
.product-bottom { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .6rem; }
.ring-card { border: 1px solid var(--rule); border-radius: 9px; padding: .65rem; display: flex; align-items: center; gap: .55rem; }
.metric-ring { --p: 70; width: 45px; height: 45px; flex: 0 0 45px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.metric-ring::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.metric-ring b { position: relative; z-index: 1; font-size: .58rem; }
.ring-card > div b { display: block; font-size: .58rem; }
.ring-card > div small { display: block; font-size: .45rem; color: var(--ink-3); }
.floating-card { position: absolute; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .75rem .9rem; z-index: 3; }
.floating-card > span { display: block; font-family: var(--mono); font-size: .48rem; letter-spacing: .1em; color: var(--pos); }
.floating-card > b { display: block; font-size: .7rem; margin: .18rem 0; }
.floating-card > small { display: block; font-size: .5rem; color: var(--ink-3); }
.floating-sql { left: -28px; bottom: 39px; }
.floating-model { right: -22px; top: 120px; }
.floating-model div { display: flex; gap: 3px; margin: .45rem 0; }
.floating-model i { width: 24px; height: 14px; border-radius: 3px; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.floating-model i:nth-child(2) { transform: translateY(10px); }
.floating-model i:nth-child(3) { transform: translateY(3px); }

.capability-strip { overflow: hidden; background: var(--brand); color: white; border-block: 1px solid color-mix(in srgb, var(--brand) 80%, black); }
.capability-track { min-width: max-content; display: flex; align-items: center; gap: 2.25rem; padding: .78rem 0; animation: capability-marquee 28s linear infinite; }
.capability-track span { display: flex; align-items: center; gap: 2.25rem; font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; opacity: .86; }
.capability-track span::after { content: '◆'; font-size: .42rem; color: var(--signal); }
@keyframes capability-marquee { to { transform: translateX(-50%); } }

.portfolio-page { padding-top: 4.5rem; }
.showcase-section { padding: 0 0 5rem; }
.showcase-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; margin-bottom: 1.7rem; }
.showcase-heading > div { max-width: 780px; }
.section-number { display: block; margin-bottom: .6rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.showcase-heading h2 { font-size: clamp(2rem, 3.5vw, 3.3rem); max-width: 18ch; margin-bottom: .7rem; }
.showcase-heading p { max-width: 66ch; margin: 0; }
.project-tabs { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.project-tabs button { border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: .48rem .8rem; font: 500 .78rem var(--body); cursor: pointer; transition: .18s; }
.project-tabs button:hover, .project-tabs button.on { background: var(--brand); border-color: var(--brand); color: white; }
.portfolio-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.portfolio-project-card { padding: 0; overflow: hidden; background: var(--surface); border-radius: 17px; box-shadow: 0 18px 48px -40px rgba(16,35,31,.75); }
.portfolio-project-card[hidden] { display: none; }
.project-cover { min-height: 280px; padding: 1.1rem; background: color-mix(in srgb, var(--accent) 11%, var(--surface-2)); border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; }
.project-cover::before { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); right: -70px; top: -110px; }
.project-cover-top { position: relative; z-index: 1; display: flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.project-cover-top > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--accent); }
.project-cover-top > i { margin-left: auto; font-style: normal; padding: .25rem .45rem; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--rule)); border-radius: 999px; }
.project-cover-dashboard { width: 84%; height: 205px; margin: 1rem auto -3.5rem; display: grid; grid-template-columns: 62px 1fr; border-radius: 12px 12px 0 0; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--rule)); box-shadow: 0 22px 35px -25px color-mix(in srgb, var(--accent) 70%, transparent); overflow: hidden; transform: perspective(900px) rotateX(2deg); }
.cover-sidebar { background: var(--accent); padding: 1rem .65rem; display: flex; flex-direction: column; gap: .55rem; }
.cover-sidebar i { height: 7px; border-radius: 4px; background: rgba(255,255,255,.32); }
.cover-sidebar i:first-child { width: 72%; background: white; }
.cover-main { padding: .85rem; min-width: 0; }
.cover-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: .35rem; }
.cover-kpis span { height: 35px; border: 1px solid var(--rule); border-radius: 5px; background: var(--surface-2); }
.cover-graph { position: relative; height: 70px; margin-top: .55rem; border: 1px solid var(--rule); border-radius: 5px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 20px, var(--rule) 21px); overflow: hidden; }
.cover-graph svg { width: 100%; height: 100%; }
.cover-bars { height: 47px; display: flex; align-items: flex-end; gap: .32rem; padding: .5rem .4rem 0; }
.cover-bars i { flex: 1; min-height: 10px; background: color-mix(in srgb, var(--accent) 76%, white); border-radius: 3px 3px 0 0; }
.project-card-body { padding: 1.35rem 1.4rem 1.45rem; }
.portfolio-project-card .proj-top { margin-bottom: .7rem; }
.portfolio-project-card .proj-idx { color: var(--accent); }
.portfolio-project-card h3 { font-size: 1.45rem; margin-bottom: .55rem; }
.portfolio-project-card p { min-height: 3.9em; }
.portfolio-project-card .proj-metrics { margin-top: 1rem; }
.portfolio-project-card .proj-foot { border-top: 1px solid var(--rule); padding-top: 1rem; }

.database-stage { display: grid; grid-template-columns: minmax(0, .82fr) minmax(560px, 1.18fr); background: var(--brand); color: white; border-radius: 22px; overflow: hidden; box-shadow: 0 32px 70px -45px rgba(5,38,33,.8); }
.database-copy { padding: 2.5rem; }
.database-kicker { font-family: var(--mono); font-size: .61rem; letter-spacing: .13em; color: var(--signal); }
.database-copy h3 { color: white; font-size: clamp(2rem, 3.3vw, 3rem); margin: .7rem 0 1rem; max-width: 13ch; }
.database-copy > p { color: rgba(255,255,255,.7); }
.database-capabilities { display: grid; gap: .75rem; margin-top: 1.6rem; }
.database-capabilities > div { display: grid; grid-template-columns: 30px 1fr; column-gap: .75rem; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.15); }
.database-capabilities span { grid-row: 1 / 3; font-family: var(--mono); color: var(--signal); font-size: .62rem; }
.database-capabilities b { font-size: .86rem; }
.database-capabilities small { color: rgba(255,255,255,.58); font-size: .72rem; line-height: 1.45; }
.database-workspace { margin: 2.1rem 2.1rem 2.1rem 0; border-radius: 15px; overflow: hidden; background: #101b19; border: 1px solid rgba(255,255,255,.15); box-shadow: 0 24px 55px -30px black; min-width: 0; }
.db-window-bar { height: 44px; display: flex; align-items: center; gap: .8rem; padding: 0 .9rem; background: #172522; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .65rem; }
.db-window-bar > span { display: flex; gap: 5px; }
.db-window-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); }
.db-window-bar b { color: rgba(255,255,255,.8); }
.db-window-bar em { margin-left: auto; font-style: normal; color: rgba(255,255,255,.45); }
.db-workspace-body { display: grid; grid-template-columns: 130px 1fr; min-height: 420px; }
.db-workspace-body aside { padding: 1rem .8rem; border-right: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: .45rem; font-size: .61rem; color: rgba(255,255,255,.55); }
.db-workspace-body aside small { color: rgba(255,255,255,.32); letter-spacing: .12em; }
.db-workspace-body aside b { color: white; margin-bottom: .25rem; }
.db-editor { min-width: 0; display: flex; flex-direction: column; }
.db-editor pre { margin: 0; padding: 1.1rem; min-height: 250px; overflow: auto; color: #d6e1dc; font: .67rem/1.65 var(--mono); }
.db-editor pre .k { color: #81c7b5; }
.db-editor pre .s { color: #e5bd82; }
.db-editor pre .c { color: #70857f; }
.query-status { display: flex; justify-content: space-between; padding: .55rem .8rem; background: #14231f; border-block: 1px solid rgba(255,255,255,.1); font-size: .56rem; color: rgba(255,255,255,.5); }
.query-status span { color: #7ad2b1; }
.query-result { overflow-x: auto; }
.query-result table { width: 100%; border-collapse: collapse; font: .55rem var(--mono); }
.query-result th, .query-result td { padding: .55rem .65rem; border-right: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; white-space: nowrap; }
.query-result th { color: rgba(255,255,255,.42); font-weight: 500; }
.query-result td { color: rgba(255,255,255,.72); }

.dashboard-feature { display: grid; grid-template-columns: minmax(0,.8fr) minmax(560px,1.2fr); gap: 2rem; align-items: center; padding: 2.2rem; border: 1px solid var(--rule); background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-md); }
.dashboard-feature-copy h3 { font-size: 2.2rem; max-width: 13ch; margin: .55rem 0 .85rem; }
.dashboard-feature-copy > p { max-width: 55ch; }
.feature-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 1.25rem 0; }
.feature-metrics div { border: 1px solid var(--rule); border-radius: 10px; padding: .7rem; background: var(--surface-2); }
.feature-metrics small, .feature-metrics span { display: block; font-size: .58rem; color: var(--ink-3); }
.feature-metrics b { display: block; font-size: 1rem; margin: .1rem 0; }
.dashboard-feature-chart { padding: 1.4rem; border-radius: 15px; background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); border: 1px solid var(--brand-line); min-width: 0; }
.feature-chart-head { display: flex; justify-content: space-between; }
.feature-chart-head small { display: block; font-size: .64rem; color: var(--ink-3); }
.feature-chart-head b { display: block; }
.feature-chart-head > span { font-size: .62rem; color: var(--ink-3); }
.feature-bars { height: 280px; display: grid; grid-template-columns: repeat(12, 1fr); gap: .45rem; align-items: end; padding-top: 2rem; border-bottom: 1px solid var(--rule); background: repeating-linear-gradient(to bottom, transparent 0, transparent 62px, var(--rule) 63px); }
.feature-bars > div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .4rem; }
.feature-bars span { width: 78%; min-height: 12px; border-radius: 5px 5px 0 0; background: var(--brand); transition: height .4s var(--ease); }
.feature-bars > div:nth-child(3n) span { background: color-mix(in srgb, var(--brand) 72%, var(--signal)); }
.feature-bars small { font-size: .48rem; color: var(--ink-3); }
.feature-chart-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; margin-top: 1rem; }
.feature-chart-summary div { padding-right: .5rem; border-right: 1px solid var(--rule); }
.feature-chart-summary div:last-child { border: 0; }
.feature-chart-summary small { display: block; color: var(--ink-3); font-size: .56rem; }
.feature-chart-summary b { display: block; font-size: .76rem; }

/* SQL page */
.sql-page-hero { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(420px,.9fr); gap: 3rem; align-items: end; padding: 2rem 0 3.5rem; }
.sql-page-hero h1 { max-width: 13ch; font-size: clamp(3rem, 5.3vw, 5rem); }
.sql-page-hero .lede { margin-top: 1.2rem; }
.sql-hero-stats { display: grid; grid-template-columns: repeat(2,1fr); border: 1px solid var(--rule); background: var(--surface); border-radius: 16px; overflow: hidden; }
.sql-hero-stats > div { padding: 1.15rem; min-height: 125px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sql-hero-stats > div:nth-child(2n) { border-right: 0; }
.sql-hero-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
.sql-hero-stats small, .sql-hero-stats span { display: block; color: var(--ink-3); font-size: .65rem; }
.sql-hero-stats b { display: block; font-size: 2rem; margin: .2rem 0; }
.compact-heading { grid-template-columns: 1fr; align-items: start; }
.compact-heading h2 { max-width: 22ch; }
.sql-capability-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: .8rem; }
.sql-capability-grid article { min-height: 250px; padding: 1.25rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; }
.sql-capability-grid article > span { font-family: var(--mono); color: var(--signal); font-size: .66rem; }
.sql-capability-grid h3 { margin-top: auto; margin-bottom: .55rem; font-size: 1.25rem; }
.sql-capability-grid p { font-size: .86rem; margin: 0; }
.sql-lab { display: grid; grid-template-columns: 260px minmax(0,1fr); min-height: 650px; border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-md); }
.sql-lab-nav { padding: 1.1rem .8rem; background: var(--brand); color: white; }
.sql-lab-nav > small { display: block; margin: .2rem .65rem .8rem; color: rgba(255,255,255,.45); font: .6rem var(--mono); letter-spacing: .1em; }
.sql-lab-nav button, .sql-lab-nav a { width: 100%; display: grid; grid-template-columns: 25px 1fr; gap: .6rem; padding: .7rem .65rem; border: 0; border-radius: 9px; background: transparent; color: rgba(255,255,255,.68); text-align: left; cursor: pointer; font-family: var(--body); }
.sql-lab-nav button:hover, .sql-lab-nav button.on, .sql-lab-nav a:hover { background: rgba(255,255,255,.12); color: white; text-decoration: none; }
.sql-lab-nav button > span, .sql-lab-nav a > span { font-family: var(--mono); font-size: .56rem; color: var(--signal); padding-top: .12rem; }
.sql-lab-nav b { display: block; font-size: .76rem; }
.sql-lab-nav div small { display: block; font-size: .57rem; opacity: .6; }
.sql-lab-main { min-width: 0; padding: 1.2rem; }
.sql-lab-context { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: .75rem; padding: .25rem .2rem; }
.sql-lab-context small { display: block; font: .58rem var(--mono); color: var(--ink-3); letter-spacing: .1em; }
.sql-lab-context b { display: block; font-size: 1rem; }
.sql-lab-context > span { font-size: .68rem; color: var(--ink-3); }
.sql-lab .sql-box { height: 570px; margin: 0; }
.sql-lab .sql-code { max-height: 520px; height: calc(100% - 48px); }
.schema-gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.schema-card { padding: 1.25rem; border: 1px solid var(--rule); border-top: 4px solid var(--accent); border-radius: 15px; background: var(--surface); }
.schema-card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.schema-card-head > div { display: flex; align-items: center; gap: .65rem; }
.schema-card-head span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: white; font: .58rem var(--mono); }
.schema-card-head h3 { font-size: 1.15rem; }
.schema-card-head > b { font-size: .65rem; color: var(--ink-3); }
.schema-tables { display: grid; gap: .45rem; }
.schema-tables > div { display: grid; grid-template-columns: 30px 1fr; gap: .65rem; align-items: start; padding: .65rem; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 8px; }
.schema-tables i { display: grid; place-items: center; height: 24px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--accent); font: 700 .52rem var(--mono); font-style: normal; }
.schema-tables b, .schema-tables small { display: block; }
.schema-tables b { font: .7rem var(--mono); }
.schema-tables small { margin-top: .14rem; font-size: .6rem; color: var(--ink-3); line-height: 1.4; }
.schema-rel { margin: .85rem 0; padding: .75rem; border-left: 2px solid var(--accent); }
.schema-rel small { display: block; color: var(--ink-3); font: .55rem var(--mono); letter-spacing: .1em; }
.schema-rel span { display: block; font-size: .68rem; margin-top: .2rem; }
.schema-card > a { font-size: .75rem; font-weight: 700; }
.engineering-flow { display: grid; grid-template-columns: repeat(6,1fr); gap: .55rem; }
.engineering-flow > div { min-height: 215px; padding: 1rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); position: relative; }
.engineering-flow > div:not(:last-child)::after { content: '→'; position: absolute; right: -.55rem; top: 28px; z-index: 2; color: var(--signal); }
.engineering-flow span { font: .61rem var(--mono); color: var(--signal); }
.engineering-flow b { display: block; margin-top: 4rem; }
.engineering-flow p { font-size: .76rem; margin-top: .4rem; }

/* About page */
.about-hero { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(420px,.8fr); gap: 4rem; padding: 2rem 0 3.5rem; border-bottom: 1px solid var(--rule); }
.about-hero h1 { font-size: clamp(3rem, 5vw, 4.8rem); max-width: 15ch; }
.about-intro p { font-size: 1rem; }
.proof-skill-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: .7rem; }
.proof-skill-grid article { min-height: 270px; display: flex; flex-direction: column; padding: 1.1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 13px; }
.proof-skill-grid article > div { display: flex; justify-content: space-between; font: .58rem var(--mono); color: var(--ink-3); }
.proof-skill-grid article > div b { color: var(--brand); }
.proof-skill-grid h3 { margin-top: auto; margin-bottom: .55rem; }
.proof-skill-grid p { font-size: .78rem; margin: 0; }
.tool-cloud { display: flex; flex-wrap: wrap; gap: .55rem; }
.tool-cloud span { padding: .65rem .9rem; border: 1px solid var(--rule); background: var(--surface); border-radius: 999px; font-size: .8rem; font-weight: 600; }
.domain-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; }
.domain-grid a { min-height: 220px; display: flex; flex-direction: column; padding: 1.15rem; border: 1px solid var(--rule); background: var(--surface); border-radius: 13px; color: var(--ink); }
.domain-grid a:hover { text-decoration: none; border-color: var(--brand-line); transform: translateY(-3px); }
.domain-grid span { font: .6rem var(--mono); color: var(--signal); }
.domain-grid h3 { margin-top: auto; font-size: 1.2rem; }
.domain-grid b { margin-top: .5rem; color: var(--brand); }
.domain-grid small { color: var(--ink-3); font-size: .66rem; margin-top: .2rem; }

/* Keep legacy pages visually consistent with the new system. */
.page-head h1, .detail-head h1, .dash-head h1 { font-size: clamp(3rem, 5vw, 4.8rem); }
.panel, .kpi, .proj-card, .step, .insight { background: var(--surface); }
.contact-card { background: var(--brand); }
.contact-card .eyebrow { color: var(--signal); }

@media (max-width: 1120px) {
  .hero-shell { grid-template-columns: 1fr; }
  .hero-copy-block { max-width: 760px; }
  .hero-copy-block h1 { max-width: 11ch; }
  .hero-product { max-width: 850px; margin-inline: auto; }
  .database-stage, .dashboard-feature { grid-template-columns: 1fr; }
  .database-workspace { margin: 0 2rem 2rem; }
  .sql-capability-grid { grid-template-columns: repeat(2,1fr); }
  .engineering-flow { grid-template-columns: repeat(3,1fr); }
  .proof-skill-grid { grid-template-columns: repeat(3,1fr); }
  .domain-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 820px) {
  .portfolio-hero { padding-top: 2.5rem; }
  .hero-copy-block h1 { font-size: clamp(3rem, 14vw, 4.5rem); }
  .hero-proof { grid-template-columns: repeat(3,1fr); }
  .hero-product { margin-top: 1rem; }
  .product-window { transform: none; border-radius: 18px; }
  .product-body { grid-template-columns: 85px 1fr; min-height: 470px; }
  .product-sidebar { padding-inline: .45rem; }
  .product-sidebar strong, .product-sidebar a { font-size: 0; }
  .product-sidebar a::before { content: '•'; font-size: 1rem; }
  .product-sidebar a.on::before { content: '●'; }
  .product-topbar { grid-template-columns: 150px 1fr 30px; }
  .product-kpis { grid-template-columns: 1fr 1fr; }
  .product-kpis > div:last-child { display: none; }
  .product-charts { grid-template-columns: 1fr; }
  .product-chart:not(.product-chart-large) { display: none; }
  .product-bottom { grid-template-columns: 1fr 1fr; }
  .product-bottom > div:last-child { display: none; }
  .floating-model { display: none; }
  .floating-sql { left: 10px; bottom: -24px; }
  .showcase-heading { grid-template-columns: 1fr; align-items: start; }
  .portfolio-project-grid { grid-template-columns: 1fr; }
  .database-stage { border-radius: 16px; }
  .database-copy { padding: 1.5rem; }
  .database-workspace { margin: 0 1rem 1rem; }
  .db-workspace-body { grid-template-columns: 95px 1fr; }
  .dashboard-feature { padding: 1.25rem; }
  .feature-bars { height: 220px; gap: .25rem; }
  .sql-page-hero, .about-hero { grid-template-columns: 1fr; gap: 2rem; }
  .sql-lab { grid-template-columns: 1fr; }
  .sql-lab-nav { display: flex; overflow-x: auto; gap: .35rem; }
  .sql-lab-nav > small { display: none; }
  .sql-lab-nav button, .sql-lab-nav a { min-width: 180px; }
  .schema-gallery { grid-template-columns: 1fr; }
  .engineering-flow { grid-template-columns: repeat(2,1fr); }
  .proof-skill-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 560px) {
  .mast-name small { display: none; }
  .portfolio-hero { padding-bottom: 3.5rem; }
  .hero-lede { font-size: 1rem; }
  .hero-proof { grid-template-columns: 1fr; gap: .65rem; }
  .hero-proof div { display: grid; grid-template-columns: 80px 1fr; align-items: center; }
  .hero-proof b { font-size: 1.25rem; }
  .product-window { min-width: 610px; transform: scale(.58); transform-origin: left top; }
  .hero-product { height: 360px; overflow: hidden; margin-right: -1rem; }
  .floating-card { display: none; }
  .showcase-section { padding-bottom: 3.7rem; }
  .showcase-heading h2 { font-size: 2.25rem; }
  .project-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; }
  .project-tabs button { flex: 0 0 auto; }
  .project-cover { min-height: 225px; }
  .project-cover-dashboard { width: 94%; height: 180px; }
  .database-workspace { display: none; }
  .dashboard-feature-chart { padding: .75rem; }
  .feature-bars { height: 175px; }
  .feature-chart-summary { grid-template-columns: 1fr; }
  .feature-chart-summary div { border-right: 0; border-bottom: 1px solid var(--rule); padding-bottom: .4rem; }
  .sql-hero-stats { grid-template-columns: 1fr; }
  .sql-hero-stats > div { border-right: 0; }
  .sql-hero-stats > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .sql-hero-stats > div:last-child { border-bottom: 0; }
  .sql-capability-grid, .engineering-flow, .proof-skill-grid, .domain-grid { grid-template-columns: 1fr; }
  .sql-capability-grid article, .proof-skill-grid article { min-height: 210px; }
  .engineering-flow > div { min-height: 175px; }
  .engineering-flow b { margin-top: 2.8rem; }
  .schema-card { padding: .9rem; }
}

.portfolio-project-grid.single { grid-template-columns: minmax(0, 1fr); }
.portfolio-project-grid.single .portfolio-project-card { width: min(100%, 780px); }

/* ========================================================================
   Simplified portfolio experience
   ======================================================================== */

.simplified-project-card .project-card-body {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.simplified-project-card .project-card-body h3 {
  margin: 0;
}

.card-story {
  padding: 1rem 1.05rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, white);
}

.card-story small,
.chart-story small {
  display: block;
  margin-bottom: .42rem;
  color: var(--accent, var(--brand));
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.card-story p {
  margin: 0;
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.6;
}

.simple-detail-head {
  align-items: stretch;
}

.simple-detail-head .q-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.simple-spec-strip {
  grid-template-columns: repeat(4, 1fr);
}

.story-section {
  padding-top: 4rem;
}

.story-summary {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  padding: clamp(1.45rem, 3vw, 2.4rem);
  border: 1px solid var(--rule);
  border-left: 6px solid var(--story-accent, var(--brand));
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--story-accent, var(--brand)) 7%, white), white 60%);
  box-shadow: 0 16px 50px rgba(22, 43, 38, .06);
}

.story-summary::after {
  content: '“';
  position: absolute;
  right: 1.25rem;
  top: -.5rem;
  color: color-mix(in srgb, var(--story-accent, var(--brand)) 12%, transparent);
  font-family: Georgia, serif;
  font-size: 9rem;
  line-height: 1;
  pointer-events: none;
}

.story-summary p {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  line-height: 1.75;
}

.simple-kpis {
  margin-top: 1.1rem;
}

.insight-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.insight-story-grid article {
  min-height: 250px;
  padding: 1.45rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--paper);
}

.insight-story-grid article > span {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 2rem;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-size: .7rem;
  font-weight: 800;
}

.insight-story-grid h3 {
  margin: 0 0 .65rem;
  font-size: 1.15rem;
}

.insight-story-grid p,
.recommendation-grid p,
.database-thinking-grid p {
  margin: 0;
  line-height: 1.65;
}

.recommendation-section {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 22px;
  background: #e8f0ec;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.recommendation-grid article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(7, 66, 57, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
}

.recommendation-grid article > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand);
  color: white;
  font-size: .7rem;
  font-weight: 850;
}

.recommendation-grid h3 {
  margin: 0 0 .45rem;
  font-size: 1.02rem;
}

.simplified-chart-list {
  gap: 1.25rem;
}

.story-chart-panel {
  overflow: hidden;
}

.chart-story {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #f3eee5;
}

.chart-story small {
  color: var(--brand);
}

.chart-story p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}

.method-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 1rem;
}

.method-summary p {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
}

.simple-schema > p {
  margin-bottom: 1rem;
}

.simple-schema > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.simple-schema > div > span {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .75rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-2);
}

.simple-schema > div b {
  font-size: .83rem;
}

.simple-schema > div small {
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.4;
}

.simple-sql-intro {
  margin: 2rem 0 .8rem;
}

.simple-sql-intro h3 {
  margin: 0 0 .35rem;
}

.simple-sql-intro p {
  margin: 0;
}

.simple-sql-box .sql-bar {
  min-height: 48px;
}

.sql-read-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .04em;
}

.simple-project-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
}

.simple-contact-card .contact-links {
  align-self: center;
}

.simple-sql-hero {
  align-items: center;
}

.plain-skill-proof {
  display: grid;
  gap: .7rem;
}

.plain-skill-proof > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  min-height: 92px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
}

.plain-skill-proof b {
  color: var(--brand);
  font-size: 2rem;
}

.plain-skill-proof span {
  color: var(--ink);
  line-height: 1.45;
}

.simple-sql-capabilities article {
  min-height: 225px;
}

.database-thinking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.database-thinking-grid article {
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
}

.database-thinking-grid b {
  display: block;
  margin-bottom: .55rem;
  color: var(--brand);
}

.simple-project-schema-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
}

.simple-project-schema-grid a {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-top: 5px solid var(--accent);
  border-radius: 14px;
  background: var(--paper);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.simple-project-schema-grid a:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(22, 43, 38, .09);
}

.simple-project-schema-grid span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 850;
}

.simple-project-schema-grid h3 {
  margin: 2.4rem 0 .45rem;
}

.simple-project-schema-grid p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.simple-project-schema-grid b {
  margin-top: auto;
  color: var(--brand);
  font-size: .8rem;
}

@media (max-width: 980px) {
  .insight-story-grid,
  .simple-project-schema-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .simple-spec-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .insight-story-grid,
  .recommendation-grid,
  .database-thinking-grid,
  .simple-project-schema-grid {
    grid-template-columns: 1fr;
  }

  .insight-story-grid article {
    min-height: auto;
  }

  .simple-schema > div {
    grid-template-columns: 1fr;
  }

  .simple-project-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .simple-project-nav .btn {
    justify-content: center;
  }

  .story-summary::after {
    display: none;
  }
}

/* ========================================================================
   V6 — evidence-led portfolio, clearer navigation, complete chart layouts
   ======================================================================== */

/* Navigation */
.masthead { height: 72px; }
.mast-nav { gap: .25rem; }
.mast-nav a { padding: .48rem .7rem; font-size: .84rem; }
.mast-tools .btn { background: var(--brand); color: #fff; border-color: var(--brand); padding-inline: 1rem; }
.mast-tools .btn:hover { background: var(--brand-ink); text-decoration: none; }

/* Keep every value inside its visual frame. On small screens charts scroll rather
   than clipping labels or shrinking them until they are unreadable. */
.chart { width: 100%; overflow-x: auto; overflow-y: visible; padding: .1rem .2rem .55rem; scrollbar-width: thin; }
.chart svg { width: 100%; max-width: 100%; height: auto; overflow: visible; }
.chart .bar-value { font-weight: 700; fill: var(--ink); }
@media (max-width: 700px) {
  .chart svg { min-width: 680px; }
  .chart::after { content: 'Swipe to see the full chart →'; display: block; margin-top: .35rem; color: var(--ink-3); font-family: var(--mono); font-size: .62rem; letter-spacing: .04em; }
}

/* Shared headings */
.section-head-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.section-head-v2 h2 { margin-top: .45rem; max-width: 18ch; }
.section-head-v2 > p { margin: 0; line-height: 1.7; }
.section-head-v2.light h2,
.section-head-v2.light p { color: #fff; }
.section-head-v2.light .section-number { color: #e5b77f; }
@media (max-width: 800px) { .section-head-v2 { grid-template-columns: 1fr; gap: .75rem; } }

/* Project index and project cards */
.projects-intro-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .65fr);
  align-items: end;
  gap: 3rem;
  padding: 1.8rem 0 3rem;
}
.projects-intro-v2 h1 { max-width: 13ch; margin-top: .7rem; }
.projects-intro-v2 > p { margin: 0; font-size: 1.05rem; line-height: 1.75; }
.project-story-list,
#homeProjectGrid { display: grid; grid-template-columns: 1fr; gap: 1.35rem; }
.project-story-card {
  --accent: var(--brand);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-top: 5px solid var(--accent);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 18px 50px -34px rgba(11, 74, 67, .42);
  color: inherit;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.project-story-card:hover { transform: translateY(-4px); box-shadow: 0 28px 65px -36px rgba(11, 74, 67, .5); border-color: color-mix(in srgb, var(--accent) 35%, var(--rule)); text-decoration: none; }
.project-story-copy { display: flex; flex-direction: column; padding: clamp(1.4rem, 3vw, 2.25rem); }
.project-story-meta { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 2rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
.project-story-meta span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: #fff; }
.project-story-meta b { color: var(--accent); }
.project-story-meta i { margin-left: auto; color: var(--ink-3); font-style: normal; }
.project-story-copy h3 { font-size: clamp(1.55rem, 2.4vw, 2.2rem); max-width: 15ch; }
.project-story-line { margin: .9rem 0 1.35rem; color: var(--ink); font-size: 1.03rem; line-height: 1.7; }
.project-proof-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-top: auto; }
.project-proof-row div { padding: .75rem .7rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface-2); }
.project-proof-row small { display: block; color: var(--ink-3); font-family: var(--mono); font-size: .55rem; line-height: 1.35; text-transform: uppercase; letter-spacing: .06em; }
.project-proof-row b { display: block; margin-top: .25rem; color: var(--ink); font-size: .86rem; }
.project-read { margin-top: 1.25rem; color: var(--accent); font-weight: 700; font-size: .87rem; }
.project-story-visual { display: flex; flex-direction: column; min-width: 0; padding: 1.5rem; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, #fff), #f8f5ef); border-left: 1px solid var(--rule); }
.project-visual-head,
.visual-title-v2 { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.project-visual-head small,
.visual-title-v2 small { display: block; color: var(--accent, var(--case-accent, var(--brand))); font-family: var(--mono); font-size: .58rem; font-weight: 700; letter-spacing: .1em; }
.project-visual-head b { display: block; margin-top: .25rem; color: var(--ink); font-size: .93rem; }
.project-visual-head > span,
.visual-title-v2 > span { padding: .25rem .5rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-3); font-family: var(--mono); font-size: .55rem; text-transform: uppercase; }
.project-story-visual .chart { margin: auto 0; }
.project-story-visual .chart svg { max-height: 260px; }
.project-visual-caption { margin-top: auto; padding: .85rem 1rem; border-left: 3px solid var(--accent); background: rgba(255,255,255,.8); border-radius: 0 10px 10px 0; }
.project-visual-caption span { color: var(--accent); font-family: var(--mono); font-size: .58rem; font-weight: 700; letter-spacing: .1em; }
.project-visual-caption p { margin: .3rem 0 0; color: var(--ink); font-size: .82rem; line-height: 1.5; }
@media (max-width: 900px) {
  .projects-intro-v2, .project-story-card { grid-template-columns: 1fr; }
  .project-story-visual { border-left: 0; border-top: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  .project-proof-row { grid-template-columns: 1fr 1fr; }
  .project-story-meta i { width: 100%; margin-left: 2.7rem; }
}

/* Project detail — story and visual stay together */
.case-study-v2 { --case-accent: var(--brand); }
.case-head-v2 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .65fr); gap: 3rem; align-items: end; padding: 1.4rem 0 2rem; }
.case-head-v2 h1 { max-width: 15ch; margin: .6rem 0 1rem; }
.case-question-v2 { padding: 1.4rem 1.5rem; border: 1px solid var(--rule); border-left: 5px solid var(--case-accent); border-radius: 14px; background: var(--surface); }
.case-question-v2 small { color: var(--case-accent); font-family: var(--mono); font-size: .62rem; font-weight: 700; letter-spacing: .11em; }
.case-question-v2 p { margin: .55rem 0 0; color: var(--ink); font-size: 1rem; line-height: 1.65; }
.case-jump-nav { position: sticky; top: 72px; z-index: 40; display: flex; gap: .3rem; overflow-x: auto; margin-bottom: 2rem; padding: .55rem; border: 1px solid var(--rule); border-radius: 999px; background: color-mix(in srgb, var(--surface) 93%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); }
.case-jump-nav a { flex: 1 0 auto; padding: .5rem .8rem; border-radius: 999px; color: var(--ink-2); text-align: center; font-size: .8rem; font-weight: 600; }
.case-jump-nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.case-overview-v2 { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1rem; scroll-margin-top: 150px; }
.case-story-v2,
.case-lead-visual { border: 1px solid var(--rule); border-radius: 20px; background: var(--surface); }
.case-story-v2 { padding: clamp(1.5rem, 3vw, 2.4rem); border-top: 6px solid var(--case-accent); }
.case-story-v2 h2 { max-width: 12ch; margin: .55rem 0 1.2rem; }
.case-story-v2 > p { color: var(--ink); font-size: 1.08rem; line-height: 1.78; }
.case-kpis-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1.4rem; }
.case-kpis-v2 div { padding: .9rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface-2); }
.case-kpis-v2 small { display: block; color: var(--ink-3); font-family: var(--mono); font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; }
.case-kpis-v2 b { display: block; margin: .22rem 0; color: var(--ink); font-size: 1.05rem; }
.case-kpis-v2 span { color: var(--ink-3); font-size: .7rem; line-height: 1.35; }
.case-lead-visual { min-width: 0; padding: clamp(1.3rem, 2.5vw, 2rem); background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--case-accent) 5%, #fff)); }
.visual-title-v2 h3 { margin-top: .25rem; font-size: 1.2rem; }
.visual-title-v2 p { margin: .3rem 0 0; font-size: .8rem; }
.visual-reading-guide { display: grid; grid-template-columns: 125px 1fr; gap: .9rem; margin-top: 1rem; padding: .9rem 1rem; border-radius: 12px; background: var(--brand-soft); }
.visual-reading-guide b { color: var(--brand); font-size: .78rem; }
.visual-reading-guide p { margin: 0; color: var(--ink); font-size: .81rem; line-height: 1.55; }
.evidence-section-v2,
.action-section-v2,
.technical-section-v2 { scroll-margin-top: 150px; }
.evidence-stack-v2 { display: grid; gap: 1.35rem; }
.evidence-row-v2 { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); overflow: hidden; border: 1px solid var(--rule); border-radius: 20px; background: var(--surface); box-shadow: 0 18px 48px -38px rgba(11,74,67,.5); }
.evidence-row-v2.reverse .evidence-copy-v2 { order: 2; }
.evidence-copy-v2 { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 3vw, 2.4rem); }
.finding-number { color: var(--case-accent); font-family: var(--mono); font-size: .63rem; font-weight: 700; letter-spacing: .1em; }
.evidence-copy-v2 h3 { margin: .8rem 0 .8rem; font-size: clamp(1.5rem, 2.7vw, 2.3rem); max-width: 12ch; }
.finding-body { color: var(--ink); font-size: 1rem; line-height: 1.75; }
.meaning-box-v2 { margin-top: .4rem; padding: 1rem; border-left: 4px solid var(--case-accent); border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--case-accent) 6%, #fff); }
.meaning-box-v2 small,
.decision-box-v2 small { color: var(--case-accent); font-family: var(--mono); font-size: .58rem; font-weight: 700; letter-spacing: .1em; }
.meaning-box-v2 p { margin: .35rem 0 0; color: var(--ink); font-size: .83rem; line-height: 1.6; }
.decision-box-v2 { margin-top: .8rem; padding: 1rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface-2); }
.decision-box-v2 b { display: block; margin-top: .25rem; font-size: .9rem; }
.decision-box-v2 p { margin: .25rem 0 0; font-size: .78rem; line-height: 1.55; }
.evidence-visual-v2 { min-width: 0; padding: clamp(1.3rem, 2.5vw, 2rem); background: #faf7f1; border-left: 1px solid var(--rule); }
.evidence-row-v2.reverse .evidence-visual-v2 { border-left: 0; border-right: 1px solid var(--rule); }
.chart-key-v2 { display: flex; align-items: center; gap: .5rem; margin-top: .65rem; color: var(--ink-3); font-family: var(--mono); font-size: .6rem; }
.chart-key-v2 span { width: 7px; height: 7px; border-radius: 50%; background: var(--case-accent); }
.action-section-v2 { padding: clamp(1.5rem, 4vw, 3rem); border-radius: 24px; background: var(--brand); }
.action-grid-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.action-grid-v2 article { display: grid; grid-template-columns: 46px 1fr; gap: 1rem; padding: 1.25rem; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(255,255,255,.08); }
.action-grid-v2 article > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--brand); font-family: var(--mono); font-weight: 700; }
.action-grid-v2 small { color: #e5b77f; font-family: var(--mono); font-size: .56rem; font-weight: 700; letter-spacing: .1em; }
.action-grid-v2 h3 { margin: .3rem 0 .55rem; color: #fff; }
.action-grid-v2 p { margin: 0; color: rgba(255,255,255,.72); font-size: .86rem; line-height: 1.65; }
.analysis-pipeline-v2 { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: .55rem; margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); }
.analysis-pipeline-v2 > div { min-width: 0; padding: .8rem; border-radius: 11px; background: var(--surface-2); }
.analysis-pipeline-v2 span { color: var(--case-accent); font-family: var(--mono); font-size: .56rem; font-weight: 700; }
.analysis-pipeline-v2 b { display: block; margin: .2rem 0; }
.analysis-pipeline-v2 small { display: block; color: var(--ink-3); font-size: .67rem; line-height: 1.35; }
.analysis-pipeline-v2 > i { color: var(--rule-strong); font-style: normal; }
.technical-grid-v2 { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem; }
.technical-card-v2 { padding: 1.5rem; border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); }
.technical-card-v2 h3 { margin: .45rem 0 .7rem; }
.schema-map-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: 1rem; }
.schema-node-v2 { position: relative; min-height: 92px; padding: .8rem; border: 1px solid var(--rule); border-left: 4px solid var(--case-accent); border-radius: 10px; background: var(--surface-2); }
.schema-node-v2 span { color: var(--case-accent); font-family: var(--mono); font-size: .55rem; }
.schema-node-v2 b { display: block; margin: .18rem 0; font-size: .8rem; overflow-wrap: anywhere; }
.schema-node-v2 small { display: block; color: var(--ink-3); font-size: .67rem; line-height: 1.35; }
.skill-proof-v2 > div { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.skill-proof-v2 > div span { padding: .36rem .58rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .68rem; font-weight: 600; }
.skill-proof-v2 ul { padding-left: 1.1rem; margin: 1.2rem 0 0; color: var(--ink-2); font-size: .82rem; }
.skill-proof-v2 li { margin-bottom: .55rem; }
.sql-proof-v2 { display: grid; grid-template-columns: .65fr 1.35fr; gap: 1rem; margin-top: 1rem; }
.sql-proof-copy { padding: 1.5rem; border-radius: 18px; background: var(--brand-soft); }
.sql-proof-copy h3 { margin: .5rem 0 .8rem; }
.sql-proof-copy p { margin: 0; color: var(--ink); line-height: 1.7; }
@media (max-width: 960px) {
  .case-head-v2, .case-overview-v2, .evidence-row-v2, .technical-grid-v2, .sql-proof-v2 { grid-template-columns: 1fr; }
  .evidence-row-v2.reverse .evidence-copy-v2 { order: initial; }
  .evidence-visual-v2, .evidence-row-v2.reverse .evidence-visual-v2 { border: 0; border-top: 1px solid var(--rule); }
  .analysis-pipeline-v2 { grid-template-columns: repeat(5, 1fr); }
  .analysis-pipeline-v2 > i { display: none; }
}
@media (max-width: 680px) {
  .case-kpis-v2, .action-grid-v2, .schema-map-v2 { grid-template-columns: 1fr; }
  .analysis-pipeline-v2 { grid-template-columns: 1fr; }
  .visual-reading-guide { grid-template-columns: 1fr; }
}

/* SQL and database page */
.sql-hero-v2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, .85fr); gap: 3rem; align-items: center; padding: 2rem 0 4rem; }
.sql-hero-copy-v2 h1 { max-width: 14ch; margin: .75rem 0 1.1rem; font-size: clamp(2.8rem, 5vw, 4.8rem); }
.sql-hero-copy-v2 > p { max-width: 65ch; font-size: 1.05rem; line-height: 1.75; }
.sql-hero-stats-v2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-top: 1.3rem; }
.sql-hero-stats-v2 div { padding: .75rem; border: 1px solid var(--rule); border-radius: 10px; background: rgba(255,255,255,.48); }
.sql-hero-stats-v2 b { display: block; color: var(--brand); font-size: 1.35rem; }
.sql-hero-stats-v2 span { color: var(--ink-3); font-family: var(--mono); font-size: .58rem; text-transform: uppercase; }
.pipeline-window-v2 { overflow: hidden; border: 1px solid var(--rule); border-radius: 20px; background: var(--surface); box-shadow: 0 28px 70px -38px rgba(11,74,67,.55); }
.pipeline-top-v2 { display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem; border-bottom: 1px solid var(--rule); background: var(--surface-2); font-family: var(--mono); font-size: .65rem; }
.pipeline-top-v2 > span { display: flex; gap: .25rem; }
.pipeline-top-v2 i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); }
.pipeline-top-v2 em { margin-left: auto; color: var(--pos); font-style: normal; }
.pipeline-body-v2 { padding: 1.1rem; }
.pipeline-layer-v2 { padding: 1rem; border-radius: 13px; }
.pipeline-layer-v2 small { color: var(--ink-3); font-family: var(--mono); font-size: .56rem; font-weight: 700; letter-spacing: .1em; }
.pipeline-layer-v2 > div:not(.mini-result-v2) { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-top: .6rem; }
.pipeline-layer-v2 > div span { padding: .55rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); text-align: center; font-family: var(--mono); font-size: .65rem; }
.pipeline-layer-v2.raw { background: #f4efe7; }
.pipeline-layer-v2.model { background: var(--brand-soft); }
.pipeline-layer-v2.answer { background: var(--brand); }
.pipeline-layer-v2.answer small { color: #e5b77f; }
.pipeline-arrow-v2 { display: block; margin: .35rem 0; color: var(--rule-strong); text-align: center; }
.mini-result-v2 { display: flex; align-items: end; gap: .4rem; height: 90px; margin-top: .7rem; }
.mini-result-v2 i { flex: 1; min-height: 12px; border-radius: 5px 5px 2px 2px; background: #fff; opacity: .9; }
.pipeline-layer-v2.answer p { margin: .7rem 0 0; color: rgba(255,255,255,.75); font-size: .77rem; }
.pipeline-layer-v2.answer p b { color: #fff; }
.sql-capability-board-v2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.sql-capability-board-v2 article { min-height: 245px; padding: 1.25rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); transition: transform .2s, box-shadow .2s; }
.sql-capability-board-v2 article:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.capability-icon-v2 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.4rem; }
.capability-icon-v2 > span { display: grid; place-items: center; width: 58px; height: 42px; border-radius: 10px; background: var(--brand); color: #fff; font-family: var(--mono); font-size: .65rem; font-weight: 700; }
.capability-icon-v2 > i { color: var(--ink-3); font-family: var(--mono); font-size: .65rem; font-style: normal; }
.sql-capability-board-v2 h3 { margin-bottom: .65rem; }
.sql-capability-board-v2 p { margin: 0; font-size: .87rem; line-height: 1.65; }
.architecture-board-v2 { padding: 1.2rem; border: 1px solid var(--rule); border-radius: 20px; background: var(--surface); }
.architecture-flow-v2 { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: .65rem; }
.architecture-flow-v2 > article { display: flex; flex-direction: column; min-height: 260px; padding: 1.1rem; border-radius: 13px; background: var(--surface-2); }
.architecture-flow-v2 > b { align-self: center; color: var(--rule-strong); }
.architecture-flow-v2 article > span { color: var(--brand); font-family: var(--mono); font-size: .58rem; font-weight: 700; letter-spacing: .1em; }
.architecture-flow-v2 h3 { margin: .55rem 0; }
.architecture-flow-v2 p { font-size: .79rem; line-height: 1.55; }
.tiny-table-v2 { display: grid; gap: .28rem; margin-top: auto; }
.tiny-table-v2 i { height: 10px; border-radius: 3px; background: var(--rule-strong); }
.tiny-table-v2 i:nth-child(2) { width: 78%; }.tiny-table-v2 i:nth-child(3) { width: 90%; }.tiny-table-v2 i:nth-child(4) { width: 62%; }
.tiny-schema-v2 { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-top: auto; }
.tiny-schema-v2 i { height: 38px; border: 1px solid var(--brand-line); border-radius: 7px; background: #fff; }
.tiny-metric-v2 { margin-top: auto; padding: 1rem; border-radius: 10px; background: var(--brand); color: #fff; text-align: center; }
.tiny-metric-v2 strong { display: block; font-size: 1.6rem; }.tiny-metric-v2 small { opacity: .7; }
.tiny-checks-v2 { display: flex; gap: .5rem; margin-top: auto; }.tiny-checks-v2 i { display: grid; place-items: center; flex: 1; height: 42px; border-radius: 8px; background: #dfeae5; color: var(--pos); font-style: normal; font-weight: 800; }
.sql-project-tabs-v2 { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .65rem; }
.sql-project-tabs-v2 button { flex: 1 0 auto; padding: .7rem .9rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 600 .82rem var(--body); cursor: pointer; }
.sql-project-tabs-v2 button span { margin-right: .45rem; color: var(--ink-3); font-family: var(--mono); font-size: .6rem; }
.sql-project-tabs-v2 button.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.sql-project-tabs-v2 button.on span { color: rgba(255,255,255,.65); }
.sql-project-workspace { display: grid; grid-template-columns: minmax(280px, .65fr) minmax(0, 1.35fr); overflow: hidden; margin-top: .75rem; border: 1px solid var(--rule); border-top: 6px solid var(--workspace-accent); border-radius: 20px; background: var(--surface); }
.sql-context-v2 { padding: 1.5rem; border-right: 1px solid var(--rule); background: var(--surface-2); }
.sql-context-v2 h3 { margin: .5rem 0 1rem; font-size: 1.5rem; }
.sql-question-v2, .sql-answer-v2 { padding: .9rem; border-radius: 11px; background: var(--surface); }
.sql-answer-v2 { margin-top: .65rem; border-left: 4px solid var(--workspace-accent); }
.sql-question-v2 small, .sql-answer-v2 small { color: var(--workspace-accent); font-family: var(--mono); font-size: .56rem; font-weight: 700; letter-spacing: .08em; }
.sql-question-v2 p, .sql-answer-v2 p { margin: .35rem 0 0; color: var(--ink); font-size: .82rem; line-height: 1.58; }
.sql-context-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-top: .8rem; }
.sql-context-stats div { padding: .7rem .5rem; border-radius: 9px; background: var(--surface); text-align: center; }
.sql-context-stats b { display: block; color: var(--workspace-accent); font-size: .82rem; overflow-wrap: anywhere; }
.sql-context-stats span { display: block; margin-top: .2rem; color: var(--ink-3); font-family: var(--mono); font-size: .5rem; text-transform: uppercase; }
.sql-result-v2 { min-width: 0; padding: 1.5rem; }
.sql-code-v2 { grid-column: 1 / -1; padding: 1rem; border-top: 1px solid var(--rule); background: #f8f5ef; }
.pattern-grid-v2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.pattern-grid-v2 article { padding: 1.15rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); }
.pattern-grid-v2 code { display: inline-block; padding: .3rem .5rem; border-radius: 7px; background: var(--brand-soft); color: var(--brand); font-family: var(--mono); font-size: .7rem; font-weight: 700; }
.pattern-grid-v2 h3 { margin: 1.5rem 0 .55rem; }
.pattern-grid-v2 p { margin: 0; font-size: .82rem; line-height: 1.6; }
@media (max-width: 1000px) {
  .sql-hero-v2, .sql-project-workspace { grid-template-columns: 1fr; }
  .sql-context-v2 { border-right: 0; border-bottom: 1px solid var(--rule); }
  .sql-capability-board-v2, .pattern-grid-v2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .architecture-flow-v2 { grid-template-columns: repeat(2, 1fr); }
  .architecture-flow-v2 > b { display: none; }
}
@media (max-width: 650px) {
  .sql-hero-stats-v2, .sql-capability-board-v2, .pattern-grid-v2, .architecture-flow-v2 { grid-template-columns: 1fr; }
  .pipeline-layer-v2 > div:not(.mini-result-v2), .sql-context-stats { grid-template-columns: 1fr; }
}

/* Contact */
.contact-card-v2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; margin-top: 4rem; padding: clamp(1.5rem, 4vw, 2.7rem); border-radius: 22px; background: var(--brand); }
.contact-card-v2 .eyebrow { color: #e5b77f; }
.contact-card-v2 h2 { max-width: 19ch; margin: .5rem 0 .7rem; color: #fff; }
.contact-card-v2 p { max-width: 65ch; margin: 0; color: rgba(255,255,255,.72); }
.contact-card-v2 .btn { background: #fff; color: var(--brand); border-color: #fff; }
.contact-card-v2 .btn:hover { background: #f4efe7; text-decoration: none; }
.contact-hero-v2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .65fr); gap: 3rem; align-items: end; padding: 2rem 0 3rem; }
.contact-hero-v2 h1 { max-width: 13ch; margin: .7rem 0 1.1rem; }
.contact-hero-v2 > div > p { max-width: 65ch; font-size: 1.05rem; line-height: 1.75; }
.contact-profile-v2 { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); }
.contact-profile-v2 > span { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; background: var(--brand); color: #fff; font-family: var(--display); font-size: 1.4rem; font-weight: 800; }
.contact-profile-v2 div { display: flex; flex-direction: column; }
.contact-profile-v2 b { font-size: 1.05rem; }.contact-profile-v2 small { color: var(--ink-3); font-size: .7rem; }.contact-profile-v2 i { margin-top: .4rem; color: var(--pos); font-size: .72rem; font-style: normal; font-weight: 700; }
.contact-methods-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.contact-methods-v2 a { display: flex; flex-direction: column; min-height: 300px; padding: clamp(1.4rem, 3vw, 2.2rem); border: 1px solid var(--rule); border-top: 6px solid var(--brand); border-radius: 18px; background: var(--surface); color: inherit; transition: transform .2s, box-shadow .2s; }
.contact-methods-v2 a:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; }
.contact-methods-v2 span { color: var(--brand); font-family: var(--mono); font-size: .62rem; font-weight: 700; letter-spacing: .1em; }
.contact-methods-v2 h2 { margin: 2.4rem 0 .7rem; font-size: clamp(1.35rem, 3vw, 2.25rem); overflow-wrap: anywhere; }
.contact-methods-v2 p { max-width: 44ch; }
.contact-methods-v2 b { margin-top: auto; color: var(--brand); }
.contact-details-v2 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .8rem; margin-top: 1rem; }
.contact-details-v2 div { padding: 1.2rem; border: 1px solid var(--rule); border-radius: 14px; background: rgba(255,255,255,.45); }
.contact-details-v2 small { color: var(--brand); font-family: var(--mono); font-size: .58rem; font-weight: 700; letter-spacing: .09em; }
.contact-details-v2 p { margin: .5rem 0 0; color: var(--ink); font-size: .83rem; line-height: 1.6; }
.contact-next-v2 { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.contact-next-v2 h2 { max-width: 17ch; margin-top: .5rem; }
.contact-next-v2 > div:last-child { display: flex; gap: .55rem; flex-wrap: wrap; }
@media (max-width: 800px) {
  .contact-card-v2, .contact-hero-v2, .contact-methods-v2, .contact-details-v2 { grid-template-columns: 1fr; }
  .contact-next-v2 { align-items: flex-start; flex-direction: column; }
}

/* Clean up older components that are no longer part of the main experience */
.projects-page-v2 .page-head,
.case-study-v2 .story-summary,
.case-study-v2 .simplified-chart-list { display: none; }

.metric-visual { padding: 1.25rem 1rem 1rem; }
.metric-visual > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.metric-visual strong { color: var(--case-accent, var(--brand)); font-family: var(--display); font-size: clamp(3rem, 7vw, 5.6rem); letter-spacing: -.06em; }
.metric-visual span { color: var(--ink-3); font-family: var(--mono); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.metric-track { height: 22px; margin: 1.1rem 0 .8rem; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.metric-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--signal)); }
.metric-visual p { max-width: 55ch; margin: 0; color: var(--ink); font-size: .88rem; line-height: 1.6; }
.sql-project-lab-v2 { scroll-margin-top: 110px; }

/* Prevent code blocks and chart canvases from widening the mobile document. */
.technical-section-v2,
.sql-proof-v2,
.sql-project-workspace,
.sql-project-workspace > *,
.sql-proof-v2 > *,
#sqlMount,
#sqlLabMount,
.sql-code-v2,
.sql-box,
.sql-bar,
.sql-code { min-width: 0; max-width: 100%; }
.sql-box { overflow: hidden; }
.sql-code { overflow-x: auto; white-space: pre; }
.sql-bar { overflow: hidden; }
.sql-bar .file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart { min-width: 0; max-width: 100%; }


/* ========================================================================
   V7 — clearer type, working section controls, non-repeating visuals
   ======================================================================== */
body { font-size: 16.5px; line-height: 1.68; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.022em; }
h1 { font-size: clamp(2.35rem, 4.6vw, 4rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.75rem, 2.8vw, 2.55rem); }
p { line-height: 1.68; }
.eyebrow, .section-number { font-size: .72rem; letter-spacing: .1em; }

.hero-shell { grid-template-columns: minmax(0, .9fr) minmax(540px, 1.1fr); gap: clamp(2rem, 4vw, 3.5rem); }
.hero-copy-block h1 { max-width: 10.5ch; font-size: clamp(3rem, 4.9vw, 4.65rem); line-height: 1.01; letter-spacing: -.045em; }
.hero-lede { font-size: 1.05rem; line-height: 1.75; }
.role-line { font-size: .84rem; letter-spacing: .015em; }

.case-head-v2 h1 { max-width: 18ch; }
.case-head-v2 .lede { font-size: 1.08rem; line-height: 1.75; }
.case-jump-nav { border-radius: 16px; }
.case-jump-nav button {
  flex: 1 0 auto;
  padding: .64rem .9rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-2);
  text-align: center;
  font: 600 .88rem var(--body);
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}
.case-jump-nav button:hover { background: var(--brand-soft); color: var(--brand); }
.case-jump-nav button.on { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -12px rgba(11,74,67,.8); }
.case-story-v2 h2 { max-width: 15ch; }
.case-story-v2 > p { font-size: 1.03rem; }
.visual-title-v2 h3 { font-size: 1.24rem; line-height: 1.25; }
.visual-title-v2 p { font-size: .86rem; line-height: 1.55; }
.finding-number { font-size: .67rem; }
.evidence-copy-v2 h3 { max-width: 16ch; font-size: clamp(1.45rem, 2.35vw, 2.05rem); }
.finding-body { font-size: .98rem; }
.meaning-box-v2 p, .decision-box-v2 p, .visual-reading-guide p { font-size: .88rem; }

.story-snapshot-v3 { display: grid; gap: .9rem; }
.snapshot-kpis-v3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .65rem; }
.snapshot-kpis-v3 article { min-width: 0; padding: 1rem; border: 1px solid var(--rule); border-radius: 13px; background: rgba(255,255,255,.78); }
.snapshot-kpis-v3 article > span { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-bottom: 1rem; border-radius: 8px; background: var(--case-accent); color: #fff; font: 600 .65rem var(--mono); }
.snapshot-kpis-v3 small { display: block; min-height: 2.5em; color: var(--ink-3); font-size: .7rem; font-weight: 600; line-height: 1.35; text-transform: uppercase; letter-spacing: .04em; }
.snapshot-kpis-v3 b { display: block; margin: .45rem 0 .3rem; color: var(--ink); font-size: clamp(1.35rem, 2vw, 1.85rem); line-height: 1.1; overflow-wrap: anywhere; }
.snapshot-kpis-v3 p { margin: 0; color: var(--ink-2); font-size: .75rem; line-height: 1.5; }
.snapshot-path-v3 { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: .55rem; padding: .95rem; border-radius: 13px; background: var(--brand); }
.snapshot-path-v3 > div { padding: .65rem; border-radius: 9px; background: rgba(255,255,255,.08); }
.snapshot-path-v3 small { display: block; color: #e8be8b; font: 600 .58rem var(--mono); letter-spacing: .08em; }
.snapshot-path-v3 b { display: block; margin-top: .25rem; color: #fff; font-size: .8rem; line-height: 1.35; }
.snapshot-path-v3 i { color: rgba(255,255,255,.45); font-style: normal; }

.section-head-v2 { grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); }
.section-head-v2 h2 { max-width: 23ch; font-size: clamp(1.8rem, 2.8vw, 2.55rem); }
.section-head-v2 > p { color: var(--ink-2); font-size: .98rem; }
.sql-hero-copy-v2 h1 { max-width: 15ch; font-size: clamp(2.65rem, 4.5vw, 4rem); line-height: 1.03; letter-spacing: -.04em; }
.sql-hero-copy-v2 > p { font-size: 1.04rem; }
.sql-capability-board-v2 article { min-height: 225px; }
.sql-capability-board-v2 h3 { font-size: 1.15rem; line-height: 1.3; }
.sql-capability-board-v2 p { font-size: .93rem; line-height: 1.65; }
.capability-icon-v2 { margin-bottom: 1.8rem; }
.architecture-flow-v2 > article { min-height: 235px; }
.architecture-flow-v2 h3 { font-size: 1.08rem; line-height: 1.3; }
.architecture-flow-v2 p { font-size: .88rem; }
.sql-question-v2 p, .sql-answer-v2 p { font-size: .88rem; }
.pattern-grid-v2 h3 { margin-top: 1.25rem; font-size: 1.08rem; }
.pattern-grid-v2 p { font-size: .88rem; }

/* Keep labels comfortably inside every visual on desktop. */
.chart { padding-inline: .45rem; }
.chart svg { display: block; }
.evidence-visual-v2 .chart, .case-lead-visual .chart, .sql-result-v2 .chart { min-width: 0; }

@media (max-width: 1100px) {
  .hero-shell { grid-template-columns: 1fr; }
  .hero-copy-block { max-width: 760px; }
  .hero-copy-block h1 { max-width: 13ch; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .hero-copy-block h1 { font-size: clamp(2.65rem, 13vw, 3.8rem); }
  .case-jump-nav { top: 72px; border-radius: 14px; }
  .case-jump-nav button { min-width: 135px; }
  .snapshot-kpis-v3 { grid-template-columns: 1fr; }
  .snapshot-path-v3 { grid-template-columns: 1fr; }
  .snapshot-path-v3 i { display: none; }
  .section-head-v2 h2 { max-width: 100%; }
}


/* ========================================================================
   V9 — larger project visuals, stable section navigation, natural copy
   ======================================================================== */
.case-study-v2 {
  width: min(100% - 2.5rem, 1420px);
}

/* Charts are part of the explanation, so they stay large enough to read. */
.chart .axis-txt { font-size: 12px; }
.chart .val-txt { font-size: 12.5px; }
.chart .bar-lbl { font-size: 13px; font-weight: 600; }
.evidence-row-v2 {
  grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr);
}
.evidence-copy-v2 {
  padding: clamp(1.6rem, 2.5vw, 2.35rem);
}
.evidence-visual-v2 {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 520px;
  padding: clamp(1.6rem, 2.8vw, 2.4rem);
}
.evidence-visual-v2 .chart {
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
  margin: .4rem 0;
}
.evidence-visual-v2 .chart svg {
  width: 100%;
  max-height: none;
}
.chart-key-v2 {
  margin-top: .85rem;
  font-size: .68rem;
}
.project-story-visual .chart svg { max-height: 330px; }
.project-story-card { min-height: 500px; }
.project-story-visual { padding: clamp(1.5rem, 2.5vw, 2.1rem); }

/* Keep the section controls readable and make the selected state obvious. */
.case-jump-nav {
  scroll-padding-inline: .5rem;
}
.case-jump-nav button {
  min-height: 42px;
}
.case-jump-nav button.on {
  background: var(--brand);
  color: #fff;
}

.snapshot-path-v3 b {
  font-size: .84rem;
  line-height: 1.42;
}
.contact-card-v2 h2 { max-width: 28ch; }

@media (max-width: 1100px) {
  .case-study-v2 { width: min(100% - 2rem, 1240px); }
  .evidence-row-v2 { grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr); }
}

@media (max-width: 960px) {
  .evidence-row-v2 { grid-template-columns: 1fr; }
  .evidence-visual-v2 { min-height: 0; }
  .evidence-row-v2.reverse .evidence-copy-v2 { order: initial; }
}

@media (max-width: 700px) {
  .case-study-v2 { width: calc(100% - 1.25rem); }
  .chart .axis-txt { font-size: 11px; }
  .chart .val-txt { font-size: 11.5px; }
  .chart .bar-lbl { font-size: 12px; }
}

/* ========================================================================
   V10 — properly scaled case-study charts and a complete About page
   ======================================================================== */

/* Let the executive summary size itself to its own content instead of
   stretching to match the story card beside it. */
.case-overview-v2 {
  align-items: start;
}
.case-story-v2,
.case-lead-visual {
  align-self: start;
}

/* Give the visual the majority of the row and remove artificial empty height. */
.evidence-row-v2 {
  grid-template-columns: minmax(340px, .64fr) minmax(0, 1.36fr);
  align-items: stretch;
}
.evidence-visual-v2 {
  display: block;
  min-height: 0;
  padding: clamp(1.6rem, 2.5vw, 2.35rem);
}
.evidence-visual-v2 .visual-title-v2 {
  margin-bottom: .75rem;
}
.evidence-visual-v2 .chart {
  display: block;
  width: 100%;
  margin: .75rem 0 .35rem;
  padding-inline: 0;
}
.evidence-visual-v2 .chart svg {
  width: 100%;
  height: auto;
  max-height: none;
}
.evidence-visual-v2.chart-type-line .chart,
.evidence-visual-v2.chart-type-grouped .chart {
  margin-top: 1rem;
}
.chart .bar-track {
  fill: color-mix(in srgb, var(--rule) 54%, transparent);
}
.chart .axis-txt {
  font-size: 14px;
  fill: var(--ink-3);
}
.chart .val-txt {
  font-size: 14px;
  font-weight: 650;
  fill: var(--ink);
}
.chart .bar-lbl {
  font-size: 14.5px;
  font-weight: 650;
  fill: var(--ink);
}
.chart-key-v2 {
  margin-top: .8rem;
  font-size: .72rem;
}

/* Actual case-study question, finding, and next step are easier to scan than
   generic process labels. */
.snapshot-path-v3 {
  align-items: stretch;
}
.snapshot-path-v3 > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.snapshot-path-v3 b {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  font-size: .78rem;
  line-height: 1.45;
}

/* About page */
.about-page-v2 {
  --about-panel: #fffdf9;
}
.about-hero-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding: 2rem 0 4rem;
  border-bottom: 1px solid var(--rule);
}
.about-hero-copy-v2 h1 {
  max-width: 15ch;
  margin: .7rem 0 1.25rem;
  font-size: clamp(2.8rem, 5vw, 4.65rem);
  line-height: 1.02;
}
.about-hero-copy-v2 > p {
  max-width: 64ch;
  font-size: 1.06rem;
  line-height: 1.75;
}
.about-profile-card-v2 {
  padding: 1.4rem;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--brand) 5%, #fff));
  box-shadow: var(--shadow-md);
}
.about-profile-head-v2 {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.about-profile-head-v2 > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font: 700 .9rem var(--mono);
}
.about-profile-head-v2 b {
  display: block;
  font-size: 1.08rem;
}
.about-profile-head-v2 small {
  display: block;
  margin-top: .2rem;
  color: var(--ink-2);
  font-size: .76rem;
  line-height: 1.4;
}
.about-profile-card-v2 dl {
  margin: 0;
}
.about-profile-card-v2 dl > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: .85rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--rule);
}
.about-profile-card-v2 dl > div:last-child {
  border-bottom: 0;
  padding-bottom: .2rem;
}
.about-profile-card-v2 dt {
  color: var(--brand);
  font: 600 .63rem var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.about-profile-card-v2 dd {
  margin: 0;
  color: var(--ink);
  font-size: .84rem;
  line-height: 1.5;
}
.about-skill-groups-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.about-skill-groups-v2 article {
  padding: 1.35rem;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--about-panel);
  box-shadow: var(--shadow-sm);
}
.about-skill-title-v2 {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: .85rem;
  align-items: start;
}
.about-skill-title-v2 > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font: 700 .66rem var(--mono);
}
.about-skill-title-v2 h3 {
  font-size: 1.18rem;
}
.about-skill-title-v2 p {
  margin: .35rem 0 0;
  font-size: .86rem;
  line-height: 1.55;
}
.about-skill-tags-v2 {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.1rem;
}
.about-skill-tags-v2 span {
  padding: .4rem .62rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 600;
}
.about-workflow-v2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
}
.about-workflow-v2 article {
  min-height: 225px;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--surface);
}
.about-workflow-v2 article > span {
  color: var(--brand);
  font: 700 .65rem var(--mono);
}
.about-workflow-v2 h3 {
  margin: 3.25rem 0 .65rem;
  font-size: 1.08rem;
}
.about-workflow-v2 p {
  margin: 0;
  font-size: .83rem;
  line-height: 1.6;
}
.about-value-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.about-value-grid-v2 article {
  padding: 1.45rem;
  border-radius: 18px;
  background: var(--brand);
  color: #fff;
}
.about-value-grid-v2 small {
  color: #e8be8b;
  font: 700 .62rem var(--mono);
  letter-spacing: .1em;
}
.about-value-grid-v2 h3 {
  margin: 1.5rem 0 .7rem;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1.25;
}
.about-value-grid-v2 p {
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: .88rem;
  line-height: 1.65;
}
.education-grid-v2 {
  display: grid;
  gap: .7rem;
}
.education-grid-v2 article {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
}
.education-grid-v2 article > span {
  color: var(--brand);
  font: 700 1rem var(--mono);
}
.education-grid-v2 h3 {
  font-size: 1.05rem;
}
.education-grid-v2 p {
  margin: .2rem 0 0;
  font-size: .83rem;
}

@media (max-width: 1160px) {
  .evidence-row-v2 {
    grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
  }
  .about-workflow-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .evidence-row-v2 {
    grid-template-columns: 1fr;
  }
  .evidence-visual-v2 {
    border: 0;
    border-top: 1px solid var(--rule);
  }
  .about-hero-v2,
  .about-skill-groups-v2,
  .about-value-grid-v2 {
    grid-template-columns: 1fr;
  }
  .about-profile-card-v2 {
    max-width: 720px;
  }
}

@media (max-width: 620px) {
  .about-workflow-v2 {
    grid-template-columns: 1fr;
  }
  .about-workflow-v2 article {
    min-height: 0;
  }
  .about-workflow-v2 h3 {
    margin-top: 1.6rem;
  }
  .about-profile-card-v2 dl > div {
    grid-template-columns: 1fr;
    gap: .25rem;
  }
  .education-grid-v2 article {
    grid-template-columns: 64px 1fr;
  }
  .chart .axis-txt {
    font-size: 12px;
  }
  .chart .val-txt,
  .chart .bar-lbl {
    font-size: 12.5px;
  }
}

/* Keep the chart in the wider column even when alternating the visual side. */
.evidence-row-v2.reverse {
  grid-template-columns: minmax(0, 1.36fr) minmax(340px, .64fr);
}

@media (max-width: 1160px) {
  .evidence-row-v2.reverse {
    grid-template-columns: minmax(0, 1.28fr) minmax(320px, .72fr);
  }
}

@media (max-width: 960px) {
  .evidence-row-v2.reverse {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================
   V11 — readable analytics visuals, correct mixed-unit charts, role alignment
   ======================================================================== */
:root {
  /* Compatibility aliases used by a few legacy components. */
  --paper: var(--surface);
  --paper-2: var(--surface-2);
  --muted: var(--ink-3);
}

/* Chart typography is intentionally larger because SVG text scales with the
   viewBox. These values stay readable in laptop-sized chart columns. */
.chart {
  scrollbar-gutter: stable;
}
.chart .axis-txt {
  font-size: 16px;
  font-weight: 560;
  fill: var(--ink-3);
}
.chart .axis-secondary {
  fill: var(--s2);
  font-weight: 700;
}
.chart .axis-title {
  font-family: var(--body);
  font-size: 16px;
  font-weight: 700;
  fill: var(--ink-2);
}
.chart .val-txt {
  font-size: 17px;
  font-weight: 700;
  fill: var(--ink);
}
.chart .bar-lbl {
  font-size: 17px;
  font-weight: 700;
  fill: var(--ink);
}
.chart .grid-vertical {
  opacity: .45;
}
.chart .bar-track {
  fill: color-mix(in srgb, var(--rule) 62%, transparent);
}
.legend {
  gap: 1.25rem;
  margin-top: 1rem;
}
.legend span {
  font-size: .9rem;
  font-weight: 600;
}
.legend span small {
  color: var(--ink-3);
  font-size: .72rem;
  font-weight: 500;
}
.legend i {
  width: 12px;
  height: 12px;
}

/* Give case-study charts the majority of the page. On normal laptops the
   chart stacks rather than being compressed into an unreadable half-column. */
.case-study-v2 {
  width: min(100% - 2.5rem, 1500px);
}
.evidence-row-v2 {
  grid-template-columns: minmax(330px, .56fr) minmax(0, 1.44fr);
}
.evidence-row-v2.reverse {
  grid-template-columns: minmax(0, 1.44fr) minmax(330px, .56fr);
}
.evidence-visual-v2 {
  padding: clamp(1.7rem, 2.6vw, 2.5rem);
}
.evidence-visual-v2 .chart {
  margin-top: 1rem;
  margin-bottom: .55rem;
}
.project-story-visual .chart svg {
  max-height: 390px;
}
.project-story-card {
  min-height: 540px;
}

/* A larger executive split also prevents the summary card from squeezing the
   snapshot on common laptop widths. */
.case-overview-v2 {
  grid-template-columns: minmax(320px, .76fr) minmax(0, 1.24fr);
  gap: 1.2rem;
}

/* Correct comparison visual for metrics with different units. Each metric has
   its own scale, so percentages are never plotted on the same axis as dollars. */
.metric-compare-chart {
  display: grid;
  gap: 1.1rem;
  width: 100%;
  margin-top: .35rem;
}
.metric-compare-block {
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface-2);
}
.metric-compare-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}
.metric-compare-head b {
  color: var(--ink);
  font-size: 1rem;
}
.metric-compare-head span {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: .66rem;
}
.metric-compare-rows {
  display: grid;
  gap: .72rem;
}
.metric-compare-row {
  display: grid;
  grid-template-columns: minmax(90px, 130px) minmax(150px, 1fr) minmax(72px, auto);
  align-items: center;
  gap: .85rem;
}
.metric-compare-row > span {
  color: var(--ink);
  font-size: .86rem;
  font-weight: 650;
  text-transform: capitalize;
}
.metric-compare-track {
  position: relative;
  height: 30px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
}
.metric-compare-track i {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 7px;
  transition: width .35s var(--ease);
}
.metric-compare-row strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* The traffic-share donut is a real chart, not a thumbnail. */
.chart-donut {
  width: min(100%, 390px);
  max-width: 390px;
  margin: .35rem auto .65rem;
  overflow: visible;
}
.chart-donut svg {
  min-width: 0 !important;
}

/* Dashboard analytical visuals get enough physical space to be read. */
.panel:has(.chart),
.panel:has(.metric-compare-chart),
.panel:has(.heat),
.panel:has(.cohort) {
  padding: 1.5rem 1.55rem 1.65rem;
}
.funnel-step {
  grid-template-columns: 118px 1fr;
  gap: 1rem;
  margin-bottom: .7rem;
}
.funnel-step span {
  font-size: .9rem;
}
.funnel-bar {
  height: 42px;
  border-radius: 8px;
}
.funnel-bar b {
  font-size: .82rem;
}
.heat {
  gap: 4px;
  padding-bottom: .35rem;
}
.heat-row {
  grid-template-columns: 54px repeat(24, minmax(22px, 1fr));
  gap: 4px;
  min-width: 690px;
}
.heat-row span {
  font-size: .68rem;
}
.heat-cell {
  border-radius: 4px;
}
.cohort table {
  font-size: .75rem;
  border-spacing: 4px;
}
.cohort th {
  padding: .4rem .55rem;
}
.cohort td {
  min-width: 52px;
  padding: .55rem .6rem;
  border-radius: 5px;
}

/* The chart cards in 2-column dashboard rows stack before the visuals become
   too narrow. This is especially important for scatter and comparison charts. */
@media (max-width: 1200px) {
  .grid-11 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1220px) {
  .case-study-v2 {
    width: min(100% - 2rem, 1180px);
  }
  .evidence-row-v2,
  .evidence-row-v2.reverse {
    grid-template-columns: 1fr;
  }
  .evidence-row-v2.reverse .evidence-copy-v2 {
    order: initial;
  }
  .evidence-visual-v2,
  .evidence-row-v2.reverse .evidence-visual-v2 {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 1080px) {
  .case-overview-v2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  /* Do not shrink a detailed SVG until its labels become microscopic. The
     chart becomes horizontally scrollable instead. */
  .chart-line svg,
  .chart-bars svg,
  .chart-grouped svg,
  .chart-scatter svg {
    width: 760px;
    min-width: 760px;
  }
  .chart::after {
    content: 'Swipe to see the full chart →';
    display: block;
    margin-top: .4rem;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: .66rem;
    letter-spacing: .04em;
  }
  .chart-donut::after {
    content: none;
  }
  .metric-compare-row {
    grid-template-columns: 1fr;
    gap: .4rem;
  }
  .metric-compare-row strong {
    grid-row: 1;
    grid-column: 1;
    justify-self: end;
  }
  .metric-compare-row > span {
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
  }
  .metric-compare-track {
    grid-column: 1;
    height: 34px;
  }
  .metric-compare-head {
    align-items: flex-start;
    flex-direction: column;
    gap: .2rem;
  }
}

@media (max-width: 620px) {
  .case-study-v2 {
    width: calc(100% - 1.25rem);
  }
  .evidence-copy-v2,
  .evidence-visual-v2 {
    padding: 1.25rem;
  }
  .chart .axis-txt {
    font-size: 16px;
  }
  .chart .val-txt,
  .chart .bar-lbl {
    font-size: 17px;
  }
}

/* Compact homepage visuals still need human-readable labels. */
.feature-bars small { font-size: .62rem; font-weight: 600; }
.feature-chart-head small { font-size: .68rem; }
.feature-chart-head b { font-size: .95rem; }

/* ========================================================================
   V12 — stronger case-study storytelling, decision-ready findings & strategy
   ======================================================================== */

/* A compact context row makes each case study feel like a complete project
   brief without adding more prose to the hero. */
.case-context-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: -.35rem 0 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--rule);
  box-shadow: 0 12px 32px -30px rgba(19, 52, 47, .45);
}
.case-context-strip > div {
  min-width: 0;
  padding: .95rem 1.05rem;
  background: var(--surface);
}
.case-context-strip small {
  display: block;
  margin-bottom: .28rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.case-context-strip b {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The long story now resolves into three memorable beats before the KPIs. */
.story-beats-v12 {
  display: grid;
  gap: .65rem;
  margin: 1.35rem 0 1.45rem;
}
.story-beats-v12 article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: .85rem;
  align-items: start;
  padding: .85rem .9rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: color-mix(in srgb, var(--case-accent) 3.5%, var(--surface));
}
.story-beats-v12 article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--case-accent);
  color: #fff;
  font: 700 .62rem var(--mono);
}
.story-beats-v12 b {
  display: block;
  margin: .05rem 0 .18rem;
  color: var(--ink);
  font-size: .9rem;
}
.story-beats-v12 p {
  margin: 0;
  color: var(--ink-2);
  font-size: .79rem;
  line-height: 1.55;
}

/* Findings should scan as Evidence -> Meaning -> Move. */
.evidence-copy-v2 {
  justify-content: flex-start;
}
.finding-number {
  width: fit-content;
  padding: .3rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--case-accent) 9%, #fff);
  color: var(--case-accent);
}
.meaning-box-v2 {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-left-width: 3px;
  background: color-mix(in srgb, var(--case-accent) 5%, #fff);
}
.decision-box-v2 {
  padding: 1rem 1.05rem;
  border-color: color-mix(in srgb, var(--case-accent) 18%, var(--rule));
  background: #fff;
}
.decision-box-v2 b {
  color: var(--ink);
  font-size: .96rem;
}

/* Strategy is intentionally richer than the old recommendations grid: every
   card includes the action and the signal that tells a team whether it worked. */
.action-section-v2 {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 10%, rgba(229, 183, 127, .16), transparent 28%),
    linear-gradient(145deg, #0b4a43 0%, #073a35 100%);
}
.action-section-v2::after {
  content: '';
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  pointer-events: none;
}
.action-grid-v2 {
  position: relative;
  z-index: 1;
  gap: .95rem;
}
.action-grid-v2 article {
  align-content: start;
  min-height: 245px;
  padding: 1.35rem;
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.action-grid-v2 article > span {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 8px 20px -15px rgba(0,0,0,.5);
}
.action-grid-v2 h3 {
  margin-bottom: .55rem;
  font-size: 1.08rem;
}
.action-grid-v2 p {
  font-size: .88rem;
  line-height: 1.65;
}
.action-measure-v12 {
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(255,255,255,.12);
}
.action-measure-v12 em {
  display: block;
  margin-bottom: .3rem;
  color: #e8be8b;
  font: 700 .55rem var(--mono);
  font-style: normal;
  letter-spacing: .1em;
}
.action-measure-v12 b {
  display: block;
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.5;
}

/* Six visuals per case study are deliberate, but the page still needs rhythm. */
.evidence-stack-v2 {
  gap: 1.6rem;
}
.evidence-row-v2 {
  box-shadow: 0 20px 56px -46px rgba(11,74,67,.65);
}
.evidence-row-v2:nth-child(3n) .evidence-visual-v2 {
  background: color-mix(in srgb, var(--case-accent) 3%, #faf7f1);
}
.evidence-visual-v2 .visual-title-v2 h3 {
  max-width: 28ch;
}
.evidence-visual-v2 .visual-title-v2 p {
  max-width: 62ch;
}

/* A little more breathing room around the most important case-study sections. */
.case-overview-v2,
.evidence-section-v2,
.action-section-v2,
.technical-section-v2 {
  scroll-margin-top: 150px;
}
.case-story-v2 > p {
  max-width: 64ch;
}
.section-head-v2 > p {
  max-width: 58ch;
}

@media (max-width: 980px) {
  .case-context-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .case-context-strip {
    grid-template-columns: 1fr 1fr;
    border-radius: 14px;
  }
  .case-context-strip > div {
    padding: .8rem .85rem;
  }
  .case-context-strip b {
    font-size: .8rem;
  }
  .story-beats-v12 article {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: .8rem;
  }
  .action-grid-v2 article {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .case-context-strip {
    grid-template-columns: 1fr;
  }
}

/* V12 homepage: concrete capabilities replace arbitrary percentage scores. */
.capability-card-v12 {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  padding: .68rem;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--surface);
}
.capability-card-v12 > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font: 800 .7rem var(--mono);
  letter-spacing: .05em;
}
.capability-card-v12 b {
  display: block;
  color: var(--ink);
  font-size: .62rem;
}
.capability-card-v12 small {
  display: block;
  margin-top: .12rem;
  color: var(--ink-3);
  font-size: .48rem;
  line-height: 1.35;
}


/* ==========================================================================
   V13 — clearer navigation, calmer reading rhythm, more natural portfolio UI
   ========================================================================== */

/* Keep the main navigation easy to scan even with descriptive labels. */
.masthead {
  gap: .8rem;
}
.mast-nav {
  gap: .08rem;
}
.mast-nav a {
  padding-inline: .72rem;
  white-space: nowrap;
}
@media (max-width: 1080px) and (min-width: 901px) {
  .mast-name small { display: none; }
  .mast-nav a { padding-inline: .55rem; font-size: .82rem; }
}

/* Home-page shortcuts: useful without turning the page into another dashboard. */
.portfolio-shortcuts-wrap {
  margin-top: -1.4rem;
  position: relative;
  z-index: 5;
}
.portfolio-shortcuts {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow-md);
}
.shortcut-label,
.portfolio-shortcuts > a {
  min-height: 84px;
  padding: 1rem 1.05rem;
}
.shortcut-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--rule);
  background: var(--brand);
  color: #fff;
}
.shortcut-label small {
  color: rgba(255,255,255,.64);
  font: 700 .58rem var(--mono);
  letter-spacing: .11em;
}
.shortcut-label b {
  margin-top: .25rem;
  color: #fff;
  font-size: .92rem;
}
.portfolio-shortcuts > a {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: .7rem;
  align-items: center;
  color: var(--ink);
  border-right: 1px solid var(--rule);
  transition: background .18s ease, transform .18s ease;
}
.portfolio-shortcuts > a:last-child { border-right: 0; }
.portfolio-shortcuts > a:hover {
  background: var(--brand-soft);
  text-decoration: none;
}
.portfolio-shortcuts > a > span {
  color: var(--brand);
  font: 700 .63rem var(--mono);
}
.portfolio-shortcuts > a b {
  display: block;
  font-size: .88rem;
}
.portfolio-shortcuts > a small {
  display: block;
  margin-top: .12rem;
  color: var(--ink-3);
  font-size: .68rem;
  line-height: 1.35;
}
.portfolio-shortcuts > a i {
  color: var(--brand);
  font-style: normal;
  font-weight: 700;
}

/* Project directory gives recruiters a fast way to jump straight into a case. */
.project-quick-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  margin: 1.45rem 0 2rem;
}
.project-quick-index a {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: .65rem;
  align-items: center;
  min-width: 0;
  padding: .85rem .9rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.project-quick-index a:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  text-decoration: none;
}
.project-quick-index span {
  color: var(--brand);
  font: 700 .62rem var(--mono);
}
.project-quick-index b,
.project-quick-index small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-quick-index b {
  font-size: .84rem;
  white-space: nowrap;
}
.project-quick-index small {
  margin-top: .15rem;
  color: var(--ink-3);
  font-size: .65rem;
  white-space: nowrap;
}
.project-quick-index i {
  color: var(--brand);
  font-style: normal;
}

/* Easier case-study scanning. */
.case-jump-nav {
  padding: .45rem;
  border-radius: 14px;
}
.case-jump-nav button {
  min-height: 40px;
  border: 0;
  cursor: pointer;
}
.case-jump-nav button.on {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.case-jump-nav button:not(.on):hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.case-story-v2 > p,
.evidence-copy-v2 > p,
.technical-card-v2 > p {
  max-width: 68ch;
}
.section-head-v2 > p {
  max-width: 58ch;
}

/* Cards feel clickable without adding decorative noise. */
.project-story-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.project-story-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-line);
  text-decoration: none;
}

/* Education should show credentials, not graduation dates. */
.education-grid-v2 article {
  grid-template-columns: 1fr;
  padding: 1.15rem 1.25rem;
}
.education-grid-v2 article > span {
  display: none;
}
.education-grid-v2 h3 {
  font-size: 1.08rem;
}
.education-grid-v2 p {
  margin-top: .28rem;
}

/* Slightly tighter reading rhythm on long pages. */
.projects-page-v2 .project-story-list,
.case-study-v2 .evidence-stack-v2 {
  scroll-margin-top: 120px;
}
.evidence-copy-v2 {
  padding-block: clamp(1.35rem, 2.5vw, 2rem);
}
.action-grid-v2 article p {
  line-height: 1.62;
}

@media (max-width: 900px) {
  .portfolio-shortcuts-wrap { margin-top: -.6rem; }
  .portfolio-shortcuts {
    grid-template-columns: 1fr;
  }
  .shortcut-label,
  .portfolio-shortcuts > a {
    min-height: 66px;
  }
  .shortcut-label {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .portfolio-shortcuts > a {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .portfolio-shortcuts > a:last-child { border-bottom: 0; }

  .project-quick-index {
    display: flex;
    overflow-x: auto;
    gap: .55rem;
    padding-bottom: .35rem;
    scroll-snap-type: x proximity;
  }
  .project-quick-index a {
    flex: 0 0 min(78vw, 300px);
    scroll-snap-align: start;
  }

  .case-jump-nav {
    border-radius: 12px;
    padding: .4rem;
  }
  .case-jump-nav button {
    flex: 0 0 auto;
    padding-inline: .85rem;
  }
}

@media (max-width: 620px) {
  .portfolio-hero {
    padding-top: 2.8rem;
  }
  .projects-intro-v2 h1,
  .about-hero-copy-v2 h1,
  .contact-hero-v2 h1 {
    max-width: 100%;
  }
  .education-grid-v2 article {
    grid-template-columns: 1fr;
  }
}

#mastContact[aria-current='page'] { box-shadow: 0 0 0 2px var(--brand-line); }
