/* ===== GLOBAL TECH EMPIRE — alien-grade UI ===== */
:root {
  --bg: #05070f;
  --panel: rgba(16, 22, 40, 0.55);
  --line: rgba(120, 160, 255, 0.14);
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --pink: #f0abfc;
  --text: #e8eeff;
  --muted: #8b97b8;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--pink));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(34, 211, 238, 0.35); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #070b16; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cyan), var(--violet)); border-radius: 5px; }

.mono { font-family: 'JetBrains Mono', monospace; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== backdrop layers ===== */
#stars { position: fixed; inset: 0; z-index: -3; }
.nebula {
  position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 30% at 18% 20%, rgba(34, 211, 238, 0.13), transparent 70%),
    radial-gradient(34% 28% at 82% 12%, rgba(167, 139, 250, 0.14), transparent 70%),
    radial-gradient(40% 34% at 55% 90%, rgba(240, 171, 252, 0.08), transparent 70%);
  animation: nebula-drift 26s ease-in-out infinite alternate;
}
@keyframes nebula-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.06); }
}
.grid-floor {
  position: fixed; left: -30%; right: -30%; bottom: -12vh; height: 46vh;
  z-index: -1; pointer-events: none;
  background:
    linear-gradient(transparent, rgba(5, 7, 15, 0.2)),
    repeating-linear-gradient(90deg, rgba(56, 189, 248, 0.10) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(56, 189, 248, 0.10) 0 1px, transparent 1px 44px);
  transform: perspective(520px) rotateX(63deg);
  mask-image: linear-gradient(transparent, #000 45%);
  -webkit-mask-image: linear-gradient(transparent, #000 45%);
  animation: grid-scroll 1.6s linear infinite;
}
@keyframes grid-scroll {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 0 0, 0 0, 0 44px; }
}

/* floating holographic wireframe hexagons */
.holo {
  position: fixed; z-index: -1; pointer-events: none;
  width: 190px; height: 190px; opacity: 0.75;
  background:
    linear-gradient(140deg, rgba(34, 211, 238, 0.16), rgba(167, 139, 250, 0.13));
  border: 1px solid rgba(34, 211, 238, 0.6);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: inset 0 0 34px rgba(34, 211, 238, 0.28);
  animation: holo-spin 26s linear infinite, holo-bob 7s ease-in-out infinite alternate;
  will-change: transform;
}
.holo-a { top: 16%; left: 6%; }
.holo-b { top: 58%; right: 7%; width: 130px; height: 130px; animation-duration: 34s, 9s; }
.holo-c { top: 78%; left: 14%; width: 90px; height: 90px; opacity: 0.5; animation-duration: 20s, 6s; }
@keyframes holo-spin { to { rotate: 360deg; } }
@keyframes holo-bob { from { translate: 0 -14px; } to { translate: 0 14px; } }
#cursor-glow {
  position: fixed; width: 520px; height: 520px; border-radius: 50%;
  z-index: 0; pointer-events: none; left: 0; top: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.07), transparent 60%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
}

/* ===== nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 26px;
  padding: 14px 4vw;
  background: rgba(5, 8, 16, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { display: grid; place-items: center; filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6)); }
.brand-name {
  font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 0.86rem; letter-spacing: 0.14em;
}
.brand-name em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.06em; position: relative; transition: color 0.25s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0%;
  background: var(--grad); transition: width 0.3s; border-radius: 2px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; transition: all 0.25s;
}
.icon-btn:hover { color: var(--cyan); border-color: rgba(34, 211, 238, 0.5); box-shadow: 0 0 14px rgba(34, 211, 238, 0.25); }
body.muted .snd-on { display: none; }
body:not(.muted) .snd-off { display: none; }

/* ===== buttons ===== */
.btn {
  --glow: rgba(34, 211, 238, 0.5);
  position: relative; display: inline-block; text-decoration: none;
  font-family: 'Orbitron', sans-serif; font-weight: 700; letter-spacing: 0.12em;
  font-size: 0.8rem; color: var(--text);
  padding: 14px 28px; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.4);
  background: linear-gradient(rgba(13, 20, 38, 0.9), rgba(13, 20, 38, 0.9));
  transition: transform 0.15s, box-shadow 0.3s, border-color 0.3s;
  isolation: isolate;
}
.btn span { position: relative; z-index: 2; }
.btn::before { /* shine sweep */
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg); transition: left 0.5s ease; z-index: 1;
}
.btn:hover::before { left: 130%; }
.btn:hover { box-shadow: 0 0 24px var(--glow), inset 0 0 18px rgba(34, 211, 238, 0.12); border-color: var(--cyan); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  background: linear-gradient(100deg, rgba(34, 211, 238, 0.18), rgba(167, 139, 250, 0.18));
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.22);
}
.btn-ghost { border-color: var(--line); }
.btn-small { padding: 10px 18px; font-size: 0.7rem; }
.btn-big { padding: 18px 34px; font-size: 0.9rem; }

