/* Certifications Section */
.certifications {
  padding: 5rem 0;
  background-color: var(--bg-primary);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.cert-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.cert-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.cert-icon {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.cert-icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.cert-item h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.cert-item p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
}

:root {
  /* Light Theme Colors */
  --primary-color: #000000;
  --secondary-color: #000000;
  --accent-color: #000000;
  --text-primary: #000000;
  --text-secondary: #000000;
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

/* Dark Theme Colors */
.dark-theme {
  --primary-color: #ffffff;
  --secondary-color: #ffffff;
  --accent-color: #ffffff;
  --text-primary: #ffffff;
  --text-secondary: #ffffff;
  --bg-primary: #000000;
  --bg-secondary: #000000;
  --card-bg: #000000;
  --border-color: #333333;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* ===== Typography ===== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Times New Roman', Times, serif;
  font-weight: bold;
  font-style: normal;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  /* Gradient text with fallback */
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Fallback for browsers that don't support background-clip */
  color: var(--primary-color);
}

/* Fallback for browsers without gradient text support */
@supports not (-webkit-background-clip: text) {
  h1 {
    background: none;
    color: var(--primary-color);
  }
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* iPad and tablet portrait */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

/* iPad Pro and large tablets */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero p {
    font-size: 1.15rem;
    max-width: 600px;
  }
  
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Galaxy A series, iPhone SE and very small screens */
@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
    padding: 0 0.25rem;
  }
  
  .hero p {
    font-size: 0.9rem;
    padding: 0 0.75rem;
  }
  
  .cert-item {
    padding: 0.75rem 0.5rem;
    margin: 0;
  }
  
  .stat-item {
    padding: 0.75rem 0.5rem;
  }
  
  .cta-section h2 {
    font-size: 1.35rem;
    padding: 0 0.25rem;
  }
  
  .cta-section p {
    font-size: 0.9rem;
    padding: 0 0.75rem;
  }
}

/* Galaxy A51, Z1, Pixel, OnePlus - Common Android dimensions */
@media (max-width: 412px) and (max-height: 892px) {
  .hero h1 {
    font-size: 1.65rem;
    line-height: 1.1;
  }
  
  .hero p {
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  .cert-item h3 {
    font-size: 1.25rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

/* Ultra-wide phones (Galaxy S series, Note series) */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 1.5rem;
    padding: 0;
  }
  
  .hero p {
    font-size: 0.8rem;
    padding: 0 0.5rem;
  }
  
  .container {
    padding: 0 0.25rem;
  }
  
  .btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
  }
}

section {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  padding: 8rem 0 6rem;
  background: var(--bg-primary);
  overflow: hidden;
}

.dark-theme .hero {
  background: #000000;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

/* Hero Image */
.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-top: 2rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  position: relative;
  z-index: 1;
}

.hero-image:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}


.hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  color: var(--text-secondary);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 3rem auto;
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
  display: block;
}

/* ===== About Section ===== */
.about-section {
  position: relative;
  background-color: var(--bg-secondary);
  padding: 6rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text {
  animation: fadeInLeft 1s ease-out;
}

.about-image {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeInRight 1s ease-out;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

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

/* ===== Stats Section ===== */
/* ===== Stats Section ===== */
.stats-section {
    background: var(--bg-primary);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  
  /* Add a subtle gradient overlay for depth */
  .stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
      135deg, 
      rgba(59, 130, 246, 0.1) 0%, 
      rgba(96, 165, 250, 0.05) 100%
    );
    z-index: 1;
  }
  
  /* Dark theme specific styles */
  .dark-theme .stats-section::before {
    background: linear-gradient(
      135deg, 
      rgba(59, 130, 246, 0.05) 0%, 
      rgba(0, 0, 0, 0.1) 100%
    );
  }
  
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
  }
  
  .stat-item {
    padding: 2rem 1rem;
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }
  
  /* Light theme specific styles */
  :root:not(.dark-theme) .stat-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }
  
  /* Dark theme specific styles */
  .dark-theme .stat-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 
                0 4px 6px -2px rgba(0, 0, 0, 0.2);
  }
  
  .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }
  
  .dark-theme .stat-item:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 
                0 10px 10px -5px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
  }
  
  .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
  }
  
  .stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
  }
  
  /* Add a subtle shine effect on hover */
  .stat-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
      to bottom right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: all 0.6s ease;
    opacity: 0;
    pointer-events: none;
  }
  
  .dark-theme .stat-item::after {
    background: linear-gradient(
      to bottom right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0) 100%
    );
  }
  
  .stat-item:hover::after {
    opacity: 1;
    animation: shine 1.5s infinite;
  }
  
  @keyframes shine {
    0% {
      transform: translateX(-100%) rotate(30deg);
    }
    100% {
      transform: translateX(100%) rotate(30deg);
    }
  }
  
  /* Responsive adjustments */
  @media (max-width: 1024px) {
    .stats-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 576px) {
    .stats-grid {
      grid-template-columns: 1fr;
    }
  }
