:root {
  --a1: #4f46e5;
  --a2: #06b6d4;
  --a3: #f59e0b;
  --grad: linear-gradient(135deg, var(--a1), var(--a2));
  --accent: var(--a1);
  --radius: 20px;
}
[data-bs-theme="dark"] {
  --a1: #818cf8;
  --a2: #22d3ee;
  --accent: #818cf8;
  --bs-body-bg: #0b1020;
  --bs-tertiary-bg: #121933;
}
body {
  font-family: "Inter", system-ui, sans-serif;
  overflow-x: hidden;
}
h1,
h2,
h3,
h4,
h5,
.navbar-brand {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.025em;
}
html {
  scroll-behavior: smooth;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* glass navbar */
.navbar {
  background: rgba(var(--bs-body-bg-rgb), 0.72) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s;
}
.navbar.scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
}
.nav-link {
  position: relative;
  font-weight: 500;
}
.nav-link.active {
  color: var(--accent) !important;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

/* buttons */
.btn-accent {
  background: var(--grad);
  color: #fff;
  border: 0;
  border-radius: 50px;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -8px var(--a1);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.btn-accent:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -8px var(--a1);
}
.btn-outline-accent {
  border: 2px solid var(--bs-border-color);
  color: var(--bs-body-color);
  border-radius: 50px;
  padding: 0.72rem 1.8rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-outline-accent:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* hero */
.hero {
  position: relative;
  padding: 7rem 0 6rem;
  isolation: isolate;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}
.blob.b1 {
  width: 380px;
  height: 380px;
  background: var(--a1);
  top: -80px;
  left: -80px;
}
.blob.b2 {
  width: 320px;
  height: 320px;
  background: var(--a2);
  right: -60px;
  top: 80px;
  animation-delay: -5s;
}
@keyframes float {
  50% {
    transform: translate(30px, 40px) scale(1.08);
  }
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  font-size: 0.85rem;
  font-weight: 500;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
}
.avatar-wrap {
  position: relative;
  display: inline-block;
  padding: 8px;
  border-radius: 50%;
  background: var(--grad);
}
.avatar {
  display: block;
  width: 100%;
  max-width: 320px;
  border-radius: 50%;
  border: 6px solid var(--bs-body-bg);
}

/* sections & cards */
.section {
  padding: 5rem 0;
}
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.card-lift {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  height: 100%;
  border: 1px solid var(--bs-border-color);
  transition:
    transform 0.3s,
    box-shadow 0.3s,
    border-color 0.3s;
}
.card-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 45px -15px rgba(79, 70, 229, 0.35);
  border-color: var(--accent);
}
.icon-box {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  font-size: 1.5rem;
}
.thumb {
  height: 150px;
  display: grid;
  place-items: center;
  font: 700 3.5rem "Space Grotesk";
  color: rgba(255, 255, 255, 0.95);
}
.g0 {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
}
.g1 {
  background: linear-gradient(135deg, #ec4899, #f59e0b);
}
.g2 {
  background: linear-gradient(135deg, #10b981, #3b82f6);
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  margin: 0 0.3rem 0.3rem 0;
}
.skill {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  border-radius: 50px;
  margin: 0.3rem;
  font-weight: 500;
  transition: all 0.2s;
}
.skill:hover {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
}

/* call to action band */
.cta {
  border-radius: 28px;
  background: var(--grad);
  color: #fff;
  padding: 3.5rem 1.5rem;
  text-align: center;
}
.cta .btn {
  background: #fff;
  color: #111;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  font-weight: 600;
}

/* forms */
.form-control {
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.15);
}
.hp {
  position: absolute;
  left: -9999px;
}

/* footer & social */
footer a {
  color: var(--bs-secondary-color);
  transition:
    color 0.2s,
    transform 0.2s;
  display: inline-block;
}
footer a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* scroll reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.js .reveal.show {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .blob {
    animation: none;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== v3: modern navigation ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding-top: env(safe-area-inset-top);
  background: rgba(var(--bs-body-bg-rgb), 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
.topbar.scrolled {
  border-color: var(--bs-border-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
.topbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font:
    700 1.3rem "Space Grotesk",
    sans-serif;
  color: var(--bs-body-color);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.dlinks {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.dlinks a.l {
  padding: 0.45rem 1rem;
  border-radius: 50px;
  color: var(--bs-secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}
.dlinks a.l:hover {
  color: var(--bs-body-color);
  background: var(--bs-tertiary-bg);
}
.dlinks a.l.active {
  color: var(--accent);
  background: var(--bs-tertiary-bg);
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--bs-body-color);
  display: inline-grid;
  place-items: center;
  transition: all 0.2s;
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tabbar {
  display: none;
}
@media (max-width: 767.98px) {
  .dlinks {
    display: none;
  }
  body {
    padding-bottom: 104px;
  }
  .tabbar {
    display: flex;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 1040;
    justify-content: space-around;
    padding: 0.45rem;
    border-radius: 26px;
    background: rgba(var(--bs-body-bg-rgb), 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.28);
  }
  .tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.5rem 0;
    border-radius: 20px;
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    transition: all 0.2s;
  }
  .tabbar a i {
    font-size: 1.3rem;
    line-height: 1;
  }
  .tabbar a.active {
    color: #fff;
    background: var(--grad);
    box-shadow: 0 8px 18px -6px var(--a1);
  }
  .hero {
    padding: 3.5rem 0 3rem;
  }
  .section {
    padding: 3.2rem 0;
  }
  .btn-accent,
  .btn-outline-accent {
    width: 100%;
    text-align: center;
  }
}

/* ===== v3: hero extras ===== */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(
    var(--bs-border-color) 1px,
    transparent 1px
  );
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    #000 30%,
    transparent 75%
  );
  opacity: 0.7;
}
.typed {
  border-right: 3px solid var(--accent);
  padding-right: 4px;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink {
  50% {
    border-color: transparent;
  }
}
.hero-social a {
  color: var(--bs-secondary-color);
  font-size: 1.4rem;
  margin-right: 1rem;
  transition: all 0.2s;
  display: inline-block;
}
.hero-social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* ===== v3: marquee & now strip ===== */
.marquee {
  overflow: hidden;
  padding: 1.2rem 0;
  border-block: 1px solid var(--bs-border-color);
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}
.marquee .track {
  display: flex;
  gap: 0.6rem;
  width: max-content;
  animation: scrollx 32s linear infinite;
}
.marquee:hover .track {
  animation-play-state: paused;
}
@keyframes scrollx {
  to {
    transform: translateX(-50%);
  }
}
.now {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  height: 100%;
}
.now i {
  font-size: 1.4rem;
  color: var(--accent);
}
.now small {
  display: block;
  color: var(--bs-secondary-color);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.contact-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  border: 1px solid var(--bs-border-color);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  margin-bottom: 0.8rem;
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}
@media (prefers-reduced-motion: reduce) {
  .marquee .track,
  .typed {
    animation: none;
  }
}

.narrow > * {
  max-width: 820px;
}

/* v3.1: docked nav, keeps sticky working */
body {
  overflow-x: clip;
}
.hero {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
  .tabbar {
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    border-width: 1px 0 0;
    box-shadow: none;
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
    background: var(--bs-body-bg);
  }
  .tabbar a {
    position: relative;
    border-radius: 12px;
    padding: 0.4rem 0;
  }
  .tabbar a.active {
    background: none;
    box-shadow: none;
    color: var(--accent);
  }
  .tabbar a.active::before {
    content: "";
    position: absolute;
    top: -0.35rem;
    left: 30%;
    right: 30%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--grad);
  }
}
