/* =========================
   RESET / BASE
========================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --background: #ffffff;
  --foreground: #000000;

  --primary: #165AF6;
  --purple: #8b5cf6;
  --green: #22c55e;
  --orange: #f97316;

  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --card: #fafafa;

  --radius: 0.75rem;
  --shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 40px -8px rgba(0, 0, 0, 0.15);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =========================
   NAVIGATION
========================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #165AF6;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* IMPORTANT: container must be relative for absolute dropdown */
.navbar .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 99px;
}

.logo {
  font-size: 1.45rem;
  font-weight: 800;
  color: white;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.975rem;
  font-weight: 600;
  color: white;
  transition: color 0.2s;
  position: relative;
  padding: 0.5rem 0;
}

/* underline */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 3px;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Hover effect */
.nav-links a:hover::after {
  width: 100%;
}

/* Permanent underline for active link */
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--foreground);
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.03);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* =========================
   MOBILE MENU (OVERLAY VERSION)
========================= */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;

  z-index: 9999;

  /* overlay design */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);

  /* animation */
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

/* open state */
.mobile-menu.active {
  max-height: 420px;
  padding: 1rem 1.5rem 1.25rem;
}

/* Mobile links */
.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0.75rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted-foreground);
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu a:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* Active link styling on mobile */
.mobile-menu a.active {
  background: rgba(22, 90, 246, 0.1);
  color: var(--foreground);
  position: relative;
  padding-left: 1.5rem;
}

.mobile-menu a.active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
  position: absolute;
  left: 10px;
}

/* Mobile menu divider */
.mobile-menu .menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

/* show desktop nav */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .mobile-menu {
    display: none;
  }
}

/* give navbar better height on mobile */
@media (max-width: 767px) {
  .navbar .container {
    height: 96px;
  }

  .logo {
    font-size: 1.25rem;
  }
}

/* =========================
   BUTTONS
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.btn:hover svg {
  transform: translateX(4px);
}

/* Light theme buttons */
.btn-primary {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--foreground);
}

.btn-outline:hover {
  background: var(--foreground);
  color: var(--background);
}

/* Dark section buttons */
.btn-white {
  background: var(--background);
  color: var(--foreground);
  border-color: var(--background);
}

.btn-white:hover {
  opacity: 0.9;
}

.btn-outline-white {
  background: transparent;
  color: var(--background);
  border-color: var(--background);
}

.btn-outline-white:hover {
  background: var(--background);
  color: var(--foreground);
}

/* =========================
   HERO (LIGHT)
========================= */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.hero h1 span {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease-out forwards;
}

.hero h1 span:nth-child(1) { animation-delay: 0ms; }
.hero h1 span:nth-child(2) { animation-delay: 100ms; }
.hero h1 span:nth-child(3) { animation-delay: 200ms; }

.text-gradient {
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto 3rem;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease-out 300ms forwards;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease-out 400ms forwards;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .hero-dark {
    text-align: center;
    margin-top: -40px !important;
  }
}

/* =========================
   HERO (DARK)
========================= */
.hero-dark {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  color: #ffffff;
  padding: 8rem 1.5rem 5rem;
  text-align: center;
  margin-top: 50px;
}

.hero-dark h1 {
  font-size: clamp(2.7rem, 8vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease-out forwards;
}

.hero-dark p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 700px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease-out 100ms forwards;
}

/* =========================
   SECTION HEADER
========================= */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--muted-foreground);
  max-width: 500px;
  margin: 0 auto;
}

/* =========================
   PROJECTS
========================= */
.projects {
  padding: 5rem 0;
}

.projects-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease-out;
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.project-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--muted);
}

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

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

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-content p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-tag {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--muted);
  border-radius: 9999px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: gap 0.2s;
}

.project-link:hover {
  gap: 0.5rem;
  color: var(--primary);
}

.project-link svg {
  width: 16px;
  height: 16px;
}

.view-all {
  text-align: center;
  margin-top: 3rem;
}

/* =========================
   MISSION
========================= */
.mission {
  padding: 5rem 0;
}

.mission-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .mission-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.mission-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.mission-content p {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.pillar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.pillar-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.pillar-icon.blue { background: var(--primary); }
.pillar-icon.purple { background: var(--purple); }
.pillar-icon.green { background: var(--green); }
.pillar-icon.orange { background: var(--orange); }

.pillar-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pillar-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* =========================
   VALUES
========================= */
.values {
  padding: 5rem 0;
  background: var(--muted);
}

.values-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .values-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.value-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.value-icon {
  width: 48px;
  height: 48px;
  background: var(--muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.value-icon svg {
  width: 24px;
  height: 24px;
  color: var(--foreground);
}

.value-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.value-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* =========================
   PROCESS
========================= */
.process {
  padding: 5rem 0;
}

.process-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.process-step {
  text-align: center;
  padding: 1.5rem;
}

.step-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  margin-bottom: 1rem;
}

.process-step h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* =========================
   CTA
========================= */
.cta {
  padding: 6rem 1.5rem;
  background: var(--foreground);
  color: var(--background);
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.cta p {
  opacity: 0.7;
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .cta-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* =========================
   FOOTER
========================= */
.footer {
  background: black;
  padding: 80px 40px;
  color: #cbd5e1;
  font-family: Arial, sans-serif;
}

.footer-container {
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 60px;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
}

.logo-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 85px;
  height: 85px;
  background: #ffffff;
  color: #071426;
  font-weight: 800;
  border-radius: 10px;
  font-size: 20px;
  padding: 10px;
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #94a3b8;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 13px;
  letter-spacing: 1px;
  color: #ffffff;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  text-decoration: none;
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 12px;
  transition: 0.3s ease;
}

.footer-col a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-contact {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 14px;
}

/* =========================
   MOBILE RESPONSIVE FOOTER
========================= */
@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 60px 20px;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-desc {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-brand .footer-logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .logo-box {
    width: 70px;
    height: 70px;
    font-size: 18px;
  }

  .logo-text {
    font-size: 16px;
  }

  .footer-col h4 {
    font-size: 14px;
  }

  .footer-col a,
  .footer-contact {
    font-size: 13px;
  }
}

/* =========================
   ANIMATIONS
========================= */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
