html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(
      circle at 20% 30%,
      rgba(59, 130, 246, 0.08),
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(99, 102, 241, 0.06),
      transparent 40%
    ),
    #0a0f1c;
    color: #e5e7eb;
}

/* grid */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.26) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.26) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: rgba(10, 15, 20, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,255,180,0.1);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
}

/* LEFT GROUP */
.nav-left {
  display: flex;
  align-items: center;
  gap: 52px; /* space between logo and menu */
}

/* LOGO IMAGE */
.logo-container {
  display: flex;
  align-items: left;
}

.logo-img {
  width: 225px;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(0,255,180,0.4));
  transition: 0.3s;
}

/* hover logo */
.logo-container:hover .logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px rgba(0,255,180,0.9));
}

/* MENU class */
.nav {
  display: flex;
  gap: 28px;
}

.nav-center {
  justify-self: center;
  display: flex;
  gap: 32px;
}

/* RIGHT */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  letter-spacing: 0.02em;
  font-size: 14px;
}

.nav-link:hover {
  color: #00ffb4;
  text-shadow: 0 0 8px rgba(0,255,180,0.8);
}

/* underline animation */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: #00ffb4;
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 20px 40px;
  background: #0a0f14;
}

.mobile-menu a {
  padding: 12px 0;
  text-decoration: none;
  color: #cfd8dc;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
    display: none;
    }

    .nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: 0.02em;
    font-size: 14px;
    }

    .nav-left {
    gap: 10px;
    }

    .nav-right {
    gap: 0;
    }
    
    .nav-container {
    padding: 10px 0px;
    }

    .menu-toggle {
    display: block;
    }

    .mobile-menu.active {
    display: flex;
    }

    .mobile-menu a {
        text-align: center;
    }

    .logo-img {
    width: 225px;
    }

    #grid-bg {
        opacity: 0.111;
    }

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image:
            linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
        background-size: 40px 40px;
        pointer-events: none;

         /* 👇 THIS FIXES EDGE CUT */
        -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
        mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    }

    .mobile-menu a:last-child {
    margin-top: 10px;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    font-weight: 500;
    }

    .mobile-menu a:last-child:hover {
    background: rgba(34, 211, 238, 0.25);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
    }
}

/* glow */
.glow {
    box-shadow: 0 0 30px rgba(0, 224, 255, 0.18);
}

/* glass */
.glass {
    background: rgba(255,255,255,0.025);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.05);
}

/* hover */
.card {
    transform: translateY(0);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 35px rgba(0, 224, 255, 0.25);
}

/* smooth */
* {
    transition: all 0.25s ease;
}

#terminal-container {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#terminal::after {
  content: "_";
  animation: blink 1s infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

#particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.15;
}

a {
    position: relative;
}

a:hover {
    color: #006674;
}

a:hover::after {
    width: 100%;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

#grid-bg,
#particles,
body::before {
    top: 0;
    left: 0;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease;
}

#grid-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;

    background-image:
        linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.16) 1px, transparent 1px);

    background-size: 30px 30px;

    transition: transform 0.2s ease-out;
}

@media (min-width: 768px) {
    #grid-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;

    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);

    background-size: 40px 40px;

    transition: transform 0.2s ease-out;
    }

    #particles {
        opacity: 0.15;
    }
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image:
            linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
        background-size: 40px 40px;
        pointer-events: none;
    }

}

.lang-btn {
  color: #9ca3af;
  transition: 0.2s;
}

.lang-btn:hover {
  color: #22d3ee;
}

.lang-btn.active {
  color: #22d3ee;
  text-shadow: 0 0 6px rgba(34,211,238,0.6);
}

.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .desktop-only {
    display: inline;
  }
}