/* ===== hero ===== */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 120px 5vw 60px; position: relative;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: clamp(0.82rem, 1.6vw, 0.95rem); letter-spacing: 0.18em; color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.35); border-radius: 999px; padding: 12px 26px;
  background: rgba(34, 211, 238, 0.06);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.15), inset 0 0 12px rgba(34, 211, 238, 0.06);
}
.pulse-dot { width: 12px; height: 12px; border-radius: 50%; background: #34f5c5; box-shadow: 0 0 14px #34f5c5; animation: breathe 2.2s ease-in-out infinite; flex-shrink: 0; }
@keyframes breathe {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 8px #34f5c5,  0 0 0 0 rgba(52, 245, 197, 0.55); }
  50%      { transform: scale(1.45); box-shadow: 0 0 22px #34f5c5, 0 0 0 12px rgba(52, 245, 197, 0); }
}
.hero-title {
  font-family: 'Orbitron', sans-serif; font-weight: 900;
  font-size: clamp(2.3rem, 7vw, 5.2rem); line-height: 1.06; margin-top: 26px;
  text-shadow: 0 0 60px rgba(34, 211, 238, 0.25);
}
.hero-title .line { display: block; }
.hero-type { margin-top: 22px; font-size: clamp(0.9rem, 2vw, 1.15rem); color: var(--cyan); font-family: 'JetBrains Mono', monospace; min-height: 1.6em; }
.caret { display: inline-block; width: 9px; height: 1.15em; background: var(--cyan); vertical-align: text-bottom; margin-left: 3px; animation: blink 0.9s steps(1) infinite; box-shadow: 0 0 8px var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { max-width: 640px; margin-top: 20px; color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.hero-stats {
  display: flex; gap: clamp(20px, 5vw, 64px); margin-top: 64px; flex-wrap: wrap; justify-content: center;
}
.stat { text-align: center; }
.stat b {
  display: block; font-family: 'Orbitron', sans-serif; font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

/* ===== sections ===== */
.section { max-width: 1180px; margin: 0 auto; padding: 110px 5vw 30px; position: relative; z-index: 1; }
.kicker { font-family: 'JetBrains Mono', monospace; color: var(--cyan); letter-spacing: 0.22em; font-size: 0.78rem; margin-bottom: 14px; }
.section-title { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.2; margin-bottom: 44px; }

/* ===== service cards ===== */
/* 8 cards: always even rows — 4x2, 2x4 or 1-col. Never a ragged 3+3+2. */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card, .work-card {
  position: relative; border-radius: 18px; padding: 26px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d; will-change: transform;
}
.card::before, .work-card::before { /* animated border glow on hover */
  content: ''; position: absolute; inset: -1px; border-radius: 18px; padding: 1px; z-index: -1;
  background: linear-gradient(130deg, rgba(34,211,238,0.7), rgba(167,139,250,0.55), rgba(240,171,252,0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.35s;
}
.card:hover::before, .work-card:hover::before { opacity: 1; }
.card:hover, .work-card:hover { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(34, 211, 238, 0.10); }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.16), rgba(167, 139, 250, 0.16));
  border: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: inset 0 0 16px rgba(34, 211, 238, 0.12), 0 0 18px rgba(34, 211, 238, 0.12);
}
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.7)); }
.card h3, .work-card h3 { font-family: 'Orbitron', sans-serif; font-size: 1.02rem; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 10px; }
.card p, .work-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.chips li {
  font-family: 'JetBrains Mono', monospace; font-size: 0.66rem; letter-spacing: 0.06em;
  color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.3); border-radius: 999px; padding: 4px 10px;
  background: rgba(34, 211, 238, 0.05);
}

/* ===== work ===== */
/* 4 cards: 2x2 or 1-col — never 3+1 */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.work-card { padding: 30px 28px; }
.work-tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.66rem; letter-spacing: 0.24em;
  color: var(--pink); border: 1px solid rgba(240, 171, 252, 0.35); border-radius: 999px; padding: 5px 12px;
  margin-bottom: 16px; background: rgba(240, 171, 252, 0.06);
}

