/* ============ TOKENS ============ */
:root {
  --bg: #fbfbfd;
  --bg-alt: #f3f4f8;
  --surface: #ffffff;
  --text: #0f1222;
  --muted: #5b6075;
  --border: #e5e7ef;
  --accent: #5b5bf7;
  --accent-2: #14b8a6;
  --accent-soft: rgba(91, 91, 247, 0.1);
  --shadow: 0 1px 2px rgba(15, 18, 34, 0.04), 0 8px 24px rgba(15, 18, 34, 0.06);
  --radius: 16px;
  --term-bg: #0d1020;
  --term-text: #d6d9ec;
}
:root[data-theme="dark"] {
  --bg: #0a0b14;
  --bg-alt: #0f111d;
  --surface: #141726;
  --text: #eef0fa;
  --muted: #9aa0b8;
  --border: #23273a;
  --accent: #8b8bff;
  --accent-2: #2dd4bf;
  --accent-soft: rgba(139, 139, 255, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 30px rgba(0, 0, 0, 0.35);
  --term-bg: #070812;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0b14;
    --bg-alt: #0f111d;
    --surface: #141726;
    --text: #eef0fa;
    --muted: #9aa0b8;
    --border: #23273a;
    --accent: #8b8bff;
    --accent-2: #2dd4bf;
    --accent-soft: rgba(139, 139, 255, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 30px rgba(0, 0, 0, 0.35);
    --term-bg: #070812;
  }
}

/* ============ BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  font: 600 15px/1 "Inter", sans-serif;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px var(--accent-soft); }
.btn-primary:hover { box-shadow: 0 10px 28px rgba(91, 91, 247, .3); }
.btn-ghost { border-color: var(--border); background: var(--surface); }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: 18px;
}
.dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; gap: 8px; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 4px; }
  .nav-links .btn { justify-content: center; margin-top: 8px; }
}

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 68px);
  display: flex; flex-direction: column;
  padding: 0 24px;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, var(--accent-soft), transparent 70%);
}
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 20%, transparent 75%);
  opacity: .5;
}
.hero-center {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 0;
}

/* Greeting: types in like a chat greeting */
.greet {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: clamp(18px, 2.2vw, 24px); color: var(--muted); font-weight: 500; margin: 0;
}
.greet-text { color: var(--text); min-height: 1.4em; }
.greet-text.typing::after { content: "▍"; color: var(--accent-2); margin-left: 2px; animation: blink 1s steps(1) infinite; }
.sparkle { color: var(--accent-2); opacity: 0; transform: scale(.3) rotate(-120deg); transition: opacity .5s, transform .8s cubic-bezier(.2,1.4,.4,1); }
.hero.greeted .sparkle { opacity: 1; transform: none; animation: spin 10s linear 1s infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Rows expand from 0 height, which pushes the greeting upward smoothly */
.reveal-rows { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 1s cubic-bezier(.65,0,.35,1); }
.rows-inner { overflow: hidden; min-height: 0; }
.hero.opened .reveal-rows { grid-template-rows: 1fr; }
.headline {
  font-size: clamp(40px, 6.6vw, 84px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08;
  margin: 18px 0 0; padding: 0 0 .1em;
}
.hl-line { display: block; opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.hl-line:nth-child(2) { transition-delay: .15s; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 560px; margin: 24px auto 0; opacity: 0; transform: translateY(20px); transition: opacity .7s .35s, transform .7s .35s; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 32px 0 6px; opacity: 0; transform: translateY(20px); transition: opacity .7s .5s, transform .7s .5s; }
.hero.opened .hl-line, .hero.opened .hero-sub, .hero.opened .hero-cta { opacity: 1; transform: none; }

/* Rotating word: slides up like a slide transition */
.rotator {
  position: relative; display: inline-block; vertical-align: bottom;
  height: 1.15em; overflow: hidden; transition: width .6s cubic-bezier(.65,0,.35,1);
}
.rot-word {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateY(110%); opacity: 0;
  transition: transform .7s cubic-bezier(.65,0,.35,1), opacity .7s;
}
.rot-word.is-current { transform: none; opacity: 1; position: relative; }
.rot-word.is-leaving { transform: translateY(-110%); opacity: 0; position: absolute; }

/* Bottom contact bar */
.hero-bottom {
  position: relative; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px;
  max-width: 1140px; width: 100%; margin: 0 auto; padding: 0 0 28px;
  opacity: 0; transform: translateY(16px); transition: opacity .8s .7s, transform .8s .7s;
}
.hero.opened .hero-bottom { opacity: 1; transform: none; }
.hb-label { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.hb-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.hb-links a { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; transition: color .2s; }
.hb-links a svg { color: var(--accent-2); }
.hb-links a:hover { color: var(--accent); }
.hb-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@media (max-width: 600px) {
  .hero { padding: 0 16px; }
  .hero-bottom { flex-direction: column; align-items: flex-start; }
}

.about-term { margin-top: 28px; }
.terminal {
  background: var(--term-bg); border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 30px 60px -20px rgba(15,18,34,.35), 0 0 0 1px rgba(91,91,247,.08);
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: rgba(255,255,255,.04); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar span:nth-child(2) { background: #febc2e; }
.term-bar span:nth-child(3) { background: #28c840; }
.term-bar em { margin-left: 10px; font: 12px "JetBrains Mono", monospace; color: #7d82a0; font-style: normal; }
.term-body {
  margin: 0; padding: 20px; min-height: 360px;
  font: 13.5px/1.75 "JetBrains Mono", monospace; color: var(--term-text);
  white-space: pre-wrap; word-break: break-word;
}
.term-body .k { color: #c792ea; }
.term-body .s { color: #a5e3a0; }
.term-body .c { color: #6b7194; }
.term-body .f { color: #82aaff; }
.term-body .ok { color: #2dd4bf; }
.caret { color: var(--accent-2); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }


/* ============ SECTIONS ============ */
.section { padding: 110px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { margin-bottom: 52px; max-width: 640px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.eyebrow { display: inline-block; font: 500 13px "JetBrains Mono", monospace; color: var(--accent); margin-bottom: 14px; letter-spacing: .02em; }
.section h2 { font-size: clamp(30px, 3.6vw, 42px); font-weight: 800; }
.sub { color: var(--muted); font-size: 17px; margin-top: 14px; }
@media (max-width: 600px) { .section { padding: 76px 0; } }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; }
.about .section-head { margin-bottom: 0; }
.about-body > p { color: var(--muted); font-size: 17px; margin-bottom: 18px; }
.about-body strong { color: var(--text); }
.about-cards { display: grid; gap: 12px; margin-top: 30px; }
.mini-card { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.mini-ico { font-size: 22px; line-height: 1; }
.mini-card p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 28px; } }

/* Cards */
.cards-4 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.cards-4 > .card { grid-column: span 2; }
.cards-4 > .card:nth-child(4) { grid-column: 2 / span 2; }
.card, .project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover, .project:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.card-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 20px; }
.card h3, .project h3 { font-size: 19px; margin-bottom: 10px; }
.card p, .project p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags li { font: 500 12px "JetBrains Mono", monospace; padding: 4px 9px; border-radius: 6px; background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); }
@media (max-width: 1000px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } .cards-4 > .card, .cards-4 > .card:nth-child(4) { grid-column: auto; } .cards-4 > .card:last-child { grid-column: 1 / -1; } }
@media (max-width: 600px) { .cards-4 { grid-template-columns: 1fr; } .cards-4 > .card:last-child { grid-column: auto; } }

/* Stack */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stack-group { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stack-group.featured { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); }
.stack-group.featured .chips li { background: var(--surface); font-weight: 500; }
.stack-group h4 { font-size: 15px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; padding: 7px 12px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); transition: border-color .2s, color .2s; }
.chips li:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 900px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .stack-grid { grid-template-columns: 1fr; } }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { font: 500 14px "Inter", sans-serif; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; transition: all .2s; }
.filter:hover { color: var(--text); }
.filter.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { display: flex; flex-direction: column; }
.project.hide { display: none; }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.status { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.status.building { background: rgba(245,158,11,.12); color: #d97706; }
.status.built { background: rgba(34,197,94,.12); color: #16a34a; }
.status.planned { background: var(--accent-soft); color: var(--accent); }
.cat { font: 12px "JetBrains Mono", monospace; color: var(--muted); }
.project .tags { margin-bottom: 20px; }
.project-links { margin-top: auto; display: flex; gap: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.link-live { font-size: 13px; font-weight: 600; color: var(--accent); }
.link-live:hover { text-decoration: underline; }
.link-soon { font-size: 13px; color: var(--muted); }
/* Shipped products */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 56px; }
.product { position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); box-shadow: var(--shadow); transition: transform .25s, border-color .25s; }
.product::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(90deg, var(--accent), #22c55e); }
.product:hover { transform: translateY(-4px); border-color: var(--accent); }
.product-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.product h3 { font-size: 26px; margin-bottom: 8px; }
.product-lead { color: var(--text); font-size: 16px; margin-bottom: 16px; }
.product-points { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.product-points li { position: relative; padding-left: 24px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.product-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #16a34a; font-weight: 700; }
.product-points strong { color: var(--text); }
.product .tags { margin-bottom: 22px; }
.product-cta { margin-top: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px dashed var(--border); }
.product-note { font-size: 13px; color: var(--muted); }
.status.live { display: inline-flex; align-items: center; gap: 7px; background: rgba(34,197,94,.12); color: #16a34a; }
.subhead { font-size: 20px; margin-bottom: 16px; }
.product-title { display: flex; align-items: center; gap: 12px; }
.product-title img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.product-title img.logo-lg { width: 56px; height: 56px; border-radius: 12px; }
.product-shot { display: block; margin: -4px 0 20px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.product-shot img { display: block; width: 100%; height: auto; transition: transform .4s; }
.product-shot:hover img { transform: scale(1.02); }
.product-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.product-body { display: flex; flex-direction: column; height: 100%; }
.product-wide .product-shot { margin: 0; }
@media (max-width: 860px) { .products { grid-template-columns: 1fr; } .product { padding: 24px; } .product-wide { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 1000px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .projects { grid-template-columns: 1fr; } }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.step-n { display: inline-block; font: 600 13px "JetBrains Mono", monospace; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 8px; margin-bottom: 18px; }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* Contact */
.contact-card {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  padding: 56px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.contact-card::before {
  content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%); pointer-events: none;
}
.contact-links { display: grid; gap: 12px; position: relative; }
.contact-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); transition: border-color .2s, transform .2s; }
.contact-item:hover { border-color: var(--accent); transform: translateX(4px); }
.contact-item svg { color: var(--accent); flex-shrink: 0; }
.contact-item small { display: block; font-size: 12px; color: var(--muted); }
.contact-item span { font-weight: 500; word-break: break-all; }
.copy-btn { justify-content: center; }
@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; padding: 32px 22px; gap: 28px; } }

/* Footer */
.footer { padding: 32px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer a:hover { color: var(--text); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .3s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero *, .reveal-rows { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ AUTO ANIMATIONS ============ */
/* Neural-network canvas + drifting glow orbs behind the hero */
.net-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 2s ease .6s; }
.hero.greeted .net-bg { opacity: 1; }
.orb { position: absolute; border-radius: 50%; pointer-events: none; opacity: .32; will-change: transform; }
.orb-1 { width: 560px; height: 560px; background: radial-gradient(circle, var(--accent), transparent 65%); left: -220px; top: 0; animation: drift1 18s ease-in-out infinite alternate; }
.orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-2), transparent 65%); right: -200px; bottom: -40px; animation: drift2 22s ease-in-out infinite alternate; }
:root[data-theme="light"] .orb { opacity: .22; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .orb { opacity: .22; } }
@keyframes drift1 { to { transform: translate(140px, 90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-160px, -70px) scale(.9); } }
.hero-center, .hero-bottom { z-index: 1; }

/* Scroll cue */
.scroll-cue { width: 24px; height: 38px; border: 2px solid var(--border); border-radius: 14px; display: flex; justify-content: center; padding-top: 7px; align-self: center; }
.scroll-cue span { width: 4px; height: 8px; border-radius: 2px; background: var(--accent-2); animation: scrollcue 1.8s ease-in-out infinite; }
@keyframes scrollcue { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-width: 600px) { .scroll-cue { display: none; } }

/* Infinite tools marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--border); background: var(--bg-alt); padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 28px; padding-right: 28px; }
.marquee li { font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap; }
.marquee li:nth-child(even) { color: var(--accent-2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Card icons bob gently, each slightly out of sync */
.card-ico, .mini-ico { animation: bob 4s ease-in-out infinite; }
.card:nth-child(2) .card-ico { animation-delay: -.8s; } .card:nth-child(3) .card-ico { animation-delay: -1.6s; }
.card:nth-child(4) .card-ico { animation-delay: -2.4s; } .card:nth-child(5) .card-ico { animation-delay: -3.2s; }
.mini-card:nth-child(2) .mini-ico { animation-delay: -1.3s; } .mini-card:nth-child(3) .mini-ico { animation-delay: -2.6s; }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* Process: a line draws across the steps when they come into view */
.steps { position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 44px; height: 2px; z-index: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left;
  transition: transform 1.6s cubic-bezier(.65,0,.35,1) .2s; }
.steps.drawn::before { transform: scaleX(1); }
.step { z-index: 1; }
.step-n { position: relative; }
.steps.drawn .step-n { animation: ping 0.6s ease both; }
.steps.drawn .step:nth-child(1) .step-n { animation-delay: .3s; } .steps.drawn .step:nth-child(2) .step-n { animation-delay: .7s; }
.steps.drawn .step:nth-child(3) .step-n { animation-delay: 1.1s; } .steps.drawn .step:nth-child(4) .step-n { animation-delay: 1.5s; }
@keyframes ping { 50% { transform: scale(1.25); background: var(--accent); color: #fff; } }
@media (max-width: 900px) { .steps::before { display: none; } }

/* Rotating glow border on the contact card and the featured skills card */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.contact-card, .stack-group.featured { isolation: isolate; }
.contact-card::after, .stack-group.featured::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: -1;
  background: conic-gradient(from var(--angle), transparent 0 70%, var(--accent) 80%, var(--accent-2) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spinborder 6s linear infinite;
}
.stack-group.featured { position: relative; }
@keyframes spinborder { to { --angle: 360deg; } }

/* Shine sweep across the "v1 built" badge */
.status.built { position: relative; overflow: hidden; }
.status.built::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.5s ease-in-out infinite 1s; }
@keyframes shine { 40%, 100% { transform: translateX(120%); } }

/* Logo mark gradient slowly shifts */
.logo-mark { background-size: 200% 200%; animation: hue 6s ease-in-out infinite alternate; }
@keyframes hue { to { background-position: 100% 100%; } }

@media (prefers-reduced-motion: reduce) {
  .orb, .marquee-track, .card-ico, .mini-ico, .scroll-cue span, .logo-mark,
  .contact-card::after, .stack-group.featured::after, .status.built::after, .steps.drawn .step-n { animation: none !important; }
  .steps::before { transform: scaleX(1); transition: none; }
}
