:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f9;
  --ink: #0d0d12;
  --muted: #46464f;
  --faint: #71717d;
  --accent: #4338ca;
  --accent-soft: rgba(67, 56, 202, 0.07);
  --line: rgba(13, 13, 18, 0.11);
  --card: #ffffff;
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d12;
    --bg-soft: #17171d;
    --ink: #f2f2f7;
    --muted: #b0b0bc;
    --faint: #6f6f7c;
    --accent: #8f99ff;
    --accent-soft: rgba(143, 153, 255, 0.13);
    --line: rgba(242, 242, 247, 0.12);
    --card: #15151b;
  }
}

* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
/* a two-tone wash of the page colors at the top of every page */
body::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 460px;
  background:
    radial-gradient(560px 320px at 10% -8%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(480px 300px at 90% -6%, color-mix(in srgb, var(--accent2, var(--accent)) 11%, transparent), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: var(--accent-soft); }

.shell { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---------------- header / nav ---------------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 0;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
nav { display: flex; gap: 4px; flex-wrap: wrap; }
.navlink {
  font: inherit; font-size: 14.5px; font-weight: 500;
  color: var(--muted);
  padding: 7px 12px; border-radius: 8px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.navlink:hover { color: var(--ink); background: var(--bg-soft); }
.navlink[aria-current="page"] { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.navlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------- page body ---------------- */
main { min-height: 72vh; }
.panel { padding: 56px 0 72px; }
@media (prefers-reduced-motion: no-preference) {
  .panel { animation: rise 0.35s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}

.kicker {
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 5.4vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 3.6vw, 31px);
  letter-spacing: -0.01em;
  margin: 44px 0 12px;
}
.lede { font-size: 18.5px; line-height: 1.7; color: var(--muted); max-width: 58ch; }

/* short accent stroke under page titles (not the home name) */
.panel > h1:not(.name)::after {
  content: "";
  display: block;
  width: 54px; height: 4px;
  border-radius: 999px;
  background: var(--accent);
  margin-top: 18px;
}
p { color: var(--muted); max-width: 66ch; }
strong { color: var(--ink); font-weight: 600; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: inherit; font-size: 14.5px; font-weight: 600;
  padding: 11px 22px; border-radius: 999px;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { opacity: 0.92; }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- home ---------------- */
.home {
  min-height: calc(100svh - 62px);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 40px 0 80px;
}
.home .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(52px, 11vw, 108px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
}
.home .line {
  margin: 18px 0 0;
  font-size: clamp(15px, 2.2vw, 17px);
  color: var(--muted);
}
.home-menu {
  margin-top: 52px;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.home-link {
  display: flex; align-items: baseline; gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: padding-left 0.15s ease, color 0.15s ease;
}
.home-link:hover { padding-left: 14px; color: var(--accent); }
.home-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-link .num { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.home-link .label { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 3.4vw, 26px); letter-spacing: -0.01em; }
.home-link .arrow { margin-left: auto; color: var(--faint); }
.home-contact { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }

.byline {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.byline a { font-weight: 600; }

/* ================= product-launch hero ================= */
.hero2 {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 110px);
  border-radius: 24px;
  background: #f6f4ff;
  display: flex;
}
@media (prefers-color-scheme: dark) {
  .hero2 { background: #12101c; }
}
.blobs { position: absolute; inset: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.55;
  will-change: transform;
}
.b1 { width: 480px; height: 480px; background: #ff5c66; top: -14%; left: -10%; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 420px; height: 420px; background: #7c5cff; bottom: -16%; right: -8%; animation: drift2 31s ease-in-out infinite alternate; }
.b3 { width: 360px; height: 360px; background: #ffb02e; top: 8%; right: 14%; animation: drift3 23s ease-in-out infinite alternate; }
.b4 { width: 330px; height: 330px; background: #2ec9ff; bottom: 4%; left: 16%; animation: drift4 28s ease-in-out infinite alternate; }
.b5 { width: 280px; height: 280px; background: #ff5cd0; top: 40%; left: 44%; animation: drift5 34s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(70px, 90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-90px, -70px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-60px, 80px) scale(0.9); } }
@keyframes drift4 { to { transform: translate(90px, -60px) scale(1.18); } }
@keyframes drift5 { to { transform: translate(-70px, -90px) scale(1.12); } }

.hero2-grid {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 28px 22px;
}
.hero2-topline {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.chip-now, .chip-ver {
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #1b1830;
  border: 1px solid rgba(27, 24, 48, 0.1);
}
@media (prefers-color-scheme: dark) {
  .chip-now, .chip-ver { background: rgba(18, 16, 28, 0.55); color: #f2f0ff; border-color: rgba(242, 240, 255, 0.14); }
}
.chip-now { color: #0b7a45; }
@media (prefers-color-scheme: dark) { .chip-now { color: #4fd894; } }

.hero2-center { max-width: 720px; }
.name2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(62px, 12.5vw, 148px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
  color: #1b1830;
}
@media (prefers-color-scheme: dark) { .name2 { color: #f6f4ff; } }
.name2 .reg { font-size: 0.22em; vertical-align: 0.9em; opacity: 0.65; letter-spacing: 0; }
.pitch {
  font-size: clamp(16px, 2.3vw, 19px);
  line-height: 1.6;
  color: #3c3757;
  max-width: 52ch;
  margin: 0 0 26px;
}
@media (prefers-color-scheme: dark) { .pitch { color: #c9c4e4; } .pitch strong { color: #fff; } }
.hero2-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-demo { background: #ff5c66; color: #fff; }
.cta-spec { background: #ffb02e; color: #1b1830; }
.cta-case { background: #7c5cff; color: #fff; }
.cta-li { background: rgba(255, 255, 255, 0.6); color: #1b1830; border: 1px solid rgba(27, 24, 48, 0.14); backdrop-filter: blur(8px); }
@media (prefers-color-scheme: dark) { .cta-li { background: rgba(18, 16, 28, 0.5); color: #f2f0ff; border-color: rgba(242, 240, 255, 0.18); } }
.hero2-cta .btn:hover { opacity: 1; transform: translateY(-2px); }

.hero2-bottom {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
}
.hero2-bottom .byline { margin: 0; font-size: 13.5px; color: #3c3757; }
@media (prefers-color-scheme: dark) { .hero2-bottom .byline { color: #c9c4e4; } }
.hero2-photo { width: min(200px, 26vw); flex: none; }
.hero2-photo img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 16px 24px rgba(27, 24, 48, 0.3));
}
@media (max-width: 640px) {
  .hero2 { min-height: calc(100svh - 130px); }
  .hero2-grid { padding: 18px 18px 16px; }
  .hero2-photo { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero2-topline { animation: rise 0.5s ease both; }
  .name2 { animation: rise 0.55s 0.06s ease both; }
  .pitch { animation: rise 0.5s 0.14s ease both; }
  .hero2-cta { animation: rise 0.5s 0.2s ease both; }
  .hero2-bottom { animation: rise 0.5s 0.28s ease both; }
}

/* hero portrait */
.home-top {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 44px;
  align-items: center;
}
.home-photo {
  position: relative;
  justify-self: end;
  width: min(100%, 330px);
  padding-top: 26px;
}
.home-photo::before {
  content: "";
  position: absolute;
  left: -7%; right: -7%; top: 30%; bottom: 2%;
  border-radius: 26px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.home-photo img {
  position: relative;
  display: block;
  width: 100%; height: auto;
  filter: drop-shadow(0 18px 26px rgba(13, 13, 18, 0.22));
}
@media (max-width: 720px) {
  .home-top { grid-template-columns: 1fr; gap: 8px; }
  .home-photo { justify-self: center; width: min(72vw, 270px); margin-top: 18px; }
}

/* ---------------- overview timeline ---------------- */
.timeline { margin-top: 40px; }
.tl-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.tl-row:last-child { border-bottom: none; }
.tl-when {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint);
  padding-top: 3px;
}
.tl-body h3 { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 0 0 4px; color: var(--ink); }
.tl-body p { margin: 0; font-size: 15px; }
@media (max-width: 560px) {
  .tl-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------------- experience entries ---------------- */
body { counter-reset: casestudy; }
.role::before {
  counter-increment: casestudy;
  content: "Case study 0" counter(casestudy);
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  padding: 3px 11px; border-radius: 999px;
  margin-bottom: 12px;
}
.role { padding: 30px 14px 30px 16px; margin: 0 -16px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; transition: border-color 0.18s ease, background 0.18s ease; border-radius: 4px; }
.role:hover { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 3%, transparent); }
.role:last-of-type { border-bottom: none; }
.role-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.role h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 0; color: var(--ink); }
.role .where { color: var(--faint); font-size: 13.5px; margin-left: auto; white-space: nowrap; }
.role .org { color: var(--muted); font-size: 15px; margin: 2px 0 14px; }
.role-grid { display: grid; grid-template-columns: 110px 1fr; gap: 8px 18px; }
.role-grid .rlabel {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  padding-top: 3px;
}
.role-grid .rtext { font-size: 15px; color: var(--muted); margin: 0; }
.role-grid .rtext strong { color: var(--ink); }
.skilltags { display: flex; flex-wrap: wrap; gap: 7px; align-self: start; }
.skilltag {
  font-size: 12.5px; font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  padding: 4px 11px; border-radius: 999px;
}
@media (max-width: 560px) {
  .role-grid { grid-template-columns: 1fr; gap: 2px; }
  .role-grid .rlabel { padding-top: 10px; }
  .role .where { margin-left: 0; width: 100%; }
}

/* ---------------- skills (bento) ---------------- */
.skillgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
.skillcard {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 24px 20px;
}
.skillcard h3 { font-family: var(--display); font-size: 18.5px; font-weight: 600; margin: 0 0 8px; color: var(--ink); padding-right: 44px; }
.skillcard p { font-size: 14.5px; margin: 0; }
.skillcard .idx {
  position: absolute; top: 20px; right: 22px;
  font-family: var(--display); font-weight: 700; font-size: 15px;
  color: var(--accent); opacity: 0.45;
}
.skillcard.feature {
  grid-column: 1 / -1;
  background: var(--accent);
  border-color: var(--accent);
}
.skillcard.feature h3 { color: #fff; font-size: 24px; }
.skillcard.feature p { color: rgba(255, 255, 255, 0.88); font-size: 15.5px; max-width: 62ch; }
.skillcard.feature .idx { color: #fff; opacity: 0.55; }
.skillcard.feature:hover { border-color: var(--accent); }
@media (max-width: 620px) { .skillgrid { grid-template-columns: 1fr; } }

.proof {
  margin-top: 40px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--card)), var(--card) 55%);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 16px;
  padding: 28px 28px 24px;
}
.proof h3 { font-family: var(--display); font-size: 21px; font-weight: 600; margin: 0 0 10px; }
.proof p { font-size: 15px; }
.proof ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 14.5px; }
.proof li { margin: 7px 0; }
.proof li::marker { color: var(--accent); }

/* ---------------- about ---------------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 30px; }
.fact {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; background: var(--card);
}
.fact .label { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.fact .value { font-size: 15px; color: var(--muted); margin-top: 5px; }
.fact .value strong { color: var(--ink); }

/* ---------------- contact strip / footer ---------------- */
.contact {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.contact .note { color: var(--faint); font-size: 14px; margin-right: auto; }

footer {
  position: relative;
  border-top: none;
  padding: 29px 0 44px;
  color: var(--faint); font-size: 13px;
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
}
footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 999px;
  background: linear-gradient(90deg, #ff5c66, #ffb02e, #7c5cff, #2ec9ff);
}
footer .made { margin-left: auto; }
footer a { color: var(--faint); }

@media (max-width: 560px) {
  .bar { flex-wrap: wrap; gap: 8px; padding: 14px 0 10px; }
  .wordmark { width: 100%; }
  nav { margin-left: -12px; }
  .panel { padding: 40px 0 56px; }
}

/* ================= visual upgrades ================= */

/* smooth cross-fade between pages (browsers that support it) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 160ms ease both vt-out; }
  ::view-transition-new(root) { animation: 220ms ease both vt-in; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
}

/* giant ghost page numeral */
.panel { position: relative; }
.pagenum {
  position: absolute; top: 26px; right: -6px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(96px, 17vw, 170px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  user-select: none; pointer-events: none;
}

/* home entrance choreography */
@media (prefers-reduced-motion: no-preference) {
  .home .name { animation: rise 0.5s ease both; }
  .home .line { animation: rise 0.5s 0.08s ease both; }
  .home .byline { animation: rise 0.5s 0.14s ease both; }
  .home-contact { animation: rise 0.5s 0.2s ease both; }
  .home-photo { animation: rise 0.55s 0.12s ease both; }
  .home-menu .home-link { animation: rise 0.45s ease both; }
  .home-menu .home-link:nth-child(1) { animation-delay: 0.28s; }
  .home-menu .home-link:nth-child(2) { animation-delay: 0.36s; }
  .home-menu .home-link:nth-child(3) { animation-delay: 0.44s; }
  .home-menu .home-link:nth-child(4) { animation-delay: 0.52s; }
}

/* home menu: bigger numerals, sliding arrows */
.home-link .num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(26px, 4.6vw, 38px);
  line-height: 1;
  color: var(--faint);
  opacity: 0.38;
  align-self: center;
}
.home-link .arrow { transition: transform 0.18s ease, color 0.18s ease; }
.home-link:hover .arrow { transform: translateX(7px); color: var(--accent); }

/* cards that respond */
.skillcard, .fact {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.skillcard:hover, .fact:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(13, 13, 18, 0.07);
}

/* ---------------- horizontal timeline ---------------- */
.tl-bridge {
  margin: 30px 0 14px;
  font-weight: 600; font-size: 16px;
  color: var(--ink);
}
.tl-band {
  margin: 0 -24px;
  padding: 22px 24px 16px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
}
.tl-band .tl-card { box-shadow: 0 12px 28px rgba(13, 13, 18, 0.07); }
.tl-card:first-child { background: var(--accent); border-color: var(--accent); }
.tl-card:first-child .when { color: rgba(255, 255, 255, 0.75); }
.tl-card:first-child h3 { color: #fff; }
.tl-card:first-child p { color: rgba(255, 255, 255, 0.9); }
.tl-scroll {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 14px 2px 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tl-scroll::-webkit-scrollbar { height: 8px; }
.tl-scroll::-webkit-scrollbar-track { background: transparent; }
.tl-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.tl-card {
  flex: 0 0 min(430px, 82vw);
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px 26px;
}
.tl-card .when {
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
}
.tl-card h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 6px 0 8px; color: var(--ink); }
.tl-card p { margin: 0; font-size: 14.8px; }
.tl-hint { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; }
@media (prefers-reduced-motion: no-preference) {
  .tl-hint .h-arrow { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
  @keyframes nudge { 50% { transform: translateX(6px); } }
}

/* scroll reveals (site.js adds .reveal, then .inview when visible) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .reveal.inview { opacity: 1; transform: none; }
}
