/* AI version of jacobbolzman.com: technical, SDLC + AI, moving charts.
   Colour carries meaning on every page:
     amber      = a person decides or directs
     periwinkle = AI produces
     teal       = verified / passed
     coral      = a defect that was caught                                     */

:root {
    --bg: #10141b;
    --panel: #171e29;
    --panel-2: #1d2634;
    --line: #2b3647;
    --text: #e8edf4;
    --muted: #9aa8bc;
    --human: #f2b544;
    --ai: #9ba8ff;
    --pass: #3fd1a5;
    --fail: #ff7a7a;
    --display: "Schibsted Grotesk", "Avenir Next", "Segoe UI", Arial, sans-serif;
    --body: "Hanken Grotesk", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.65;
}

main { flex: 1; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: var(--human); text-underline-offset: 3px; }
a:hover { color: #ffd37f; }
:focus-visible { outline: 3px solid var(--human); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.12; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.measure { max-width: 64ch; }
.muted { color: var(--muted); }

/* ── Header ───────────────────────────────────────────────────────── */

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 28px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.wordmark:hover { color: var(--text); }
.tabs { display: flex; flex-wrap: wrap; gap: 2px 6px; margin: 0; padding: 0; list-style: none; }
.tabs a { display: block; padding: 8px 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--human); }

/* ── Layout helpers ───────────────────────────────────────────────── */

.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { margin-bottom: 14px; }
.page-title { padding: 52px 0 12px; }
.page-title h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 24px; } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }

