/* =========================================
   GLOBAL STYLES
========================================= */

:root {
  --primary: #004aad;
  --primary-light: #3b82f6;
  --dark: #020617;
  --dark-2: #071226;
  --text: #e2e8f0;
  --muted: #94a3b8;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background:
    linear-gradient(to bottom,
      #020617,
      #071226);
  color: var(--text);
  overflow-x: hidden;
}

section {
  padding: 120px 0;
  position: relative;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -1px;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: white;
}

.section-subtitle {
  display: inline-block;
  color: #60a5fa;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.section-text {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* =========================================
   SKIP LINK
========================================= */

.skip-link {
  position: absolute;
  top: -50px;
  left: 10px;
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  z-index: 9999;
  border-radius: 8px;
}

.skip-link:focus {
  top: 10px;
}

/* =========================================
   NAVBAR
========================================= */

.navbar {
  padding: 18px 0;
  background: rgba(2, 6, 23, 0.45) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(2, 6, 23, 0.92) !important;
}

.nav-link {
  color: rgba(255,255,255,0.85) !important;
  margin-left: 20px;
  transition: 0.3s ease;
}

.nav-link:hover {
  color: #60a5fa !important;
}

.logo-img {
  max-width: 240px;
}

/* =========================================
   HERO
========================================= */

.hero {
  min-height: 100vh;

  background:
    linear-gradient(
      rgba(2, 6, 23, 0.82),
      rgba(2, 6, 23, 0.9)
    ),

    url('/images/bg_desk.jpg');

  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 900px;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 24px;

  padding: 10px 18px;

  border-radius: 999px;

  background: rgba(255,255,255,0.08);

  border: 1px solid rgba(255,255,255,0.08);

  color: #93c5fd;

  font-size: 0.85rem;

  letter-spacing: 1px;

  font-weight: 600;
}

.hero-title {
  font-weight: 900;

  color: white;

  text-shadow:
    0 10px 40px rgba(0,0,0,0.5);

  margin-bottom: 24px;
}

.hero-subtitle {
  color: rgba(255,255,255,0.8);

  font-size: 1.3rem;

  line-height: 1.7;

  max-width: 720px;

  margin: 0 auto 40px auto;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================
   FLOWING BACKGROUND BLOBS
========================================= */

.hero-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: floatBlob 18s infinite ease-in-out;
}

.shape1 {
  width: 420px;
  height: 420px;
  background: #004aad;
  top: -140px;
  left: -120px;
}

.shape2 {
  width: 300px;
  height: 300px;
  background: #3b82f6;
  bottom: -100px;
  right: 10%;
  animation-delay: 5s;
}

.shape3 {
  width: 260px;
  height: 260px;
  background: #60a5fa;
  top: 25%;
  right: -80px;
  animation-delay: 10s;
}

@keyframes floatBlob {

  0% {
    transform: translate(0px, 0px);
  }

  50% {
    transform: translate(30px, -40px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

/* =========================================
   GRID OVERLAY
========================================= */

.grid-overlay {
  position: absolute;
  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;

  mask-image: linear-gradient(to bottom,
      rgba(0,0,0,0.7),
      transparent);
}

/* =========================================
   BUTTONS
========================================= */

.btn-primary {
  background:
    linear-gradient(
      135deg,
      #004aad,
      #3b82f6);

  border: none;

  border-radius: 14px;

  font-weight: 600;

  transition: all 0.3s ease;

  box-shadow:
    0 10px 30px rgba(0,74,173,0.35);
}

.btn-primary:hover {
  transform: translateY(-4px);

  box-shadow:
    0 15px 40px rgba(0,74,173,0.5);
}

.btn-outline-light {
  border-radius: 14px;
}

/* =========================================
   WORK SECTION
========================================= */

#work {
  background:
    linear-gradient(to bottom,
      #071226,
      #0f172a);
}

.section-gradient {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(circle at top left,
      rgba(0,74,173,0.18),
      transparent 35%);
}

/* =========================================
   PROJECT GRID
========================================= */

.project-stack {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.project-item {
  flex: 1 1 calc(33.333% - 30px);
}

.project-img {
  width: 100%;
  border-radius: 20px;

  border: 1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 15px 40px rgba(0,0,0,0.45);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;

  cursor: pointer;
}

.project-img:hover {
  transform: translateY(-10px) scale(1.02);

  box-shadow:
    0 25px 60px rgba(0,74,173,0.35);
}

.project-img.active {
  box-shadow:
    0 25px 60px rgba(0,74,173,0.45);
}

/* =========================================
   CONTACT SECTION
========================================= */

#contact {

  background:
    linear-gradient(
      rgba(2,6,23,0.9),
      rgba(2,6,23,0.95)
    ),

    url('/images/bg_point_cpu.jpg');

  background-size: cover;
  background-position: center;
}

.contact-overlay {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to right,
      rgba(0,74,173,0.2),
      rgba(2,6,23,0.7));
}

.contact-text {
  color: rgba(255,255,255,0.82);
  font-size: 1.2rem;
}

.contact-email {
  display: inline-block;

  margin-top: 10px;

  color: #60a5fa;

  font-size: 1.4rem;

  text-decoration: none;

  transition: 0.3s ease;
}

.contact-email:hover {
  color: white;
}

/* =========================================
   FOOTER
========================================= */

footer {
  padding: 30px 0;

  background: #020617;

  border-top:
    1px solid rgba(255,255,255,0.05);

  color: var(--muted);
}

/* =========================================
   LIGHTBOX
========================================= */

.img-overlay {
  position: fixed;
  inset: 0;

  background: rgba(2,6,23,0.82);

  backdrop-filter: blur(12px);

  display: none;

  align-items: center;
  justify-content: center;

  z-index: 3000;

  padding: 30px;
}

.img-overlay.show {
  display: flex;
}

.img-overlay img {
  max-width: 92%;
  max-height: 92%;

  border-radius: 18px;

  border: 1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 30px 80px rgba(0,0,0,0.65);
}

.close-hint {
  position: absolute;

  top: 20px;
  right: 25px;

  color: white;

  opacity: 0.8;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 992px) {

  .project-item {
    flex: 1 1 calc(50% - 30px);
  }
}

@media (max-width: 768px) {

  section {
    padding: 90px 0;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .project-item {
    flex: 1 1 100%;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-lg {
    width: 100%;
    max-width: 320px;
  }
}