/* ==========================================================================
   CSS Variables - Color Palette & Typography
   ========================================================================== */
:root {
  /* Primary Colors */
  --color-bg-dark: #2F2E2E;
  --color-bg-darker: #1a1a1a;
  --color-white: #FFFFFF;
  --color-accent-blue: #3D9BE9;
  --color-accent-gold: #F3AF56;

  /* Gray Scale */
  --color-gray-light: #A0A09F;
  --color-gray-mid: #605E5E;
  --color-gray-dark: #47464B;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;

  /* Spacing */
  --container-width: 980px;
  --section-padding: 80px 0;
}

/* ==========================================================================
   Accessibility Utilities
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.4;
  color: var(--color-white);
  background-color: var(--color-bg-dark);
  background-image: url('img/bg_new.avif');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.1em;
}

h1 {
  font-size: 48px;
  margin-bottom: 16px;
}

h2 {
  font-size: 44px;
  text-align: center;
  margin-bottom: 20px;
}

h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

h4 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--color-white);
}

p {
  margin-bottom: 16px;
  line-height: 1.5;
}

.highlight {
  color: var(--color-accent-blue);
}

.highlight-gold {
  color: var(--color-accent-gold);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 1000;
  background: transparent;
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 1;
}

.nav-container .social-bar {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.logo-img {
  height: 36px;
  width: auto;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-white);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--color-white);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--color-accent-gold);
}

.social-bar a {
  color: var(--color-white);
  transition: color 0.3s ease;
}

.social-bar a:hover {
  color: var(--color-accent-blue);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  position: relative;
  transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  left: 0;
  transition: transform 0.3s ease;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

/* Hamburger animation when open */
.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active .hamburger::after {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  min-height: auto;
  padding: 80px 20px 40px;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: start;
}

.hero-image {
  position: sticky;
  top: 120px;
}

.profile-photo {
  width: 178px;
  height: 178px;
  border-radius: 50%;
  border: 1px solid var(--color-accent-gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  object-fit: cover;
  filter: grayscale(100%);
}

.hero-text h1 {
  font-size: 32px;
  letter-spacing: 0.05em;
}

.tagline {
  font-size: 15px;
  color: #D0D0D0;
  margin-bottom: 20px;
  line-height: 1.4;
}

.hero-divider {
  height: 1px;
  background: var(--color-gray-dark);
  margin-bottom: 20px;
}

.role-divider {
  height: 1px;
  background: var(--color-gray-mid);
  margin: 12px 0;
  opacity: 0.5;
}

.current-role, .past-roles {
  margin-bottom: 24px;
}

.current-role p, .past-roles p {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.6;
}

.arrow {
  color: var(--color-accent-gold);
  margin-right: 8px;
}

.current-role .label,
.past-roles .label {
  color: var(--color-gray-light);
  font-size: 18px;
  margin-bottom: 12px;
}

.certifications {
  font-size: 16px;
  color: var(--color-gray-light);
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-gray-dark);
}

/* ==========================================================================
   Quote Section
   ========================================================================== */
.quote-section {
  padding: 30px 20px 20px;
  background: rgba(47, 46, 46, 0.8);
}

.quote-section .container {
  text-align: center;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gray-mid), transparent);
  margin: 30px 0;
}

blockquote {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.6;
  color: var(--color-white);
  max-width: 900px;
  margin: 0 auto;
}

/* ==========================================================================
   Who I Am Section
   ========================================================================== */
.who-section {
  padding: var(--section-padding);
  background: rgba(47, 46, 46, 0.4);
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--color-white);
  margin: 0 auto 50px;
}

.who-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.vertical-line {
  width: 3px;
  min-height: 300px;
  background: linear-gradient(180deg, var(--color-accent-blue), transparent);
  flex-shrink: 0;
}

.who-text .lead {
  font-size: 28px;
  line-height: 1.4;
  margin-bottom: 32px;
}

.who-text p {
  font-size: 22px;
  line-height: 1.5;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-section {
  padding: var(--section-padding);
  background: rgba(47, 46, 46, 0.8);
}

#services {
  padding-top: 20px;
}

