/* ===== Variables ===== */
:root {
  --blue: #007bff;
  --blue-light: #00d4ff;
  --blue-dark: #001f3f;
  --navy: #0a0e1a;
  --navy-light: #111827;
  --navy-card: #151c2e;
  --white: #f0f4ff;
  --gray: #8892a8;
  --green: #39ff14;
  --gradient: linear-gradient(135deg, var(--blue-light) 0%, var(--blue) 50%, #0056b3 100%);
  --glow: 0 0 30px rgba(0, 123, 255, 0.3);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --header-h: 72px;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--white);
  background: var(--navy);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

/* ===== Background effects ===== */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 123, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 123, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
  pointer-events: none;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== Typography ===== */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--blue-light);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.section__desc {
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 560px;
  margin-inline: auto;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 123, 255, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.nav__logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 123, 255, 0.4));
}

.nav__logo strong { color: var(--blue-light); }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__menu a {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color var(--transition);
  position: relative;
}

.nav__menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width var(--transition);
}

.nav__menu a:hover { color: var(--white); }
.nav__menu a:hover::after { width: 100%; }

.nav__cta {
  padding: 8px 20px !important;
  border: 1px solid rgba(0, 123, 255, 0.4) !important;
  border-radius: 6px;
  color: var(--blue-light) !important;
  transition: background var(--transition), box-shadow var(--transition) !important;
}

.nav__cta::after { display: none !important; }

.nav__cta:hover {
  background: rgba(0, 123, 255, 0.15) !important;
  box-shadow: var(--glow);
  color: var(--white) !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 8px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn--primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 123, 255, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 123, 255, 0.5);
}

.btn--ghost {
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--blue-light);
}

.btn--ghost:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--blue-light);
}

.btn--lg { padding: 16px 32px; font-size: 0.85rem; }

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.hero__glow--1 {
  width: 600px;
  height: 600px;
  background: rgba(0, 123, 255, 0.12);
  top: -100px;
  right: -100px;
}

.hero__glow--2 {
  width: 400px;
  height: 400px;
  background: rgba(0, 212, 255, 0.08);
  bottom: 0;
  left: -100px;
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0 80px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blue-light);
  border: 1px solid rgba(0, 212, 255, 0.25);
  padding: 8px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  background: rgba(0, 212, 255, 0.05);
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--blue-light);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(0, 212, 255, 0); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.hero__desc {
  color: var(--gray);
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero__stats {
  display: flex;
  gap: 40px;
}

.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-light);
}

.stat__label {
  font-size: 0.85rem;
  color: var(--gray);
  letter-spacing: 0.05em;
}

/* Hero visual */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__logo-ring {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__logo-ring-inner {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 123, 255, 0.15) 0%, rgba(10, 14, 26, 0.9) 70%);
  border: 1px solid rgba(0, 123, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(0, 123, 255, 0.25), inset 0 0 40px rgba(0, 123, 255, 0.08);
  animation: float 6s ease-in-out infinite;
}

.hero__logo-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 0 24px rgba(0, 123, 255, 0.45));
}

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

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 123, 255, 0.15);
  animation: spin linear infinite;
}

.orbit--1 {
  width: 100%;
  height: 100%;
  animation-duration: 20s;
}

.orbit--2 {
  width: 115%;
  height: 115%;
  animation-duration: 30s;
  animation-direction: reverse;
  border-color: rgba(0, 212, 255, 0.1);
}

.orbit--3 {
  width: 130%;
  height: 130%;
  animation-duration: 45s;
  border-style: dashed;
  border-color: rgba(0, 123, 255, 0.08);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.orbit::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--blue-light);
  border-radius: 50%;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--blue-light);
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--blue-light), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ===== Services ===== */
.services {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy) 100%);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--navy-card);
  border: 1px solid rgba(0, 123, 255, 0.1);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 123, 255, 0.3);
  box-shadow: var(--glow);
}

.service-card:hover::before { transform: scaleX(1); }

.service-card__icon {
  width: 48px;
  height: 48px;
  color: var(--blue-light);
  margin-bottom: 20px;
}

.service-card__icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===== Apps ===== */
.apps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.app-card {
  position: relative;
  background: var(--navy-card);
  border: 1px solid rgba(0, 123, 255, 0.12);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}

.app-card--static {
  cursor: default;
}

.app-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 212, 255, 0.35);
}

.app-card--static:hover {
  transform: translateY(-8px);
}

.app-card__glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.app-card:hover .app-card__glow { opacity: 1; }

.app-card__logo {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-card__info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.app-card__info p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.app-card__link {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--blue-light);
  text-transform: uppercase;
}

/* ===== Projects ===== */
.projects {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--navy-card);
  border: 1px solid rgba(0, 123, 255, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glow);
}

.project-card--app {
  cursor: default;
}

.project-card__img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 24px;
  overflow: hidden;
}

.project-card__img img {
  max-height: 140px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition);
}

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

.project-card__body {
  padding: 24px;
  border-top: 1px solid rgba(0, 123, 255, 0.08);
}

.project-card__body h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.project-card__body p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.project-card__url {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--blue-light);
  text-transform: uppercase;
}

.project-card__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(57, 255, 20, 0.3);
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(57, 255, 20, 0.08);
}

/* ===== Contact ===== */
.contact__wrapper {
  position: relative;
  background: var(--navy-card);
  border: 1px solid rgba(0, 123, 255, 0.15);
  border-radius: 20px;
  padding: 64px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  overflow: hidden;
}

.contact__glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 123, 255, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin: 12px 0 20px;
}

.contact__desc {
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 32px;
}

.contact__visual {
  text-align: center;
}

.contact__logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-inline: auto;
  filter: drop-shadow(0 0 30px rgba(0, 123, 255, 0.4));
  animation: float 6s ease-in-out infinite;
}

.contact__tagline {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--blue);
  margin-top: 16px;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(0, 123, 255, 0.1);
  padding: 32px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer__brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.footer__brand span {
  font-size: 0.8rem;
  color: var(--gray);
}

.footer__copy {
  color: var(--gray);
  font-size: 0.85rem;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color var(--transition);
}

.footer__links a:hover { color: var(--blue-light); }

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

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .apps__grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__content { grid-template-columns: 1fr; text-align: center; }
  .hero__desc { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__stats { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__logo-ring { width: 280px; height: 280px; }
  .hero__logo-ring-inner { width: 200px; height: 200px; }
  .hero__logo-img { width: 150px; height: 150px; }
  .contact__wrapper { grid-template-columns: 1fr; text-align: center; padding: 48px 32px; }
  .contact__desc { margin-inline: auto; }
  .contact__actions { display: flex; justify-content: center; }
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 32px;
    gap: 24px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    border-bottom: 1px solid rgba(0, 123, 255, 0.1);
  }

  .nav__menu.open {
    transform: translateY(0);
    opacity: 1;
  }

  .services__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 24px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .hero__scroll { display: none; }
}
