:root {
  --bg: #0b1020;
  --bg-soft: #0f1530;
  --card: #121935;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --brand: #7c3aed; /* violet-600 */
  --brand-2: #06b6d4; /* cyan-500 */
  --ok: #10b981; /* emerald-500 */
  --warn: #f59e0b; /* amber-500 */
  --danger: #ef4444; /* red-500 */
  --ring: 0 0 0 3px rgba(124, 58, 237, 0.35);
}
:root.light {
  --bg: #f3f4f6;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
}

* {
  box-sizing: border-box;
}
html,
html {
  height: 100%;
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
  background-attachment: fixed;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text);
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* Utility */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.2rem;
  border-radius: 1rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.4);
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  border: 0;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.tag {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: #c4b5fd;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-block;
}

/* Glassy nav */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(15, 23, 42, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 3px;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}
.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav-links a {
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  color: var(--muted);
  font-weight: 600;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.hamburger {
  display: none;
}

/* Hero */
header {
  position: relative;
}
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  padding: 5rem 0 4rem;
  align-items: center;
}
.headline {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  font-weight: 800;
}
.sub {
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
}
.hero-cta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}
.hero-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: 1.3rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
  font-weight: 800;
}

/* Sections */
section {
  padding: 4rem 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.6rem;
  gap: 1rem;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}
.grid {
  display: grid;
  gap: 1rem;
}

/* Services */
.services {
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.2rem;
  padding: 1.2rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.45);
}
.icon {
  width: 40px;
  height: 40px;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  background: rgba(124, 58, 237, 0.14);
  margin-bottom: 0.7rem;
}

/* Skills */
.skills {
  grid-template-columns: repeat(6, 1fr);
}
.skill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 0.8rem;
  border-radius: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* Projects */
.projects {
  grid-template-columns: repeat(3, 1fr);
}
.project {
  overflow: hidden;
  padding: 0;
}
.project figure {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  height: 220px;
}
.project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transition: transform 0.5s ease;
}
.project:hover img {
  transform: scale(1.08);
}
.project .p-body {
  padding: 1rem;
}

/* Testimonials */
.testis {
  grid-template-columns: repeat(3, 1fr);
}
.quote {
  font-weight: 600;
}
.t-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
}
.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
}

/* Pricing */
.pricing {
  grid-template-columns: repeat(3, 1fr);
}
.price {
  text-align: center;
  padding: 1.2rem;
}
.price h3 {
  margin: 0.4rem 0;
}
.price .amount {
  font-size: 2rem;
  font-weight: 800;
}

/* Contact */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}
form {
  display: grid;
  gap: 0.8rem;
}
input,
textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}
input:focus,
textarea:focus {
  outline: none;
  box-shadow: var(--ring);
  border-color: rgba(124, 58, 237, 0.45);
}
textarea {
  min-height: 140px;
  resize: vertical;
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem 0;
  color: var(--muted);
}
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 3.3rem;
  }
  .grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .services,
  .projects,
  .testis,
  .pricing {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: inline-flex;
  }
  .grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .services,
  .projects,
  .testis,
  .pricing,
  .skills {
    grid-template-columns: 1fr;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
  }
}

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 2s ease, transform 2s ease;
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Back to top */
.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s linear;
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #111827;
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 0.8rem;
  z-index: 60;
}