.services-icon {
  text-align: center;
  margin-bottom: 10px;
}

.services-subtitle {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--color-accent-gold);
  margin-bottom: 30px;
  line-height: 1.4;
}

.services-intro {
  text-align: center;
  font-size: 18px;
  color: var(--color-white);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

/* ==========================================================================
   Success Stories Section
   ========================================================================== */
.stories-section {
  padding: var(--section-padding);
  background: rgba(47, 46, 46, 0.4);
}

/* Featured Story */
.featured-story {
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--color-gray-dark);
}

.featured-icon {
  margin-bottom: 16px;
}

.featured-subtitle {
  font-size: 20px;
  color: var(--color-accent-blue);
  margin-bottom: 40px;
  font-weight: 600;
}

.featured-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 40px;
  text-align: left;
}

.featured-cell {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(150, 150, 150, 0.3);
}

.featured-cell p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.featured-cell:nth-last-child(-n+2) {
  border-bottom: none;
  padding-bottom: 0;
}

/* Stories Grid */
.stories-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.story-card {
  flex: 0 1 300px;
  text-align: center;
  padding: 30px 20px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.story-card:hover {
  transform: translateY(-5px);
  background: rgba(0, 0, 0, 0.2);
}

.story-icon {
  margin-bottom: 16px;
}

.story-card h4 {
  font-size: 18px;
  color: var(--color-accent-blue);
  margin-bottom: 16px;
  font-weight: 600;
}

.story-card p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  color: var(--color-white);
}

/* ==========================================================================
   Tech Logos Section
   ========================================================================== */
.tech-section {
  padding: 60px 20px;
  background: rgba(47, 46, 46, 0.4);
}

.tech-header {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-light);
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}

.tech-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.tech-logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-gray-light);
  transition: color 0.3s ease;
}

.tech-logo:hover {
  color: var(--color-white);
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.testimonials-section {
  padding: var(--section-padding);
  background: rgba(47, 46, 46, 0.8);
}

.carousel {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.carousel-track-container {
  flex: 1;
  overflow: hidden;
  border-radius: 8px;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-slide img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.carousel-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--color-white);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-gray-mid);
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.carousel-dot:hover {
  background: var(--color-gray-light);
}

.carousel-dot.active {
  background: var(--color-accent-blue);
}

@media (max-width: 768px) {
  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .carousel {
    gap: 10px;
  }
}

/* ==========================================================================
   Scroll Navigation
   ========================================================================== */
.scroll-nav {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

.scroll-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-gray-mid);
  transition: background 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.scroll-nav-dot:hover {
  background: var(--color-gray-light);
  transform: scale(1.3);
}

.scroll-nav-dot.active {
  background: var(--color-accent-blue);
}

@media (max-width: 768px) {
  .scroll-nav {
    display: none;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 60px 20px;
  background: var(--color-bg-darker);
  border-top: 1px solid var(--color-gray-dark);
}

.footer-content {
  text-align: center;
}

.footer-content .social-bar {
  margin-bottom: 20px;
}

.footer-content .social-bar a {
  display: inline-block;
}

.footer-contact {
  margin-bottom: 20px;
}

.footer-contact .protected-email {
  display: block;
  color: var(--color-accent-blue);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.footer-contact .protected-email:hover {
  color: var(--color-accent-gold);
}

.footer-contact p {
  font-size: 14px;
  color: var(--color-gray-light);
  margin: 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.copyright {
  font-size: 14px;
  color: var(--color-gray-light);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
  /* Fix iOS Safari background-attachment: fixed performance issue */
  body {
    background-attachment: scroll;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-image {
    position: relative;
    top: 0;
    display: flex;
    justify-content: center;
  }


  .featured-content {
    grid-template-columns: 1fr;
  }

  .featured-cell {
    border-bottom: 1px solid rgba(150, 150, 150, 0.3);
    padding-bottom: 20px;
  }

  .featured-cell:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    border-top: 1px solid var(--color-gray-dark);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--color-gray-dark);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 18px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 32px;
  }

  .hero-section {
    padding: 40px 20px 60px;
  }

  .hero-text h1 {
    font-size: 28px;
    text-align: center;
  }

  .tagline {
    text-align: center;
  }

  blockquote {
    font-size: 16px;
  }

  .who-content {
    flex-direction: column;
  }

  .vertical-line {
    width: 100%;
    height: 3px;
    min-height: auto;
    background: linear-gradient(90deg, var(--color-accent-blue), transparent);
  }

  .who-text .lead {
    font-size: 22px;
  }

  .who-text p {
    font-size: 18px;
  }

  .stories-grid .story-card {
    flex: 0 1 100%;
  }

  .tech-logos {
    gap: 30px;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 60px 0;
  }

  h2 {
    font-size: 28px;
  }

  .profile-photo {
    width: 146px;
    height: 146px;
  }

  .story-card {
    padding: 20px 16px;
  }

  .story-card p {
    font-size: 15px;
  }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.fade-up {
  transform: translateY(40px);
}

.reveal.fade-left {
  transform: translateX(-40px);
}

.reveal.fade-right {
  transform: translateX(40px);
}

.reveal.fade-scale {
  transform: scale(0.95);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Staggered animation delays for grid items */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.5s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal.fade-up,
  .reveal.fade-left,
  .reveal.fade-right,
  .reveal.fade-scale {
    transform: none;
  }
}

/* ==========================================================================
   Dropdown Navigation
   ========================================================================== */
.nav-dropdown { position: relative; }
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -16px;
  right: -16px;
  height: 10px;
}
.dropdown-arrow { font-size: 12px; margin-left: 4px; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  background: rgba(26, 26, 26, 0.98);
  min-width: 220px;
  list-style: none;
  border-top: 2px solid var(--color-accent-blue);
  border-radius: 0 0 8px 8px;
  z-index: 100;
}

.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-gray-dark);
}

.dropdown-menu li:last-child a { border-bottom: none; }

@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    border-top: none;
    padding-left: 16px;
    background: transparent;
  }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.active .dropdown-menu { display: block; }
}

