/* Modelcraft portfolio site. "Ink & signal": ink structure, white work surfaces,
   Power BI yellow reserved for primary actions, blue for focus and selection.
   The same tokens are repeated in lab-source/styles.css and the workspace theme. */
:root {
  --ink: #0b1220;
  --ink-2: #141d2f;
  --ink-3: #1d2840;
  --ink-line: #2a3650;
  --ink-text: #e8edf5;
  --ink-text-2: #b4bfd0;
  --canvas: #f4f6f9;
  --surface: #ffffff;
  --line: #e3e7ed;
  --line-strong: #cbd2dc;
  --text: #0b1220;
  --text-2: #475467;
  --text-3: #5d6b80;
  --signal: #f2c811;
  --signal-hover: #e3b900;
  --signal-ink: #1a1500;
  --accent: #2f5bea;
  --accent-soft: #eef3ff;
  --focus: #2f5bea;
  --focus-dark: #8fb0ff;
  --pass: #067647;
  --warn: #b54708;
  --sans: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --gutter: 40px;
  --radius: 14px;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--surface); }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 50; top: -60px; left: 16px; padding: 10px 14px; border-radius: 8px; background: var(--signal); color: var(--signal-ink); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 11px 20px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1.3; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.btn-primary:hover { background: var(--signal-hover); border-color: var(--signal-hover); }
