/* ==========================================================================
   Emmanuel Emeka Ndubuisi - portfolio v2
   Dark by default (crimson / violet / amber glow), light theme via [data-theme]
   ========================================================================== */

@font-face { font-family: "Sora"; src: url(fonts/sora-latin.woff2) format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Sora", "Inter", system-ui, sans-serif;

  --ink: #f8fafc;
  --muted: rgba(248, 250, 252, 0.76);
  --faint: rgba(248, 250, 252, 0.56);
  --surface: #1a0c17;                     /* opaque panels: dialogs, menus */
  --panel: rgba(24, 10, 22, 0.52);        /* glass cards */
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.14);

  --brand: #dc2626;
  --brand-deep: #b91c1c;
  --brand-warm: #f97316;
  --brand-text: #f87171;                  /* accent used as TEXT */
  --ok: #4ade80;

  --bg-a: #7f1d1d;
  --bg-b: #450a0a;
  --bg-c: #1a0505;
  --blob-op: 0.5;

  --radius: 18px;
  --maxw: 1120px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

[data-theme="light"] {
  --ink: #1c1017;
  --muted: rgba(28, 16, 23, 0.76);
  --faint: rgba(28, 16, 23, 0.58);
  --surface: #fffafa;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-2: rgba(255, 255, 255, 0.6);
  --line: rgba(90, 24, 36, 0.16);

  --brand: #c81e1e;
  --brand-deep: #a51616;
  --brand-warm: #ea580c;
  --brand-text: #b91c1c;

  --bg-a: #ffe1dc;
  --bg-b: #fff1ee;
  --bg-c: #fdf2f8;
  --blob-op: 0.32;
  --shadow: 0 24px 60px rgba(120, 30, 30, 0.16);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-a) 0%, var(--bg-b) 50%, var(--bg-c) 100%) fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(220, 38, 38, 0.4); }

.container { width: min(var(--maxw), 100% - 2 * clamp(20px, 5vw, 40px)); margin-inline: auto; }
.section { padding: clamp(72px, 10vw, 120px) 0; }
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 400; background: var(--brand-deep); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; transition: top 0.2s; }
.skip-link:focus { top: 12px; }

