:root {
  --bg: #0b0d12;
  --bg-alt: #11141b;
  --surface: #161a23;
  --border: #252b38;
  --text: #e8ebf2;
  --muted: #9aa3b5;
  --accent: #5b8cff;
  --accent-2: #22d3a6;
  --radius: 16px;
  --max: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: "Space Grotesk", "Inter", sans-serif; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.4rem; margin-bottom: .5rem; }

.eyebrow {
  color: var(--accent-2);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }
.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); background: #4778f0; }
.btn--ghost { background: transparent; border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--surface); }
.btn--small { padding: .5rem 1.1rem; font-size: .9rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 18, .8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__logo { font-family: "Space Grotesk", sans-serif; font-size: 1.4rem; font-weight: 700; }
.nav__logo span { color: var(--accent-2); }
.nav__links { display: flex; align-items: center; gap: 1.6rem; font-size: .95rem; }
.nav__links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

/* Hero */
.hero { padding: 90px 0 70px; }
.hero__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: center; }
.hero__text h1 { margin-bottom: 1.2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 2.2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.hero__stats strong { display: block; font-family: "Space Grotesk", sans-serif; font-size: 1.7rem; }
.hero__stats span { color: var(--muted); font-size: .85rem; }
.hero__photo { display: flex; justify-content: center; }

/* Image placeholders: the label shows until a real image is dropped into assets/img/ */
.media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,.025) 12px 24px),
    linear-gradient(135deg, #1a2030, #121621);
  border: 1px dashed var(--border);
}
.media::before {
  content: attr(data-label);
  white-space: pre-line;
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  padding: 1rem;
}
.media img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.media--round { width: min(340px, 80vw); aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--accent); }

/* Sections */
.section { padding: 90px 0; }
.section--alt { background: var(--bg-alt); }

.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; }
.about__body p { color: var(--muted); margin-bottom: 1rem; font-size: 1.05rem; }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.service {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform .2s, border-color .2s;
}
.service:hover { transform: translateY(-4px); border-color: var(--accent); }
.service__icon { font-size: 1.5rem; color: var(--accent-2); margin-bottom: .8rem; }
.service p { color: var(--muted); font-size: .95rem; }

/* Projects */
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.project:first-of-type { border-top: 0; padding-top: 1rem; }
.project--reverse .project__media { order: 2; }
.project__media { display: grid; gap: 1rem; position: sticky; top: 90px; }
.project__body h3 { font-size: 2rem; margin: .6rem 0; }
.project__summary { color: var(--muted); margin-bottom: 1.2rem; }

.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(91, 140, 255, .12);
  color: var(--accent);
}

.checklist li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: .5rem;
  font-size: .97rem;
}
.checklist li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--accent-2);
  font-weight: 700;
}
.checklist--compact li { font-size: .9rem; color: var(--muted); }

.links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.links a {
  font-size: .85rem;
  padding: .4rem .8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .2s, color .2s;
}
.links a:hover { border-color: var(--accent); color: var(--accent); }
.links__title { margin-top: 1.4rem; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

.video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }
.video--short { aspect-ratio: 9 / 16; max-width: 260px; justify-self: center; }

/* Local cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card .media { border-radius: 0; border: 0; border-bottom: 1px solid var(--border); }
.card__body { padding: 1.5rem; }
.card__body h3 { margin-top: .6rem; }

/* Pills */
.pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.pills li { padding: .55rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .9rem; }

/* Contact */
.contact { text-align: center; background: radial-gradient(ellipse at center, rgba(91,140,255,.15), transparent 70%); }
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact .hero__cta { justify-content: center; }
.booking { width: 100%; max-width: 1000px; min-height: 600px; margin-top: 1rem; border-radius: var(--radius); overflow: auto; }

.footer { padding: 2rem 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; text-align: center; }

/* ============ Animations ============ */
:root { --ease: cubic-bezier(.22, 1, .36, 1); }

/* Scroll progress bar */
.progress {
  position: fixed; top: 0; left: 0; z-index: 100;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* Soft glow that follows the cursor (desktop only) */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 0;
  width: 480px; height: 480px; margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,140,255,.12), transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
}
body.has-pointer .cursor-glow { opacity: 1; }
main, .nav, .footer { position: relative; z-index: 1; }
.nav { position: sticky; z-index: 50; }

