:root {
  --bg: #050316;
  --panel: rgba(14, 11, 45, 0.78);
  --panel-strong: rgba(19, 16, 62, 0.9);
  --text: #f4f7ff;
  --muted: #c8d0ff;
  --border: rgba(255, 255, 255, 0.16);
  --purple: #8c4dff;
  --purple-bright: #b98aff;
  --blue: #1132ff;
  --cyan: #4ff6ff;
  --lime: #d3ff63;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
  --radius: 28px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(140, 77, 255, 0.34), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(79, 246, 255, 0.16), transparent 22%),
    radial-gradient(circle at 60% 55%, rgba(17, 50, 255, 0.26), transparent 30%),
    linear-gradient(140deg, #050316 0%, #090924 32%, #0c0d31 63%, #04020c 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  opacity: 0.22;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 246, 255, 0.18), transparent 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.site-header,
.section {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  background: rgba(9, 8, 28, 0.54);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid #fff;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  box-shadow: 6px 6px 0 rgba(255, 255, 255, 0.12);
}

.brand-text,
.site-nav a,
.eyebrow,
.button,
.service-index,
.panel-kicker,
.spec-item span {
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav a {
  padding: 10px 14px;
  border: 1px solid transparent;
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.section {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 92px 0;
}

.hero {
  min-height: calc(100vh - 110px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 44px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.04);
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3,
.brand-mark {
  font-family: "Archivo Black", sans-serif;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(3.6rem, 8vw, 7.4rem);
  line-height: 0.95;
  text-wrap: balance;
}

h2 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.95;
  max-width: 11ch;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  line-height: 1;
}

.hero-text,
.cta-panel p,
.portfolio-meta p,
.service-card p,
.about-card p,
.spec-item p,
.specialization-panel p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-text {
  max-width: 34rem;
  margin: 24px 0 0;
}

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

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 14px 20px;
  border: 2px solid #fff;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
  overflow: hidden;
}

.button::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 0;
  background: linear-gradient(135deg, rgba(79, 246, 255, 0.32), rgba(140, 77, 255, 0.4));
  transition: height 0.22s ease;
  z-index: -1;
}

.button:hover,
.button:focus-visible {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 rgba(255, 255, 255, 0.12);
}

.button:hover::after,
.button:focus-visible::after {
  height: 100%;
}

.button-primary {
  background: linear-gradient(135deg, var(--purple), var(--blue));
}

.button-secondary {
  background: rgba(255, 255, 255, 0.05);
}

.hero-visual {
  position: relative;
  min-height: 620px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  overflow: hidden;
  box-shadow: var(--shadow);
}

.floating-card,
.about-card,
.service-card,
.specialization-panel,
.portfolio-card,
.cta-panel,
.site-header {
  border-radius: var(--radius);
}

.floating-card {
  position: absolute;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.floating-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 0.78rem;
}

.floating-card strong {
  font-size: 1.25rem;
  line-height: 1.15;
}

.card-a {
  top: 8%;
  left: 8%;
  width: 48%;
  transform: rotate(-4deg);
  animation: drift 8s ease-in-out infinite;
}

.card-b {
  right: 8%;
  top: 30%;
  width: 42%;
  transform: rotate(7deg);
  animation: drift 10s ease-in-out infinite reverse;
}

.card-c {
  left: 18%;
  bottom: 10%;
  width: 52%;
  transform: rotate(-8deg);
  animation: drift 9s ease-in-out infinite;
}

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

.orb-one {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(140, 77, 255, 0.95), transparent 65%);
  top: 8%;
  right: -8%;
}

.orb-two {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(79, 246, 255, 0.4), transparent 62%);
  bottom: -8%;
  left: -10%;
}

.grid-scan {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
  transform: translateY(-100%);
  animation: scan 7s linear infinite;
}

.section-heading {
  display: grid;
  gap: 16px;
  margin-bottom: 34px;
}

