/* =========================================================
   Tokens
   ========================================================= */
:root {
  --bg: #fafaf9;
  --bg-alt: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #f6f5f3;
  --ink: #0c0c0e;
  --ink-2: #44464d;
  --ink-3: #7c7f87;
  --line: #e7e5e1;
  --line-strong: #d6d3cd;
  --accent: #f0561d;
  --accent-ink: #c2410c;
  --accent-soft: #fff0e8;
  --grid: rgba(12, 12, 14, .045);
  --shadow-sm: 0 1px 2px rgba(12, 12, 14, .05);
  --shadow: 0 1px 2px rgba(12, 12, 14, .04), 0 12px 32px -12px rgba(12, 12, 14, .14);
  --shadow-lg: 0 2px 4px rgba(12, 12, 14, .04), 0 30px 60px -20px rgba(12, 12, 14, .28);
  --maxw: 1180px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --bg-alt: #0e0e11; --surface: #131317; --surface-2: #18181c;
    --ink: #f4f4f5; --ink-2: #b5b6bd; --ink-3: #82838c;
    --line: #232329; --line-strong: #303038;
    --accent: #ff6a33; --accent-ink: #ff8a5c; --accent-soft: #2a160d;
    --grid: rgba(255, 255, 255, .04);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 70px -20px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --bg-alt: #0e0e11; --surface: #131317; --surface-2: #18181c;
  --ink: #f4f4f5; --ink-2: #b5b6bd; --ink-3: #82838c;
  --line: #232329; --line-strong: #303038;
  --accent: #ff6a33; --accent-ink: #ff8a5c; --accent-soft: #2a160d;
  --grid: rgba(255, 255, 255, .04);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 70px -20px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; overflow-x: clip;
}
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor; stroke: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent); color: #fff; }

/* Black logos (Apple, Unity, Gradle, pandas) flip in dark mode */
:root[data-theme="dark"] img.mono { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.mono { filter: invert(1); } }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }

/* =========================================================
   Buttons, links, chips
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s, color .18s;
  cursor: pointer; max-width: 100%;
}
.btn svg { font-size: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn--dark { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn--dark:hover { box-shadow: var(--shadow); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: var(--line-strong); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 90%, #fff); }
.btn--outline-light { color: #fff; border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .04); }
.btn--outline-light:hover { border-color: rgba(255, 255, 255, .6); }

.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; color: var(--ink);
  transition: border-color .18s;
}
.icon-btn:hover { border-color: var(--line-strong); }

.link {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  font-weight: 600; font-size: 14.5px; text-decoration: none; color: var(--ink);
}
.link svg { transition: transform .18s var(--ease); color: var(--accent); }
.link:hover svg { transform: translate(2px, -2px); }
.link:hover { color: var(--accent-ink); }

.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack li {
  font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
}

.pill {
  display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}

/* =========================================================
   Nav
   ========================================================= */
.nav { position: sticky; top: 0; z-index: 100; padding: 12px 16px 0; }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; height: 60px; padding: 0 10px 0 14px;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid transparent; border-radius: 16px;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.nav.is-scrolled .nav__inner {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-color: var(--line); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.015em; margin-right: auto; }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 12px; font-weight: 500; position: relative;
}
.brand__mark::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.nav__menu { display: flex; gap: 2px; }
.nav__menu a {
  padding: 7px 13px; border-radius: 9px; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  transition: color .15s, background .15s;
}
.nav__menu a:hover { color: var(--ink); background: var(--surface-2); }
.nav__menu a.is-active { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__menu-contact { display: none; }
.menu-toggle { display: none; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}
/* Full menu fits from ~680px, so tablets (iPad mini 744px and up) keep it; phones get the ☰ menu */
@media (max-width: 719px) {
  .nav { padding: 8px 8px 0; }
  .nav__inner { position: relative; }
  .menu-toggle { display: grid; }
  .nav__cta { display: none; }
  .nav__menu {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; gap: 2px; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s var(--ease), visibility .2s;
  }
  .nav__menu a { padding: 12px 14px; font-size: 16px; }
  .nav__menu .nav__menu-contact { display: block; }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; transform: none; }
  .nav.is-open .nav__inner { background: var(--surface); border-color: var(--line); }
}

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; margin-top: -72px; padding-top: calc(72px + clamp(40px, 7vw, 88px)); }
.hero__bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.hero__bg::after {
  content: ""; position: absolute; width: 640px; height: 640px; max-width: 100%; right: 4%; top: 6%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 65%);
  filter: blur(20px);
}
.hero__grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px; align-items: center; }