/* Nav hides on scroll down, returns on scroll up */
.nav { transition: transform .4s var(--ease); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__links a.is-active { color: var(--text); }

/* Hero background: floating blobs + grid */
.hero { position: relative; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  mask-image: linear-gradient(#000 70%, transparent);
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .45;
  animation: float 18s ease-in-out infinite alternate;
}
.blob--1 { width: 420px; height: 420px; background: #3b5bdb; top: -120px; left: -80px; }
.blob--2 { width: 360px; height: 360px; background: #12b886; bottom: -140px; right: 10%; animation-duration: 22s; animation-delay: -6s; }
.blob--3 { width: 260px; height: 260px; background: #7048e8; top: 30%; right: -60px; animation-duration: 26s; animation-delay: -12s; }
@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.15); }
  100% { transform: translate(-40px, 80px) scale(.95); }
}
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
}

/* Hero entrance: each block rises in, one after another */
.hero__text > *, .hero__photo {
  opacity: 0;
  animation: rise 1s var(--ease) forwards;
}
.hero__text > :nth-child(1) { animation-delay: .1s; }
.hero__text > :nth-child(2) { animation-delay: .2s; }
.hero__text > :nth-child(3) { animation-delay: .35s; }
.hero__text > :nth-child(4) { animation-delay: .5s; }
.hero__text > :nth-child(5) { animation-delay: .65s; }
.hero__photo { animation-delay: .3s; animation-name: pop; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes pop  { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* Spinning gradient ring around the profile photo */
.hero__photo { position: relative; }
.media--round { border: 0; }
.hero__photo::before {
  content: "";
  position: absolute;
  width: min(356px, calc(80vw + 16px)); aspect-ratio: 1;
  top: 50%; left: 50%; translate: -50% -50%;
  border-radius: 50%;
  background: conic-gradient(var(--accent), var(--accent-2), #7048e8, var(--accent));
  animation: spin 8s linear infinite;
  z-index: -1;
}
@keyframes spin { to { rotate: 360deg; } }

/* Rotating headline word + shimmering gradient */
.accent { background-size: 200% auto; animation: shimmer 4s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
.rotator { transition: opacity .35s ease; }
.rotator.is-out { opacity: 0; }

/* Scroll reveal with stagger (delay set per element in JS) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(4px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

/* Cards: 3D tilt + spotlight that follows the cursor */
.service, .card { position: relative; transform-style: preserve-3d; will-change: transform; }
.service::after, .card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(91,140,255,.14), transparent 45%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.service:hover::after, .card:hover::after { opacity: 1; }
.service.is-visible, .card.is-visible { transition: opacity .9s var(--ease), transform .25s ease-out, filter .9s var(--ease), border-color .2s; }
.card:hover { border-color: var(--accent); }

/* Image zoom on hover */
.media img { transition: transform .8s var(--ease); }
.card:hover .media img, .project__media .media:hover img { transform: scale(1.06); }

/* Magnetic buttons + shine sweep */
.btn { position: relative; overflow: hidden; transition: transform .25s var(--ease), background .2s; }
.btn::after {
  content: "";
  position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.25), transparent);
  transition: left .6s var(--ease);
}
.btn:hover::after { left: 140%; }

/* Checklist items slide in one by one */
.project.is-visible .checklist li { animation: slideIn .6s var(--ease) both; }
.project.is-visible .checklist li:nth-child(n) { animation-delay: calc(var(--i, 0) * 60ms + .2s); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

/* Infinite marquee for the toolbox */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee .pills { flex-wrap: nowrap; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .pills { animation-play-state: paused; }
.marquee .pills li { white-space: nowrap; transition: border-color .2s, color .2s; }
.marquee .pills li:hover { border-color: var(--accent-2); color: var(--accent-2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Tags pulse softly */
.tag { animation: glow 3s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(91,140,255,.08); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__text > *, .hero__photo, .reveal { opacity: 1; transform: none; filter: none; }
  .cursor-glow { display: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero__grid, .about, .project { grid-template-columns: 1fr; }
  .hero__photo { order: -1; }
  .project--reverse .project__media { order: 0; }
  .project__media { position: static; }
  .services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 1.2rem;
    padding: 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .services, .cards { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 50px 0; }
}
