/* ============================================================================
   "As-Built" — the site as a drawing set: vellum paper with a drafting grid,
   drafting ink, redline accents, title blocks for section headers. The live
   panels sit in rack-black frames so they read as hardware on the page.
   ============================================================================ */
:root {
  --paper: #edeae2;
  --paper-2: #f5f3ee;
  --grid: #d9d5c9;
  --ink: #1b2a3a;
  --ink-2: #4c5866;
  --line: #3f5a78;
  --rule: #b9b3a5;
  --redline: #d33f2e;
  --rack: #16171a;
  --rack-2: #222327;
  --radius: 4px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  /* drafting grid: fine 24px, heavier every 120px */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--grid) 45%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--grid) 45%, transparent) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
a { color: var(--line); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--redline); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.08; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-stretch: 122%; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-stretch: 120%; }
h3 { font-size: 1.12rem; font-stretch: 105%; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.redline { color: var(--redline); }
code { font-family: var(--mono); font-size: .88em; background: var(--paper-2); border: 1px solid var(--rule); padding: 0 .3em; border-radius: 2px; }

/* ---------- title block (section labels) ---------- */
.tb { display: inline-flex; align-items: stretch; border: 1.5px solid var(--ink); background: var(--paper-2); font: 500 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.1rem; }
.tb > span { padding: .5rem .7rem; display: flex; align-items: center; }
.tb > span + span { border-left: 1.5px solid var(--ink); }
.tb-sheet { background: var(--ink); color: var(--paper-2); font-weight: 600; }
.tb-rev { color: var(--redline); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; cursor: pointer;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper-2);
  font: 600 .95rem var(--sans); font-stretch: 105%; text-decoration: none;
  padding: .8rem 1.3rem; border-radius: var(--radius);
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--redline); border-color: var(--redline); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }
.btn-sm { padding: .45rem .85rem; font-size: .85rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .8rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1.5px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font: 700 1rem var(--sans); font-stretch: 115%; letter-spacing: .02em; text-transform: uppercase; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--ink); font: 600 .78rem var(--mono); }
.nav nav { display: flex; gap: 1.4rem; align-items: center; }
.nav nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav nav a:not(.btn):hover { color: var(--redline); }

/* ---------- layout ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem); }
.section { padding: 3.5rem 0; }   /* the title block marks each new sheet; no rule needed */
.section-head { max-width: 720px; margin-bottom: 2.2rem; }
.section-head .muted { font-size: 1.05rem; }
.grid { display: grid; gap: 1.2rem; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: center; padding: 4rem 0 4.5rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 520px; }
.hero-cta { display: flex; gap: .8rem; margin: 1.8rem 0 2.2rem; flex-wrap: wrap; }
.stats { list-style: none; padding: 0; margin: 0 0 1.4rem; display: flex; gap: 2.4rem; }
.stats strong { display: block; font-size: 2rem; font-stretch: 112%; line-height: 1.1; }
.stats span { color: var(--ink-2); font-size: .85rem; }
.platforms { margin: 0; display: grid; border: 1.5px solid var(--ink); background: var(--paper-2); max-width: 520px; }
.platforms > div { display: grid; grid-template-columns: 110px 1fr; }
.platforms > div + div { border-top: 1px solid var(--rule); }
.platforms dt { font: 600 .78rem var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: .55rem .7rem; border-right: 1px solid var(--rule); }
.platforms dd { margin: 0; padding: .55rem .7rem; font-size: .92rem; color: var(--ink-2); }
.hero-panel { display: grid; gap: .9rem; }
.hero-swatches { display: flex; align-items: center; justify-content: center; gap: .8rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); flex-wrap: wrap; }