/* ===== timeline ===== */
/* 5 steps: one full row on desktop, clean vertical stack below — never 4+1 */
.timeline { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.timeline li {
  border: 1px solid var(--line); border-radius: 16px; padding: 22px 20px; background: var(--panel);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: relative; overflow: hidden; transition: border-color 0.3s, transform 0.25s;
}
.timeline li:hover { border-color: rgba(34, 211, 238, 0.45); transform: translateY(-4px); }
.timeline li::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--grad); opacity: 0.7;
}
.timeline b { font-family: 'Orbitron', sans-serif; font-size: 0.8rem; letter-spacing: 0.12em; color: var(--cyan); }
.timeline p { margin-top: 10px; color: var(--muted); font-size: 0.85rem; line-height: 1.6; }

/* ===== marquee ===== */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: scroll 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee-track span {
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--muted); white-space: nowrap;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; background: rgba(13, 20, 38, 0.6);
  transition: all 0.25s;
}
.marquee-track span:hover { color: var(--cyan); border-color: rgba(34, 211, 238, 0.5); box-shadow: 0 0 14px rgba(34, 211, 238, 0.2); }

/* ===== contact ===== */
.contact-card {
  text-align: center; border-radius: 24px; padding: clamp(40px, 7vw, 80px) 6vw; margin-bottom: 60px;
  background:
    radial-gradient(60% 90% at 50% 0%, rgba(34, 211, 238, 0.10), transparent 70%),
    var(--panel);
  border: 1px solid rgba(34, 211, 238, 0.25);
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.08), inset 0 0 40px rgba(34, 211, 238, 0.04);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.contact-sub { color: var(--muted); max-width: 560px; margin: 0 auto 30px; line-height: 1.7; }
.contact-note { margin-top: 26px; font-size: 0.7rem; letter-spacing: 0.2em; color: var(--muted); }

/* ===== footer ===== */
.footer {
  text-align: center; padding: 26px 5vw 34px; color: var(--muted); font-size: 0.78rem;
  border-top: 1px solid var(--line); letter-spacing: 0.04em;
}

/* ===== toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 100;
  transform: translateX(-50%) translateY(20px); opacity: 0;
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; letter-spacing: 0.12em;
  color: #d9faff; padding: 14px 22px; border-radius: 12px;
  background: rgba(13, 20, 38, 0.95);
  border: 1px solid rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.35), 0 12px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ===== reveal animations ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== mobile menu ===== */
.menu-btn { display: none; }
.menu-btn .ico-close { display: none; }
body.menu-open .menu-btn .ico-burger { display: none; }
body.menu-open .menu-btn .ico-close { display: block; }
#mobile-menu {
  position: fixed; left: 12px; right: 12px; top: 66px; z-index: 49;
  display: none; flex-direction: column; gap: 4px; padding: 14px;
  background: rgba(8, 12, 24, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.3); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(34, 211, 238, 0.12);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
body.menu-open #mobile-menu { display: flex; opacity: 1; transform: none; }
#mobile-menu a:not(.btn) {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: 13px 14px; border-radius: 10px; letter-spacing: 0.06em;
}
#mobile-menu a:not(.btn):active { background: rgba(34, 211, 238, 0.12); }
#mobile-menu .menu-cta { text-align: center; margin-top: 8px; }

/* ===== responsive (all grids keep full, even rows at every width) ===== */
@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  /* compact top bar: nothing overflows, nothing gets cut off */
  .nav { gap: 10px; padding: 10px 14px; }
  .brand-name { font-size: 0.72rem; letter-spacing: 0.1em; }
  .btn-small { padding: 9px 12px; font-size: 0.62rem; letter-spacing: 0.08em; white-space: nowrap; }
  .nav-cta { gap: 8px; margin-left: auto; }
  .hero { padding-top: 100px; }
  .hero-stats { gap: 26px; }
  .work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  /* very small phones: the CTA lives in the menu instead of the bar */
  .nav-start { display: none; }
  .brand-name { font-size: 0.68rem; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
}
/* NOTE: no prefers-reduced-motion gating — Windows "animation effects off"
   sets that flag and was freezing all site animation for those visitors. */
@media (max-width: 760px) {
  .holo-a, .holo-c { display: none; } /* keep mobile clean + light */
}
