:root {
  --bg: #0a0a0b;
  --bg-elev: #111113;
  --bg-card: #121214;
  --border: #232327;
  --border-strong: #34343a;
  --text: #ededef;
  --text-dim: #a0a0a8;
  --text-faint: #6b6b74;
  --accent: #7cf0c9;
  --accent-ink: #04120d;
  --accent-soft: rgba(124, 240, 201, .10);
  --glow: rgba(124, 240, 201, .16);
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="light"] {
  --bg: #fafaf9;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --border: #e6e6e3;
  --border-strong: #cfcfca;
  --text: #121214;
  --text-dim: #54545c;
  --text-faint: #8a8a92;
  --accent: #0b8a68;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 138, 104, .08);
  --glow: rgba(11, 138, 104, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s var(--ease), color .3s var(--ease);
}
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
.mono { font-family: var(--mono); }
.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--border-strong); font-family: var(--mono); font-size: 13px; color: var(--accent);
}
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--text-dim); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  background: transparent; border: 1px solid var(--border); color: var(--text-dim); cursor: pointer;
  transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-size: 14.5px; font-weight: 500;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  cursor: pointer; transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--text-faint); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 8px 30px -8px var(--glow); }
.btn-primary svg { transition: transform .2s var(--ease); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost:hover { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -200px 0 auto 0; height: 560px; pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 30% 0%, var(--glow), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--text-dim);
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }
h1 {
  margin-top: 26px; font-size: clamp(40px, 6vw, 65px); line-height: 1.04; letter-spacing: -.035em; font-weight: 600;
}
h1 em { font-style: normal; color: var(--text-dim); }
.lede { margin-top: 26px; max-width: 560px; font-size: 18px; color: var(--text-dim); line-height: 1.65; }
.cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.hero-meta li { display: flex; flex-direction: column; gap: 2px; }
.hero-meta .k { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.hero-meta .v { font-size: 14.5px; }

.hero-panel {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); overflow: hidden;
  box-shadow: 0 30px 80px -40px var(--glow), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.panel-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.lights { display: flex; gap: 6px; }
.lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.panel-title { font-size: 12px; color: var(--text-faint); }
.panel-body { padding: 20px 20px 24px; font-size: 13px; line-height: 2; white-space: pre-wrap; }
.row.divider { height: 1px; background: var(--border); margin: 10px 0; }
.c-dim { color: var(--text-faint); }
.c-key { color: var(--accent); }
.c-ok { color: var(--accent); margin-right: 6px; }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--accent); margin-left: 4px; vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Strip ---------- */
.strip { border-block: 1px solid var(--border); background: var(--bg-elev); }
.strip-inner { padding: 44px 0; }
.strip p { max-width: 820px; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.4; letter-spacing: -.02em; color: var(--text-dim); }