/* ---------- device frame (rack black, neutral like a real TSW bezel) ---------- */
.device {
  position: relative; padding: 16px 16px 28px;
  background: linear-gradient(170deg, #2a2b2f, var(--rack) 60%);
  border-radius: 20px; border: 1px solid #000;
  box-shadow: 0 30px 50px -28px rgba(20, 20, 20, .55), inset 0 1px 0 #3a3b40;
}
.device-led { position: absolute; bottom: 10px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 6px #3ddc84; }
.device-screen { aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #000; position: relative; }
.device-screen iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #000; }
.live-tag { position: absolute; top: -12px; right: 22px; z-index: 2; display: flex; align-items: center; gap: .45rem; padding: .3rem .7rem; background: var(--redline); color: #fff; font: 600 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; border-radius: 2px; }
.live-tag i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.device-open { display: none; }

/* ---------- work ---------- */
.platform-tabs { display: inline-flex; border: 1.5px solid var(--ink); margin-bottom: 1.6rem; background: var(--paper-2); }
.platform-tab { border: 0; cursor: pointer; font: 600 .9rem var(--sans); color: var(--ink-2); background: transparent; padding: .6rem 1.2rem; }
.platform-tab + .platform-tab { border-left: 1.5px solid var(--ink); }
.platform-tab[aria-selected="true"] { background: var(--ink); color: var(--paper-2); }
.work { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; }
.project-list { display: flex; flex-direction: column; border: 1.5px solid var(--ink); align-self: start; background: var(--paper-2); counter-reset: sheet; }
.project-tab { counter-increment: sheet; text-align: left; cursor: pointer; color: var(--ink); background: transparent; border: 0; padding: .85rem 1rem .85rem 3rem; font: 600 1rem var(--sans); position: relative; }
.project-tab + .project-tab { border-top: 1px solid var(--rule); }
.project-tab::before { content: counter(sheet, decimal-leading-zero); position: absolute; left: 1rem; top: .95rem; font: 500 .75rem var(--mono); color: var(--ink-2); }
.project-tab small { display: block; color: var(--ink-2); font: 400 .74rem var(--mono); margin-top: .2rem; }
.project-tab:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.project-tab[aria-selected="true"] { background: var(--ink); color: var(--paper-2); }
.project-tab[aria-selected="true"]::before, .project-tab[aria-selected="true"] small { color: color-mix(in srgb, var(--paper-2) 70%, transparent); }
.work-stage { display: grid; gap: 1.1rem; min-width: 0; }

.brand-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: 0 .2rem .2rem; border-bottom: 1px solid var(--rule); }
.brand-bar strong { font: 600 .78rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.brand-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.swatches { display: flex; gap: .4rem; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--c); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.swatch[aria-pressed="true"] { outline: 2px solid var(--redline); outline-offset: 2px; }
.swatch-custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.logo-btn { cursor: pointer; }

.project-detail { display: grid; grid-template-columns: 1fr; gap: .8rem; }
.project-detail h3 { font-size: 1.35rem; margin: 0; }
.project-detail p { margin: 0; color: var(--ink-2); max-width: 760px; }
.project-detail details { border-top: 1px solid var(--rule); padding-top: .6rem; }
.project-detail summary { cursor: pointer; font: 600 .78rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.project-detail ul { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font: .72rem var(--mono); padding: .25rem .55rem; border: 1px solid var(--ink); color: var(--ink); background: var(--paper-2); }
/* redline note: the drawing-set way to say "look here" */
.combine-tip { border: 1.5px dashed var(--redline); color: var(--ink); padding: .8rem 1rem; font-size: .93rem; background: color-mix(in srgb, var(--redline) 5%, var(--paper-2)); }
.combine-tip strong { color: var(--redline); font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-right: .4rem; }

/* ---------- tooling ---------- */
.spec-list { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.spec-list li { padding-left: 1.4rem; position: relative; color: var(--ink-2); }
.spec-list li::before { content: ""; position: absolute; left: 0; top: .75em; width: .8rem; height: 1.5px; background: var(--redline); }
.browser { border: 1.5px solid var(--ink); background: var(--rack); }
.browser-bar { display: flex; align-items: center; gap: 1rem; padding: .55rem .9rem; border-bottom: 1px solid #000; background: var(--rack-2); }
.dots { display: flex; gap: .4rem; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #45464c; }
.browser-url { flex: 1; font-size: .74rem; color: #a7a9b0; background: #111214; padding: .3rem .7rem; border-radius: 3px; }
.browser-screen { position: relative; height: min(70vh, 640px); overflow: hidden; background: #e8ebf0; }
.browser-screen iframe { position: absolute; top: 0; left: 0; width: 1280px; border: 0; transform-origin: 0 0; pointer-events: none; }
.browser.is-live .browser-screen iframe { pointer-events: auto; }
.browser-cover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(22, 23, 26, .55); }
.browser-cover > div { background: var(--paper-2); border: 1.5px solid var(--ink); padding: 1.4rem 1.6rem; max-width: 420px; display: grid; gap: .5rem; text-align: center; }
.browser-cover b { font-size: 1.1rem; font-stretch: 110%; }
.browser-cover span { color: var(--ink-2); font-size: .92rem; }
.cover-actions { display: flex; gap: .6rem; justify-content: center; margin-top: .6rem; flex-wrap: wrap; }
.browser.is-live .browser-cover { display: none; }
.tools-chips { margin-top: 1rem; }

/* ---------- code ---------- */
.repos { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--paper-2); border: 1.5px solid var(--ink); padding: 1.4rem; transition: box-shadow .15s, transform .15s; }
.repo { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.repo:hover { color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.repo h3 { font-family: var(--mono); font-size: .98rem; font-weight: 600; }
.repo p { flex: 1; color: var(--ink-2); margin: 0 0 .9rem; font-size: .95rem; }
.repo-meta { display: flex; gap: 1rem; font: .74rem var(--mono); color: var(--ink-2); }
.lang-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--redline); margin-right: .35rem; }
.repo-meta .soon { color: var(--redline); }

/* ---------- services: numbered spec rows, two columns ---------- */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); background: var(--paper-2); counter-reset: svc; }
.services li { counter-increment: svc; padding: 1.4rem 1.5rem 1.3rem 4.2rem; position: relative; border-top: 1px solid var(--rule); }
.services li:nth-child(-n+2) { border-top: 0; }
.services li:nth-child(odd) { border-right: 1px solid var(--rule); }
.services li::before { content: counter(svc, decimal-leading-zero); position: absolute; left: 1.5rem; top: 1.45rem; font: 600 .82rem var(--mono); color: var(--redline); }
.services p { margin: 0 0 .6rem; color: var(--ink-2); font-size: .95rem; }
.services .tags { font-size: .74rem; color: var(--line); margin: 0; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-links { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; }
.contact-links li { display: flex; gap: 1rem; align-items: baseline; }
.contact-links span { width: 74px; color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.contact-form { display: grid; gap: 1rem; background: var(--paper-2); border: 1.5px solid var(--ink); padding: 1.5rem; }
.contact-form label { display: grid; gap: .35rem; font: 600 .76rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.contact-form input, .contact-form select, .contact-form textarea { font: 400 1rem var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 2px; padding: .7rem .8rem; text-transform: none; letter-spacing: 0; }
.contact-form :focus { outline: 2px solid var(--redline); outline-offset: 1px; }
/* let the contact columns and fields shrink on narrow phones: a select is otherwise as wide as its
   longest option ("Deployment tooling / room standards") and pushes the form off-screen */
.contact > * { min-width: 0; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; min-width: 0; }
.contact-links a { overflow-wrap: anywhere; }

/* ---------- footer ---------- */
.footer { max-width: 1200px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem) 3rem; }

[hidden] { display: none !important; }

/* ---------- round 1 review: drafting details, how-I-work, write-ups ---------- */
/* silkscreen-condensed labels, wide headings: Archivo's width axis does the work */
.tb-title, .nav nav a:not(.btn), .platform-tab { font-stretch: 82%; }
.tb-title { font-family: var(--sans); font-weight: 600; font-size: .82rem; letter-spacing: .1em; }

/* dimension line under the hero panel: |<-- 10.1" TSW · 1280 x 800 -->| */
.dim { position: relative; height: 18px; margin: -.2rem 16px 0; display: grid; place-items: center; }
.dim::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 0; border-top: 1px solid var(--line);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.dim::after { content: ""; position: absolute; inset: 3px 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.dim span { position: relative; z-index: 1; background: var(--paper); padding: 0 .6rem; font: 500 .7rem var(--mono); color: var(--line); letter-spacing: .06em; }

/* revision marker + link to the divisible-room demo */
.hero-demo { display: inline-flex; align-items: center; gap: .55rem; margin: -1rem 0 2rem; font-weight: 600; color: var(--redline); text-decoration: none; }
.hero-demo:hover { text-decoration: underline; }
.rev { display: inline-grid; place-items: center; width: 26px; height: 22px; font: 600 .62rem var(--mono); color: var(--redline);
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M13 1.5 24.5 20.5H1.5Z' fill='none' stroke='%23d33f2e' stroke-width='1.5'/%3E%3C/svg%3E"); padding-top: 5px; }

/* revision cloud: scalloped redline border around the "try this" note */
.combine-tip { border: 0; position: relative; padding: 1.1rem 1.3rem;
  background:
    radial-gradient(circle at 50% 100%, transparent 6px, var(--redline) 6.5px 8px, transparent 8.5px) top left / 16px 9px repeat-x,
    radial-gradient(circle at 50% 0, transparent 6px, var(--redline) 6.5px 8px, transparent 8.5px) bottom left / 16px 9px repeat-x,
    radial-gradient(circle at 100% 50%, transparent 6px, var(--redline) 6.5px 8px, transparent 8.5px) top left / 9px 16px repeat-y,
    radial-gradient(circle at 0 50%, transparent 6px, var(--redline) 6.5px 8px, transparent 8.5px) top right / 9px 16px repeat-y,
    color-mix(in srgb, var(--redline) 5%, var(--paper-2)); }

/* problem / what I did / result labels inside project write-ups */
.project-detail p b { font: 600 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--redline); margin-right: .35rem; }
.project-detail p b:not(:first-child) { margin-left: .5rem; }

/* how I work */
.how { padding: 2.5rem 0 1rem; }
.how-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1.5px solid var(--ink); background: var(--paper-2); }
.how-list li { padding: 1.1rem 1.2rem; display: grid; gap: .3rem; }
.how-list li + li { border-left: 1px solid var(--rule); }
.how-list b { font-stretch: 110%; }
.how-list span { color: var(--ink-2); font-size: .9rem; }
.form-note { color: var(--ink-2); font-size: .82rem; }

@media (max-width: 960px) {
  .how-list { grid-template-columns: 1fr 1fr; }
  .how-list li:nth-child(3) { border-left: 0; }
  .how-list li:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  /* phones: the live panel goes right under the headline, the platform table is dropped */
  .hero { display: flex; flex-direction: column; gap: 1.2rem; }
  .hero-text { display: contents; }
  .hero-text .tb { order: 1; align-self: flex-start; margin-bottom: 0; }
  .hero h1 { order: 2; margin: 0; }
  .hero-panel { order: 3; }
  .lead { order: 4; margin: 0; }
  .hero-cta { order: 5; margin: 0; }
  .hero-demo { order: 6; margin: 0; }
  .stats { order: 7; }
  .platforms { display: none; }
  .how-list { grid-template-columns: 1fr; }
  .how-list li + li { border-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- round 2 review: process timeline, code CTA, closing title block ---------- */
.how-who { margin: 0 0 1rem; color: var(--ink-2); }
ol.how-list { counter-reset: step; }
.how-list li { counter-increment: step; position: relative; padding-top: 2.4rem; }
.how-list li::before { content: counter(step, decimal-leading-zero); position: absolute; top: 1rem; left: 1.2rem; font: 600 .78rem var(--mono); color: var(--redline); }
/* arrows between steps: the process reads left to right like a signal flow */
.how-list li + li::after { content: "→"; position: absolute; left: -.55rem; top: .85rem; background: var(--paper-2); color: var(--redline); font: 600 .9rem var(--mono); padding: 0 .1rem; }
.code-cta { display: flex; align-items: center; gap: .6rem; margin: 1.2rem 0 0; color: var(--ink-2); }

.title-block { display: grid; grid-template-columns: 2.2fr repeat(4, 1fr); border: 2px solid var(--ink); background: var(--paper-2); }
.title-block > div { padding: .7rem .9rem; display: grid; gap: .2rem; align-content: start; border-left: 1px solid var(--ink); }
.title-block > div:first-child { border-left: 0; }
.title-block small { font: 500 .62rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.title-block b { font: 600 .82rem var(--mono); }
.tbk-main b { font: 700 1.05rem var(--sans); font-stretch: 118%; }
.tbk-main span { font-size: .8rem; color: var(--ink-2); }
.tbk-note { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--ink); grid-auto-flow: column; justify-content: start; align-items: baseline; gap: .8rem !important; }
.tbk-note b { color: var(--redline); }
@media (max-width: 960px) {
  .how-list li:nth-child(3)::after { display: none; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .title-block .tbk-main { grid-column: 1 / -1; }
  .title-block > div { border-top: 1px solid var(--ink); }
  .title-block > div:nth-child(2), .title-block > div:nth-child(4) { border-left: 0; }
}
@media (max-width: 640px) {
  .how-list li + li::after { display: none; }
  .tbk-note { grid-auto-flow: row; }
}

/* ---------- credentials strip (from the resume) ---------- */
.creds { padding: 0 0 2.5rem; }
.cred-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--ink); background: var(--paper-2); }
.cred-list li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem 1rem; border-top: 1px solid var(--rule); }
.cred-list li:nth-child(-n+3) { border-top: 0; }
.cred-list li:not(:nth-child(3n+1)) { border-left: 1px solid var(--rule); }
.cred-list b { font-size: .95rem; font-stretch: 105%; }
/* approval stamp: a boxed, slightly rotated redline mark */
.stamp { flex: none; font: 600 .62rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ok, #2f8f5b); border: 1.5px solid currentColor; padding: .2rem .45rem; transform: rotate(-3deg); }
.stamp-open { color: var(--redline); border-style: dashed; }
.cred-note { margin: .8rem 0 0; color: var(--ink-2); font-size: .92rem; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 1.6rem; flex-wrap: wrap; }
.stats span { display: block; line-height: 1.3; }
@media (max-width: 960px) {
  .cred-list { grid-template-columns: 1fr 1fr; }
  .cred-list li:nth-child(3) { border-top: 1px solid var(--rule); }
  .cred-list li:not(:nth-child(3n+1)) { border-left: 0; }
  .cred-list li:nth-child(even) { border-left: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .cred-list { grid-template-columns: 1fr; }
  .cred-list li:nth-child(2) { border-top: 1px solid var(--rule); }
  .cred-list li:nth-child(even) { border-left: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .work { grid-template-columns: 1fr; }
  .project-list { flex-direction: row; overflow-x: auto; }
  .project-tab { flex: 0 0 auto; }
  .project-tab + .project-tab { border-top: 0; border-left: 1px solid var(--rule); }
  .contact { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .services li:nth-child(odd) { border-right: 0; }
  .services li:nth-child(2) { border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .nav { flex-direction: column; align-items: flex-start; gap: .5rem; padding-top: .6rem; padding-bottom: .6rem; }
  .nav nav { gap: 1rem; overflow-x: auto; max-width: 100%; }
  .nav nav .btn { padding: .35rem .7rem; }
  .repos { grid-template-columns: 1fr; }
  .stats { gap: 1.6rem; }
  .platforms > div { grid-template-columns: 90px 1fr; }
  /* project list: stacked, not a sideways scroller that cuts names off */
  .project-list { flex-direction: column; overflow: visible; }
  .project-tab + .project-tab { border-left: 0; border-top: 1px solid var(--rule); }
  /* panels are 1280 px wide: at phone width the targets are ~3 mm, so offer full screen instead */
  .device { padding: 10px 10px 22px; border-radius: 14px; }
  .device-screen iframe { pointer-events: none; }
  .device-open { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
    position: absolute; inset: 10px 10px 22px; border-radius: 6px; background: rgba(22, 23, 26, .62);
    color: #fff; text-decoration: none; font: 600 1rem var(--sans); text-align: center; }
  .device-open:hover { color: #fff; }
  .device-open small { font: .72rem var(--mono); opacity: .8; }
  .live-tag { display: none; }
  .browser-screen { height: 420px; }
  #builderTry { display: none; }
}