.btn { display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 700; text-decoration: none; border: 1.5px solid var(--human); }
.btn-primary { background: var(--human); color: #1a1405; }
.btn-primary:hover { background: #ffd37f; border-color: #ffd37f; color: #1a1405; }
.btn-quiet { color: var(--human); }
.btn-quiet:hover { background: var(--human); color: #1a1405; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Legend that explains the colour code */
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 0.95rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.i-human { background: var(--human); } .i-ai { background: var(--ai); } .i-pass { background: var(--pass); } .i-fail { background: var(--fail); }

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero { padding: 60px 0 30px; }
.hero h1 { max-width: 16ch; margin-bottom: 20px; }
.hero .lede { margin-bottom: 26px; }
.pipeline { width: 100%; height: auto; margin-top: 34px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.pipeline text { font-family: var(--body); fill: var(--text); }
.pipeline .stage rect { fill: var(--panel-2); stroke: var(--line); stroke-width: 1.5; }
.pipeline .stage text { font-size: 15px; font-weight: 600; }
.pipeline .track { stroke: var(--line); stroke-width: 3; fill: none; }
.pipeline .retry { stroke: var(--fail); stroke-width: 2; stroke-dasharray: 5 5; fill: none; opacity: 0.8; }
.pipeline .retry-label { font-size: 13px; fill: var(--fail); }
.pipeline .legend-text { font-size: 13px; fill: var(--muted); }

/* ── Charts ───────────────────────────────────────────────────────── */

.chart-group { margin-bottom: 26px; }
.chart-group h3 { margin-bottom: 2px; }
.chart-group .where { color: var(--muted); font-size: 0.95rem; margin-bottom: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(180px, 280px) 1fr 64px; align-items: center; gap: 14px; margin: 8px 0; font-size: 0.98rem; }
.bar-track { height: 16px; background: var(--panel-2); border-radius: 8px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: calc(var(--v) * 1%); background: var(--pass); border-radius: 8px; transition: width 1.3s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 110ms); }
.bar-value, .gantt-axis, .stage-table { font-variant-numeric: tabular-nums; }
.bar-value { font-family: var(--display); font-weight: 700; text-align: right; }
.js .bar-fill { width: 0; }
.js .in-view .bar-fill { width: calc(var(--v) * 1%); }
@media (max-width: 640px) { .bar-row { grid-template-columns: 1fr 56px; } .bar-row .bar-label { grid-column: 1 / -1; } }

.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.gauge { text-align: center; }
.gauge svg { width: 150px; height: 150px; }
.gauge .g-track { fill: none; stroke: var(--panel-2); stroke-width: 10; }
.gauge .g-arc { fill: none; stroke: var(--pass); stroke-width: 10; stroke-linecap: round; stroke-dasharray: calc(var(--v) * 1) 100; transition: stroke-dasharray 1.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .gauge .g-arc { stroke-dasharray: 0 100; }
.js .in-view .gauge .g-arc { stroke-dasharray: calc(var(--v) * 1) 100; }
.gauge .g-num { font-family: var(--display); font-weight: 700; font-size: 22px; fill: var(--text); }
.gauge p { margin: 8px 0 0; font-size: 0.95rem; }
.gauge .where { color: var(--muted); font-size: 0.88rem; }

/* Career timeline as a Gantt chart */
.gantt { position: relative; margin-top: 10px; }
.gantt-row { display: grid; grid-template-columns: 230px 1fr; align-items: center; gap: 14px; padding: 5px 0; font-size: 0.93rem; }
.gantt-label small { display: block; color: var(--muted); font-size: 0.82rem; line-height: 1.2; }
.gantt-track { position: relative; height: 18px; border-radius: 9px; background: linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / calc(100% / 7) 100%; }
.gantt-bar { position: absolute; left: calc(var(--s) * 1%); width: calc(var(--w) * 1%); top: 0; bottom: 0; border-radius: 9px; background: #5b7192; transform-origin: left center; transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.gantt-bar.ai { background: var(--ai); }
.js .gantt-bar { transform: scaleX(0); }
.js .in-view .gantt-bar { transform: scaleX(1); }
.gantt-axis { display: grid; grid-template-columns: 230px 1fr; gap: 14px; font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
.gantt-axis-ticks { position: relative; height: 18px; }
.gantt-axis-ticks span { position: absolute; transform: translateX(-50%); }
.gantt-axis-ticks span:first-child { transform: none; }
.gantt-marker { position: absolute; top: 24px; bottom: 0; left: calc(230px + 14px + (100% - 230px - 14px) * var(--m)); border-left: 2px dashed var(--human); pointer-events: none; }
.gantt-marker b { position: absolute; top: -4px; right: 8px; white-space: nowrap; font-size: 0.8rem; color: var(--human); font-weight: 600; background: var(--bg); padding: 0 4px; }
@media (max-width: 760px) {
    .gantt-row, .gantt-axis { grid-template-columns: 1fr; gap: 2px; }
    .gantt-axis > span:first-child { display: none; }
    .gantt-marker { display: none; }
}

/* Counters */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.1; color: var(--text); }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* ── SDLC stage table ─────────────────────────────────────────────── */

.stage-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.stage-table th, .stage-table td { text-align: left; vertical-align: top; padding: 14px 14px; border-top: 1px solid var(--line); }
.stage-table thead th { border-top: 0; font-family: var(--display); font-size: 0.95rem; color: var(--muted); padding-bottom: 8px; }
.stage-table tbody th { font-family: var(--display); font-weight: 700; white-space: nowrap; }
.stage-table .c-human { border-left: 3px solid var(--human); }
.stage-table .c-ai { border-left: 3px solid var(--ai); }
.stage-table .c-pass { border-left: 3px solid var(--pass); }
@media (max-width: 860px) {
    .stage-table thead { position: absolute; left: -9999px; }
    .stage-table, .stage-table tbody, .stage-table tr, .stage-table td, .stage-table th { display: block; width: 100%; }
    .stage-table tr { border-top: 1px solid var(--line); padding: 10px 0; }
    .stage-table th, .stage-table td { border: 0; padding: 4px 0 4px 12px; }
    .stage-table td::before { content: attr(data-label); display: block; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
}

.loop { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
.loop text { font-family: var(--body); fill: var(--text); font-size: 15px; font-weight: 600; }
.loop .ring { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 8; }
.loop .step { fill: var(--panel-2); stroke-width: 2; }
.loop .sub { font-size: 12px; font-weight: 400; fill: var(--muted); }

/* ── Architecture diagrams ────────────────────────────────────────── */

.arch { width: 100%; height: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.arch text { font-family: var(--body); fill: var(--text); font-size: 14px; font-weight: 600; }
.arch .sub { font-size: 12px; font-weight: 400; fill: var(--muted); }
.arch .box { fill: var(--panel-2); stroke: var(--line); stroke-width: 1.5; }
.arch .box.ai { stroke: var(--ai); }
.arch .box.data { stroke: var(--pass); }
.arch .wire { fill: none; stroke: var(--line); stroke-width: 2; }
.arch .note { font-size: 12px; font-weight: 400; fill: var(--muted); }

.project { margin-bottom: 40px; }
.project h3 { font-size: 1.5rem; margin-bottom: 4px; }
.project .status { color: var(--muted); margin-bottom: 12px; }
.project-shot { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 20px; }
.agents { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 18px 0 0; }
.agent { background: var(--panel-2); border: 1px solid var(--ai); border-radius: 10px; padding: 14px 18px 12px; }
.agent h4 { font-size: 1.05rem; color: var(--ai); margin-bottom: 10px; }
.skills { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
.skills li { position: relative; padding: 5px 0 5px 18px; font-size: 0.95rem; line-height: 1.4; }
.skills li::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; border-top: 2px solid var(--line); }
.project .facts { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; font-size: 0.97rem; color: var(--muted); }
.project .facts b { color: var(--text); }

/* ── About / contact ──────────────────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 4px 12px; font-size: 0.92rem; }
.stack-group { margin-bottom: 18px; }
.stack-group h3 { font-size: 1rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

.contact-form { max-width: 560px; }
.contact-form label { display: block; font-weight: 600; margin: 0 0 4px; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea { width: 100%; font: inherit; padding: 10px 12px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form button { font: inherit; font-weight: 700; cursor: pointer; }

/* ── Footer ───────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--line); margin-top: auto; padding: 22px 0 70px; font-size: 0.93rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; }
.site-footer a { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }

@media (prefers-reduced-motion: reduce) {
    .bar-fill, .gantt-bar, .gauge .g-arc { transition: none !important; }
}

/* ── Sample wireframes ────────────────────────────────────────────── */

.wireframes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-top: 22px; }
.wf-fig { margin: 0; }
.wf { display: block; width: 100%; height: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.wf .wf-box { fill: none; stroke: #5b7192; stroke-width: 1.5; }
.wf .wf-fill { fill: #2a3548; }
.wf .wf-line { stroke: #5b7192; stroke-width: 1.5; }
.wf .wf-on { fill: var(--ai); stroke: var(--ai); stroke-width: 1.5; }
.wf .wf-ok { fill: var(--pass); stroke: var(--pass); stroke-width: 1.5; }
.wf .wf-warn { fill: rgba(242, 181, 68, 0.14); stroke: var(--human); stroke-width: 1.5; }
.wf text { font-family: var(--body); }
.wf .wf-text { font-size: 11px; fill: var(--muted); }
.wf .wf-title { font-size: 14px; font-weight: 700; fill: var(--text); }
.wf .wf-btn { font-size: 12px; font-weight: 700; fill: #12151c; }
.wf .wf-pin circle { fill: var(--human); }
.wf .wf-pin text { font-size: 11px; font-weight: 700; fill: #1a1405; }
.wf-fig figcaption { margin-top: 12px; font-size: 0.95rem; }
.wf-notes { margin: 6px 0 0; padding-left: 1.3em; color: var(--muted); }
.wf-notes li { margin-bottom: 4px; }

/* Numbered pins on diagrams, and the matching step list */
.arch .pin circle { fill: var(--human); }
.arch .pin text { font-size: 12px; font-weight: 700; fill: #1a1405; }
.steps { margin: 16px 0 0; padding-left: 1.4em; }
.steps li { margin-bottom: 6px; }