.intro { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #eee;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line-strong), var(--shadow);
}
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #16a34a; opacity: .5; animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }

.hero__title { margin-top: 26px; font-size: clamp(50px, 8.4vw, 104px); font-weight: 750; letter-spacing: -0.05em; line-height: .92; }
.hero__role {
  display: block; margin-top: 20px; font-size: clamp(20px, 2.5vw, 28px); font-weight: 550; letter-spacing: -0.025em; line-height: 1.25; color: var(--ink-2);
}
.hero__role em { display: inline-block; font-style: normal; color: var(--ink); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 28%, transparent) 62%); }
.hero__lead { margin-top: 22px; max-width: 560px; font-size: 17.5px; line-height: 1.65; color: var(--ink-2); }
/* Phones held sideways: keep the heading from filling the whole short screen */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { padding-top: calc(72px + 28px); }
  .hero__title { margin-top: 18px; font-size: clamp(40px, 6.4vw, 64px); }
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.socials { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 26px; }
.social { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); text-decoration: none; font-family: var(--mono); }
.social svg { font-size: 16px; }
.social:hover { color: var(--ink); }

/* Device collage */
.hero__visual { position: relative; height: 560px; }
.device { position: absolute; top: 50%; left: 50%; }
.device img { width: 100%; }
.device--front { width: 236px; transform: translate(-50%, -50%); z-index: 3; }
.device--front img { filter: drop-shadow(0 30px 40px rgba(12, 12, 14, .28)); }
.device--back-left { width: 196px; transform: translate(-112%, -46%) rotate(-7deg); z-index: 1; }
.device--back-right { width: 196px; transform: translate(12%, -40%) rotate(7deg); z-index: 2; }
.device--back-left img, .device--back-right img {
  border: 6px solid #111; border-radius: 30px; background: #000; box-shadow: var(--shadow-lg);
}
.tag {
  position: absolute; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.tag__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tag__dot--green { background: #22c55e; }
.tag__dot--gold { background: #c9a86a; }
.device--front .tag { left: 50%; bottom: -14px; transform: translateX(-50%); }
.device--back-left .tag { left: -18px; top: 16%; transform: rotate(7deg); }
.device--back-right .tag { right: -22px; bottom: 14%; transform: rotate(-7deg); }
.tag--accent { background: var(--ink); color: var(--bg); border-color: transparent; }
.tag--accent .tag__dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { height: 520px; margin-top: 8px; }
}
@media (max-width: 520px) {
  .hero__visual { height: 430px; }
  .device--front { width: 190px; }
  .device--back-left, .device--back-right { width: 148px; }
  .device--back-left { transform: translate(-102%, -46%) rotate(-7deg); }
  .device--back-right { transform: translate(2%, -40%) rotate(7deg); }
  .device--back-left .tag, .device--back-right .tag { display: none; }
}

/* Marquee */
.marquee {
  margin-top: clamp(56px, 7vw, 88px); border-block: 1px solid var(--line); background: var(--surface);
  overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; gap: 44px; padding: 20px 22px; }
.marquee__list li { display: flex; align-items: center; gap: 10px; font-weight: 550; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.marquee__list img { width: 22px; height: 22px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   Sections
   ========================================================= */
.section { padding-block: clamp(72px, 10vw, 128px); scroll-margin-top: 70px; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3);
}
.eyebrow span { color: var(--accent-ink); }
.eyebrow span::after { content: ""; display: inline-block; vertical-align: middle; width: 22px; height: 1px; margin-left: 10px; background: var(--line-strong); }
.section h2 { margin-top: 14px; font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -0.04em; font-weight: 720; }
.section__sub { margin-top: 16px; font-size: 17.5px; color: var(--ink-2); max-width: 620px; }

.proj-head { display: flex; align-items: center; gap: 14px; }
.proj-head h3 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.035em; }
.meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.app-icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); background: #fff; object-fit: cover; }
img.app-icon { background: none; box-shadow: none; border-radius: 0; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(12, 12, 14, .14)); }
.app-icon--glyph { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: 26px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }

