:root {
  --bg: #0a1322;
  --panel: rgba(12, 27, 46, 0.78);
  --panel-strong: #0f233f;
  --line: rgba(133, 205, 250, 0.22);
  --text: #e7f0ff;
  --muted: #a3b5cc;
  --accent: #2ec4b6;
  --accent-2: #ffb703;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, #1f3d67 0%, transparent 35%),
    radial-gradient(circle at 85% 85%, #173a52 0%, transparent 30%),
    linear-gradient(160deg, var(--bg), #07101c 70%);
  min-height: 100vh;
}

body.theme-light {
  --bg: #eef4fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --line: rgba(18, 33, 43, 0.12);
  --text: #12212b;
  --muted: #4d5d64;
  --accent: #176b62;
  --accent-2: #e07a2f;
  background: radial-gradient(circle at 15% 10%, #d3ebff 0%, transparent 35%),
    radial-gradient(circle at 85% 85%, #dff7e8 0%, transparent 30%),
    linear-gradient(160deg, var(--bg), #f8fbff 70%);
}

.orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}

.orb-a {
  width: 180px;
  height: 180px;
  top: 8%;
  left: 4%;
  background: rgba(46, 196, 182, 0.28);
}

.orb-b {
  width: 250px;
  height: 250px;
  top: 18%;
  right: 6%;
  background: rgba(255, 183, 3, 0.18);
  animation-delay: -3s;
}

.orb-c {
  width: 220px;
  height: 220px;
  bottom: 10%;
  left: 50%;
  background: rgba(52, 210, 244, 0.16);
  animation-delay: -6s;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 95%);
  pointer-events: none;
}

.topbar,
main,
footer {
  width: min(1150px, 92vw);
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  margin-top: 16px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 17, 32, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.02em;
  font-size: 1.1rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.scroll-progress {
  position: sticky;
  top: 0;
  z-index: 25;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

main {
  padding: 2rem 0 4rem;
}

.hero,
.projects,
.services,
.skills,
.highlights,
.impact,
.testimonials,
.contact {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(130deg, rgba(15, 35, 63, 0.85), rgba(12, 27, 46, 0.64));
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3);
}

.hero {
  padding: 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: center;
}

.hero h1 {
  text-shadow: 0 0 18px rgba(46, 196, 182, 0.14);
}

.hero-roles {
  margin: 1rem 0 0;
  color: var(--muted);
  font-weight: 700;
}

.hero-roles span {
  color: var(--accent);
}

.robot-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
}

.robot-body {
  width: min(320px, 70vw);
  animation: robotFloat 3.4s ease-in-out infinite;
}

.robot-head {
  height: 140px;
  border: 2px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.22));
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.robot-eye {
  width: 60px;
  height: 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), #77e5ff);
  box-shadow: 0 0 12px rgba(46, 196, 182, 0.5);
  animation: blink 4.2s infinite;
}

.robot-chest {
  margin: 0.8rem auto 0;
  width: 86%;
  height: 180px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(46, 196, 182, 0.2), rgba(7, 16, 28, 0.2));
  position: relative;
  overflow: hidden;
}

.robot-chest::after {
  content: "";
  position: absolute;
  inset: 28% 20%;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 183, 3, 0.2), rgba(46, 196, 182, 0.16));
  animation: scan 2.2s linear infinite;
}

.robot-shadow {
  width: 220px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  filter: blur(8px);
  margin-top: 0.35rem;
  animation: shadowPulse 3.4s ease-in-out infinite;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.12;
}

h1 {
  margin: 0.9rem 0 1rem;
  font-size: clamp(2rem, 6vw, 3.8rem);
  max-width: 18ch;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  text-decoration: none;
  font-weight: 800;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

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

.btn-primary {
  border: none;
  background: linear-gradient(90deg, var(--accent), #34d2f4);
  color: #05202b;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
}

#copy-email.copied {
  background: rgba(46, 196, 182, 0.18);
  color: var(--accent);
}

.stats {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.stats li {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.15);
}

.stats strong {
  display: block;
  font-size: 1.5rem;
  color: var(--accent);
}

.stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.projects,
.services,
.skills,
.highlights,
.impact,
.testimonials,
.contact {
  margin-top: 1.2rem;
  padding: 1.4rem;
}

.impact-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.impact-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 1rem;
}

.impact-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.impact-card p {
  color: var(--muted);
  margin: 0.7rem 0 0;
}

.meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 900ms ease;
}

.highlight-marquee {
  margin-top: 1rem;
  display: flex;
  gap: 0.8rem;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.highlight-marquee span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  animation: marquee 18s linear infinite;
}

.highlight-marquee span:nth-child(2n) {
  animation-duration: 22s;
}

.highlight-marquee span:nth-child(3n) {
  animation-duration: 26s;
}

.section-head h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
}

.project-tools {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

#project-search {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font-weight: 700;
}

.filter.active {
  background: var(--accent);
  color: #022a24;
  border-color: transparent;
}

.project-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.service-grid,
.testimonial-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

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

.service-card,
.testimonial-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 1rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.service-card:hover,
.testimonial-card:hover,
.card:hover,
.impact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 196, 182, 0.42);
}

.service-card h3,
.testimonial-card blockquote {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.testimonial-card blockquote {
  line-height: 1.65;
}

.testimonial-card figcaption {
  color: var(--accent-2);
  font-weight: 700;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 0.9rem;
}

.card.hidden {
  display: none;
}

.card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tag {
  margin: 0.7rem 0 0;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 800;
}

.card h3 {
  margin: 0.5rem 0;
  font-size: 1.35rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card .btn {
  margin-top: 0.85rem;
}

.pill-grid {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill-grid span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.contact-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.contact-item {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: var(--panel-strong);
}

.contact-item span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-item strong {
  font-size: 0.95rem;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #06212a;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

footer {
  padding: 0 0 2rem;
  color: var(--muted);
}

dialog {
  max-width: 560px;
  width: min(92vw, 560px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #081426;
  color: var(--text);
  padding: 1rem;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

#close-modal {
  float: right;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

#modal-points {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) scale(1);
  }
  50% {
    transform: translateY(-18px) translateX(8px) scale(1.04);
  }
}

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

@keyframes shadowPulse {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.9;
  }
  50% {
    transform: scaleX(0.86);
    opacity: 0.45;
  }
}

@keyframes blink {
  0%,
  44%,
  48%,
  100% {
    transform: scaleY(1);
  }
  46% {
    transform: scaleY(0.12);
  }
}

@keyframes scan {
  0% {
    transform: translateY(-20%);
    opacity: 0.2;
  }
  50% {
    transform: translateY(40%);
    opacity: 0.65;
  }
  100% {
    transform: translateY(-20%);
    opacity: 0.2;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-120%);
  }
}

@media (max-width: 880px) {
  .hero-grid,
  .stats,
  .impact-grid,
  .project-grid,
  .service-grid,
  .testimonial-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .highlight-marquee {
    flex-wrap: wrap;
    white-space: normal;
  }

  .highlight-marquee span {
    animation: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .hero,
  .projects,
  .impact,
  .skills,
  .contact {
    padding: 1rem;
  }
}
