/* =========================================================
   Nasir Khalil, portfolio
   Layout: editorial single page; dark first with a full light theme.
   ========================================================= */

:root {
  --bg: #0a0c11;
  --bg-2: #0f1218;
  --surface: #141820;
  --surface-2: #1b202a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --text: #eef0f5;
  --muted: #a1a8b5;
  --dim: #6f7683;
  --accent: #c8f169;
  --accent-ink: #12160a;
  --accent-soft: rgba(200, 241, 105, 0.12);
  --violet: #8b7cff;
  --danger: #ff6b6b;
  --star: #f7c548;
  --upwork: #14a800;
  --fiverr: #1dbf73;
  --linkedin: #0a66c2;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.65);
  --shadow-sm: 0 10px 30px -12px rgba(0, 0, 0, 0.5);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --radius: 18px;
  --radius-lg: 26px;
  --container: 1200px;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f6f2;
  --bg-2: #efede6;
  --surface: #ffffff;
  --surface-2: #f2f1ec;
  --line: rgba(16, 18, 24, 0.09);
  --line-2: rgba(16, 18, 24, 0.17);
  --text: #12141a;
  --muted: #545b67;
  --dim: #858b96;
  --accent: #3d6b00;
  --accent-ink: #f7ffe9;
  --accent-soft: rgba(61, 107, 0, 0.1);
  --violet: #5a49d6;
  --star: #e2a200;
  --shadow: 0 30px 70px -35px rgba(20, 22, 30, 0.28);
  --shadow-sm: 0 10px 30px -14px rgba(20, 22, 30, 0.25);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.theme-anim, body.theme-anim * { transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease) !important; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.label { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 400; margin: 0 0 10px; }

.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 100; background: linear-gradient(90deg, var(--accent), var(--violet)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap; text-align: center;
  transition: transform .3s var(--ease), background-color .3s, border-color .3s, box-shadow .3s, color .3s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .3s var(--ease); }
.btn:hover svg:last-child { transform: translateX(3px); }
.btn:hover svg:first-child:not(:last-child) { transform: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px var(--accent); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -14px var(--accent); }
.btn--ghost { border-color: var(--line-2); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.btn--ghost:hover { border-color: var(--text); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 16px 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--text);
  transition: border-color .25s, background-color .25s;
}
.icon-btn:hover { border-color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn--sm { width: 36px; height: 36px; }
.icon-btn[disabled] { opacity: .35; pointer-events: none; }

/* Theme toggle: exactly one icon visible, chosen by the resolved theme */
.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle__icon { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .45s var(--ease), opacity .3s; }
.theme-toggle__icon svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .theme-toggle__moon,
:root[data-theme="light"] .theme-toggle__sun { transform: translateY(120%) rotate(90deg); opacity: 0; }
:root[data-theme="dark"] .theme-toggle__sun,
:root[data-theme="light"] .theme-toggle__moon { transform: none; opacity: 1; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid transparent; transition: background-color .35s, border-color .35s; }
.nav.is-scrolled, .nav.is-open { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand__mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--text); color: var(--bg); font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1; padding-bottom: 3px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__text strong { font-size: 15.5px; font-weight: 600; }
.brand__text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__links { display: flex; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.nav__links a { padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color .2s, background-color .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav__burger span { display: block; width: 16px; height: 1.7px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.4px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.4px) rotate(-45deg); }
.mobile-menu { padding: 8px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); }
.mobile-menu nav { display: flex; flex-direction: column; margin-bottom: 18px; }
.mobile-menu nav a { padding: 14px 0; font-size: 20px; font-weight: 500; border-bottom: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--nav-h) + 64px) 0 0; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000 30%, transparent 75%); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); animation: drift 18s ease-in-out infinite alternate; }
.orb--1 { width: 520px; height: 520px; background: var(--violet); top: -160px; right: -120px; opacity: .26; }
.orb--2 { width: 420px; height: 420px; background: var(--accent); bottom: 40px; left: -180px; opacity: .12; animation-delay: -6s; }
@keyframes drift { to { transform: translate(-40px, 40px) scale(1.08); } }

