@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --navy: #050d1a;
  --navy-2: #0a1628;
  --cyan: #00c8ff;
  --cyan-dim: #0097c4;
  --green: #00e676;
  --card-bg: rgba(255, 255, 255, 0.07);
  --border: rgba(0, 200, 255, 0.2);
}

.text-slate-400 { color: #cbd5e1 !important; } /* Lighter slate for better dark mode visibility */
.text-slate-500 { color: #94a3b8 !important; }

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--navy);
  color: #e2e8f0;
  overflow-x: hidden;
}

/* PARTICLES */
#particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0;
  animation: float-up linear infinite;
}

@keyframes float-up {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.2;
  }

  100% {
    transform: translateY(-100vh) scale(0.3);
    opacity: 0;
  }
}

/* NAV */
#navbar {
  transition: background 0.4s, box-shadow 0.4s;
}

#navbar.scrolled {
  background: rgba(5, 13, 26, 0.92) !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 32px rgba(0, 200, 255, 0.08);
}

.nav-link {
  position: relative;
  color: #94a3b8;
  font-weight: 500;
  transition: color 0.2s;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width 0.3s;
}

.nav-link:hover {
  color: var(--cyan);
}

.nav-link:hover::after {
  width: 100%;
}

/* HERO */
.hero-bg {
  background: radial-gradient(ellipse at 60% 50%, #0d2d50 0%, var(--navy) 70%);
}

.hero-grid {
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.glow-text {
  text-shadow: 0 0 40px rgba(0, 200, 255, 0.4);
}

.cyan-badge {
  display: inline-block;
  background: rgba(0, 200, 255, 0.1);
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: var(--cyan);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.pulse-ring {
  animation: pulse-ring 2s ease-out infinite;
}

/* SECTION HEADINGS */
.section-tag {
  display: inline-block;
  background: rgba(0, 200, 255, 0.08);
  border: 1px solid rgba(0, 200, 255, 0.25);
  color: var(--cyan);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.section-title span {
  color: var(--cyan);
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  border-radius: 2px;
  margin-top: 12px;
}

/* CARDS */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 200, 255, 0.5);
  box-shadow: 0 16px 48px rgba(0, 200, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.glass-card:hover::before {
  opacity: 1;
}

.about-stat-badge {
  background: rgba(10, 22, 40, 0.95) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 200, 255, 0.3) !important;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.2), rgba(0, 200, 255, 0.05));
  border: 1px solid rgba(0, 200, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
  transition: transform 0.3s;
}

.glass-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

/* STATS */
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
}

/* PROJECTS */
.project-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover img {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 13, 26, 0.95) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s;
}

.project-card:hover .project-overlay {
  transform: translateY(0);
  opacity: 1;
}

/* Project tag pill inside overlay */
.project-tag-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  background: rgba(0, 200, 255, 0.12);
  border: 1px solid rgba(0, 200, 255, 0.35);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 4px;
  width: fit-content;
}

/* PORTFOLIO FILTER BUTTONS */
.portfolio-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 200, 255, 0.2);
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Inter', sans-serif;
}

.portfolio-filter-btn:hover {
  border-color: rgba(0, 200, 255, 0.5);
  color: var(--cyan);
  background: rgba(0, 200, 255, 0.07);
}

.portfolio-filter-btn.active {
  background: linear-gradient(135deg, #00a8d4, #00c8ff);
  border-color: var(--cyan);
  color: #050d1a;
  font-weight: 700;
}

/* Portfolio item show/hide with animation */
.portfolio-item {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.portfolio-item.hidden-item {
  display: none;
}

/* WHY */
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.check-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
}

/* CLIENTS */
.client-logo {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 28px;
  background: var(--card-bg);
  font-weight: 600;
  color: #64748b;
  text-align: center;
  transition: all 0.3s;
}

.client-logo:hover {
  border-color: rgba(0, 200, 255, 0.4);
  color: var(--cyan);
  background: rgba(0, 200, 255, 0.06);
}

/* CONTACT */
.form-input {
  width: 100%;
  background: rgba(10, 22, 40, 0.6) !important;
  border: 1px solid rgba(0, 200, 255, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s;
  outline: none;
  appearance: none;
}

/* Fix for Select Options in Dark Mode */
.form-input option {
  background-color: #0a1628;
  color: #e2e8f0;
}

/* Fix for Chrome/Safari Auto-fill Background */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e2e8f0;
  -webkit-box-shadow: 0 0 0px 1000px #0a1628 inset;
  transition: background-color 5000s ease-in-out 0s;
}

.form-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.1);
}

.form-input::placeholder {
  color: #475569;
}

textarea.form-input {
  resize: vertical;
  min-height: 130px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #00a8d4, #00c8ff);
  color: #050d1a;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 200, 255, 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--cyan);
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(0, 200, 255, 0.1);
  transform: translateY(-2px);
}

/* FOOTER */
footer {
  background: #030911;
  border-top: 1px solid rgba(0, 200, 255, 0.1);
}

.footer-link {
  color: #64748b;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--cyan);
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
}

.fade-up.visible {
  animation: fadeUp 0.6s ease forwards;
}

/* MOBILE MENU */
#mobile-menu {
  display: none;
}