/* ===== Certifications Section ===== */
.certifications {
  padding: 6rem 0;
  background-color: var(--bg-primary);
  text-align: center;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.cert-item {
  background: var(--card-bg);
  padding: 2.5rem 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.cert-item:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cert-item:hover:after {
  transform: scaleX(1);
  transform-origin: left;
}

.cert-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.cert-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.cert-item h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  text-align: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section h2 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

.cta-section p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  color: var(--text-secondary);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(90deg, #00b9c3, #dfd6d6);
  color: white;
  font-weight: 20;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #42aaff, #e7dbdb);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.btn-primary:hover:before {
  opacity: 1;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #2892e9, #e7dbdb) translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  text-decoration: none;
  color: white;
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(59, 130, 246, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.back-to-top i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-2px);
}

/* Dark theme adjustments */
.dark-theme .back-to-top {
    background-color: rgba(59, 130, 246, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .back-to-top:hover {
    background-color: #3b82f6;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .back-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top i {
        font-size: 1.1rem;
    }
}

/* Pulse Animation for CTA */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

/* Text Gradient Animation */
.text-gradient-animate {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
  background-size: 200% auto;
  color: #000;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient 3s linear infinite;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* ===== Responsive Styles ===== */
@media (max-width: 1024px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-text {
    text-align: center;
  }
  
  .about-image {
    max-width: 500px;
    margin: 20px auto;
  }
  
  .cert-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .hero {
    padding: 6rem 0 4rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  .hero {
    padding: 5rem 0 3rem;
  }
  
  .hero h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
  }
  
  .hero p, .cta-section p {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .cert-item {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-item {
    padding: 1.5rem 1rem;
  }
  
  .cta-section h2 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  h1 {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  
  .hero {
    padding: 3rem 0 2rem;
    min-height: auto;
  }
  
  .hero h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
  }
  
  .hero p {
    font-size: 0.95rem;
    padding: 0 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
  }
  
  .hero-image {
    margin-top: 1rem;
    max-width: 95%;
    height: auto;
  }
  
  .cert-item {
    padding: 1rem 0.75rem;
    margin: 0 0.25rem;
  }
  
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .stat-item {
    padding: 1rem 0.75rem;
    text-align: center;
  }
  
  .cta-section {
    padding: 2.5rem 0;
  }
  
  .cta-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
  }
  
  .cta-section p {
    font-size: 0.95rem;
    padding: 0 1rem;
    line-height: 1.5;
  }
  
  .btn {
    width: calc(100% - 2rem);
    max-width: 280px;
    margin: 0 auto;
    display: block;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }
  
  .back-to-top {
    width: 2.5rem;
    height: 2.5rem;
    bottom: 1.5rem;
    right: 1.5rem;
  }
  
  .back-to-top svg {
    width: 16px;
    height: 16px;
  }
}

/* Print Styles */
@media print {
  .back-to-top, .theme-toggle-btn, .hamburger-menu {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: #000000 !important;
    font-size: 12pt;
  }
  
  a {
    color: #000000 !important;
    text-decoration: underline !important;
  }
  
  .stats-section, .cta-section {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}