:root {
  --bg: #05050b;
  --surface: #10101a;
  --surface-2: #181826;
  --surface-3: #202034;
  --text: #f4f4ff;
  --muted: #c4c6de;
  --primary: #8b5cf6;
  --secondary: #22d3ee;
  --ring: rgba(139, 92, 246, 0.45);
  --border: rgba(255, 255, 255, 0.1);
}

body.light {
  --bg: #f4f7ff;
  --surface: #ffffff;
  --surface-2: #ecf0ff;
  --surface-3: #dfe8ff;
  --text: #0f1629;
  --muted: #404962;
  --primary: #5b21b6;
  --secondary: #0e7490;
  --ring: rgba(91, 33, 182, 0.2);
  --border: rgba(15, 22, 41, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "General Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, #2a1655 0%, transparent 38%),
    radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.16) 0%, transparent 30%),
    var(--bg);
  overflow-x: hidden;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.2;
  z-index: -1;
}

.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 65%);
  filter: blur(5px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  z-index: 999;
}

.section {
  width: min(1140px, 92%);
  margin-inline: auto;
  padding: 7rem 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1140px, 92%);
  margin: 1rem auto 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 19, 0.74);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
}

.logo {
  text-decoration: none;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.navbar {
  display: flex;
  gap: 1.4rem;
}

.navbar a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.25s ease, background-color 0.25s ease;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
}

.navbar a.active,
.navbar a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.menu-btn,
.theme-btn {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 110px);
}

.hero-content {
  position: relative;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--secondary);
  font-size: 0.76rem;
  margin-bottom: 0.8rem;
}

h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
  line-height: 1.1;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy {
  margin-top: 1.1rem;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.7;
}

.hero-cta {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.3s ease;
  cursor: pointer;
  position: relative;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 8px 24px var(--ring);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.socials {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.socials a:hover {
  transform: translateY(-3px);
  border-color: var(--secondary);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(520px, 70vh);
}

.profile-shell {
  position: relative;
  width: min(380px, 88%);
  padding: 3px;
  border-radius: 28px;
  background: linear-gradient(
    145deg,
    rgba(34, 211, 238, 0.95),
    rgba(139, 92, 246, 0.85) 50%,
    rgba(34, 211, 238, 0.55)
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 0 100px rgba(139, 92, 246, 0.12);
}

.profile-shell::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 80%, rgba(34, 211, 238, 0.14), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

.profile-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 25px;
  overflow: hidden;
  background: var(--surface-3);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

body.light .profile-shell {
  box-shadow:
    0 0 0 1px rgba(15, 22, 41, 0.08),
    0 24px 48px rgba(15, 22, 41, 0.12),
    0 0 80px rgba(91, 33, 182, 0.08);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

.orb-one {
  width: 170px;
  height: 170px;
  left: 5%;
  top: 3%;
  background: rgba(139, 92, 246, 0.4);
}

.orb-two {
  width: 180px;
  height: 180px;
  right: 3%;
  bottom: 2%;
  background: rgba(34, 211, 238, 0.34);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.stats article {
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border-radius: 14px;
  padding: 1.2rem;
  backdrop-filter: blur(5px);
}

.stats h3 {
  font-size: 1.7rem;
  margin-bottom: 0.3rem;
}

.stats p {
  color: var(--muted);
}

.section-head {
  max-width: 760px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.about-grid,
.service-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.about-card,
.service-card,
.project-card,
.contact-card {
  border: 1px solid var(--border);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  border-radius: 16px;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(9px);
}

.about-card,
.service-card {
  padding: 1.25rem;
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.about-card:hover,
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
}

.about-card p,
.service-card p,
.project-meta p,
.contact-card p {
  color: var(--muted);
  margin-top: 0.7rem;
}

.service-card i {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.project-card {
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-meta {
  padding: 1rem;
}

.project-card:hover img {
  transform: scale(1.07);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.3);
}

.contact-card {
  width: min(780px, 100%);
  margin: auto;
  padding: 2rem;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.12), transparent 35%);
}

#contactForm {
  margin-top: 1.4rem;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

input,
textarea {
  width: 100%;
  margin-top: 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 0.85rem 1rem;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--ring);
}

.footer {
  width: min(1140px, 92%);
  margin: 0 auto 2rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.back-to-top {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
}

.floating {
  animation: float 6s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .floating {
    animation: none;
  }
}

@media (max-width: 900px) {
  .hero,
  .about-grid,
  .service-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .header {
    border-radius: 16px;
  }

  .navbar {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin-inline: auto;
    width: min(1140px, 100%);
    flex-direction: column;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: none;
  }

  .navbar.open {
    display: flex;
  }

  .menu-btn,
  .theme-btn {
    display: block;
  }
}

@media (max-width: 640px) {
  .input-row {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
