:root {
  --bg: #fbfbfe;
  --bg-soft: #f4f2fb;
  --surface: #ffffff;
  --border: #e7e5f1;
  --text: #0f1222;
  --text-muted: #5b5f77;
  --text-faint: #9296a8;
  --accent-1: #6d5bf8;
  --accent-2: #c14bf0;
  --dark-bg: #0a0c14;
  --dark-surface: #141724;
  --dark-border: #262a3d;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(15, 18, 34, .04), 0 12px 28px -10px rgba(15, 18, 34, .12);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section, .stats-band, .project-card { scroll-margin-top: 92px; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { box-shadow: 0 10px 24px -8px rgba(15, 18, 34, .45); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text); }
.btn-gradient { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff; }
.btn-gradient:hover { box-shadow: 0 10px 28px -8px rgba(109, 91, 248, .55); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn-outline-light:hover { border-color: #fff; }
.btn-sm { padding: 9px 16px; font-size: .85rem; }

/* Nav */
.navbar {
  position: sticky; top: 0; z-index: 100; background: rgba(251, 251, 254, .85);
  backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease;
}
.navbar.is-scrolled { border-color: var(--border); box-shadow: 0 4px 20px -12px rgba(15, 18, 34, .15); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff; font-size: .8rem; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: .92rem; font-weight: 500; color: var(--text-muted); position: relative; padding: 6px 0;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); border-radius: 2px;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* Section scaffolding */
.section { padding: 96px 0; }
.section-tight { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600;
  color: var(--accent-1); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px;
}
.section-title { font-size: clamp(1.7rem, 2.6vw, 2.1rem); font-weight: 800; margin-bottom: 10px; }
.section-sub { color: var(--text-muted); font-size: 1rem; }

/* Hero */
.hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -180px; right: -160px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 91, 248, .18), transparent 70%); z-index: 0;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 22px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.hero-lead { font-size: 1.05rem; color: var(--text-muted); max-width: 480px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 40px; flex-wrap: wrap; }
.trust-label { font-size: .82rem; color: var(--text-faint); margin-bottom: 14px; }
.trust-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.trust-row i { font-size: 1.5rem; color: var(--text-muted); }
.trust-row span { font-size: .85rem; font-weight: 600; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }

.hero-visual { position: relative; }
.hero-photo {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); border: 1px solid var(--border);
  aspect-ratio: 16 / 11.5;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

.hero-stats {
  position: relative; margin-top: -34px; margin-left: 24px; margin-right: 24px; background: #fff; border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); border: 1px solid var(--border); display: flex; padding: 18px 8px;
}
.hero-stats .stat { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-stats .stat + .stat { border-left: 1px solid var(--border); }
.hero-stats .stat .num { font-size: 1.25rem; font-weight: 800; }
.hero-stats .stat .lbl { font-size: .72rem; color: var(--text-faint); font-weight: 500; }

/* Icon tiles */
.icon-tile {
  width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.icon-tile svg { width: 22px; height: 22px; }
.tile-blue { background: #e7f0ff; color: #2563eb; }
.tile-violet { background: #f1eaff; color: #7c3aed; }
.tile-indigo { background: #e9ecff; color: #4f46e5; }
.tile-orange { background: #fff1e6; color: #ea7c1f; }
.tile-sky { background: #e6f6ff; color: #0284c7; }
.tile-plum { background: #fbe9ff; color: #a21caf; }

/* What I Do grid: soft cards */
.do-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.do-item { background: var(--surface); border-radius: var(--radius-md); padding: 22px 18px; }
.do-item .icon-tile { width: 44px; height: 44px; margin-bottom: 14px; }
.do-item .icon-tile svg { width: 20px; height: 20px; }
.do-item h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.do-item p { color: var(--text-muted); font-size: .84rem; }

.tag {
  font-size: .76rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--bg-soft); color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Projects */
.projects-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; gap: 20px; flex-wrap: wrap; }
.projects-scroller-wrap { position: relative; }
.projects-scroller-wrap::before, .projects-scroller-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 8px; width: 64px; z-index: 1; pointer-events: none;
}
.projects-scroller-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg-soft), transparent); }
.projects-scroller-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg-soft), transparent); }
.projects-scroller {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none;
}
.projects-scroller::-webkit-scrollbar { display: none; }
.project-card {
  flex: 0 0 300px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column;
}
.project-thumb { position: relative; height: 168px; padding: 14px; display: flex; flex-direction: column; overflow: hidden; }
.project-thumb .win-dots { display: flex; gap: 5px; margin-bottom: 12px; position: relative; z-index: 1; }
.project-thumb .win-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.project-thumb .thumb-icon { flex: 1; display: flex; align-items: center; justify-content: center; }
.project-thumb .thumb-icon svg { width: 44px; height: 44px; color: rgba(255, 255, 255, .92); }
.project-thumb .badge-circle {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .22);
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.project-thumb .badge-circle svg { width: 14px; height: 14px; color: #fff; }
.project-thumb.has-image img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; z-index: 0;
}
.project-thumb.has-image::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10, 12, 20, .55), rgba(10, 12, 20, 0) 45%);
}
.project-thumb.has-image .win-dots span { background: rgba(255, 255, 255, .8); }
.project-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-body h3 { font-size: 1rem; font-weight: 700; }
.project-body p { font-size: .87rem; color: var(--text-muted); flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.scroller-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; padding: 0; appearance: none; color: var(--text);
}
.scroller-nav svg { width: 18px; height: 18px; }
.scroller-nav-next { right: -14px; }
.scroller-nav-prev { left: -14px; }