.hero__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 64px; align-items: center; }
.status { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--muted); background: color-mix(in srgb, var(--surface) 70%, transparent); margin: 0; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.hero__title { font-size: clamp(40px, 6.2vw, 84px); line-height: 1; letter-spacing: -0.045em; margin: 26px 0 18px; }
.hero__title em { letter-spacing: -0.02em; }
.hero__role { font-family: var(--mono); font-size: 13.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.hero__lead { font-size: clamp(17px, 1.5vw, 19.5px); color: var(--muted); max-width: 600px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 34px; }

.trust { display: flex; flex-wrap: wrap; gap: 10px; }
.trust__item { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); transition: border-color .25s, transform .3s var(--ease); }
a.trust__item:hover { border-color: var(--line-2); transform: translateY(-2px); }
.trust__item strong { display: block; font-size: 14px; line-height: 1.2; }
.trust__item small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.trust__logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.trust__logo svg { width: 19px; height: 19px; }
.trust__logo--upwork { background: var(--upwork); color: #fff; }
.trust__logo--fiverr { background: var(--fiverr); color: #fff; }
.trust__logo--linkedin { background: var(--linkedin); color: #fff; }
.trust__logo--microsoft { background: #fff; }

.hero__visual { position: relative; justify-self: end; width: 100%; max-width: 440px; }
.portrait { position: relative; margin: 0; border-radius: 30px; overflow: hidden; aspect-ratio: 4 / 4.6; border: 1px solid var(--line-2); box-shadow: var(--shadow); background: var(--surface); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 6, 10, .78)); pointer-events: none; }
.portrait__tag { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.portrait__tag strong { font-size: 20px; letter-spacing: -0.01em; }
.portrait__tag span { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: rgba(255, 255, 255, .82); }
.portrait__tag svg { width: 15px; height: 15px; }
.chip { position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); animation: float 6s ease-in-out infinite; }
.chip strong { color: var(--text); }
.chip--rating { left: -48px; top: 34px; }
.chip--code { right: -26px; bottom: 96px; animation-delay: -3s; font-family: var(--mono); font-size: 12.5px; }
.chip--code .k { color: var(--violet); } .chip--code .f { color: var(--accent); } .chip--code .s { color: #f5a97f; }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 14px; height: 14px; }
@keyframes float { 50% { transform: translateY(-9px); } }

.marquee { margin-top: 96px; border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 48px; width: max-content; animation: marquee 50s linear infinite; }
.marquee__track span { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--muted); white-space: nowrap; }
.marquee__track span::after { content: "✦"; font-style: normal; font-size: 12px; margin-left: 48px; color: var(--accent); vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 72px; padding-bottom: 24px; }
.stat { padding: 6px 22px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num { display: block; white-space: nowrap; font-size: clamp(30px, 2.9vw, 44px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__label { display: block; margin-top: 12px; font-size: 14.5px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 112px 0; position: relative; }
.section--alt { background: var(--bg-2); }
.section__head { max-width: 720px; margin-bottom: 56px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .eyebrow { justify-content: center; }
.section__sub { color: var(--muted); font-size: 18px; margin: 18px 0 0; }
.section__cta { margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 26px; border-radius: var(--radius); border: 1px dashed var(--line-2); }
.section__cta p { margin: 0; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.h2 { font-size: clamp(32px, 4.2vw, 54px); letter-spacing: -0.035em; line-height: 1.05; }
.h2--xl { font-size: clamp(36px, 5vw, 66px); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.service { position: relative; padding: 36px 32px; background: var(--bg); }
.service::before { content: ""; position: absolute; inset: 0; background: radial-gradient(380px circle at var(--x, 50%) var(--y, 50%), var(--accent-soft), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.service:hover::before { opacity: 1; }
.service > * { position: relative; }
.service__icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface); margin-bottom: 24px; color: var(--accent); transition: transform .5s var(--ease); }
.service__icon svg { width: 24px; height: 24px; }
.service:hover .service__icon { transform: rotate(-8deg) scale(1.06); }
.service h3 { font-size: 21px; margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 15.5px; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tags li { font-family: var(--mono); font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.filter { padding: 8px 15px; border-radius: 999px; border: 0; background: transparent; font-size: 14px; color: var(--muted); transition: background-color .25s, color .25s; }
.filter:hover { color: var(--text); }
.filter.is-active { background: var(--text); color: var(--bg); }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.project { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: transform .5s var(--ease), border-color .3s, box-shadow .5s var(--ease); }
.project:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.project--featured { grid-column: span 3; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.project--flip .project__media { order: 2; border-right: 0; border-left: 1px solid var(--line); }
.project.is-hidden { display: none; }
.project__open { position: absolute; inset: 0; z-index: 2; border: 0; background: transparent; border-radius: inherit; }
.project__open:focus-visible { outline-offset: -3px; }
.project__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: color-mix(in srgb, var(--accent-p) 22%, var(--surface-2)); border-bottom: 1px solid var(--line); }
.project--featured .project__media { aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--line); }
.project__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .8s var(--ease); }
.project:hover .project__media img { transform: scale(1.04); }
.cover { position: absolute; inset: 0; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; color: #fff;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--accent-p) 80%, transparent), transparent 60%),
    radial-gradient(80% 80% at 100% 100%, color-mix(in srgb, var(--accent-p) 45%, #000), transparent 70%),
    linear-gradient(160deg, #141826, #07080c);
}
.cover::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); }
.cover > * { position: relative; }
.cover__label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.cover__title { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.05; }
.mock { position: absolute; left: 9%; right: 9%; top: 14%; bottom: -6%; border-radius: 14px 14px 0 0; background: rgba(10, 12, 18, .84); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); padding: 14px; display: grid; grid-template-columns: 24% minmax(0, 1fr); gap: 12px; transition: transform .8s var(--ease); }
.project:hover .mock { transform: translateY(-8px); }
.mock__side { display: flex; flex-direction: column; gap: 7px; }
.mock__side i { height: 7px; border-radius: 4px; background: rgba(255,255,255,.12); }
.mock__side i:first-child { width: 60%; background: var(--accent-p); margin-bottom: 6px; }
.mock__main { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; min-width: 0; }
.mock__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mock__kpis b { height: 30px; border-radius: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.mock__chart { border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); position: relative; overflow: hidden; }
.mock__chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mock__badge { position: absolute; left: 14px; top: 14px; z-index: 1; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #fff; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.18); }
.cover__stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cover__stack li { font-family: var(--mono); font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.project__body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project--featured .project__body { padding: 40px; justify-content: center; }
.project__cat { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.project__title { font-size: 21px; letter-spacing: -0.02em; }
.project--featured .project__title { font-size: clamp(26px, 2.6vw, 34px); }
.project__desc { color: var(--muted); font-size: 15px; margin: 0; }
.project--featured .project__desc { font-size: 16.5px; }
.project__more { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.project__more svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.project:hover .project__more svg { transform: translateX(4px); }
.projects__empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 72px; align-items: center; }
.about__copy > p { color: var(--muted); font-size: 18px; }
.about__copy .h2 { margin-bottom: 26px; }
.about__facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.about__facts span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.about__facts svg { width: 16px; height: 16px; color: var(--accent); }
.about__cards { display: grid; gap: 14px; }
.pillar { display: flex; gap: 16px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.pillar__icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pillar__icon svg { width: 18px; height: 18px; }
.pillar h3 { font-size: 18px; margin-bottom: 6px; }
.pillar p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }

/* ---------- Reviews ---------- */
.ratings { display: flex; flex-wrap: wrap; gap: 10px; }
.rating-card { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: border-color .25s, transform .3s var(--ease); }
.rating-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.rating-card__logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.rating-card__logo svg { width: 22px; height: 22px; }
.rating-card strong { display: block; font-size: 20px; line-height: 1.1; letter-spacing: -0.02em; }
.rating-card small { display: block; font-size: 12.5px; color: var(--muted); }
.quotes { columns: 3; column-gap: 20px; }
.quote { break-inside: avoid; margin: 0 0 20px; padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 16px; }
.quote--feature { background: linear-gradient(160deg, color-mix(in srgb, var(--violet) 18%, var(--surface)), var(--surface) 65%); }
.quote blockquote { margin: 0; font-size: 16px; line-height: 1.6; }
.quote--feature blockquote { font-family: var(--serif); font-size: clamp(21px, 2vw, 25px); line-height: 1.35; }
.quote figcaption { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.quote figcaption strong { display: block; font-size: 14.5px; }
.quote figcaption small { display: block; font-size: 12.5px; color: var(--dim); }
.quote__avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; }

/* ---------- Experience ---------- */
.exp { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; }
.exp__aside { position: sticky; top: calc(var(--nav-h) + 40px); align-self: start; }
.exp__aside .h2 { margin-bottom: 20px; }
.edu { margin-top: 32px; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.edu .label:not(:first-child) { margin-top: 22px; }
.edu__title { font-weight: 600; margin: 0 0 2px; }
.edu .muted { margin: 0; }
.certs li { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; margin-top: 6px; }
.certs svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 4px; }
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--line-2), var(--line) 85%, transparent); }
.tl { position: relative; padding-bottom: 38px; }
.tl:last-child { padding-bottom: 0; }
.tl__dot { position: absolute; left: -34px; top: 6px; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); }
.tl__dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--dim); }
.tl--current .tl__dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl--current .tl__dot::after { background: var(--accent); }
.tl h3 { font-size: 20px; }
.tl__where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--accent); margin: 6px 0 8px; }
.tl__period { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); margin: 0 0 10px; }
.tl--current .tl__period { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.tl__loc { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.tl__loc svg { width: 14px; height: 14px; }
.tl p:last-child { color: var(--muted); margin: 0; font-size: 15.5px; }

/* ---------- Skills ---------- */
.stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stack__group { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.stack__group h3 { font-size: 17px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.step__n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--accent-ink); background: var(--accent); }
.step h3 { font-size: 19px; margin: 20px 0 8px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Contact ---------- */
.contact-section { background: radial-gradient(900px 500px at 50% 0%, var(--accent-soft), transparent 70%), var(--bg); }
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
@media (max-width: 900px) { .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .channels { grid-template-columns: minmax(0, 1fr); } }
.channel { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .25s, transform .3s var(--ease), box-shadow .3s; min-width: 0; }
.channel:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.channel__icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); }
.channel__icon svg { width: 21px; height: 21px; }
.channel__text { min-width: 0; }
.channel__text strong { display: block; font-size: 15px; line-height: 1.25; }
.channel__text small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.channel__ext { margin-left: auto; color: var(--dim); }
.channel__ext svg { width: 16px; height: 16px; }
.channel--primary { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.channel--primary .channel__icon { background: var(--accent); color: var(--accent-ink); }
.channel--upwork .channel__icon { background: var(--upwork); color: #fff; }
.channel--fiverr .channel__icon { background: var(--fiverr); color: #fff; }
.channel--linkedin .channel__icon { background: var(--linkedin); color: #fff; }
.channel--whatsapp .channel__icon { background: #25d366; color: #fff; }

.panels { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 20px; align-items: start; }
.panel { padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel__head { margin-bottom: 22px; }
.panel__head h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; }
.panel__head h3 svg { width: 22px; height: 22px; color: var(--accent); }
.panel__head p { margin: 6px 0 0; }

/* Booking */
.booking__step[data-step="pick"] { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 24px; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal__head strong { font-size: 16px; }
.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal__dow span { font-size: 12px; color: var(--dim); padding: 4px 0; font-family: var(--mono); }
.cal__day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; border: 1px solid transparent; background: transparent; font-size: 14.5px; font-variant-numeric: tabular-nums; color: var(--dim); padding: 0; cursor: default; position: relative; }
.cal__day.is-available { color: var(--text); background: var(--surface-2); border-color: var(--line); cursor: pointer; font-weight: 600; }
.cal__day.is-available::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.cal__day.is-available:hover { border-color: var(--accent); }
.cal__day.is-selected { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cal__day.is-selected::after { background: var(--accent-ink); }
.cal__day.is-today { text-decoration: underline; text-underline-offset: 3px; }
.slots__day { font-weight: 600; margin: 4px 0 12px; }
.slots__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 330px; overflow-y: auto; padding-right: 4px; }
.slot { padding: 11px 8px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; font-weight: 600; font-size: 14.5px; font-variant-numeric: tabular-nums; transition: border-color .2s, background-color .2s, color .2s; }
.slot:hover { border-color: var(--accent); color: var(--accent); }
.slots__empty { grid-column: 1 / -1; color: var(--muted); font-size: 14.5px; margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }
.booking__chosen { padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); font-weight: 600; margin: 0 0 18px; }
.booking__done { text-align: center; padding: 20px 0; }
.done__icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin-bottom: 14px; }
.done__icon svg { width: 30px; height: 30px; }
.booking__done h4 { font-size: 24px; margin-bottom: 8px; }
.done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.booking__off p { color: var(--muted); }

/* Forms */
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field label, .label-text { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.opt { color: var(--dim); font-weight: 400; }
.field input, .field textarea, .field select { width: 100%; padding: 13px 15px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 16px; transition: border-color .25s, box-shadow .25s; }
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field__error { display: block; color: var(--danger); font-size: 13px; margin-top: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.pill span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; transition: all .2s; }
.pill input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__note { margin: 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.form__note.is-ok { color: var(--accent); }
.form__note.is-error { color: var(--danger); }
.form-success { text-align: center; padding: 30px 10px; }
.form-success h4 { font-size: 22px; margin: 12px 0 6px; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; }
.faq__list { display: grid; gap: 10px; }
.faq__item { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.faq__item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; cursor: pointer; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { font-size: 17px; font-weight: 600; }
.faq__icon { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: transform .3s var(--ease); }
.faq__icon svg { width: 16px; height: 16px; }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__item p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { padding: 80px 0 calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.footer__cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 56px; margin-bottom: 48px; border-bottom: 1px solid var(--line); }
.footer__cta h2 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.03em; max-width: 560px; }
.footer__cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.footer__grid nav, .footer__grid > div:last-child { display: flex; flex-direction: column; gap: 8px; }
.footer__grid nav a, .footer__social { color: var(--muted); font-size: 15px; transition: color .2s; }
.footer__grid nav a:hover, .footer__social:hover { color: var(--text); }
.footer__social { display: inline-flex; align-items: center; gap: 10px; }
.footer__social svg { width: 16px; height: 16px; }
.footer__about { margin-top: 16px; max-width: 380px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer__bottom p { margin: 0; }

/* ---------- Floating controls ---------- */
.to-top {
  position: fixed; z-index: 40; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease), background-color .2s, color .2s;
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mobile-cta { display: none; }

/* ---------- Modal ---------- */
.modal { width: min(860px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow: auto; overscroll-behavior: contain; }
.modal::backdrop { background: rgba(5, 6, 10, .7); backdrop-filter: blur(6px); }
.modal[open] { animation: pop .4s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.modal__close { position: sticky; top: 14px; float: right; margin: 14px 14px -56px 0; z-index: 3; background: var(--surface); }
.modal__media { aspect-ratio: 16 / 9; background: var(--surface-2); position: relative; overflow: hidden; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.modal__content { padding: 30px 34px 36px; }
.modal__content h3 { font-size: clamp(24px, 3vw, 32px); margin: 8px 0 14px; letter-spacing: -0.025em; }
.modal__content > p { color: var(--muted); }
.modal__content h4 { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 24px 0 12px; font-weight: 400; }
.modal__points li { display: flex; gap: 10px; margin-bottom: 8px; }
.modal__points svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 4px; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ---------- Reveal (content stays visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 0; }
  .stats .stat:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .hero__visual { justify-self: start; max-width: 420px; }
  .chip--rating { left: auto; right: -30px; top: 24px; }
  .services, .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project--featured { grid-column: span 2; }
  .about, .exp, .faq { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .exp__aside { position: static; }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quotes { columns: 2; }
  .panels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --nav-h: 66px; }
  body { font-size: 16px; }
  .container { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .brand__text small { display: none; }
  .nav__cta { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 36px); }
  .hero__ctas .btn { width: 100%; }
  .hero__visual { max-width: none; }
  .portrait { aspect-ratio: 4 / 4.2; }
  .chip--rating { right: 10px; top: 12px; left: auto; font-size: 12px; }
  .chip--code { display: none; }
  .trust { display: grid; grid-template-columns: minmax(0, 1fr); }
  .marquee { margin-top: 64px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 0; padding-top: 56px; }
  .stats .stat:nth-child(3n + 1) { border-left: 1px solid var(--line); padding-left: 22px; }
  .stats .stat:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat { padding: 4px 16px; }
  .section { padding: 80px 0; }
  .section__head { margin-bottom: 36px; }
  .services, .stack, .process, .projects { grid-template-columns: minmax(0, 1fr); }
  .service { padding: 28px 22px; }
  .project--featured { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .project--featured .project__media { min-height: 0; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--line); }
  .project--featured .project__body { padding: 24px; }
  .project--flip .project__media { order: 0; border-left: 0; }
  .filters { border-radius: 18px; }
  .quotes { columns: 1; }
  .panel { padding: 20px 16px; border-radius: 22px; }
  .booking__step[data-step="pick"] { grid-template-columns: minmax(0, 1fr); }
  .slots__list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer__cta-actions, .footer__cta-actions .btn { width: 100%; }
  .modal__content { padding: 22px 20px 28px; }
  .to-top { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: 44px; height: 44px; }
  .mobile-cta {
    position: fixed; z-index: 39; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink); font-weight: 600; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .6);
    transform: translateY(140%); transition: transform .4s var(--ease);
  }
  .mobile-cta svg { width: 18px; height: 18px; }
  .mobile-cta.is-visible { transform: none; }
  .footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}


/* ---------- Project tags and screenshot count ---------- */
.project__tag, .project__count { position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; color: #fff; background: rgba(8, 10, 16, .72); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
.project__tag { left: 14px; top: 14px; }
.project__tag--own { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.project__count { right: 14px; bottom: 14px; }
.project__count svg { width: 14px; height: 14px; }
.modal__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pill-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.pill-tag--own { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

/* ---------- Case study gallery ---------- */
/* Every screenshot is scaled to fit (object-fit: contain) inside a fixed stage, so nothing needs scrolling. */
.modal { width: min(1040px, calc(100% - 32px)); }
.gallery { --gh: min(70vh, 600px); position: relative; background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 20px 0 12px; user-select: none; -webkit-user-select: none; }
.gallery__viewport { overflow: hidden; touch-action: pan-y; }
.gallery__track { display: flex; transition: transform .45s var(--ease); will-change: transform; }
.gallery__slide { flex: 0 0 100%; min-width: 0; margin: 0; height: var(--gh); display: grid; place-items: center; padding: 0 68px; }
.gallery__zoom { display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery__zoom img { display: block; width: auto; height: auto; max-width: 100%; max-height: var(--gh); object-fit: contain; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .45); pointer-events: none; }
.gallery__zoom:focus-visible { outline-offset: -4px; }
.gallery__zoom--phone { width: auto; }
.phone { position: relative; box-sizing: border-box; display: block; height: var(--gh); width: calc(var(--gh) * 0.4639); max-width: 100%; padding: 9px; border-radius: 38px; background: #10131a; border: 1px solid rgba(255, 255, 255, .14); }
.phone img { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: top center; border-radius: 30px; border: 0; }
.phone__notch { position: absolute; z-index: 1; top: 9px; left: 50%; transform: translateX(-50%); width: 34%; height: 18px; border-radius: 0 0 12px 12px; background: #10131a; }
.gallery__nav { position: absolute; top: calc(20px + var(--gh) / 2); transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); transition: opacity .2s, border-color .2s; }
.gallery__nav svg { width: 20px; height: 20px; }
.gallery__nav:hover:not(:disabled) { border-color: var(--text); }
.gallery__nav:disabled { opacity: .3; cursor: default; }
.gallery__nav--prev { left: 12px; }
.gallery__nav--next { right: 12px; }
.gallery__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px 0; font-size: 14px; color: var(--text); min-height: 32px; }
.gallery__hint { font-size: 12.5px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.gallery__dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; padding: 6px 24px 0; }
.gallery__dots button { width: 24px; height: 24px; border: 0; padding: 0; background: transparent; display: grid; place-items: center; }
.gallery__dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background-color .2s, transform .2s; }
.gallery__dots button[aria-current="true"]::before { background: var(--accent); transform: scale(1.3); }
.modal__review { margin: 0; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.modal__review blockquote { margin: 0; font-size: 16px; line-height: 1.6; }
.modal__review figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* ---------- Full screen screenshot ---------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 9, 12, .94); color: #fff; overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(8, 9, 12, .6); }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100dvh - 110px); width: auto; height: auto; object-fit: contain; border-radius: 8px; background: #fff; cursor: zoom-out; }
.lightbox__caption { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .85); }
.lightbox__btn { position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; }
.lightbox__btn:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.lightbox__btn:disabled { opacity: .3; }
.lightbox__btn[hidden] { display: none; }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 760px) {
  .gallery { --gh: clamp(190px, 58vw, 52vh); padding-top: 60px; }
  .gallery__slide { padding: 0 12px; }
  .gallery__nav { top: auto; bottom: 4px; transform: none; width: 40px; height: 40px; }
  .gallery__bar { padding: 12px 60px 0; flex-direction: column; gap: 2px; text-align: center; }
  .gallery__dots { padding: 4px 60px 6px; }
  .project__tag { left: 12px; top: 12px; }
  .lightbox img { max-width: 100vw; max-height: calc(100dvh - 140px); border-radius: 0; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 52px; transform: none; }
  .lightbox__caption { bottom: 16px; padding: 0 16px; }
}

/* ---------- Wide service cards and checklists ---------- */
.service--wide { grid-column: span 2; }
.service__points { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 22px; }
.service__points li { display: flex; gap: 9px; align-items: flex-start; font-size: 15px; color: var(--text); }
.service__points svg { flex: none; width: 17px; height: 17px; margin-top: 3px; color: var(--accent); }

/* ---------- Secure by design ---------- */
.section--tight { padding-top: 0; }
.secure { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.secure__item { display: flex; gap: 14px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.secure__item h3 { font-size: 17px; margin: 2px 0 6px; }
.secure__item p { margin: 0; font-size: 15px; color: var(--muted); }
.secure__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.secure__icon svg { width: 20px; height: 20px; }
/* Responsive rules come after the base rules above so they win. */
@media (max-width: 1100px) {
  .secure { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Two columns: only the first wide card spans, so the grid stays even. */
  .service--wide ~ .service--wide { grid-column: auto; }
}
@media (max-width: 760px) {
  /* Two stat columns: every right hand stat gets the same divider and padding. */
  .stats .stat:nth-child(2n) { border-left: 1px solid var(--line); padding-left: 22px; }
  .stats .stat:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .secure { grid-template-columns: minmax(0, 1fr); }
  .service--wide { grid-column: auto; }
}

/* ---------- Several tags on one card ---------- */
.project__tags { position: absolute; z-index: 1; left: 14px; top: 14px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.project__tags .project__tag { position: static; }

/* ---------- Above the fold ----------
   On laptop screens (1366x768, 1536x864) the headline, role, intro, both buttons and the badges
   must fit on the first screen. The headline scales with the viewport height as well as the width. */
.hero { padding-top: calc(var(--nav-h) + 40px); }
.hero__title { font-size: clamp(38px, min(4.7vw, 8.2vh), 70px); line-height: 1.02; margin: 20px 0 14px; max-width: 13ch; }
.hero__lead { margin: 0; }
.hero__ctas { margin: 24px 0 24px; }
.trust { flex-wrap: wrap; gap: 8px; }
.trust__item { padding: 6px 12px 6px 6px; gap: 9px; border-radius: 12px; }
.trust__item strong { font-size: 13.5px; }
.trust__item small { font-size: 11.5px; }
.trust__logo { width: 30px; height: 30px; border-radius: 9px; }
.trust__logo svg { width: 17px; height: 17px; }

@media (max-width: 760px) {
  /* 375x667: the first button must be on the first screen. */
  .hero { padding-top: calc(var(--nav-h) + 22px); }
  .status { font-size: 12.5px; padding: 6px 12px 6px 10px; }
  .hero__title { font-size: clamp(32px, 9.4vw, 40px); margin: 16px 0 10px; max-width: none; }
  .hero__role { font-size: 12px; margin-bottom: 10px; }
  .hero__lead { font-size: 15.5px; line-height: 1.55; }
  .hero__ctas { margin: 18px 0 20px; gap: 10px; }
  .hero__ctas .btn--lg { padding: 14px 22px; font-size: 15.5px; }
}

/* ---------- Modern dropdowns (enhanced selects) ---------- */
.select { position: relative; }
.select__native { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.select__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 16px; text-align: left; cursor: pointer; transition: border-color .25s, box-shadow .25s; }
.select__btn:hover { border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.select__btn:focus-visible, .select.is-open .select__btn { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select__btn svg { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .25s var(--ease); }
.select.is-open .select__btn svg { transform: rotate(180deg); color: var(--accent); }
.select__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; max-height: min(340px, 60vh); overflow-y: auto; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .35), 0 4px 14px -6px rgba(0, 0, 0, .12); outline: none; transform-origin: top center; animation: selectIn .16s var(--ease); }
.select--up .select__list { top: auto; bottom: calc(100% + 8px); transform-origin: bottom center; }
.select__list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 10px; font-size: 15px; color: var(--text); cursor: pointer; transition: background .15s; }
.select__list li svg { width: 17px; height: 17px; flex: none; color: var(--accent); opacity: 0; }
.select__list li.is-active { background: var(--surface-2); }
.select__list li[aria-selected="true"] { font-weight: 600; color: var(--accent); }
.select__list li[aria-selected="true"] svg { opacity: 1; }
@keyframes selectIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .select__list { animation: none; } }