/* ==========================================================================
   Service Cards
   ========================================================================== */
.services-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  text-align: center;
  padding: 30px 20px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  background: rgba(0, 0, 0, 0.2);
}

.service-card-icon {
  margin-bottom: 16px;
}

.service-card h4 {
  font-size: 18px;
  color: var(--color-accent-blue);
  margin-bottom: 12px;
  font-weight: 600;
}

.service-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-white);
  flex: 1;
  margin-bottom: 20px;
}

.btn-service {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--color-accent-blue);
  color: var(--color-accent-blue);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
  align-self: center;
}

.btn-service:hover {
  background: var(--color-accent-blue);
  color: var(--color-white);
}

@media (max-width: 1024px) { .services-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .services-cards { grid-template-columns: 1fr; } }

/* 7th, 8th, and 9th stagger delays */
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.6s; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 0.7s; }
.reveal-stagger > .reveal:nth-child(9) { transition-delay: 0.8s; }

/* ==========================================================================
   Service Tiers Table
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
  margin: 30px 0;
}

.service-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 500px;
}

.service-table th {
  background: rgba(61, 155, 233, 0.12);
  color: var(--color-accent-blue);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-family: var(--font-heading);
  border-bottom: 2px solid var(--color-accent-blue);
  white-space: nowrap;
}

.service-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-gray-dark);
  color: var(--color-white);
  vertical-align: top;
  line-height: 1.5;
}

.service-table td:first-child {
  color: var(--color-gray-light);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.service-table tr:last-child td {
  border-bottom: none;
}

.service-table tr:hover td {
  background: rgba(61, 155, 233, 0.05);
}

/* ==========================================================================
   Service Page Hero
   ========================================================================== */
.service-hero {
  padding: 80px 20px 60px;
  text-align: center;
}

.service-hero-icon {
  margin-bottom: 20px;
}

.service-hero h1 { font-size: 40px; color: var(--color-accent-gold); margin-bottom: 16px; }
.service-hero p { font-size: 20px; max-width: 700px; margin: 0 auto; color: var(--color-gray-light); }