.about-layout,
.specialization-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.about-card,
.service-card,
.specialization-panel,
.cta-panel {
  padding: 30px;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.about-card.accent {
  background:
    linear-gradient(135deg, rgba(140, 77, 255, 0.22), rgba(17, 50, 255, 0.22)),
    var(--panel-strong);
}

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

.service-card {
  position: relative;
  min-height: 280px;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 18px;
  height: 18px;
  background: var(--lime);
  box-shadow: 0 0 20px rgba(211, 255, 99, 0.7);
}

.service-index {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--cyan);
  font-size: 0.85rem;
}

.specialization-list {
  display: grid;
  gap: 18px;
}

.spec-item {
  padding: 22px 24px;
  border-left: 4px solid var(--cyan);
  background: rgba(255, 255, 255, 0.04);
}

.spec-item span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.panel-kicker {
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 0.78rem;
}

.specialization-panel strong {
  display: block;
  margin: 10px 0 16px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.portfolio-card {
  grid-column: span 5;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.portfolio-card.offset {
  grid-column: 7 / span 6;
  transform: translateY(48px);
}

.portfolio-card.wide {
  grid-column: span 7;
}

.portfolio-card:hover,
.portfolio-card:focus-within {
  transform: translateY(-10px) rotate(-1deg);
  border-color: rgba(79, 246, 255, 0.5);
}

.portfolio-media {
  min-height: 260px;
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.portfolio-media::before,
.portfolio-media::after {
  content: "";
  position: absolute;
  inset: 0;
}

.portfolio-media::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(45deg, rgba(140, 77, 255, 0.86), rgba(17, 50, 255, 0.88));
}

.portfolio-media::after {
  background:
    radial-gradient(circle at 20% 30%, rgba(79, 246, 255, 0.68), transparent 18%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.4), transparent 15%);
  mix-blend-mode: screen;
  transition: transform 0.28s ease;
}

.portfolio-card:hover .portfolio-media::after {
  transform: scale(1.08) rotate(4deg);
}

.media-two::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 32%),
    linear-gradient(45deg, #0e185a, #883dff);
}

.media-three::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(45deg, #071025, #293cff 60%, #8c4dff);
}

.media-four::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(45deg, #0f0b30, #2768ff);
}

.portfolio-meta {
  padding: 18px 6px 6px;
}

.cta {
  padding-bottom: 110px;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(140, 77, 255, 0.28), rgba(17, 50, 255, 0.28)),
    rgba(12, 11, 37, 0.86);
}

.cta-panel::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -30px;
  top: -30px;
  background: var(--lime);
  opacity: 0.14;
  transform: rotate(18deg);
}

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

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

.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.tilt-card:hover {
  border-color: rgba(79, 246, 255, 0.52);
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) rotate(var(--rotation, 0deg));
  }
  50% {
    transform: translateY(-16px) rotate(calc(var(--rotation, 0deg) + 1.5deg));
  }
}

@keyframes scan {
  to {
    transform: translateY(100%);
  }
}

.card-a {
  --rotation: -4deg;
}

.card-b {
  --rotation: 7deg;
}

.card-c {
  --rotation: -8deg;
}

@media (max-width: 1080px) {
  .hero,
  .about-layout,
  .specialization-layout,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .hero-visual {
    min-height: 520px;
  }

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

  .portfolio-card,
  .portfolio-card.offset,
  .portfolio-card.wide {
    grid-column: auto;
    transform: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 16px;
    border-radius: 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-text {
    font-size: 0.95rem;
  }

  .site-nav {
    gap: 6px;
  }

  .section {
    width: min(calc(100% - 24px), var(--max-width));
    padding: 72px 0;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .button {
    min-height: 56px;
  }

  .hero-visual {
    min-height: 460px;
  }

  .floating-card {
    width: auto;
    left: 16px;
    right: 16px;
  }

  .card-a {
    top: 8%;
  }

  .card-b {
    top: 36%;
  }

  .card-c {
    bottom: 8%;
  }

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

  .cta-panel,
  .about-card,
  .service-card,
  .specialization-panel {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .cursor-glow {
    display: none;
  }
}
