/* =========================================================
   THEME VARIABLES
   ========================================================= */
:root {
  --bg: #050814;
  --bg-alt: #050a1c;
  --fg: #f5f7ff;
  --muted: #9aa0c2;

  --accent-1: #4fd1ff;
  --accent-2: #7f5dff;
  --accent-3: #ff4df0;

  --border: #1a2038;
  --max-width: 1200px;

  --radius-lg: 18px;
  --radius-md: 12px;

  --shadow-soft: 0 0 40px rgba(0, 0, 0, 0.6);

  --gradient-bg: radial-gradient(circle at top, #0b1024 0, #02030a 55%, #000 100%);
}

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

html,
body {
  height: 100%;
  background: var(--gradient-bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   PAGE WRAPPER
   ========================================================= */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 80px;
}

#bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.logo {
  font-size: 16px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-1);
  position: relative;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav a {
  position: relative;
  padding-bottom: 4px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width 0.25s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--gradient-bg);
  border-radius: 32px;
  border: 1px solid rgba(79, 209, 255, 0.12);
  box-shadow: var(--shadow-soft);
  padding-inline: 24px;
  margin-block: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
}

.section-kicker {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-1);
}

.section-title {
  font-size: 26px;
  font-weight: 500;
}

.section-sub {
  max-width: 420px;
  font-size: 14px;
  color: var(--muted);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 40px;
  align-items: center;
  min-height: calc(100vh - 140px);
}

.hero-kicker {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-1);
}

.hero-title {
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.05;
  margin-top: 12px;
}

.hero-title span {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 18px;
  font-size: 15px;
  color: var(--muted);
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 20px;
  font-size: 11px;
  color: var(--muted);
}

/* =========================================================
   BUTTONS (MODULAR)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;

  --btn-bg: transparent;
  --btn-color: var(--fg);
  --btn-border: transparent;
  --btn-shadow: none;

  background: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-border);
  box-shadow: var(--btn-shadow);

  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  --btn-bg: radial-gradient(circle at top left, var(--accent-1), var(--accent-2));
  --btn-color: #02030a;
  --btn-shadow: 0 0 24px rgba(79, 209, 255, 0.5);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(127, 93, 255, 0.7);
}

.btn-ghost {
  --btn-bg: rgba(2, 3, 10, 0.6);
  --btn-border: rgba(127, 93, 255, 0.6);
}

.btn-ghost:hover {
  background: rgba(10, 14, 40, 0.9);
  box-shadow: 0 0 18px rgba(127, 93, 255, 0.5);
}

/* =========================================================
   HERO VISUAL
   ========================================================= */
.hero-visual {
  position: relative;
}

.neon-grid {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(79, 209, 255, 0.4);
  background:
    radial-gradient(circle at top, rgba(79, 209, 255, 0.18), transparent 60%),
    radial-gradient(circle at bottom, rgba(127, 93, 255, 0.18), transparent 60%),
    #02030a;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
  min-height: 320px;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
  animation: grid-pan 18s linear infinite;
}

@keyframes grid-pan {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-80px, -80px, 0);
  }
}

/* Floating Orbs (optimized) */
.floating-orb {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.9;
  mix-blend-mode: screen;
  animation: float-orb var(--orb-speed) ease-in-out infinite alternate;
}

.orb-1 {
  background: radial-gradient(circle, var(--accent-1), transparent);
  top: 18%;
  left: 12%;
  --orb-speed: 10s;
  --orb-transform: translate3d(20px, -30px, 0);
}

.orb-2 {
  background: radial-gradient(circle, var(--accent-2), transparent);
  bottom: 10%;
  right: 8%;
  --orb-speed: 12s;
  --orb-transform: translate3d(-30px, 20px, 0);
}

.orb-3 {
  background: radial-gradient(circle, var(--accent-3), transparent);
  top: 50%;
  right: 40%;
  --orb-speed: 14s;
  --orb-transform: translate3d(10px, -20px, 0);
}

@keyframes float-orb {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: var(--orb-transform);
  }
}

/* SVG Shapes */
.svg-shape {
  position: absolute;
  stroke: rgba(255, 255, 255, 0.7);
  fill: transparent;
  stroke-width: 1.2;
  filter: drop-shadow(0 0 10px rgba(79, 209, 255, 0.7));
  animation: shape-pulse 4s ease-in-out infinite alternate;
}

.svg-1 {
  width: 120px;
  top: 18%;
  right: 12%;
}