/* =========================================================
   Projects carousel
   ========================================================= */
.projects__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.carousel__nav { display: flex; gap: 8px; }
.icon-btn--lg { width: 46px; height: 46px; border-radius: 14px; font-size: 20px; }
.carousel__btn:disabled { opacity: .35; cursor: default; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter {
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 550; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.filter:hover { border-color: var(--line-strong); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.carousel { position: relative; }
.carousel__track {
  --gap: 20px; --per: 3;
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
  gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px 2px 22px; margin: -6px -2px 0; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline-offset: 6px; }
@media (max-width: 1000px) { .carousel__track { --per: 2; } }
@media (max-width: 640px) {
  .carousel__track { --gap: 14px; grid-auto-columns: 84%; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .carousel__nav { display: none; }
}
.carousel__progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.carousel__progress i { display: block; height: 100%; width: var(--w, 30%); margin-left: var(--x, 0%); border-radius: inherit; background: var(--accent); transition: margin-left .15s linear, width .2s; }

.pcard {
  position: relative; scroll-snap-align: start; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.pcard[hidden] { display: none; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.pcard__visual {
  position: relative; height: 220px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; gap: 14px;
  padding-top: 26px; border-bottom: 1px solid var(--line);
}
.pcard__visual .phone {
  width: 118px; border-radius: 18px; border: 4px solid #0d0d10; box-shadow: 0 20px 34px -12px rgba(0, 0, 0, .45);
  transition: transform .5s var(--ease);
}
.pcard__visual .phone:nth-child(2) { margin-top: 30px; }
.pcard:hover .pcard__visual .phone:nth-child(1) { transform: translateY(-6px) rotate(-1.5deg); }
.pcard:hover .pcard__visual .phone:nth-child(2) { transform: translateY(-10px) rotate(1.5deg); }
.pcard__visual .phone--framed, .dlg__visual .phone--framed { border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .4)); width: 124px; }

.v-spoton { background: radial-gradient(circle at 50% 10%, rgba(255, 140, 90, .9), transparent 60%), linear-gradient(160deg, #c2410c, #431407); }
.v-hunter { background: radial-gradient(circle at 30% 0%, #6366f1, transparent 60%), linear-gradient(160deg, #312e81, #1e1b4b); }
.v-mingler { background: radial-gradient(circle at 70% 10%, rgba(201, 168, 106, .45), transparent 55%), linear-gradient(160deg, #1d1b18, #0b0b0d); }
.v-run { background: radial-gradient(circle at 50% 0%, #f59e0b, transparent 60%), linear-gradient(160deg, #7c2d12, #431407); }
.v-cards { background: radial-gradient(circle at 50% 0%, #a7f3d0, transparent 60%), linear-gradient(160deg, #065f46, #064e3b); align-items: center !important; padding: 18px !important; }
.v-cards img { width: 100%; max-width: 440px; border-radius: 12px; box-shadow: 0 20px 34px -12px rgba(0, 0, 0, .5); transition: transform .5s var(--ease); }
.pcard:hover .v-cards img { transform: scale(1.03); }
.v-photo { padding: 0 !important; }
.v-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pcard:hover .v-photo img { transform: scale(1.04); }
.v-db { align-items: center !important; padding: 20px !important; background: radial-gradient(circle at 20% 20%, rgba(51, 103, 145, .5), transparent 55%), linear-gradient(160deg, #0f172a, #0b1120); }
.v-ml { align-items: center !important; padding: 20px !important; background: radial-gradient(circle at 80% 0%, rgba(255, 106, 51, .35), transparent 55%), linear-gradient(160deg, #18181b, #09090b); }

.db { width: 100%; max-width: 420px; border-radius: 14px; background: rgba(15, 23, 42, .7); border: 1px solid rgba(148, 163, 184, .2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); overflow: hidden; }
.db__bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid rgba(148, 163, 184, .16); }
.db__bar span { width: 9px; height: 9px; border-radius: 50%; }
.db__bar span:nth-child(1) { background: #f87171; } .db__bar span:nth-child(2) { background: #fbbf24; } .db__bar span:nth-child(3) { background: #34d399; }
.db__bar em { margin-left: 8px; font-style: normal; font-family: var(--mono); font-size: 11.5px; color: #94a3b8; }
.db__stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.db__stats div { padding: 12px 16px; border-top: 1px solid rgba(148, 163, 184, .12); }
.db__stats div:nth-child(odd) { border-right: 1px solid rgba(148, 163, 184, .12); }
.db__stats div:nth-child(-n+2) { border-top: 0; }
.db__stats dt { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #7dd3fc; }
.db__stats dd { margin: 4px 0 0; font-size: 26px; font-weight: 750; letter-spacing: -0.04em; color: #f8fafc; line-height: 1; }

.mlcard { width: 100%; max-width: 300px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); color: #fff; }
.mlcard__k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .55); }
.mlcard__big { display: block; margin: 2px 0 10px; font-size: 48px; font-weight: 750; letter-spacing: -0.04em; line-height: 1; color: #ff6a33; }
.mlcard__row { display: flex; justify-content: space-between; font-size: 12.5px; color: rgba(255, 255, 255, .7); margin-top: 8px; }
.mlcard__row b { font-family: var(--mono); font-weight: 500; color: #fff; }
.meter { margin-top: 6px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.meter i { display: block; height: 100%; width: calc(var(--v) * 100%); background: #ff6a33; border-radius: inherit; }

.pcard__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.pill {
  display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.pcard h3 { font-size: 21px; letter-spacing: -0.03em; margin-top: 4px; }
.pcard__open { all: unset; cursor: pointer; }
/* The title button covers the whole card, so a click anywhere opens the details */
.pcard__open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.pcard__open:focus-visible { outline: none; }
.pcard__open:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.pcard p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.pcard__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pcard__hint { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.pcard__hint svg { font-size: 15px; transition: transform .25s var(--ease); }
.pcard:hover .pcard__hint svg { transform: rotate(90deg); }
.pcard__foot .link { position: relative; z-index: 2; }

/* =========================================================
   Project details dialog
   ========================================================= */
html.has-dialog { overflow: hidden; }
.dlg {
  width: min(960px, calc(100% - 32px)); max-height: min(88vh, 760px); padding: 0; border: 1px solid var(--line); border-radius: 26px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden;
}
.dlg::backdrop { background: rgba(9, 9, 11, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dlg[open] { animation: dlg-in .28s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dlg__close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.dlg__content { display: grid; grid-template-columns: 1fr 1fr; max-height: min(88vh, 760px); }
.dlg__visual { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 28px; min-height: 100%; overflow: hidden; }
.dlg__visual > img { width: 100%; border-radius: 12px; box-shadow: 0 20px 34px -12px rgba(0, 0, 0, .5); }
.dlg__visual.v-photo > img { height: 100%; border-radius: 0; object-fit: cover; box-shadow: none; }
.dlg__visual--gallery { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.dlg__visual--gallery > img { flex: none; width: 46%; max-width: 200px; border-radius: 20px; border: 4px solid #0d0d10; scroll-snap-align: center; }
.dlg__visual--gallery.is-framed > img { border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .4)); }
.dlg__visual--gallery > img:first-child { margin-left: auto; }
.dlg__visual--gallery > img:last-child { margin-right: auto; }
.dlg__visual--ml { flex-direction: column; align-items: stretch !important; padding: 28px !important; }
.dlg__visual--ml .mlcard { max-width: none; }
.pipeline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pipeline li { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); display: flex; flex-direction: column; gap: 2px; color: #fff; }
.pipeline__k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #ff8a5c; }
.pipeline strong { font-size: 14px; line-height: 1.25; margin-top: 2px; }
.pipeline small { font-size: 12px; color: rgba(255, 255, 255, .55); line-height: 1.35; }
.dlg__body { padding: 36px 32px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.dlg__body .pcard__meta { width: 100%; padding-right: 48px; }
.dlg__title { font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -0.035em; }
.dlg__body > p { color: var(--ink-2); font-size: 16px; }
.bullets { display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 20px; font-size: 15px; color: var(--ink-2); }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.dlg__body .btn { margin-top: 6px; }
.dlg__body .btn svg { font-size: 17px; }
@media (max-width: 760px) {
  .dlg { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .dlg[open] { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
  .dlg__content { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
  .dlg__visual { min-height: 0; height: 260px; padding: 20px; }
  .dlg__visual.v-photo { height: auto; aspect-ratio: 16 / 9; padding: 0; }
  .dlg__visual--gallery > img { width: 120px; }
  .dlg__visual--ml { height: auto; padding: 64px 20px 24px !important; }
  .dlg__body { overflow: visible; padding: 26px 20px 30px; }
}

/* =========================================================
   Skills
   ========================================================= */
.skills { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.skill { grid-column: span 2; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.skill--ai, .skill--ai + .skill { grid-column: span 3; }
.skill h3 { font-size: 12.5px; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 16px; }
.skill--ai {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: linear-gradient(160deg, var(--accent-soft), var(--surface) 60%);
}
.skill--ai h3 { color: var(--accent-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink);
}
.skill--ai .chips li { background: var(--surface); }
.chips img { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .skills { grid-template-columns: 1fr 1fr; }
  .skill, .skill--ai + .skill { grid-column: span 1; }
  .skill--ai { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .skills { grid-template-columns: 1fr; }
  .skill, .skill--ai, .skill--ai + .skill { grid-column: auto; }
}

/* =========================================================
   About
   ========================================================= */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.portrait {
  position: relative; margin: 0; border-radius: 28px; overflow: hidden; background: #f1f1f1;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.portrait img { width: 100%; aspect-ratio: 760 / 930; object-fit: cover; }
.portrait figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 1px;
  padding: 12px 16px; border-radius: 16px; color: #0c0c0e;
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .25);
}
.portrait figcaption strong { font-size: 16px; letter-spacing: -0.015em; }
.portrait figcaption span { font-size: 13.5px; color: #55575e; }
.about__main { display: flex; flex-direction: column; gap: 32px; }
.about__copy > p:not(.eyebrow) { margin-top: 18px; font-size: 17.5px; color: var(--ink-2); max-width: 620px; }
.about__copy h2 { max-width: 640px; }
.about__side { padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.about__label { font-family: var(--mono); font-size: 12.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 20px; }
.timeline { position: relative; display: grid; gap: 24px; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); }
.timeline__date { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); }
.timeline strong { font-size: 16.5px; letter-spacing: -0.015em; }
.timeline span:last-child { font-size: 14.5px; color: var(--ink-3); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .portrait { max-width: 420px; } }

/* =========================================================
   Contact
   ========================================================= */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(40px, 7vw, 88px) clamp(20px, 6vw, 80px);
  border-radius: 32px; background: #0c0c0e; color: #fff;
  box-shadow: var(--shadow-lg); text-align: center;
}
:root[data-theme="dark"] .cta { border: 1px solid var(--line-strong); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta { border: 1px solid var(--line-strong); } }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 100%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 50% 100%, #000, transparent 70%);
}
.cta__glow { position: absolute; z-index: -1; left: 50%; bottom: -320px; width: 720px; max-width: 160%; height: 520px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 106, 51, .55), transparent 65%); filter: blur(10px); }
.eyebrow--light { color: rgba(255, 255, 255, .55); }
.eyebrow--light span { color: #ff8a5c; }
.eyebrow--light span::after { background: rgba(255, 255, 255, .25); }
.cta h2 { color: #fff; max-width: 760px; margin-inline: auto; }
.cta__text { margin: 18px auto 0; max-width: 520px; font-size: 17.5px; color: rgba(255, 255, 255, .7); }
.cta__actions { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 440px) {
  .cta__actions .btn--accent { width: 100%; font-size: 14px; padding: 0 14px; }
  .cta__actions .btn--outline-light { flex: 1; }
}

/* =========================================================
   Footer
   ========================================================= */
.footer { padding: 28px 0 40px; color: var(--ink-3); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__links { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* =========================================================
   Motion
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .hero__title.reveal { transition-delay: .06s; }
.js .hero__lead.reveal { transition-delay: .12s; }
.js .hero__cta.reveal { transition-delay: .18s; }
.js .socials.reveal { transition-delay: .24s; }

/* =========================================================
   Motion polish
   ========================================================= */
/* Reading progress */
.scrollbar { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 150; pointer-events: none; }
.scrollbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffb347); transform: scaleX(var(--p, 0)); transform-origin: left; }

/* Hero: the name rises out of a mask, the highlight draws itself */
.rise { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.rise > span { display: inline-block; }
.js .rise > span { transform: translateY(105%); transition: transform .9s var(--ease); }
.js .rise > span:nth-child(2) { transition-delay: .09s; }
.js .is-in .rise > span { transform: none; }
.js .hero__title.reveal { opacity: 1; transform: none; }
.js .hero__role { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease) .35s, transform .7s var(--ease) .35s; }
.js .is-in .hero__role { opacity: 1; transform: none; }
.hero__role em { background-repeat: no-repeat; background-size: 100% 100%; }
.js .hero__role em { background-size: 0% 100%; transition: background-size .9s var(--ease) .8s; }
.js .is-in .hero__role em { background-size: 100% 100%; }

/* Hero: drifting glow, plus a soft light that follows the pointer */
.hero__bg::after { animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-9%, 7%) scale(1.14); } }
.hero__spot {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 40%), color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
}
.hero:hover .hero__spot { opacity: 1; }

/* Hero phones: fan out on load, then float gently; they lean with the pointer */
.hero__visual { transition: transform .6s var(--ease); transform-style: preserve-3d; }
.js .hero__visual.reveal { opacity: 1; transform: none; }
.js .hero__visual .device { opacity: 0; transition: opacity .8s var(--ease), transform 1.1s var(--ease); }
.js .hero__visual:not(.is-in) .device--front { transform: translate(-50%, -42%) scale(.94); }
.js .hero__visual:not(.is-in) .device--back-left { transform: translate(-60%, -46%) rotate(0deg) scale(.9); }
.js .hero__visual:not(.is-in) .device--back-right { transform: translate(-40%, -40%) rotate(0deg) scale(.9); }
.js .hero__visual.is-in .device { opacity: 1; }
.js .hero__visual.is-in .device--back-left { transition-delay: .15s; }
.js .hero__visual.is-in .device--back-right { transition-delay: .25s; }
.device img { animation: bob 6s ease-in-out infinite; }
.device--back-left img { animation-duration: 7s; animation-delay: -2s; }
.device--back-right img { animation-duration: 7.5s; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.js .hero__visual .tag { opacity: 0; transition: opacity .6s var(--ease) 1s; }
.js .hero__visual.is-in .tag { opacity: 1; }

/* Buttons: light sweep on hover */
.btn--dark, .btn--accent { position: relative; overflow: hidden; }
.btn--dark::after, .btn--accent::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); transform: skewX(-18deg);
}
.btn--dark:hover::after, .btn--accent:hover::after { animation: sweep .8s var(--ease); }
@keyframes sweep { to { left: 130%; } }
.btn svg { transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* Section headings: the little line grows */
.js .reveal .eyebrow span::after { width: 0; transition: width .8s var(--ease) .3s; }
.js .is-in .eyebrow span::after { width: 22px; }

/* Project cards: come in one after another, and light up under the pointer */
.js .carousel.reveal { opacity: 1; transform: none; }
.js .carousel:not(.is-in) .pcard { opacity: 0; }
.js .carousel.is-in .pcard { animation: card-in .75s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(34px) scale(.97); } }
.pcard::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--px, 50%) var(--py, 0%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.pcard:hover::before { opacity: 1; }
.filter { transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.filter:active { transform: scale(.95); }

/* Details window: content settles in */
.dlg[open] .dlg__body > * { animation: settle .5s var(--ease) backwards; }
.dlg[open] .dlg__body > :nth-child(2) { animation-delay: .06s; }
.dlg[open] .dlg__body > :nth-child(3) { animation-delay: .12s; }
.dlg[open] .dlg__body > :nth-child(4) { animation-delay: .18s; }
.dlg[open] .dlg__body > :nth-child(5) { animation-delay: .24s; }
.dlg[open] .dlg__body > :nth-child(6) { animation-delay: .3s; }
.dlg[open] .dlg__visual > * { animation: settle .6s var(--ease) .1s backwards; }
@keyframes settle { from { opacity: 0; transform: translateY(14px); } }

/* Skills: chips pop in */
.js .skill:not(.is-in) .chips li { opacity: 0; }
.js .skill.is-in .chips li { animation: chip-in .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms + .15s); }
@keyframes chip-in { from { opacity: 0; transform: translateY(10px) scale(.92); } }
.chips li { transition: transform .2s var(--ease), border-color .2s; }
.chips li:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* Education line draws down */
.js .about__side .timeline::before { transform: scaleY(0); transform-origin: top; transition: transform 1s var(--ease) .3s; }
.js .about__side.is-in .timeline::before { transform: none; }

/* Contact: breathing glow */
.cta__glow { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .65; transform: translateX(-50%) scale(1.12); } }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; width: auto; }
  .marquee__list[aria-hidden="true"] { display: none; }
  .marquee__list { flex-wrap: wrap; justify-content: center; }
  .pulse::after { animation: none; }
  .pcard, .btn, .pcard__visual img { transition: none; }
  .js .rise > span, .js .hero__role, .js .hero__role em { transform: none; opacity: 1; background-size: 100% 100%; transition: none; }
  .hero__bg::after, .device img, .cta__glow, .btn::after { animation: none !important; }
  .js .hero__visual .device, .js .hero__visual .tag { opacity: 1; transition: none; }
  .js .hero__visual:not(.is-in) .device--front { transform: translate(-50%, -50%); }
  .js .carousel .pcard { opacity: 1 !important; animation: none !important; }
  .dlg[open], .dlg[open] .dlg__body > *, .dlg[open] .dlg__visual > * { animation: none; }
  .carousel__track { scroll-behavior: auto; }
  .js .skill .chips li { opacity: 1 !important; animation: none !important; }
  .js .reveal .eyebrow span::after { width: 22px; transition: none; }
  .js .about__side .timeline::before { transform: none; transition: none; }
  .hero__spot, .scrollbar { display: none; }
}