/* ---------- Sections ---------- */
.section { padding: 120px 0 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.eyebrow-sm { font-size: 12px; letter-spacing: .12em; color: var(--accent); margin-bottom: 16px; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.section-sub { margin-top: 16px; color: var(--text-dim); font-size: 17px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card { background: var(--bg-card); padding: 28px 24px 32px; transition: background .3s; position: relative; }
.card:hover { background: var(--bg-elev); }
.card::after { content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--accent); transition: width .4s var(--ease); }
.card:hover::after { width: 100%; }
.card-n { font-size: 12px; color: var(--text-faint); }
.card h3 { margin: 40px 0 10px; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; }
.card p { font-size: 14.5px; color: var(--text-dim); }

/* Cases */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.case { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); padding: 32px; display: flex; flex-direction: column; transition: border-color .3s, transform .3s var(--ease); }
.case:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.case-meta { display: flex; gap: 14px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.case h3 { margin: 18px 0 22px; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; font-weight: 600; }
.case dl { display: grid; gap: 14px; flex: 1; }
.case dl > div { display: grid; grid-template-columns: 84px 1fr; gap: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.case dt { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); padding-top: 3px; }
.case dd { font-size: 14.5px; color: var(--text-dim); }
.case-desc { margin-bottom: 20px; font-size: 14.5px; color: var(--text-dim); }
.proj-list { flex: 1; columns: 2; column-gap: 24px; font-size: 14px; }
.proj-list li { position: relative; padding: 4px 0 4px 16px; break-inside: avoid; color: var(--text); }
.proj-list li::before { content: ''; position: absolute; left: 0; top: .95em; width: 6px; height: 1px; background: var(--accent); }
.proj-list a { border-bottom: 1px solid var(--border-strong); transition: border-color .2s, color .2s; }
.proj-list a:hover { color: var(--accent); border-color: var(--accent); }
.more { margin-top: 32px; font-size: 15px; }
.more a { color: var(--accent); }
.more a:hover { text-decoration: underline; text-underline-offset: 4px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 40px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.facts li { background: var(--bg-card); padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.facts strong { font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.facts span { font-size: 13.5px; color: var(--text-dim); }
.job-link { color: var(--accent); font-size: 12px; }
.job + .job { border-top: 0; }
.tags { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.tags span { padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); }

/* Stack */
.stack { border-top: 1px solid var(--border); }
.stack-row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.stack-row h3 { font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.stack-row ul { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.stack-row li { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14.5px; background: var(--bg-card); transition: border-color .2s, color .2s, background .2s; }
.stack-row li:hover { border-color: var(--accent); background: var(--accent-soft); }

/* Experience */
.job { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 36px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.job-side { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.job-co { color: var(--text); font-size: 15px; }
.job-now { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; }
.job-main h3 { font-size: 26px; letter-spacing: -.02em; font-weight: 600; margin-bottom: 18px; }
.job-main li { position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--text-dim); max-width: 720px; }
.job-main li::before { content: ''; position: absolute; left: 0; top: .75em; width: 10px; height: 1px; background: var(--accent); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: s; }
.steps li { border-top: 1px solid var(--border-strong); padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.steps li > span { font-size: 12px; color: var(--accent); }
.steps h3 { font-size: 18px; letter-spacing: -.01em; font-weight: 600; margin-bottom: 6px; }
.steps p { font-size: 14.5px; color: var(--text-dim); }

/* Contact */
.contact { padding-bottom: 120px; }
.contact-card {
  position: relative; border: 1px solid var(--border); border-radius: 20px; padding: clamp(36px, 6vw, 72px);
  background: radial-gradient(ellipse 60% 100% at 50% 0%, var(--glow), transparent 70%), var(--bg-elev);
}
.contact-card h2 { max-width: 640px; }
.contact-card .section-sub { max-width: 520px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 13px; color: var(--text-faint); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .cases { grid-template-columns: 1fr; }
  .stack-row, .job { grid-template-columns: 1fr; gap: 12px; }
  .section { padding-top: 88px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding: 56px 0 64px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .case { padding: 24px; }
  .proj-list { columns: 1; }
  .facts { grid-template-columns: 1fr; }
  .case dl > div { grid-template-columns: 1fr; gap: 4px; }
  .hero-meta { gap: 22px; }
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot, .caret { animation: none; }
}

/* ---------- Hero visual ---------- */
.hero-visual { position: relative; justify-self: center; width: min(100%, 420px); }
.portrait { position: relative; margin: 0; aspect-ratio: 4 / 5; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--bg-elev); box-shadow: 0 30px 80px -40px var(--glow); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-mono { display: none; position: absolute; inset: 0; place-items: center; font-size: 96px; letter-spacing: -.04em; color: var(--accent); background: radial-gradient(ellipse 70% 60% at 50% 40%, var(--glow), transparent 70%); }
.portrait.no-img .portrait-mono { display: grid; }
.portrait-tag { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.portrait-tag strong { display: block; font-size: 14px; font-weight: 600; }
.portrait-tag span { font-size: 12px; color: var(--text-dim); }
.portrait-metric { color: var(--accent) !important; font-size: 13px !important; }
.code-badge { position: absolute; right: -28px; top: 28px; padding: 12px 16px 14px; font-size: 11.5px; line-height: 1.8; border: 1px solid var(--border-strong); border-radius: 12px; background: color-mix(in srgb, var(--bg-elev) 94%, transparent); box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); animation: floaty 7s ease-in-out infinite; }
.code-badge .lights { margin-bottom: 8px; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.hero-stack { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero-stack .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-right: 4px; }
.hero-stack [role=listitem] { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); transition: color .2s, border-color .2s; }
.hero-stack [role=listitem]:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Project filter + grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { font: inherit; font-size: 13.5px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pcard { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.pcard:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.pcard[hidden] { display: none; }
.pcard-preview { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.pcard-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.pcard:hover .pcard-preview img { transform: scale(1.04); }
.pcard-mono { display: none; position: absolute; inset: 0; place-items: center; font-size: 44px; letter-spacing: -.03em; color: var(--text-faint); background: radial-gradient(ellipse 70% 80% at 50% 0%, var(--accent-soft), transparent 70%); }
.pcard-preview.no-img .pcard-mono { display: grid; }
.pcard-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.pcard-top { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pcard h3 { margin: 10px 0 6px; font-size: 19px; letter-spacing: -.02em; font-weight: 600; }
.pcard p { font-size: 14px; color: var(--text-dim); flex: 1; }
.pcard .tags { margin-top: 16px; }
.plink { margin-top: 16px; font-size: 13.5px; color: var(--accent); }
.plink:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1020px) { .pgrid { grid-template-columns: repeat(2, 1fr); } .code-badge { right: -8px; } }
@media (max-width: 560px) { .pgrid { grid-template-columns: 1fr; } .code-badge { display: none; } }

/* ---------- CV additions ---------- */
.cases.featured { margin-bottom: 56px; }
.subhead { margin-bottom: 20px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.job-date { color: var(--text-faint); font-size: 12px; }
.creds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cred { background: var(--bg-card); padding: 28px 24px; }
.cred h3 { margin-bottom: 18px; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.cred li { position: relative; padding: 5px 0 5px 16px; font-size: 14.5px; color: var(--text-dim); }
.cred li::before { content: ''; position: absolute; left: 0; top: 1em; width: 6px; height: 1px; background: var(--accent); }
@media (max-width: 1020px) { .creds { grid-template-columns: 1fr; } }

/* Portrait polish */
.portrait img { object-position: 50% 12%; filter: contrast(1.04) saturate(.95); }
.portrait::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(to bottom, transparent 55%, color-mix(in srgb, var(--bg) 55%, transparent) 100%),
              linear-gradient(135deg, var(--glow), transparent 45%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.portrait-tag { z-index: 1; }

/* Portrait v2: clean headshot, caption below, nothing over the face */
.portrait { aspect-ratio: auto; display: flex; flex-direction: column; background: var(--bg-elev); }
.portrait img { aspect-ratio: 1 / 1; height: auto; object-position: 50% 20%; filter: none; }
.portrait::after { display: none; }
.portrait.no-img { aspect-ratio: 1 / 1; }
.portrait-tag { position: static; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 16px 18px; }
.portrait.no-img .portrait-tag { position: absolute; left: 0; right: 0; bottom: 0; }
.code-badge { display: none; }

/* ---------- Projects page ---------- */
.page-hero { position: relative; padding: 72px 0 8px; overflow: hidden; }
.page-hero .wrap { position: relative; }
.back { display: inline-block; margin-bottom: 28px; font-size: 12px; letter-spacing: .06em; color: var(--text-dim); transition: color .2s; }
.back:hover { color: var(--accent); }
.page-title { margin-top: 0; font-size: clamp(40px, 6vw, 64px); }
.proj-section { padding-top: 56px; padding-bottom: 120px; }
.pcard-preview { padding: 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; cursor: zoom-in; width: 100%; height: var(--ph, 380px); aspect-ratio: auto; font: inherit; color: inherit; }
.pcard-preview img { width: 100%; height: auto; object-fit: initial; display: block; transform: none; transition: transform 4.5s linear; }
.pcard:hover .pcard-preview img { transform: translateY(calc(-100% + var(--ph, 380px))); }
.pcard-body h3 { margin-bottom: 0; }

.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lightbox[hidden] { display: none; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--border); }
.lightbox-title { font-size: 13px; color: var(--text-dim); }
.lightbox-scroll { flex: 1; overflow-y: auto; padding: 24px; }
.lightbox-scroll img { display: block; width: min(1000px, 100%); margin: 0 auto; border: 1px solid var(--border); border-radius: 10px; }

.pgrid-2 { grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 700px) { .pgrid-2 { grid-template-columns: 1fr; } }

/* Mobile app slider */
.app-section { border-top: 1px solid var(--border); }
.app-title { margin: 8px 0 12px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; font-weight: 600; }
.slider { position: relative; margin-top: 36px; }
.slider-track { display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 8px 4px 16px; scrollbar-width: none; outline: none; }
.slider-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 auto; width: 240px; margin: 0; scroll-snap-align: center; text-align: center; }
.phone { padding: 8px; border: 1px solid var(--border-strong); border-radius: 34px; background: var(--bg-elev); box-shadow: 0 20px 50px -20px var(--glow); }
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 1242 / 2688; border-radius: 27px; }
.slide figcaption { margin-top: 14px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.slider-btn { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; margin-top: -30px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--bg-elev); color: var(--text); cursor: pointer; transition: border-color .2s, color .2s, opacity .2s; }
.slider-btn:hover { border-color: var(--accent); color: var(--accent); }
.slider-btn:disabled { opacity: .35; cursor: default; }
.slider-btn.prev { left: -12px; }
.slider-btn.next { right: -12px; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.slider-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--border-strong); cursor: pointer; transition: background .2s, transform .2s; }
.slider-dots button.active { background: var(--accent); transform: scale(1.3); }
@media (max-width: 560px) { .slide { width: 200px; } .slider-btn { display: none; } }

/* Project slider + drag */
.proj-slider { margin-top: 8px; }
.slider-track > .pcard { flex: 0 0 auto; width: min(440px, 82vw); scroll-snap-align: center; }
.slider-track { cursor: grab; }
.slider-track.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.slider-track.dragging * { pointer-events: none; }
.slider-track img { -webkit-user-drag: none; user-select: none; }
.proj-slider .slider-btn { margin-top: -20px; }
.proj-slider .slider-track { padding-top: 12px; }

/* Hide the arrow at either end so it never covers the first/last slide */
.slider-btn:disabled { opacity: 0; pointer-events: none; }
.slider-track { padding-left: 12px; padding-right: 12px; scroll-padding-inline: 12px; }

.app-section { padding-bottom: 80px; }
@media (max-width: 820px) { .app-section { padding-bottom: 56px; } }

.phone img { aspect-ratio: auto; }
.app-section .tags { margin-top: 20px; }

/* Positioning strip */
.strip { position: relative; overflow: hidden; }
.strip-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 120% at 0% 50%, var(--accent-soft), transparent 70%); pointer-events: none; }
.strip-inner { position: relative; padding: 64px 0; }
.strip p { max-width: 900px; padding-left: 24px; border-left: 3px solid var(--accent); font-size: clamp(22px, 3vw, 36px); line-height: 1.3; font-weight: 500; letter-spacing: -.025em; }
.strip p strong { display: block; margin-bottom: 6px; font-weight: 700; color: var(--text); }
.strip p em { font-style: normal; color: var(--text); background: linear-gradient(transparent 62%, var(--accent-soft) 62%); }
.strip-steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0 27px; padding: 0; list-style: none; }
.strip-steps li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg-card); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.strip-steps li span { color: var(--accent); }
@media (max-width: 560px) { .strip-inner { padding: 44px 0; } .strip-steps { margin-left: 0; } }
