/* Portfolio page. Plain CSS, no build step. One reading path: a label on the
   left, the content on the right, and full-width visuals between them. */

:root {
  --bg: #0e1014;
  --bg-raised: #151920;
  --panel: #1a1f28;
  --line: #2a303b;
  --text: #eef0f4;
  --text-soft: #cdd2dc;
  --muted: #9ea6b5;
  --accent: #7ce0c3;
  --accent-ink: #08241c;
  --warm: #f2b866;
  --max: 1120px;
  --rail: 248px;
  --radius: 14px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #a8f0da; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 16, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.topnav { display: flex; gap: 26px; margin-left: auto; }
.topnav a { color: var(--text-soft); text-decoration: none; font-size: 15px; font-weight: 600; }
.topnav a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line);
  color: var(--text); font-weight: 700; font-size: 16px; text-decoration: none;
  background: transparent;
}
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #a8f0da; border-color: #a8f0da; color: var(--accent-ink); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 92px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 64px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(36px, 4.3vw, 56px); font-weight: 800; margin: 16px 0 22px; }
.lede { font-size: 20px; line-height: 1.55; color: var(--text-soft); max-width: 34em; }
.hero .lede + .lede { margin-top: 14px; font-size: 17px; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }
.cta .plain { color: var(--text-soft); font-weight: 600; font-size: 16px; margin-left: 6px; }

.hero-art { position: relative; padding: 0 0 36px 0; }
.hero-art .browser { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.hero-art .phone { position: absolute; right: -8px; bottom: 0; width: 34%; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }

/* ---------- sections ---------- */
section.block { padding: 104px 0; border-bottom: 1px solid var(--line); }
.kicker { display: flex; align-items: baseline; gap: 14px; color: var(--accent); font-weight: 700; font-size: 15px; }
.kicker .num { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.block h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; margin: 14px 0 18px; }
.block .intro { font-size: 20px; line-height: 1.55; color: var(--text-soft); max-width: 38em; }

.part { margin-top: 72px; }
.part-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin-bottom: 14px; }
.part-head h3 { font-size: 28px; font-weight: 800; }
.status { color: var(--warm); font-size: 15px; font-weight: 600; }
.part > p.lead { color: var(--text-soft); max-width: 44em; margin-bottom: 30px; }

/* label on the left, content on the right */
.split { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 0 48px; margin-top: 56px; }
.split > .label { padding-top: 22px; }
.split > .label h4 { font-size: 18px; font-weight: 800; }
.split > .label p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.5; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows > li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.rows h5 { margin: 0 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; color: var(--text); }
.rows p { color: var(--text-soft); max-width: 44em; }
/* Small tool rows: text on the left, a console thumbnail on the right. */
.tools { list-style: none; margin: 36px 0 0; padding: 0; border-top: 1px solid var(--line); }
.tools > li { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px 44px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tools h5 { margin: 0 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; color: var(--text); }
.tools p { color: var(--text-soft); font-size: 16px; line-height: 1.55; }
.tools .cmd { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0c0c0c; }
.tools .cmd span { display: block; padding: 4px 12px; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 600; }
.tools .cmd img { display: block; width: 100%; height: auto; }
@media (max-width: 720px) {
  .tools > li { grid-template-columns: minmax(0, 1fr); }
  .tools .cmd { max-width: 420px; }
}
.rows.compact > li { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 4px 28px; padding: 14px 0; align-items: baseline; }
.rows.compact h5 { margin: 0; font-size: 17px; }
.rows.compact p { font-size: 16px; line-height: 1.55; }
.led { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: rgba(124, 224, 195, 0.14); color: var(--accent); font-size: 12.5px; font-weight: 700; vertical-align: 2px; letter-spacing: 0; }

.points { margin: 0; padding: 0 0 0 20px; color: var(--text-soft); }
.points li { margin: 0 0 8px; padding-left: 4px; max-width: 44em; }
.points li::marker { color: var(--accent); }

section.block.tight { padding: 60px 0 64px; }
.tight .rows.compact > li { padding: 11px 0; }
.block .intro.wide, .tight .intro { max-width: 46em; }
h3.minor { margin: 32px 0 16px; font-size: 14px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
code { font-family: var(--mono); font-size: 0.88em; padding: 1px 6px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line); }

/* pipeline */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 22px 0 0; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 16px; margin-bottom: 14px; position: relative; z-index: 1;
}
.steps li::after { content: ""; position: absolute; top: 19px; left: 38px; right: 0; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h5 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.steps p { color: var(--text-soft); font-size: 15.5px; line-height: 1.5; }

/* visuals */
figure { margin: 0; }
figcaption { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 52em; }
.browser { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.browser .bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4150; }
.browser .bar span { margin-left: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.browser img { width: 100%; }
.phone { border: 7px solid #2b313c; border-radius: 30px; overflow: hidden; background: #fff; }
.phone img { width: 100%; }
.shot-lg { margin-top: 8px; }
.phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 40px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.tag-before, .tag-after { display: inline-block; margin-bottom: 10px; font-weight: 800; font-size: 15px; }
.tag-before { color: var(--muted); }
.tag-after { color: var(--accent); }

/* results */
.results { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); overflow: hidden; }
.results > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.results > div:last-child { border-bottom: 0; }
.results .fig { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); line-height: 1; white-space: nowrap; }
.results .fig.cut { color: var(--warm); }
.results h5 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.results p { color: var(--text-soft); font-size: 16px; line-height: 1.55; }
.note { margin-top: 14px; color: var(--muted); font-size: 15px; }

/* the closing strip of every case study */
.wrapup { margin-top: 56px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
.wrapup > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.wrapup > div:last-child { border-bottom: 0; }
.wrapup dt, .wrapup .k { font-weight: 800; font-size: 16px; color: var(--accent); }
.wrapup p { color: var(--text-soft); font-size: 16px; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-soft); }

.terminal { margin: 22px 0 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #0a0c0f; color: #cfd6e2; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; overflow-x: auto; white-space: pre; }
.terminal b { color: var(--accent); font-weight: 600; }

/* skills */
.skills { margin: 44px 0 0; border-top: 1px solid var(--line); }
.skills > div { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 8px 48px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.skills dt { font-weight: 800; font-size: 18px; }
.skills dd { margin: 0; color: var(--text-soft); }

/* contact */
.contact { padding: 110px 0 120px; text-align: center; }
.contact h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; }
.contact p { margin: 18px auto 0; color: var(--text-soft); font-size: 20px; max-width: 30em; }
.contact .cta { justify-content: center; }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14.5px; text-align: center; }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .topnav { display: none; }
  .topbar .btn { margin-left: auto; }
  .hero { padding: 56px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero-art { max-width: 620px; }
  .split { grid-template-columns: minmax(0, 1fr); margin-top: 44px; }
  .split > .label { padding: 0 0 14px; }
  .skills > div { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 0; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 20px; }
  section.block { padding: 68px 0; }
  .lede, .block .intro, .contact p { font-size: 18px; }
  .part { margin-top: 56px; }
  .part-head h3 { font-size: 24px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 22px 56px; min-height: 60px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li::after, .steps li:nth-child(2)::after { display: block; top: 38px; bottom: 0; left: 18px; right: auto; width: 2px; height: auto; }
  .steps li:last-child::after { display: none; }
  .rows.compact > li { grid-template-columns: 1fr; }
  .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .pair { grid-template-columns: 1fr; }
  .results > div { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .wrapup > div { grid-template-columns: 1fr; gap: 6px; padding: 18px 20px; }
  .terminal { font-size: 12px; }
  .hero-art .phone { right: 0; }
}
