/* Shared look for the inner pages (case studies, about). Tokens match index.html. */
:root {
  --bg: #f4f3ef; --bg-2: #ebe9e3; --card: #fbfaf7; --ink: #141414; --muted: #5b5a55;
  --line: rgba(20, 20, 20, .14); --line-2: rgba(20, 20, 20, .28);
  /* Majorelle ultramarine, chosen after the colour case study (prototypes/color/study.html). The whole site reads these tokens. */
  --brand: #5646d6; --brand-text: #5646d6; --brand-bright: #958be2; --brand-deep: #4937d3; --brand-soft: #a8a1e3;
  --red: #d42a25; /* a true red for meaning (Available, FAIL); independent of the brand colour */
  --glow-1: #6f63ff; --glow-2: #ffb040; --glow-3: #3a2fa8; --glow-4: #5fd0c7;
  --accent: var(--brand-text); --accent-fill: var(--brand); --accent-ink: #ffffff; --shadow: 0 30px 60px -30px rgba(60, 40, 20, .35);
  --radius: 22px; --pad: clamp(16px, 4vw, 48px); --max: 1180px;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121212; --bg-2: #1a1a1a; --card: #1c1c1c; --ink: #f1f0ec; --muted: #a8a69f;
  --line: rgba(241, 240, 236, .14); --line-2: rgba(241, 240, 236, .3);
  --accent: var(--brand-bright); --red: #ff4a3f; --accent-fill: var(--brand); --shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.serif { font-family: var(--serif); font-weight: 900; letter-spacing: -.02em; }
.serif em { font-style: italic; font-weight: 900; }
.muted { color: var(--muted); }

/* floating pill nav, same as the homepage */
.nav { position: fixed; top: 10px; left: 50%; translate: -50% 0; z-index: 40; width: min(1240px, calc(100% - 24px)); height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 7px 0 8px; border-radius: 999px; background: color-mix(in srgb, var(--card) 80%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 10px 30px -18px rgba(40, 30, 20, .35); }
:root[data-theme="dark"] .nav { background: color-mix(in srgb, #1c1c1c 82%, transparent); border-color: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 30px -18px rgba(0, 0, 0, .7); }
.brand { display: flex; align-items: center; gap: 10px; padding-right: 6px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { width: 36px; height: 36px; border-radius: 999px; background: var(--accent-fill); color: #fff; display: grid; place-items: center; font: 900 13px/1 var(--display); font-stretch: 110%; }
.nav-links { display: flex; gap: 6px; margin: 0 auto; }
.nav-links a { text-decoration: none; font-size: 14px; padding: 8px 13px; border-radius: 999px; color: color-mix(in srgb, var(--ink) 78%, transparent); transition: transform .35s cubic-bezier(.16, 1, .3, 1), background-color .25s ease, color .25s ease, opacity .25s ease; }
.nav-links:hover a, .nav-links:focus-within a { opacity: .6; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { opacity: 1; color: var(--ink); background: color-mix(in srgb, var(--card) 85%, transparent); }
.nav-links a:hover { transform: scale(1.08); }
.avail { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.avail i, .eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #2fbf5b; box-shadow: 0 0 0 3px color-mix(in srgb, #2fbf5b 25%, transparent); }
.theme-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.theme-btn svg { width: 17px; height: 17px; }
@media (max-width: 1020px) { .nav-links { display: none; } .avail { margin-left: auto; } }
.nav-cta { display: none; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 999px; background: var(--accent-fill); color: var(--accent-ink); font: 600 13.5px/1 var(--sans); text-decoration: none; white-space: nowrap; }
.nav-cta i { width: 7px; height: 7px; border-radius: 50%; background: #5be37f; box-shadow: 0 0 0 3px rgba(91,227,127,.28); }
@media (max-width: 560px) { .avail { display: none; } .nav-cta { display: inline-flex; margin-left: auto; } .nav-cta + .theme-btn { margin-left: 0; } }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.pill:hover { background: var(--ink); color: var(--bg); }
.pill.solid { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.pill.solid:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* article */
.display { font-family: var(--display); font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; line-height: .88; }
.page { padding-top: 96px; }
.crumbs { margin: 30px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font: 500 13px/1.4 var(--mono); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 26px 0 0; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 13px/1 var(--sans); }
.eyebrow i { background: var(--accent); box-shadow: none; }
.page h1 { margin: 18px 0 22px; font-size: clamp(38px, 7.2vw, 108px); padding-bottom: 6px; }
.page h1 em { font-style: normal; color: var(--accent); }
.page h2 { margin: 0 0 18px; font: 900 clamp(26px, 3.6vw, 52px)/.92 var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: -.03em; }
.page h4 { margin: 34px 0 14px; font: 800 clamp(18px, 2vw, 24px)/1.1 var(--display); font-stretch: 110%; text-transform: uppercase; letter-spacing: -.01em; }
.page p, .page li { max-width: 68ch; }
.page .lede { font-size: clamp(16px, 1.6vw, 19px); }
.intro { font-size: clamp(17px, 1.8vw, 22px); color: var(--muted); max-width: 60ch; margin: 0 0 26px; }
.page > .lede, .page > .cols3 { margin-top: 26px; }
.page > .cols3 { padding: 22px 0; border-block: 1px solid var(--line); }
.page > .cols3 .kpi + .kpi { padding-left: clamp(16px, 3vw, 34px); border-left: 1px solid var(--line); }

/* section cards: the homepage's rounded double border */
.blk { margin: 28px 0 0; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); }
.blk-in { position: relative; padding: 52px clamp(18px, 3.4vw, 44px) clamp(20px, 3vw, 40px); border: 1px solid var(--line); border-radius: calc(var(--radius) - 8px); overflow: hidden; }
.blk-label { position: absolute; top: 16px; left: clamp(18px, 3.4vw, 44px); font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: .02em; }
.blk-in > :last-child { margin-bottom: 0; }

/* content blocks shared with the homepage deep dives */
.phone .scr { border-radius: 16%/7.4%; padding: 3.2%; background: #0b0b0b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), var(--shadow); }
.phone img, .phone video { display: block; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; border-radius: 13.4%/6.2%; background: #1a1a1a; }
.rail { display: flex; gap: 18px; overflow-x: auto; padding: 4px 2px 16px; scroll-snap-type: x mandatory; }
.rail figure { margin: 0; flex: 0 0 auto; width: clamp(150px, 17vw, 200px); scroll-snap-align: start; }
.rail figcaption { margin-top: 10px; font-size: 13px; line-height: 1.35; }
.rail figcaption b { display: block; font-weight: 600; }
.rail figcaption a { font-size: 12px; color: var(--accent); text-decoration: none; }
.rail figcaption a:hover { text-decoration: underline; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(16px, 3vw, 34px); }
.kpi .n { font: 900 clamp(32px, 4vw, 56px)/.9 var(--display); font-stretch: 112%; letter-spacing: -.03em; color: var(--accent); }
.kpi p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
pre.cmd { margin: 0; padding: 18px 20px; border-radius: 14px; background: #0f0f10; color: #e6e6e3; font: 13px/1.8 var(--mono); overflow-x: auto; }
pre.cmd .c { color: #7c8189; }
.shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }

/* about page */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.ledger time { font: 500 13px/1.6 var(--mono); color: var(--muted); }
.ledger b { display: block; }
@media (max-width: 560px) { .ledger li { grid-template-columns: 1fr; gap: 2px; } }
.skills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.skills li { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; }
.portrait { width: min(240px, 60vw); height: auto; border-radius: 18px; }

/* next steps + footer */
.more { margin: 64px 0 0; padding: 28px 0 0; border-top: 1px solid var(--line); }
.more ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.more li a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; background: var(--card); }
.more li a:hover { border-color: var(--ink); }
.more li span { display: block; font: 500 12px/1.4 var(--mono); color: var(--muted); margin-bottom: 4px; }
.cta { margin: 28px 0 0; padding: clamp(28px, 5vw, 56px); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line-2); text-align: center; }
.cta p { margin-inline: auto; color: var(--muted); }
.cta .actions { justify-content: center; }
.cta h2 { margin-top: 0; font: 900 clamp(32px, 4.6vw, 64px)/1.02 var(--serif); text-transform: none; letter-spacing: -.02em; font-stretch: 100%; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.foot { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; margin: 56px 0 0; padding: 22px 0 36px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 14px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* skip to content */
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 14px/1 var(--sans); text-decoration: none; transition: top .2s ease; }
.skip:focus { top: 12px; }