.svg-2 {
  width: 90px;
  bottom: 16%;
  left: 18%;
}

@keyframes shape-pulse {
  from {
    opacity: 0.4;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* =========================================================
   CARDS
   ========================================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 20px 18px 22px;
  background: radial-gradient(circle at top left, #151a32, #050814);
  border: 1px solid rgba(79, 209, 255, 0.18);
  overflow: hidden;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.7);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 0 32px rgba(127, 93, 255, 0.6);
  border-color: rgba(127, 93, 255, 0.6);
}

.card-border-glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 0deg,
    rgba(79, 209, 255, 0.1),
    rgba(127, 93, 255, 0.2),
    rgba(255, 77, 240, 0.1),
    transparent,
    rgba(79, 209, 255, 0.1)
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.card:hover .card-border-glow {
  opacity: 1;
}

.card-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.card-text {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.card-list {
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}

.card-list li::before {
  content: "▹";
  color: var(--accent-1);
  margin-right: 6px;
}

/* =========================================================
   AI SECTION
   ========================================================= */
.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr);
  gap: 40px;
  align-items: center;
}

.ai-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.ai-list {
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.ai-list li {
  margin-bottom: 8px;
}

.ai-list li::before {
  content: "◎";
  color: var(--accent-2);
  margin-right: 8px;
}

.ai-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.ai-chip {
  position: relative;
  width: 220px;
  height: 140px;
  border-radius: 24px;
  background: radial-gradient(circle at top, #1b2140, #050814);
  border: 1px solid rgba(79, 209, 255, 0.5);
  box-shadow: 0 0 32px rgba(79, 209, 255, 0.6);
  overflow: hidden;
}

.ai-chip-core {
  position: absolute;
  inset: 32px 60px;
  border-radius: 16px;
  background: radial-gradient(circle, var(--accent-2), #050814);
  box-shadow: 0 0 24px rgba(127, 93, 255, 0.8);
}

.ai-chip-lines {
  position: absolute;
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(79, 209, 255, 0.8),
    transparent
  );
  opacity: 0.7;
  animation: chip-scan 3s linear infinite;
}

.ai-chip-lines-1 {
  top: 30%;
}

.ai-chip-lines-2 {
  top: 50%;
  animation-delay: 0.8s;
}

.ai-chip-lines-3 {
  top: 70%;
  animation-delay: 1.6s;
}

@keyframes chip-scan {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.ai-glitch-text {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr);
  gap: 40px;
}

.about-text {
  font-size: 15px;
  color: var(--fg);
  line-height: 1.7;
}

.about-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.about-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 4px;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr);
  gap: 40px;
  align-items: flex-start;
}

.contact-title {
  font-size: 20px;
  margin-bottom: 10px;
}

.contact-text {
  font-size: 14px;
  color: var(--muted);
}

.contact-block {
  margin-bottom: 16px;
}

.contact-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 4px;
}

.contact-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(79, 209, 255, 0.3);
  background: rgba(10, 14, 40, 0.6);
  color: var(--fg);
  font-size: 14px;
}

.contact-input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 12px rgba(127, 93, 255, 0.4);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid rgba(79, 209, 255, 0.2);
  margin-top: 32px;
  padding-top: 16px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================================================
   GLITCH EFFECT (optimized)
   ========================================================= */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: visible;
  opacity: 0.7;
  mix-blend-mode: screen;
  animation: glitch 2.2s infinite linear alternate-reverse;
}

.glitch::before {
  color: var(--accent-1);
  transform: translate(1px, -1px);
}

.glitch::after {
  color: var(--accent-3);
  transform: translate(-1px, 1px);
}

@keyframes glitch {
  0% {
    clip-path: inset(0 0 80% 0);
  }
  20% {
    clip-path: inset(10% 0 40% 0);
  }
  40% {
    clip-path: inset(40% 0 20% 0);
  }
  60% {
    clip-path: inset(80% 0 0 0);
  }
  80% {
    clip-path: inset(30% 0 50% 0);
  }
  100% {
    clip-path: inset(0 0 80% 0);
  }
}

/* =========================================================
   REVEAL ON SCROLL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
  }

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

  .hero-visual {
    order: -1;
  }

  .section-header {
    flex-direction: column;
  }

  .cards-grid,
  .ai-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-alt {
    padding-inline: 16px;
  }
}

@media (max-width: 600px) {
  .page {
    padding-inline: 16px;
  }

  .hero-title {
    font-size: 34px;
  }

  .nav {
    font-size: 11px;
  }
}