#mobile-menu.open {
  display: block;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--navy-2);
}

::-webkit-scrollbar-thumb {
  background: var(--cyan-dim);
  border-radius: 3px;
}

@media (max-width: 768px) {
  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

/* ==========================================
   LIGHT THEME OVERRIDES (POLISHED)
   ========================================== */
body.light-theme {
  --navy: #f8fafc;
  --navy-2: #ffffff;
  --cyan: #0088cc;
  /* Darker cyan for better contrast on white */
  --cyan-dim: #006699;
  --card-bg: #ffffff;
  --border: rgba(0, 136, 204, 0.1);
  background: var(--navy);
  color: #334155;
}

body.light-theme .text-slate-200,
body.light-theme .text-slate-300,
body.light-theme .text-slate-400,
body.light-theme .text-slate-500 {
  color: #475569 !important;
}

body.light-theme .text-white,
body.light-theme .section-title {
  color: #0f172a !important;
}

body.light-theme .nav-link {
  color: #475569;
}

body.light-theme .nav-link:hover {
  color: var(--cyan);
}

/* Invert Background classes */
body.light-theme .bg-\[\#050d1a\],
body.light-theme .bg-\[\#070e1c\],
body.light-theme .bg-\[\#0a1628\] {
  background: var(--navy) !important;
}

body.light-theme .bg-white\/5 {
  background: rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .border-white\/10 {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Hero Grids & Gradients */
body.light-theme .hero-bg {
  background: radial-gradient(ellipse at 60% 50%, #e2e8f0 0%, #f8fafc 70%);
}

body.light-theme .hero-grid {
  background-image:
    linear-gradient(rgba(0, 136, 204, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 136, 204, 0.04) 1px, transparent 1px);
}

/* Cards & Components */
body.light-theme .glass-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 136, 204, 0.1) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .glass-card:hover {
  border-color: var(--cyan) !important;
  box-shadow: 0 20px 40px -15px rgba(0, 136, 204, 0.15) !important;
}

body.light-theme .section-tag,
body.light-theme .cyan-badge {
  background: rgba(0, 136, 204, 0.08);
  border-color: rgba(0, 136, 204, 0.2);
  color: var(--cyan);
}

body.light-theme .hero-pills span {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  color: #475569 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

body.light-theme .service-icon {
  background: rgba(0, 136, 204, 0.05) !important;
  border-color: rgba(0, 136, 204, 0.1) !important;
}

body.light-theme .form-input {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

body.light-theme .form-input:focus {
  border-color: var(--cyan) !important;
}

body.light-theme #navbar.scrolled {
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme footer {
  background: #f1f5f9 !important;
  border-top: 1px solid #e2e8f0 !important;
}

body.light-theme .footer-link {
  color: #64748b;
}

body.light-theme .footer-link:hover {
  color: var(--cyan);
}

/* Contact Icon Boxes Light Mode */
body.light-theme .bg-cyan-500\/10 {
  background: rgba(0, 136, 204, 0.08) !important;
}
body.light-theme .border-cyan-500\/20 {
  border-color: rgba(0, 136, 204, 0.15) !important;
}

body.light-theme .client-logo {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme #lang-dropdown {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.light-theme #lang-dropdown button:hover {
  background: #f8fafc !important;
}

body.light-theme .btn-outline {
  border-color: var(--cyan);
  color: var(--cyan);
}

body.light-theme .btn-outline:hover {
  background: rgba(0, 136, 204, 0.05);
}

body.light-theme .project-overlay {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, transparent 60%);
}

body.light-theme .project-overlay h3 {
  color: #0f172a !important;
}

body.light-theme .project-overlay p {
  color: #475569 !important;
}

body.light-theme .check-icon {
  background: rgba(0, 230, 118, 0.1);
  border-color: rgba(0, 230, 118, 0.2);
}

/* Specific Utility Overrides */
body.light-theme .bg-\[\#0a1628\]\/80 {
  background: rgba(255, 255, 255, 0.95) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .border-cyan-900\/30 {
  border-color: rgba(0, 136, 204, 0.1) !important;
}

/* Improve section title contrast in background or muted areas */
body.light-theme .text-slate-400 {
  color: #64748b !important;
}

body.light-theme .text-slate-500 {
  color: #475569 !important;
}

/* Fix Hero Pills shadow and borders */
body.light-theme .hero-pills span {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

/* Testimonial adjustments */
body.light-theme .text-slate-300 {
  color: #334155 !important;
}

/* Heading Highlights */
body.light-theme .section-title span {
  color: #0088cc !important;
}

/* Portfolio filter buttons — light mode */
body.light-theme .portfolio-filter-btn {
  background: #f8fafc;
  border-color: rgba(0, 136, 204, 0.2);
  color: #475569;
}

body.light-theme .portfolio-filter-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 136, 204, 0.06);
}

body.light-theme .portfolio-filter-btn.active {
  background: linear-gradient(135deg, #0077bb, #0099dd);
  border-color: var(--cyan);
  color: #ffffff;
}

body.light-theme .project-tag-pill {
  background: rgba(0, 136, 204, 0.1);
  border-color: rgba(0, 136, 204, 0.25);
  color: var(--cyan);
}