/* ---------- atmosphere ---------- */
.mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.mesh i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--blob-op); }
.mesh .m1 { width: 460px; height: 460px; background: #ef4444; top: -140px; left: -120px; animation: drift 20s ease-in-out infinite; }
.mesh .m2 { width: 400px; height: 400px; background: #991b1b; bottom: -160px; right: -100px; animation: drift 26s ease-in-out infinite reverse; }
.mesh .m3 { width: 320px; height: 320px; background: #f97316; top: 42%; left: 58%; opacity: calc(var(--blob-op) * 0.45); animation: drift 32s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(44px, 64px); } }
.progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 300; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--brand), var(--brand-warm)); }

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
.eyebrow { font: 700 0.78rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-text); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-warm)); border-radius: 2px; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-lead { margin-top: 14px; color: var(--muted); font-size: 1.08rem; }
.grad { background: linear-gradient(90deg, #ef4444, #f97316, #f59e0b, #ef4444); background-size: 250% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shimmer 7s linear infinite; }
[data-theme="light"] .grad { background-image: linear-gradient(90deg, #b91c1c, #ea580c, #c2410c, #b91c1c); }
@keyframes shimmer { to { background-position: 250% center; } }
kbd { font: 600 0.72rem var(--font-body); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0.8rem 1.45rem; border-radius: 999px; font: 600 0.95rem/1.2 var(--font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease; white-space: nowrap; min-height: 44px; }
@media (max-width: 639px) { .btn { padding: 0.9rem 1.2rem; font-size: 1rem; } }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; box-shadow: 0 10px 30px rgba(220, 38, 38, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(220, 38, 38, 0.5); }
.btn-ghost { background: var(--panel-2); border-color: var(--line); color: var(--ink); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--brand-text); transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.85rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.icon-btn:hover { border-color: var(--brand-text); }
.icon-btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 200; transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled { background: color-mix(in srgb, var(--bg-b) 78%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: var(--line); }
.nav { width: min(var(--maxw), 100% - 2 * clamp(20px, 5vw, 40px)); margin-inline: auto; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font: 800 1.3rem var(--font-head); letter-spacing: 0.02em; text-decoration: none; }
.brand .dot-accent { color: var(--brand-text); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; color: var(--muted); text-decoration: none; transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); background: var(--panel-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 0 12px; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.icon-sun { display: none; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(118px, 15vw, 168px); padding-bottom: 20px; }
.hero-grid { display: grid; gap: clamp(36px, 6vw, 60px); align-items: center; }
.hero-grid > * { min-width: 0; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-size: 0.85rem; font-weight: 600; color: var(--muted); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); } 70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.badge time { font-variant-numeric: tabular-nums; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; margin: 22px 0 16px; }
.rotator { font: 600 clamp(1.05rem, 2.4vw, 1.3rem) var(--font-head); margin-bottom: 14px; }
.rotate-word { color: var(--brand-text); display: inline-block; min-width: 7ch; border-bottom: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); transition: opacity 0.25s, transform 0.25s; }
.rotate-word.swap { opacity: 0; transform: translateY(6px); }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-hint { margin-top: 18px; font-size: 0.85rem; color: var(--faint); }
.hero-hint kbd { margin: 0 2px; }

.device { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; transform: perspective(1400px) rotateY(-5deg) rotateX(2deg); transition: transform 0.5s ease; }
.device:hover, .device:focus-within { transform: none; }
.device-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: color-mix(in srgb, var(--surface) 70%, #000); border-bottom: 1px solid var(--line); }
.device-bar .d { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.device-bar .d:first-child { background: #ef4444; }
.device-url { margin-left: 8px; flex: 1; min-width: 0; padding: 4px 12px; border-radius: 999px; background: var(--panel-2); font-size: 0.74rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-screen { position: relative; aspect-ratio: 16 / 9; background: #0c0712; }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity 0.7s ease; }
.slide.is-active { opacity: 1; }
.device-cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 0.85rem; }
.device-cap strong { font-family: var(--font-head); font-size: 0.95rem; }
.device-dots { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; }
@media (max-width: 639px) {
  .device-dots { width: 100%; flex-wrap: nowrap; justify-content: space-between; }
  .device-dots .device-dot { flex: 0 1 22px; min-width: 14px; }
}
.device-dot { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.device-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); opacity: 0.55; transition: transform 0.25s, background 0.25s, opacity 0.25s; }
.device-dot[aria-selected="true"]::before { background: var(--brand-text); opacity: 1; transform: scale(1.35); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 700; color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }

.marquee { overflow: hidden; margin-top: clamp(44px, 7vw, 72px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee ul { display: flex; gap: 12px; padding-right: 12px; }
.marquee li { white-space: nowrap; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: 0.86rem; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: clamp(28px, 5vw, 44px); }
.stat { padding: 22px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stat strong { display: block; font: 800 clamp(1.8rem, 4vw, 2.5rem)/1 var(--font-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; font-size: 0.85rem; color: var(--muted); }

/* ---------- work ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.chip span { font-size: 0.75rem; color: var(--faint); }
.chip:hover { border-color: var(--brand-text); }
.chip.is-on { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); border-color: transparent; color: #fff; }
.chip.is-on span { color: rgba(255, 255, 255, 0.85); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 22px; }
.card { position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none; transition: opacity 0.3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(239, 68, 68, 0.2), transparent 62%); }
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card.pop { animation: pop 0.45s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: #0c0712; }
.card-media picture { display: block; width: 100%; height: 100%; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s ease; }
.card:hover .card-media img { transform: scale(1.045); }
.card-body { flex: 1; padding: 18px 20px 6px; }
@media (max-width: 639px) { .card-body { padding: 20px 22px 8px; } }
.card-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 639px) { .card-meta { font-size: 0.82rem; } }
.card-meta .cat { color: var(--brand-text); }
.card-title { margin: 8px 0; font-size: 1.28rem; }
@media (max-width: 639px) { .card-title { font-size: 1.4rem; margin: 10px 0 8px; } }
.card-open { all: unset; cursor: pointer; }
.card-open::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-open:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 4px; border-radius: 4px; }
.card-text { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 639px) { .card-text { font-size: 1rem; line-height: 1.6; } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags li { padding: 4px 11px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-text); }
@media (max-width: 639px) { .tags li { font-size: 0.78rem; padding: 5px 12px; } }
.tags li.tag-own { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.card-foot { display: flex; gap: 10px; padding: 14px 20px 20px; }
@media (max-width: 639px) { .card-foot { padding: 16px 22px 22px; gap: 12px; } }
.card-foot .btn { flex: 1; position: relative; z-index: 2; }

/* ---------- case study dialog ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(12, 4, 8, 0.74); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
dialog[open] { animation: dlg 0.32s ease both; }
@keyframes dlg { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.case { position: relative; width: min(1040px, 94vw); max-height: 90vh; margin: auto; overflow: auto; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55); overscroll-behavior: contain; }
.case-close { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 5; width: 40px; height: 40px; border-radius: 50%; }
.case-grid { display: grid; gap: 0; }
.case-media { position: relative; padding: 28px 28px 0; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 65%); }
.case-desk { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.case-desk .device-bar { padding: 8px 12px; }
.case-desk img { display: block; width: 100%; }
.case-phone { width: 34%; margin: -14% 0 -6% auto; position: relative; border-radius: 22px; overflow: hidden; border: 5px solid #120a12; box-shadow: var(--shadow); background: #120a12; }
.case-phone img { display: block; width: 100%; }
.case-body { padding: 28px clamp(22px, 4vw, 40px) 34px; }
.case-body .cat-line { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-text); }
.case-body h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 8px 0 6px; }
.case-tagline { color: var(--muted); font-size: 1.05rem; }
.case-body h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin: 24px 0 8px; font-family: var(--font-body); }
.case-body p { color: var(--muted); }
.case-body ul.points li { position: relative; padding-left: 24px; margin: 8px 0; color: var(--muted); }
.case-body ul.points li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-warm)); }
.case-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ---------- process ---------- */
.steps { display: grid; gap: 16px; counter-reset: step; }
.step { position: relative; padding: 24px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.step-num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; margin-bottom: 14px; font: 800 0.9rem var(--font-head); color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-warm)); }
.step p { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }
.process-extra { display: grid; gap: 16px; margin-top: 16px; }
.prompt-card { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: color-mix(in srgb, var(--surface) 88%, #000); box-shadow: var(--shadow); }
.pc-head { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, #000); font-size: 0.78rem; color: var(--faint); }
.pc-head .d { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.pc-head .d:first-child { background: #ef4444; }
.pc-head em { font-style: normal; margin-left: 8px; letter-spacing: 0.04em; }
.pc-body { padding: 18px; font-size: 0.92rem; min-height: 190px; }
.pc-line { display: flex; gap: 12px; margin-bottom: 10px; }
.pc-line b { flex: none; min-width: 34px; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-text); padding-top: 3px; }
.pc-caret { display: inline-block; width: 8px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--brand-text); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pc-steps { margin-top: 10px; }
.pc-steps li { position: relative; padding-left: 28px; margin: 9px 0; color: var(--muted); font-size: 0.88rem; opacity: 0; transform: translateX(-6px); transition: opacity 0.4s, transform 0.4s; }
.pc-steps li.on { opacity: 1; transform: none; }
.pc-steps li::before { content: "\2713"; position: absolute; left: 0; top: 0; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 0.7rem; color: var(--ok); background: rgba(74, 222, 128, 0.16); }
.quality { padding: 24px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.quality h3 { margin-bottom: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; color: var(--muted); }
.checks li strong { color: var(--ink); }
.checks svg { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--ok); }

/* ---------- about (bento) ---------- */
.bento { display: grid; gap: 16px; }
.tile { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tile h3 { font: 700 0.78rem var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.tile-bio { display: grid; gap: 22px; align-items: center; }
.about-photo { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; border: 3px solid color-mix(in srgb, var(--brand) 70%, transparent); box-shadow: 0 14px 44px rgba(220, 38, 38, 0.3); }
.about-lead { font-size: 1.1rem; }
.about-lead strong { color: var(--brand-text); }
.tile-bio p + p { margin-top: 12px; color: var(--muted); }
.tile .big { font: 800 clamp(2rem, 5vw, 2.8rem)/1 var(--font-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile p.sub { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.facts li { margin: 12px 0; }
.facts strong { display: block; color: var(--brand-text); }
.facts span { color: var(--muted); font-size: 0.92rem; }

/* ---------- faq ---------- */
.faq-list { display: grid; gap: 12px; max-width: 820px; }
.faq details { border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color 0.2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font: 700 1.02rem var(--font-head); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; line-height: 1; background: var(--panel-2); border: 1px solid var(--line); transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: clamp(28px, 5vw, 56px); align-items: start; }
.contact-grid > * { min-width: 0; }
.contact-copy h2 { margin-bottom: 14px; }
.contact-links { margin-top: 26px; display: grid; gap: 12px; max-width: 420px; }
.contact-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; font-weight: 600; transition: border-color 0.2s, transform 0.2s; }
.contact-link:hover { border-color: var(--brand-text); transform: translateX(3px); }
.contact-link small { color: var(--faint); font-weight: 500; min-width: 0; overflow-wrap: anywhere; text-align: right; }
.contact-row { display: flex; gap: 8px; }
.contact-row .contact-link { flex: 1; min-width: 0; }
.contact-row .contact-link small { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 639px) {
  .contact-row .contact-link { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 12px 14px; }
  .contact-row .contact-link small { text-align: left; font-size: clamp(0.66rem, 3.4vw, 0.9rem); }
}
.brief { padding: clamp(20px, 4vw, 32px); border-radius: 22px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.brief fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.brief legend { font: 700 0.82rem var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.opt span { display: inline-block; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-size: 0.88rem; font-weight: 600; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.opt:hover span { border-color: var(--brand-text); }
.opt input:checked + span { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); border-color: transparent; color: #fff; }
.opt input:focus-visible + span { outline: 2px solid var(--brand-text); outline-offset: 3px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); font: inherit; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.field [aria-invalid="true"] { border-color: #f87171; }
.two { display: grid; gap: 16px; }
.preview { margin: 4px 0 18px; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line); background: var(--panel-2); font: 0.85rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.preview-label { display: block; font: 700 0.72rem var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.brief-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.brief-actions .btn { flex: 1; min-width: 160px; }
.form-status { margin-top: 14px; min-height: 1.4em; font-size: 0.9rem; color: var(--brand-text); }
.form-status.ok { color: var(--ok); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- footer ---------- */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--line); }
.foot { display: grid; gap: 24px; }
.foot nav ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.foot a:hover { color: var(--ink); }
.foot .legal { color: var(--faint); font-size: 0.85rem; }

/* ---------- command palette + toast ---------- */
.palette { width: min(620px, 92vw); margin: 12vh auto auto; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55); overflow: hidden; }
.pal-input-wrap { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.pal-input-wrap svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.pal-input { flex: 1; min-width: 0; height: 56px; border: 0; background: transparent; color: var(--ink); font: 1rem var(--font-body); outline: none; }
.pal-list { max-height: min(52vh, 380px); overflow: auto; padding: 8px; }
.pal-group { padding: 10px 12px 4px; font: 700 0.7rem var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.pal-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.pal-item small { color: var(--faint); font-weight: 500; }
.pal-item.is-active { background: color-mix(in srgb, var(--brand) 22%, transparent); }
.pal-empty { padding: 26px; text-align: center; color: var(--faint); }
.pal-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--faint); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 500; transform: translate(-50%, 20px); padding: 12px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: 0.9rem; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; display: grid; place-content: center; gap: 16px; text-align: center; padding: 24px; }
.nf h1 { font-size: clamp(4rem, 16vw, 8rem); font-weight: 800; }

/* ---------- reveal (progressive enhancement: only hidden when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.05s !important; } .d2 { transition-delay: 0.12s !important; } .d3 { transition-delay: 0.19s !important; } .d4 { transition-delay: 0.26s !important; } .d5 { transition-delay: 0.33s !important; }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .two { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .tile-bio { grid-template-columns: auto 1fr; }
}
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .process-extra { grid-template-columns: 1.1fr 1fr; }
  .bento { grid-template-columns: repeat(6, 1fr); }
  .tile-bio { grid-column: span 6; }
  .tile-tools { grid-column: span 3; }
  .tile-now { grid-column: span 3; }
  .tile-time { grid-column: span 2; }
  .tile-facts { grid-column: span 4; }
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
  .case-grid { grid-template-columns: 1.05fr 1fr; }
  .case-media { padding: 40px 0 40px 32px; display: flex; align-items: center; }
  .case-media .case-stack { width: 100%; }
  .foot { grid-template-columns: 1.2fr 1fr auto; align-items: center; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.02fr 0.98fr; }
}
@media (max-width: 859px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .kbd-btn .kbd { display: none; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; display: none; flex-direction: column; gap: 2px; padding: 12px clamp(20px, 5vw, 40px) 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; font-size: 1rem; }
  .device { transform: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee ul[aria-hidden="true"] { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .device { transform: none; }
  .pc-steps li { opacity: 1; transform: none; }
}
@media (hover: none) { .hero-hint { display: none; } }
.services { display: grid; gap: 16px; }
.service { padding: 24px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 8px; transition: transform 0.25s, border-color 0.25s; }
.service:hover { transform: translateY(-3px); border-color: var(--brand); }
.service p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.service .link-btn { align-self: flex-start; margin-top: 6px; }
.cta-band { padding: 8px 0 72px; }
.cta-inner { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; padding: 34px 28px; border-radius: calc(var(--radius) + 6px); border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 28%, var(--panel)), var(--panel)); }
.cta-inner h2 { font: 800 clamp(1.4rem, 3vw, 2rem) var(--font-head); }
.cta-inner p { color: var(--muted); margin-top: 6px; }
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .services { grid-template-columns: repeat(3, 1fr); } .cta-inner { flex-direction: row; align-items: center; justify-content: space-between; padding: 40px 44px; } }

/* phone: compact 2-column project grid */
.lbl-short { display: none; }
@media (max-width: 639px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid .card:hover { transform: none; }
  .grid .card-media { aspect-ratio: 3 / 4; }
  .grid .card-body { padding: 12px 12px 4px; }
  .grid .card-meta { font-size: 0.66rem; letter-spacing: 0.04em; }
  .grid .card-meta span:last-child { display: none; }
  .grid .card-meta .cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .grid .card-title { font-size: 1.02rem; line-height: 1.2; margin: 6px 0 4px; }
  .grid .card-text { font-size: 0.8rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .grid .tags { display: none; }
  .grid .card-foot { padding: 10px 12px 12px; gap: 6px; }
  .grid .card-foot .btn { min-height: 38px; padding: 0.45rem 0.3rem; font-size: 0.8rem; }
  .grid .lbl-long { display: none; }
  .grid .lbl-short { display: inline; }
}
