/* ==============================================
   BASE
   ============================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0a0f1a;
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  margin: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0f1a; }
::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* ==============================================
   ANIMATIONS
   ============================================== */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes slideUp {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==============================================
   REUSABLE COMPONENTS
   ============================================== */

/* Scroll-reveal */
.reveal-card {
  opacity: 0;
}
.reveal-card.visible {
  animation: slideUp 0.5s ease-out forwards;
}

/* Hero element fade-in (driven by JS setTimeout) */
.hero-animate {
  opacity: 0;
}

/* Card lift on hover */
.card-hover {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
}

/* Badge scale on hover */
.badge-hover {
  transition: filter 0.2s ease, transform 0.2s ease;
}
.badge-hover:hover {
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.6));
  transform: scale(1.05);
}

/* ==============================================
   NAVIGATION
   ============================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 15, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e3a5f;
}

.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 1.125rem;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease;
}
.nav-brand:hover {
  color: #3b82f6;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  overflow-x: auto;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}
.nav-link:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link--active {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
}

.nav-cta {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.07);
}
.nav-cta:hover {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.55);
}

/* ==============================================
   INTRO SPLASH
   ============================================== */
#intro {
  height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 3.75rem;
  padding-bottom: 3rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.intro-line {
  margin: 0;
  line-height: 1.2;
  font-size: 1.75rem;
  font-weight: 400;
}

.intro-line--q {
  color: #94a3b8;
}

.intro-line--a {
  color: #ffffff;
  font-weight: 600;
}

.intro-cta {
  margin-top: 1rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: #3b82f6;
  opacity: 0.7;
  text-decoration: none;
  animation: scroll-bounce 1.5s ease-in-out infinite;
  transition: opacity 0.2s;
}

.scroll-indicator:hover {
  opacity: 1;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ==============================================
   HERO
   ============================================== */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 3.75rem;
  overflow: hidden;
}

/* Subtle grid texture */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Fade to background at the bottom */
#hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, #0a0f1a);
  pointer-events: none;
}

.hero-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1.25rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #3b82f6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
}

.hero-headline {
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 2.75rem;
  line-height: 1.1;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 1.25rem 0;
}

.hero-sub {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #94a3b8;
  margin: 0 0 2rem 0;
  max-width: 32rem;
}

.hero-actions {
  margin-bottom: 1.75rem;
}

.btn-primary {
  display: inline-block;
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  color: #ffffff;
  background: #3b82f6;
  border-radius: 0.5rem;
  padding: 0.75rem 1.75rem;
  text-decoration: none;
  transition: background 200ms ease, transform 150ms ease, box-shadow 200ms ease;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.45);
}

.hero-trust {
  font-size: 0.8125rem;
  color: #4b5563;
  margin: 0;
  font-style: italic;
}

/* Photo */
.hero-photo-wrapper {
  position: relative;
  flex-shrink: 0;
  align-self: center;
}

.photo-glow {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
  filter: blur(20px);
  z-index: 0;
}

.photo-frame {
  position: relative;
  z-index: 10;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.18);
  transition: box-shadow 300ms ease, border-color 300ms ease;
}
.photo-frame:hover {
  border-color: rgba(59, 130, 246, 0.75);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.35);
}

.photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 300ms ease;
}
.photo-frame:hover .photo-img {
  transform: scale(1.05);
}

/* About section photo frame variant */
.photo-frame--about {
  width: 9rem;
  height: 9rem;
  border-radius: 0.875rem;
}

/* ==============================================
   SHARED SECTION STYLES
   ============================================== */
.section-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-heading {
  margin-bottom: 3rem;
}

.section-label {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  color: #3b82f6;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 0.625rem 0;
}

.section-title {
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
}

.section-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: #64748b;
  margin: 0.875rem 0 0 0;
  max-width: 48rem;
}

/* Shared tech tags used in services, projects */
.stag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  background: rgba(59, 130, 246, 0.07);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  white-space: nowrap;
}

/* ==============================================
   PROBLEMS
   ============================================== */
#problems {
  padding: 6rem 0;
  background: rgba(26, 34, 52, 0.35);
}

.problems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.problem-card {
  background: #1a2234;
  border: 1px solid #1e3a5f;
  border-left: 3px solid #f59e0b;
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.problem-card:hover {
  border-left-color: #f59e0b;
}

.problem-number {
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 2rem;
  color: rgba(245, 158, 11, 0.25);
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
  margin-top: 0.125rem;
}

.problem-text {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin: 0.25rem 0 0 0;
}

/* ==============================================
   SERVICES
   ============================================== */
#services {
  padding: 6rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: #1a2234;
  border: 1px solid #1e3a5f;
  border-radius: 0.75rem;
  padding: 1.75rem;
}

.service-icon {
  width: 2.25rem;
  height: 2.25rem;
  color: #3b82f6;
  margin-bottom: 1.125rem;
}
.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-title {
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 0.625rem 0;
  line-height: 1.3;
}