.btn-ghost { background: transparent; border-color: rgb(255 255 255 / .24); color: #fff; }
.btn-ghost:hover { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .42); }
.btn-small { min-height: 36px; padding: 7px 14px; font-size: 13.5px; border-radius: 8px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Navigation */
.site-nav { position: sticky; top: 0; z-index: 20; background: rgb(11 18 32 / .94); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--ink-line); color: var(--ink-text); }
.site-nav :focus-visible, .hero :focus-visible, .closing :focus-visible, .stage-bar :focus-visible, .scope-card-ink :focus-visible { outline-color: var(--focus-dark); }
.nav-inner { display: flex; align-items: center; gap: 28px; max-width: 1360px; height: 64px; margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-family: var(--display); font-size: 19px; font-weight: 650; letter-spacing: -.02em; text-decoration: none; }
.mark { width: 28px; height: 28px; display: block; }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links a { display: inline-flex; align-items: center; gap: 5px; padding: 8px 11px; border-radius: 8px; color: var(--ink-text-2); font-size: 14px; text-decoration: none; transition: color .15s, background-color .15s; }
.nav-links a:hover { color: #fff; background: rgb(255 255 255 / .06); }
.nav-links .icon { width: 13px; height: 13px; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--ink-text); padding: 72px 0 286px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgb(255 255 255 / .13) 1px, transparent 1.3px); background-size: 24px 24px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 10%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 70% 10%, #000 20%, transparent 75%); }
.hero::after { content: ""; position: absolute; z-index: -1; right: -10%; top: -30%; width: 60%; height: 90%; background: radial-gradient(closest-side, rgb(242 200 17 / .10), transparent); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr); gap: 32px 72px; align-items: end; }
.hero-side { padding-bottom: 4px; }
.kicker-sep { color: #5d6b80; }
.hero-kicker { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 26px; padding: 6px 12px 6px 10px; border: 1px solid var(--ink-line); border-radius: 999px; background: rgb(255 255 255 / .03); color: var(--ink-text-2); font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgb(242 200 17 / .18); }
.hero h1 { max-width: 12em; color: #fff; font-size: clamp(38px, 4.9vw, 68px); font-weight: 680; line-height: 1.04; letter-spacing: -.038em; }
.hero-lede { max-width: 620px; color: var(--ink-text-2); font-size: clamp(16.5px, 1.3vw, 18px); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.li-glyph { width: 16px; height: 16px; flex-shrink: 0; border-radius: 3px; }
.byline { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 22px; padding: 6px 12px 6px 8px; border: 1px solid transparent; border-radius: 10px; color: var(--ink-text-2); font-size: 14px; text-decoration: none; transition: background-color .15s, border-color .15s; }
.byline .li-glyph { width: 18px; height: 18px; color: #fff; }
.byline strong { color: #fff; font-weight: 600; }
.byline-cta { display: inline-flex; align-items: center; gap: 4px; color: var(--signal); font-weight: 600; }
.byline-cta .icon { width: 13px; height: 13px; }
.byline:hover { background: rgb(255 255 255 / .06); border-color: var(--ink-line); }
.byline:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 40px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.principles li { display: grid; gap: 4px; padding: 20px 28px 0 0; }
.principles li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.principles strong { color: var(--text); font-size: 15.5px; font-weight: 650; }
.principles span { color: var(--text-2); font-size: 14.5px; line-height: 1.5; }

/* Demo stage */
.stage-section { position: relative; z-index: 2; margin-top: -236px; }
.stage { overflow: hidden; border: 1px solid rgb(11 18 32 / .14); border-radius: 18px; background: var(--surface); box-shadow: 0 40px 90px -30px rgb(11 18 32 / .55), 0 12px 30px -12px rgb(11 18 32 / .25); }
.chapters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--canvas); border-bottom: 1px solid var(--line); }
.chapter { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-content: start; padding: 16px 20px 15px; border: 0; background: transparent; text-align: left; cursor: pointer; transition: background-color .15s; }
.chapter + .chapter { border-left: 1px solid var(--line); }
.chapter::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: transparent; transition: background-color .15s; }
.chapter:hover { background: #eceff4; }
.chapter[aria-pressed="true"] { background: var(--surface); }
.chapter[aria-pressed="true"]::before { background: var(--signal); }
.chapter:focus-visible { outline-offset: -3px; border-radius: 0; }
.chapter-num { grid-row: span 2; padding-top: 2px; color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.chapter[aria-pressed="true"] .chapter-num { color: var(--text); }
.chapter-title { color: var(--text); font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.chapter-desc { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding: 7px 10px 7px 16px; background: var(--ink); color: var(--ink-text-2); font-size: 12.5px; }
.stage-bar p { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
.live-chip { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.live-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ccb7f; box-shadow: 0 0 0 3px rgb(60 203 127 / .2); }
.stage-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.stage-link { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #fff; font-size: 12.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.stage-link:hover { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .16); }
.stage-link .icon { width: 14px; height: 14px; }
.stage iframe { display: block; width: 100%; height: clamp(640px, calc(100vh - 150px), 860px); border: 0; background: var(--canvas); }
.stage-hint { min-height: 1.6em; margin-top: 16px; color: var(--text-2); font-size: 14px; text-align: center; }

/* Sections */
.section { padding: 112px 0; }
.section-tint { background: var(--canvas); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-tint + .section, .section + .section-tint { border-top-color: var(--line); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.label { margin-bottom: 14px; color: var(--text-3); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.section h2 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 660; line-height: 1.1; letter-spacing: -.032em; }
.section-head > p:not(.label) { margin-top: 18px; color: var(--text-2); font-size: 17px; }

/* Flow */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.flow li { position: relative; padding: 26px 28px 4px 0; border-top: 2px solid var(--text); }
.flow li + li { padding-left: 28px; }
.flow li:not(:last-child)::after { content: ""; position: absolute; top: -7px; right: -6px; width: 12px; height: 12px; border-top: 2px solid var(--text); border-right: 2px solid var(--text); transform: rotate(45deg); background: var(--surface); }
.flow li:last-child { border-top-color: var(--signal); }
.flow-num { display: block; margin-bottom: 14px; color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.flow h3 { margin-bottom: 8px; font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.flow p { color: var(--text-2); font-size: 15px; }

/* Scope */
.scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.scope-card { display: flex; flex-direction: column; gap: 22px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.scope-card header { display: grid; gap: 10px; }
.scope-card h3 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.scope-tag { justify-self: start; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-2); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.facts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.facts li { position: relative; padding-left: 30px; line-height: 1.5; }
.facts li::before { position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 1; }
.facts .yes::before { content: "✓"; background: #e3f5ec; color: var(--pass); }
.facts .no::before { content: "×"; background: #fdebe2; color: var(--warn); font-size: 15px; }
.facts .note::before { content: "i"; background: #e9edf3; color: var(--text-2); font-family: Georgia, serif; font-style: italic; }
.scope-card .text-link { margin-top: auto; }
.scope-card-ink { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.scope-card-ink h3 { color: #fff; }
.scope-card-ink .scope-tag { border-color: var(--ink-line); color: var(--ink-text-2); }
.scope-card-ink .facts .yes::before { background: rgb(60 203 127 / .16); color: #7fe0ae; }
.scope-card-ink .facts .note::before { background: rgb(255 255 255 / .1); color: var(--ink-text-2); }
.scope-card-ink .text-link { color: var(--signal); }

/* Evidence */
.scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.score { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.score-label { color: var(--text-2); font-size: 14px; font-weight: 600; }
.score-value { margin: 14px 0 16px; color: var(--text); font-family: var(--display); font-size: 56px; font-weight: 650; line-height: 1; letter-spacing: -.04em; }
.score-value span { color: var(--text-3); font-size: 28px; font-weight: 550; letter-spacing: -.02em; }
.meter { height: 8px; border-radius: 4px; background: #e6e9ef; overflow: hidden; }
.meter span { display: block; width: calc(var(--value) * 100%); height: 100%; border-radius: 4px; background: var(--text); }
.meter-tuned span { background: repeating-linear-gradient(135deg, var(--text) 0 6px, #56637a 6px 9px); }
.score-note { margin-top: 16px; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.score-note strong { color: var(--text); }
.perf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); }
.perf div { padding: 18px 24px; }
.perf div + div { border-left: 1px solid var(--line); }
.perf dt { color: var(--text-3); font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.perf dd { margin: 6px 0 0; color: var(--text); font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.evidence-link { margin-top: 28px; }

/* Engineering */
.eng-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.eng-grid article { padding: 28px; background: var(--surface); }
.eng-grid h3 { margin-bottom: 10px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.eng-grid p { color: var(--text-2); font-size: 15px; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.stack span { padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-family: var(--mono); font-size: 12.5px; }

/* Closing + footer */
.closing { position: relative; isolation: isolate; overflow: hidden; padding: 96px 0; background: var(--ink); color: #fff; }
.closing::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgb(255 255 255 / .1) 1px, transparent 1.3px); background-size: 24px 24px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.closing h2 { max-width: 16em; font-size: clamp(30px, 3.6vw, 46px); font-weight: 660; line-height: 1.1; letter-spacing: -.032em; }
.closing .hero-actions { margin-top: 30px; }
.closing-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 48px; align-items: center; }
.author { padding: 26px 28px; border: 1px solid var(--ink-line); border-radius: var(--radius); background: rgb(20 29 47 / .85); }
.author .label { margin-bottom: 8px; color: var(--ink-text-2); }
.author-name { color: #fff; font-family: var(--display); font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.author-note { margin-top: 8px; color: var(--ink-text-2); font-size: 14.5px; line-height: 1.55; }
.btn-linkedin { margin-top: 20px; background: #fff; border-color: #fff; color: var(--ink); }
.btn-linkedin:hover { background: #e8edf5; border-color: #e8edf5; }
.btn-linkedin .li-glyph { width: 18px; height: 18px; color: #0a66c2; }
.site-footer p a { color: #fff; text-underline-offset: 3px; }
.site-footer { padding: 26px 0; background: var(--ink); border-top: 1px solid var(--ink-line); color: var(--ink-text-2); font-size: 13.5px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer strong { color: #fff; font-weight: 600; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--ink-text-2); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.site-footer :focus-visible { outline-color: var(--focus-dark); }

/* Responsive */
@media (max-width: 1100px) {
  :root { --gutter: 28px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero h1 { max-width: 14em; }
  .chapter-desc { display: none; }
  .chapter { padding: 14px 16px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .flow li:nth-child(odd) { padding-left: 0; }
  .flow li:nth-child(2)::after { display: none; }
  .scores { grid-template-columns: 1fr; }
  .score { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; column-gap: 32px; align-items: center; }
  .score-label { grid-column: 1; }
  .score-value { grid-column: 1; grid-row: 2 / span 2; margin: 8px 0 0; }
  .meter { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
  .score-note { grid-column: 2; margin-top: 12px; }
  .eng-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perf div:nth-child(3) { border-left: 0; }
  .perf div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .nav-links a:not(:last-child) { display: none; }
  .hero { padding: 64px 0 260px; }
  .principles { grid-template-columns: 1fr; margin-top: 28px; }
  .principles li, .principles li + li { padding: 14px 0; border-left: 0; }
  .principles li + li { border-top: 1px solid var(--line); }
  .scope-grid { grid-template-columns: 1fr; }
  .closing-inner { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 84px 0; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  html { scroll-padding-top: 64px; }
  .nav-inner { height: 56px; gap: 12px; }
  .brand { font-size: 17px; }
  .mark { width: 24px; height: 24px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 8px; font-size: 13px; }
  .nav-cta { min-height: 34px; padding: 6px 12px; font-size: 13px; }
  .hero { padding: 44px 0 230px; }
  .hero-kicker { margin-bottom: 20px; font-size: 11px; line-height: 1.5; }
  .kicker-extra { display: none; }
  .hero h1 { font-size: 37px; letter-spacing: -.034em; }
  .hero-lede { margin-top: 18px; font-size: 16.5px; }
  .hero-actions { flex-direction: column; align-items: stretch; margin-top: 28px; }
  .stage-section { margin-top: -206px; }
  .stage { border-radius: 14px; }
  .chapters { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .chapters::-webkit-scrollbar { display: none; }
  .chapter { flex: 0 0 auto; scroll-snap-align: start; padding: 12px 16px; }
  .chapter-num { grid-row: auto; }
  .stage-bar { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 12px; }
  .stage-facts { font-size: 12px; line-height: 1.5; }
  .stage-actions { justify-content: flex-start; margin-left: -8px; }
  .stage iframe { height: 620px; }
  .stage-hint { font-size: 13px; text-align: left; }
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head > p:not(.label) { font-size: 16px; }
  .flow { grid-template-columns: 1fr; row-gap: 0; }
  .flow li, .flow li + li, .flow li:nth-child(odd) { padding: 20px 0 24px 0; }
  .flow li::after { display: none; }
  .scope-card, .score, .eng-grid article { padding: 22px; }
  .score { display: flex; align-items: stretch; }
  .score .meter { align-self: stretch; }
  .score-value { margin: 12px 0 14px; font-size: 48px; }
  .eng-grid { grid-template-columns: 1fr; }
  .perf { grid-template-columns: 1fr 1fr; }
  .perf div { padding: 14px 16px; }
  .perf dd { font-size: 16px; }
  .closing { padding: 68px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media (forced-colors: active) {
  .chapter[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .meter span { background: CanvasText; }
}