/* Stats band */
.stats-panel { background: var(--dark-bg); border-radius: var(--radius-lg); padding: 32px 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; text-align: center; }
.stat-item { padding: 0 20px; }
.stat-item + .stat-item { border-left: 1px solid var(--dark-border); }
.stat-item .icon-circle {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
}
.stat-item .icon-circle svg { width: 20px; height: 20px; }
.stat-item .num { font-size: 1.7rem; font-weight: 800; color: #fff; }
.stat-item .lbl { font-size: .82rem; color: #9296b3; margin-top: 4px; }
.c-purple { background: rgba(124, 92, 255, .15); color: #a78bfa; }
.c-violet { background: rgba(196, 75, 240, .15); color: #e879f9; }
.c-orange { background: rgba(245, 165, 36, .15); color: #f5a524; }
.c-green { background: rgba(34, 197, 94, .15); color: #4ade80; }
.stat-item .num.t-purple { color: #a78bfa; }
.stat-item .num.t-violet { color: #e879f9; }
.stat-item .num.t-orange { color: #f5a524; }
.stat-item .num.t-green { color: #4ade80; }

/* Tech logos */
.tech-grid {
  display: flex; flex-wrap: nowrap; gap: 10px; justify-content: center; max-width: 100%; overflow-x: auto; padding: 4px;
  scrollbar-width: none;
}
.tech-grid::-webkit-scrollbar { display: none; }
.tech-pill {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; font-weight: 600; font-size: .82rem; box-shadow: var(--shadow-card); white-space: nowrap; flex: 0 0 auto;
}
.tech-pill img, .tech-pill i { width: 18px; height: 18px; font-size: 18px; }

/* CTA / contact band */
.cta-band {
  background:
    linear-gradient(100deg, var(--dark-bg) 38%, rgba(10, 12, 20, .55) 60%, rgba(10, 12, 20, .15) 78%, transparent 92%),
    radial-gradient(circle at 15% 15%, rgba(109, 91, 248, .35), transparent 45%),
    url('../img/cta-earth.png');
  background-size: auto, auto, cover;
  background-position: left, left, right center;
  background-repeat: no-repeat;
  border-radius: var(--radius-lg); padding: 40px 40px; position: relative; overflow: hidden;
}
.cta-band .eyebrow { color: #c9b8ff; margin-bottom: 8px; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; margin-bottom: 10px; }
.cta-band p { color: #b6b9cc; max-width: 480px; margin-bottom: 20px; font-size: .92rem; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.cta-contact-row { display: flex; flex-wrap: wrap; gap: 28px; }
.cta-contact-row .item { display: flex; align-items: center; gap: 10px; color: #e5e6f0; font-size: .9rem; font-weight: 500; }
.cta-contact-row .item svg { width: 18px; height: 18px; color: #c9b8ff; }

/* Footer */
.site-footer { background: var(--dark-bg); border-top: 1px solid var(--dark-border); padding: 44px 0 20px; position: relative; overflow: hidden; }
.footer-dots {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(90%, 900px); aspect-ratio: 644 / 350; pointer-events: none; z-index: 0;
  background-image: url('../img/footer-world-map.webp');
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: .1;
}
.footer-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-grid h4 { color: #fff; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.footer-grid p { color: #9296b3; font-size: .88rem; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid ul li a, .footer-grid ul li { color: #9296b3; font-size: .88rem; }
.footer-grid ul li a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; color: #fff; }
.footer-bottom {
  position: relative; z-index: 1;
  border-top: 1px solid var(--dark-border); padding-top: 24px; text-align: center; color: #6d7191; font-size: .82rem;
}

/* .reveal is intentionally inert: content stays visible unconditionally,
   independent of JS timing, crawlers, or no-JS clients. */

/* Responsive */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .do-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .stat-item:nth-child(2n+1) { border-left: none; }
}
@media (max-width: 768px) {
  .nav-links { position: fixed; top: 76px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; padding: 20px 24px; gap: 18px; display: none; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-right .btn-sm { display: none; }
  .do-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band { padding: 32px 24px; }
  .tech-grid { flex-wrap: wrap; overflow-x: visible; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { flex-direction: column; margin-left: 0; margin-right: 0; }
  .hero-stats .stat + .stat { border-left: none; border-top: 1px solid var(--border); padding-top: 10px; }
}