.service-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: #94a3b8;
  margin: 0 0 1.25rem 0;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ==============================================
   WORK
   ============================================== */
#work {
  padding: 6rem 0;
  background: rgba(26, 34, 52, 0.35);
}

.clients-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 3rem;
  padding: 1.25rem 1.5rem;
  background: #1a2234;
  border: 1px solid #1e3a5f;
  border-radius: 0.75rem;
}

.clients-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.client-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  color: #e2e8f0;
}

.dot-sep {
  color: #3b82f6;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.project-card {
  background: #1a2234;
  border: 1px solid #1e3a5f;
  border-radius: 0.75rem;
  padding: 1.75rem;
}

.project-title {
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 0.625rem 0;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: #94a3b8;
  margin: 0 0 1.25rem 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ==============================================
   ABOUT
   ============================================== */
#about {
  padding: 6rem 0;
}

.about-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-photo-wrapper {
  flex-shrink: 0;
}

.about-p {
  font-size: 1rem;
  line-height: 1.8;
  color: #cbd5e1;
  margin: 0 0 1rem 0;
}
.about-p:last-of-type {
  margin-bottom: 1.5rem;
}

.about-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

.about-email {
  font-size: 0.9rem;
  color: #3b82f6;
  text-decoration: none;
  transition: color 150ms ease;
}
.about-email:hover {
  color: #60a5fa;
}

.about-linkedin {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #64748b;
  text-decoration: none;
  transition: color 150ms ease;
}
.about-linkedin:hover {
  color: #94a3b8;
}

/* ==============================================
   CERTIFICATIONS
   ============================================== */
#certifications {
  padding: 6rem 0;
  background: rgba(26, 34, 52, 0.35);
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.cert-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  background: #1a2234;
  border: 1px solid #1e3a5f;
  border-radius: 0.75rem;
  padding: 2rem 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.cert-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12);
}

.cert-badge {
  display: block;
  margin-bottom: 1rem;
}

.cert-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #ffffff;
  margin: 0 0 0.25rem 0;
}

.cert-subtitle {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  color: #3b82f6;
  margin: 0;
}

/* ==============================================
   CTA SECTION
   ============================================== */
#contact {
  padding: 6rem 0;
}

.cta-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.07) 0%, rgba(26, 34, 52, 0.5) 100%);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 1rem;
  padding: 3rem 1.75rem;
  text-align: center;
}

.cta-headline {
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 2rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 1rem 0;
  line-height: 1.25;
}

.cta-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: #94a3b8;
  max-width: 38rem;
  margin: 0 auto 2rem auto;
}

/* ==============================================
   FOOTER
   ============================================== */
.site-footer {
  border-top: 1px solid #1e3a5f;
  padding: 2rem 0;
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: #475569;
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: #475569;
  text-decoration: none;
  transition: color 150ms ease;
}
.footer-link:hover {
  color: #94a3b8;
}

/* ==============================================
   HAMBURGER MENU (mobile only)
   ============================================== */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* X state */
.site-header.nav-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header.nav-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.site-header.nav-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav dropdown */
.nav-links {
  display: none;
  position: absolute;
  top: 3.75rem;
  left: 0;
  right: 0;
  flex-direction: column;
  background: rgba(10, 15, 26, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e3a5f;
  padding: 0.75rem 1.25rem 1.25rem;
  gap: 0.25rem;
}

.site-header.nav-open .nav-links {
  display: flex;
}

.site-header.nav-open .nav-link {
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
}

/* ==============================================
   MOBILE ONLY (below 640px)
   ============================================== */
@media (max-width: 639px) {
  #intro {
    height: 100svh;
  }
}

/* ==============================================
   RESPONSIVE — sm breakpoint (640px)
   ============================================== */
@media (min-width: 640px) {

  /* Intro */
  .intro-line {
    font-size: 2.75rem;
  }

  /* Nav */
  .nav-inner {
    padding: 0 2rem;
  }
  .nav-hamburger {
    display: none;
  }
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    padding: 0;
    gap: 0.25rem;
  }
  .site-header.nav-open .nav-link {
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
  }

  /* Hero */
  .hero-container {
    padding: 5rem 2rem;
  }
  .hero-layout {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
  }
  .hero-text {
    max-width: 34rem;
  }
  .hero-headline {
    font-size: 3.75rem;
  }
  .hero-sub {
    font-size: 1.125rem;
  }
  .photo-frame {
    width: 13rem;
    height: 13rem;
  }

  /* Sections */
  .section-inner {
    padding: 0 2rem;
  }
  .section-title {
    font-size: 2.5rem;
  }

  /* Problems */
  .problems-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Services */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Work */
  .clients-row {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* About */
  .about-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }
  .photo-frame--about {
    width: 11rem;
    height: 11rem;
  }

  /* Certifications */
  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* CTA */
  .cta-card {
    padding: 4.5rem 3rem;
  }
  .cta-headline {
    font-size: 2.5rem;
  }

  /* Footer */
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 2rem;
  }
}
