/* Custom Styles for Jaffar Alromaih's Portfolio */

/* Color Palette */
:root {
  --deep-blue: #0a2463;
  --blue: #007bff;
  --cyan: #17a2b8;
  --light-blue: #e3f2fd;
  --very-light-blue: #f0f8ff;
  --primary-text: #0a2463;
  --secondary-text: #2c3e50;
  --light-text: #ffffff;
  --muted-text: #6c757d;
}

/* General Styles */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden; /* Prevent horizontal overflow */
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--secondary-text);
  line-height: 1.6;
}

/* Navigation */
.navbar-custom {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(33, 150, 243, 0.15);
  transition: all 0.3s ease;
  border-bottom: 2px solid rgba(33, 150, 243, 0.2);
}

.navbar-custom.scrolled {
  background: linear-gradient(135deg, rgba(227, 242, 253, 0.95) 0%, rgba(187, 222, 251, 0.95) 50%, rgba(144, 202, 249, 0.95) 100%);
  box-shadow: 0 6px 25px rgba(33, 150, 243, 0.25);
}

#logo {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(33, 150, 243, 0.3));
  transition: transform 0.3s ease;
  /* Ensure SVG animation plays smoothly */
  will-change: transform;
}

#logo:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Optimize SVG animation performance */
#logo[src$=".svg"] {
  /* Enable hardware acceleration for SVG animations */
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Fallback for browsers that don't support SVG favicon */
@supports not (color: color(display-p3 1 1 1)) {
  #logo[src$=".svg"] {
    display: none;
  }
  
  #logo[src$=".png"] {
    display: inline-block;
  }
}

/* Loading placeholder using animated logo */
.loading-placeholder {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.loading-placeholder img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-placeholder.loaded img {
  opacity: 1;
}

.loading-placeholder .loading-svg {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.loading-placeholder.loaded .loading-svg {
  opacity: 0;
}

/* Fix hover effects for images wrapped in loading placeholders */
.loading-placeholder:hover img {
  opacity: 1;
}

/* Ensure hover effects work on wrapped images (excluding org logos) */
.certificate-link:hover .loading-placeholder img,
.resume-image-link:hover .loading-placeholder img {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.2);
  border-color: rgba(33, 150, 243, 0.3);
}

/* Comprehensive fix for hover effects on images in loading placeholders */
.loading-placeholder.loaded:hover img {
  transform: inherit;
}

/* Ensure parent hover effects work on wrapped images (excluding org logos) */
.certificate-link:hover .loading-placeholder img,
.resume-image-link:hover .loading-placeholder img {
  transform: inherit;
}

/* Specific loading placeholders for certificate images */
.certificate-preview .loading-placeholder .loading-svg {
  width: 40px;
  height: 40px;
}

.resume-preview .loading-placeholder .loading-svg {
  width: 50px;
  height: 50px;
}

.profile-img-enhanced.loading-placeholder .loading-svg {
  width: 80px;
  height: 80px;
}

/* Loading animation for the placeholder */
@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

.loading-placeholder .loading-svg {
  animation: pulse 1.5s ease-in-out infinite;
}

.brand-text {
  font-weight: 700;
  color: var(--deep-blue);
  font-size: 1.2rem;
  text-shadow: 0 1px 2px rgba(33, 150, 243, 0.2);
  letter-spacing: 0.5px;
}

.navbar-brand {
  font-weight: 700;
  color: var(--deep-blue) !important;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
}

.navbar-brand:hover {
  transform: translateY(-2px);
  color: var(--deep-blue) !important;
}

.nav-link {
  font-weight: 500;
  color: var(--secondary-text) !important;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem !important;
  margin: 0 0.2rem;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.2), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover {
  color: var(--blue) !important;
  background-color: rgba(33, 150, 243, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.nav-link i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.nav-link:hover i {
  transform: scale(1.2);
}

.navbar-toggler {
  border: 2px solid rgba(33, 150, 243, 0.5);
  padding: 0.25rem 0.5rem;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background-color: rgba(33, 150, 243, 0.1);
  border-color: var(--blue);
  transform: scale(1.05);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(33, 150, 243, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 150, 243, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #3b6ba9 50%, #5e8cc4 75%, #87ceeb 100%);
  color: var(--light-text);
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-main-content {
  padding: 2rem 0;
  position: relative;
  z-index: 2;
  min-height: 70vh;
}

.hero-about-section {
  padding: 0.5rem 0 0.5rem 0;
  position: relative;
  z-index: 2;
}

.hero-about-text-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.hero-text h1,
.hero-text-main h1 {
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-size: 3.5rem;
  line-height: 1.2;
  background: linear-gradient(45deg, #ffffff, #e6f3ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text h2,
.hero-text-main h2 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  font-size: 2.2rem;
}

.hero-text .hero-subtitle,
.hero-text-main .hero-subtitle {
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  font-size: 2.2rem;
}

.hero-text .hero-concentration,
.hero-text-main .hero-concentration {
  color: #e8eaf6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.hero-enthusiast {
  color: #c5cae9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  font-weight: 500;
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 2rem;
}

.profile-img-enhanced {
  max-width: 380px;
  border: 8px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1),
              inset 0 0 20px rgba(255, 255, 255, 0.1);
  margin: 0 auto;
}

/* Special handling for profile image loading placeholder to preserve shadow */
.loading-placeholder.profile-img-enhanced {
  overflow: visible;
  display: inline-block;
}

.loading-placeholder.profile-img-enhanced img {
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1),
              inset 0 0 20px rgba(255, 255, 255, 0.1);
  border: 8px solid rgba(255, 255, 255, 0.25);
}

/* Ensure the loading SVG doesn't interfere with the circular profile image */
.loading-placeholder.profile-img-enhanced .loading-svg {
  border-radius: 50%;
  overflow: hidden;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #ffffff, #f5f5f5);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #3949ab;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-hero-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-hero-primary:hover::before {
  left: 100%;
}

.btn-hero-primary:hover {
  background: linear-gradient(135deg, #f5f5f5, #e8eaf6);
  border-color: rgba(255, 255, 255, 0.5);
  color: #1a237e;
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-hero-secondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-hero-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-hero-secondary:hover::before {
  left: 100%;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-buttons .btn {
  margin: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.hero-text .lead,
.hero-text-main .lead {
  color: #e8eaf6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  font-weight: 500;
  font-size: 1.1rem;
}

.hero-text .text-muted,
.hero-text-main .text-muted {
  color: #e6f3ff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  font-weight: 400;
}

.hero-about-text {
  color: #e8eaf6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  border-right: 3px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  margin: 0;
}

/* Hero Summary Box Styles */
.hero-summary-section {
  padding: 1rem 0;
  position: relative;
  z-index: 2;
}

.hero-summary-container {
  max-width: 1000px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  /* Fix for arrow artifacts */
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.summary-footer {
  margin-top: 1.5rem;
  /* Isolate the footer to prevent backdrop-filter interference */
  position: relative;
  z-index: 10;
  /* Remove container styling - button directly in summary box */
  padding: 0;
  backdrop-filter: none;
  background: transparent;
  border: none;
  border-radius: 0;
}

.summary-header {
  margin-bottom: 1.5rem;
}

.summary-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.summary-subtitle {
  color: #e8eaf6;
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 0;
  font-style: italic;
  opacity: 0.9;
}

.summary-footer {
  margin-top: 1.5rem;
}

.summary-footer .summary-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  /* Prevent rendering artifacts during scroll */
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  /* Create stacking context to isolate from backdrop-filter */
  isolation: isolate;
}

.summary-footer .arrow-left,
.summary-footer .arrow-right {
  animation: bounce 1s infinite linear;
  font-size: 0.9rem;
  position: relative;
  /* Hardware acceleration for smooth animation */
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  /* Prevent subpixel rendering issues */
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  /* Create stacking context */
  isolation: isolate;
  /* Ensure smooth rendering */
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.summary-footer .summary-subtitle:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.summary-footer .summary-subtitle:hover .arrow-left,
.summary-footer .summary-subtitle:hover .arrow-right {
  animation: bounce 0.5s infinite linear;
}

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

.summary-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.summary-item i {
  font-size: 1.5rem;
  color: #ffffff;
  margin-right: 1rem;
  min-width: 30px;
  text-align: center;
  flex-shrink: 0;
}

.summary-item-content {
  flex: 1;
  min-width: 0;
}

.summary-item h6 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  line-height: 1.2;
  word-wrap: break-word;
  hyphens: auto;
}

.summary-item p {
  color: #e8eaf6;
  margin-bottom: 0;
  font-weight: 500;
  font-size: 1rem;
  text-align: left;
  line-height: 1.3;
  word-wrap: break-word;
}

/* Responsive adjustments for hero summary */
@media (max-width: 768px) {
  .hero-summary-section {
    padding: 0.5rem 0;
  }
  
  .hero-summary-container {
    padding: 0.75rem;
    margin: 0 1rem;
  }
  
  .summary-header {
    margin-bottom: 1rem;
  }
  
  .summary-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }
  
  .summary-subtitle {
    font-size: 1rem;
  }
  
  .summary-footer {
    margin-top: 1rem;
  }
  
  .summary-footer .fa-chevron-down {
    font-size: 0.8rem;
  }
  
  .summary-item {
    padding: 0.5rem;
    align-items: flex-start;
  }
  
  .summary-item i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
  }
  
  .summary-item-content {
    flex: 1;
    min-width: 0;
  }
  
  .summary-item h6 {
    font-size: 0.8rem;
    line-height: 1.1;
    margin-bottom: 0.125rem;
    text-align: left;
    word-wrap: break-word;
    hyphens: auto;
  }
  
  /* Extra small screens (phones) - Enhanced alignment fixes */
  @media (max-width: 480px) {
    .summary-item {
      padding: 0.5rem;
      align-items: flex-start;
      min-height: auto;
    }
    
    .summary-item i {
      font-size: 1.125rem;
      margin-right: 0.625rem;
      margin-top: 0.125rem;
      min-width: 24px;
      text-align: center;
      flex-shrink: 0;
    }
    
    .summary-item-content {
      flex: 1;
      min-width: 0;
      overflow: hidden;
    }
    
    .summary-item h6 {
      font-size: 0.75rem;
      line-height: 1.1;
      margin-bottom: 0.125rem;
      text-align: left;
      word-wrap: break-word;
      hyphens: auto;
      overflow-wrap: break-word;
      white-space: normal;
    }
    
    .summary-item p {
      font-size: 0.8rem;
      line-height: 1.2;
      text-align: left;
      word-wrap: break-word;
      overflow-wrap: break-word;
      white-space: normal;
    }
  }
  
  /* Very small screens (ultra-compact phones) */
  @media (max-width: 360px) {
    .summary-item {
      padding: 0.375rem 0.5rem;
    }
    
    .summary-item i {
      font-size: 1rem;
      margin-right: 0.5rem;
      min-width: 20px;
    }
    
    .summary-item h6 {
      font-size: 0.7rem;
    }
    
    .summary-item p {
      font-size: 0.75rem;
    }
  }
  
  .summary-item p {
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: left;
    word-wrap: break-word;
  }
}

.hero-text-main {
  padding-right: 1rem;
}

/* Section Styles */
section {
  padding: 5rem 0;
  transition: all 0.8s ease;
  width: 100%;
  min-width: 100%;
  position: relative;
}

/* Ensure all containers utilize full width - Exclude Fieldz project page */
.container:not(.fieldz-hero .container) {
  max-width: 100%;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Enhanced container responsiveness - Exclude Fieldz project page */
@media (min-width: 576px) {
  .container:not(.fieldz-hero .container) {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 768px) {
  .container:not(.fieldz-hero .container) {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 992px) {
  .container:not(.fieldz-hero .container) {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

@media (min-width: 1200px) {
  .container:not(.fieldz-hero .container) {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

@media (min-width: 1400px) {
  .container:not(.fieldz-hero .container) {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

/* Full-width sections for better visual impact */
.hero-section {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}

/* Ensure all sections fit properly within viewport */
#education-skills,
#experience,
#projects,
#resume,
#contact {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

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

.section-title h2 {
  color: var(--primary-text);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(10, 36, 99, 0.1);
  margin-bottom: 1rem;
}

.title-underline {
  height: 4px;
  width: 80px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 2px;
}


/* Education & Skills Section - Light Blue Gradient */
#education-skills {
  background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-blue) 100%);
}

/* About Section - Keep original gradient */
#about {
  background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-blue) 100%);
}

#about h3 {
  color: var(--primary-text);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

#about p {
  color: var(--secondary-text);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Work Experience Item Styles */
.work-experience-item {
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-experience-item:hover,
.work-experience-item.visible:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px rgba(10, 36, 99, 0.15);
}

.work-experience-item h4 {
  color: var(--primary-text);
  font-weight: 600;
}

/* Education Item Styles - Only for education section */
.education-item {
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(10, 36, 99, 0.1);
}

.education-item h4 {
  color: var(--primary-text);
  font-weight: 600;
}

/* Override for education section items that use education-vertical */
.education-grid .education-item {
  padding: 0;
  border-left: none;
  background-color: transparent;
  border-radius: 0;
  box-shadow: none;
}

.skill-item {
  margin-bottom: 0.5rem;
}

/* Professional Experience Section - Light Blue Variation */
#experience {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  transition: background 0.8s ease;
}

#experience .section-title h2 {
  color: var(--primary-text);
}

/* Projects Section - Sky Blue Variation */
#projects {
  background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
  transition: background 0.8s ease;
}

#projects .section-title h2 {
  color: var(--primary-text);
}

.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(33, 150, 243, 0.1);
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.1);
}

.project-card:hover,
.project-card.visible:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px rgba(10, 36, 99, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
}

.project-card .card-title {
  color: var(--primary-text);
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-card .card-text {
  color: var(--secondary-text);
  line-height: 1.6;
}

.project-tags .badge {
  background-color: var(--cyan);
  color: var(--light-text);
  font-weight: 500;
  font-size: 0.75rem;
}

/* Override project tags badge colors for specific technologies */
.project-tags .tech-badge-flutter {
  background-color: #02569B !important;
  color: white !important;
}

.project-tags .tech-badge-firebase {
  background-color: #FFCA28 !important;
  color: #000 !important;
}

.project-tags .tech-badge-dart {
  background-color: #00A2E5 !important;
  color: white !important;
}

.project-tags .tech-badge-maps {
  background-color: #4285F4 !important;
  color: white !important;
}

.project-tags .tech-badge-mobile {
  background-color: #3DDC84 !important;
  color: #000 !important;
}

.project-tags .tech-badge-crossplatform {
  background-color: #7952B3 !important;
  color: white !important;
}

.project-tags .tech-badge-payment {
  background-color: #FF6B35 !important;
  color: white !important;
}

.project-tags .tech-badge-pattern {
  background-color: #6B46C1 !important;
  color: white !important;
}

/* Resume Section - Light Cyan Variation */
#resume {
  background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
  transition: background 0.8s ease;
}

#resume .section-title h2 {
  color: var(--primary-text);
}

/* Contact Section - Deep Blue Variation */
#contact {
  background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
  transition: background 0.8s ease;
}

#contact h3 {
  color: var(--primary-text);
  font-weight: 600;
}

.info-item {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: var(--secondary-text);
  margin-bottom: 1rem;
}

.social-links .btn {
  margin-right: 10px;
  margin-bottom: 10px;
}

/* Contact Button Styles */
.contact-btn {
  min-width: 350px;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: #000000;
  border: 2px solid #000000;
  margin: 0;
  line-height: 1.4;
}

.contact-btn-uniform {
  width: 350px;
  min-width: 350px;
  max-width: 350px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-btn:hover {
  transform: translateY(-2px);
  background-color: rgba(0, 0, 0, 0.1);
  border-color: #000000;
  color: #000000;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-btn:active {
  transform: translateY(0);
  background-color: rgba(0, 0, 0, 0.2);
}

/* Contact Information Column */
.contact-info-column {
  max-width: 500px;
  margin: 0 auto;
}

/* Contact Item Styles */
.contact-item {
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(33, 150, 243, 0.2);
  box-shadow: 0 2px 8px rgba(10, 36, 99, 0.1);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 450px;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
  background-color: rgba(255, 255, 255, 0.9);
}

.contact-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-text);
  flex-grow: 1;
  text-align: left;
}

/* Contact Action Buttons */
.contact-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  min-width: 80px;
  justify-content: center;
}

.contact-call-btn {
  background-color: #28a745;
  color: white;
}

.contact-call-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  color: white;
  text-decoration: none;
}

.contact-email-btn {
  background-color: var(--blue);
  color: white;
}

.contact-email-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
  color: white;
  text-decoration: none;
}

.contact-action-btn i {
  font-size: 0.9rem;
}

.contact-action-btn .btn-text {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Responsive adjustments for contact items */
@media (max-width: 768px) {
  .contact-info-column {
    max-width: 350px;
  }
  
  .contact-item {
    padding: 0.875rem 1rem;
    max-width: 320px;
  }
  
  .contact-text {
    font-size: 0.9rem;
  }
  
  .contact-action-btn {
    padding: 0.4rem 0.8rem;
    min-width: 70px;
  }
  
  .contact-action-btn .btn-text {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .contact-info-column {
    max-width: 300px;
  }
  
  .contact-item {
    padding: 0.75rem 0.875rem;
    max-width: 280px;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .contact-text {
    font-size: 0.85rem;
    text-align: center;
  }
  
  .contact-action-btn {
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
  }
  
  .contact-action-btn .btn-text {
    font-size: 0.8rem;
  }
}

/* Enlarged Social Buttons */
.social-links .btn {
  margin-right: 12px;
  margin-bottom: 12px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.social-links .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for contact buttons */
@media (max-width: 768px) {
  .contact-btn {
    min-width: 320px;
    width: 320px;
    max-width: 320px;
    font-size: 0.9rem;
    padding: 0.7rem 1.5rem;
  }
  
  .contact-btn-uniform {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
  }
  
  .contact-buttons-column {
    max-width: 340px;
  }
  
  .social-links .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .contact-btn {
    min-width: 280px;
    width: 280px;
    max-width: 280px;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
  }
  
  .contact-btn-uniform {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
  }
  
  .contact-buttons-column {
    max-width: 300px;
  }
  
  .social-links .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}


/* Resume Preview */
.resume-preview-container {
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(10, 36, 99, 0.12);
  overflow: hidden;
  padding: 2rem;
  border: 1px solid rgba(10, 36, 99, 0.08);
}

.resume-preview {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 1rem;
}

.resume-image-link {
  display: inline-block;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 10px;
  overflow: hidden;
}

.resume-image-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(10, 36, 99, 0.2);
}

.resume-image-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.resume-image-link:hover::before {
  opacity: 1;
}

.resume-preview-img {
  max-width: 100%;
  height: auto;
  max-height: 700px;
  object-fit: contain;
  transition: all 0.3s ease;
  border: 3px solid rgba(33, 150, 243, 0.1);
}

.resume-image-link:hover .resume-preview-img,
.resume-image-link:hover .loading-placeholder .resume-preview-img {
  border-color: rgba(33, 150, 243, 0.3);
}

.resume-click-hint {
  font-size: 0.9rem;
  color: var(--muted-text) !important;
  font-style: italic;
  margin-top: 1rem !important;
  transition: color 0.3s ease;
}

.resume-image-link:hover ~ .resume-click-hint {
  color: var(--blue) !important;
}

.resume-controls {
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 10px;
  margin-top: 1rem;
}

.resume-controls .btn {
  margin: 0.5rem;
  min-width: 200px;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.resume-controls .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(10, 36, 99, 0.2);
}

/* Responsive Resume Preview */
@media (max-width: 768px) {
  .resume-preview-container {
    padding: 1rem;
  }
  
  .resume-preview {
    padding: 1rem;
  }
  
  .resume-preview-img {
    max-height: 500px;
  }
  
  .resume-controls .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
    min-width: auto;
  }
  
  .resume-click-hint {
    font-size: 0.8rem;
  }
}

/* Footer */
footer {
  background-color: #343a40 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    text-align: center;
    padding: 100px 0 50px;
  }
  
  .hero-main-content {
    flex-direction: column;
    min-height: auto;
    padding: 1rem 0;
  }
  
  .hero-text-main {
    margin-bottom: 2rem;
    padding-right: 0;
  }
  
  .hero-text-main h1,
  .hero-text h1 {
    font-size: 2.5rem;
  }
  
  .hero-text-main h2,
  .hero-text h2 {
    font-size: 1.8rem;
  }
  
  .hero-about-section {
    padding: 0.5rem 0;
  }
  
  .hero-about-text-container {
    padding: 0 1rem;
  }
  
  .hero-about-text {
    padding: 1rem;
    font-size: 0.9rem;
  }
  
  .profile-img-enhanced {
    max-width: 250px;
    margin-bottom: 2rem;
  }
  
  .contact-form {
    margin-top: 2rem;
  }
}

@media (max-width: 992px) {
  .profile-img-enhanced {
    max-width: 320px;
  }
  
  .hero-text-main {
    padding-right: 0;
  }
  
  .hero-main-content {
    min-height: 60vh;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ensure elements are visible by default and animate in */
.section-title {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animation for Project Cards */
.project-card:not(.visible) {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

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

/* Animation for Work Experience Items */
.work-experience-item:not(.visible) {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.work-experience-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animation for Education Items */
.education-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.education-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Special handling for education-vertical items */
.education-vertical {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.education-vertical.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0056b3;
}

/* Loading Spinner */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: var(--blue);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* Active Navigation Link */
.navbar-nav .nav-link.active {
  color: var(--blue) !important;
  font-weight: 600;
  position: relative;
}

.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 2px;
}

/* Improved Button Hover Effects */
.btn {
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #0056b3);
  border: 2px solid var(--blue);
  color: var(--light-text);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056b3, var(--deep-blue));
  border-color: #0056b3;
  color: var(--light-text);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.btn-outline-primary {
  border-color: #ffffff;
  color: #ffffff;
  font-weight: 600;
  background: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(10, 36, 99, 0.2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Scroll to Top Button */
#scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--blue), #0056b3);
  color: var(--light-text);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(10, 36, 99, 0.3);
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-to-top:hover {
  background: linear-gradient(135deg, #0056b3, var(--deep-blue));
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(10, 36, 99, 0.4);
}
/* Education Logo Styling */
.education-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

/* Education Grid Layout */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* For larger screens - 2 columns */
@media (min-width: 992px) {
  .education-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* For medium screens - still 2 columns but smaller min-width */
@media (min-width: 768px) and (max-width: 991px) {
  .education-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* For smaller screens - 1 column */
@media (max-width: 767px) {
  .education-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Vertical Education Item Layout */
.education-vertical {
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.education-vertical:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(10, 36, 99, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
}

.education-vertical .education-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto;
}

.education-vertical .education-title {
  margin-bottom: 0.125rem;
  line-height: 1.3;
  word-wrap: break-word;
  hyphens: auto;
}

.education-vertical .education-subtitle {
  font-size: 0.9rem;
  color: var(--secondary-text);
  margin-bottom: 0.125rem;
  font-weight: 500;
}

.education-vertical .education-honor {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 0.375rem;
  font-weight: 700;
  font-style: italic;
}

.education-vertical .education-gpa {
  margin-top: 0;
  margin-bottom: 0;
}

.education-vertical .education-button {
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding-top: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.education-vertical .education-button .btn {
  min-width: 200px;
  padding: 0.5rem 1.5rem;
  width: 100%;
  max-width: 250px;
}

/* GPA Display Styling */
.gpa-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 auto;
  padding: 0.5rem;
  background-color: rgba(10, 36, 99, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--blue);
  max-width: fit-content;
  text-align: center;
}

.gpa-row {
  display: flex;
  align-items: center;
}

.gpa-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.gpa-label {
  font-weight: 600;
  color: var(--primary-text);
  white-space: nowrap;
}

.gpa-fraction {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  font-weight: 500;
  color: var(--secondary-text);
}

.gpa-fraction .numerator {
  font-weight: 600;
  color: var(--blue);
  font-size: 0.95em;
}

.gpa-fraction .denominator {
  font-weight: 500;
  color: var(--secondary-text);
  font-size: 0.9em;
}

.gpa-fraction .fraction-bar {
  font-weight: 400;
  color: var(--muted-text);
  font-size: 1.1em;
  margin: 0 0.1rem;
}


.gpa-equivalence {
  font-weight: 500;
  color: var(--muted-text);
  margin: 0 0.3rem;
}

/* Responsive adjustments for GPA display */
@media (max-width: 768px) {
  .education-logo {
    width: 60px;
    height: 60px;
  }
  
  .education-vertical {
    padding: 0.5rem 0.75rem;
  }
  
  .education-vertical .education-gpa {
    margin-top: 0;
    margin-bottom: 0;
  }
  
  .gpa-display {
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .gpa-item {
    font-size: 0.85rem;
  }
  
  .gpa-label {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .education-logo {
    width: 50px;
    height: 50px;
  }
}

/* Skill Grid Optimization */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 100%; /* Prevent overflow */
  margin: 0 auto; /* Center the grid */
  grid-auto-rows: 1fr; /* Standardize row heights */
}

/* Skill Card Styling */
.skill-card {
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  min-height: 120px; /* Ensure minimum consistent height */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box; /* Include padding in height calculation */
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(10, 36, 99, 0.15);
}

.skill-card i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.skill-card h6 {
  margin-bottom: 0.25rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  width: 100%; /* Ensure full width for centering */
}

.skill-card small {
  font-size: 0.8rem;
  line-height: 1.1;
  text-align: center;
  width: 100%; /* Ensure full width for centering */
}

/* Responsive breakpoints for skill grids */
@media (min-width: 768px) {
  .skill-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.875rem;
    padding: 0 1rem; /* Add padding to prevent edge touching */
  }
  
  .skill-card {
    min-height: 110px;
  }
}

@media (min-width: 992px) {
  .skill-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    padding: 0 2rem; /* Increase padding for larger screens */
  }
  
  .skill-card {
    min-height: 105px;
  }
}

@media (min-width: 1200px) {
  .skill-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.625rem;
    padding: 0 2.5rem; /* Further increase padding */
  }
  
  .skill-card {
    padding: 0.625rem;
    min-height: 100px;
  }
}

@media (min-width: 1400px) {
  .skill-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
    padding: 0 3rem; /* Maximum padding for ultra-wide */
  }
  
  .skill-card {
    padding: 0.5rem;
    min-height: 95px;
  }
}

@media (min-width: 1600px) {
  .skill-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    padding: 0 4rem; /* Maximum padding for ultra-wide screens */
  }
  
  .skill-card {
    min-height: 90px;
  }
}

/* Small screen specific fixes */
@media (max-width: 767px) {
  .skill-grid {
    padding: 0 0.5rem; /* Prevent edge touching on mobile */
    gap: 0.75rem;
  }
  
  .skill-card {
    min-height: 100px;
    padding: 0.625rem;
  }
  
  .skill-card i {
    font-size: 1.25rem; /* Slightly smaller icons on mobile */
  }
  
  .skill-card h6 {
    font-size: 0.9rem; /* Slightly smaller text on mobile */
  }
  
  .skill-card small {
    font-size: 0.75rem;
  }
}

/* Extra small screen fixes */
@media (max-width: 480px) {
  .skill-grid {
    padding: 0 0.25rem; /* Minimal padding for very small screens */
    gap: 0.5rem;
  }
  
  .skill-card {
    min-height: 90px;
    padding: 0.5rem;
  }
}

/* Ensure skill category containers don't overflow */
.skill-category {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 2rem;
  box-sizing: border-box;
}

/* Fix container overflow issues */
.row {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

.col-12 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

@media (min-width: 576px) {
  .col-12 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media (min-width: 768px) {
  .col-12 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Ensure all grid containers fit properly */
.education-grid,
.skill-grid {
  box-sizing: border-box;
  width: calc(100% - 1rem); /* Account for container padding */
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

@media (min-width: 576px) {
  .education-grid,
  .skill-grid {
    width: calc(100% - 1.5rem);
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
}

@media (min-width: 768px) {
  .education-grid,
  .skill-grid {
    width: calc(100% - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

/* Fix resume containers */
.resume-preview-container {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Ensure footer fits full width */
footer {
  width: 100%;
  max-width: 100%;
}

/* Prevent any horizontal scrolling - Exclude Fieldz project page specific overrides */
*:not(.fieldz-project *) {
  box-sizing: border-box;
}

img:not(.fieldz-image) {
  max-width: 100%;
  height: auto;
}

/* Fix for very small screens */
@media (max-width: 480px) {
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .col-12 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  .education-grid,
  .skill-grid {
    width: calc(100% - 0.5rem);
    margin-left: 0.25rem;
    margin-right: 0.25rem;
  }
}

/* Certificates Section Styles */
.certificates-container {
  margin-top: 1rem;
}

.certificate-card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.certificate-card:hover,
.certificate-card.visible:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px rgba(10, 36, 99, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
}

.certificate-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.certificate-icon {
  flex-shrink: 0;
}

.certificate-org-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.certificate-org-logo:hover {
  transform: scale(1.05);
}

.certificate-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.certificate-organization {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.certificate-description {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--secondary-text);
  flex-grow: 1;
  margin-bottom: 1rem;
}

.certificate-preview {
  margin-top: auto;
}

.certificate-link {
  display: inline-block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.certificate-link:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.2);
}

.certificate-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.certificate-link:hover::before {
  opacity: 1;
}

.certificate-thumbnail {
  max-width: 100%;
  max-height: 300px;
  object-fit: cover;
  border: 2px solid rgba(33, 150, 243, 0.1);
  transition: border-color 0.3s ease;
}

/* Ensure consistent height for education certificate thumbnails */
.education-gpa + .certificate-preview .certificate-thumbnail {
  max-height: 300px;
  object-fit: contain;
}

.certificate-link:hover .certificate-thumbnail,
.certificate-link:hover .loading-placeholder .certificate-thumbnail {
  border-color: rgba(33, 150, 243, 0.3);
}

.certificate-click-hint {
  font-size: 0.75rem;
  color: var(--muted-text) !important;
  font-style: italic;
  margin-top: 0.5rem !important;
  transition: color 0.3s ease;
}

.certificate-link:hover ~ .certificate-click-hint {
  color: var(--blue) !important;
}

/* Responsive adjustments for certificates */
@media (max-width: 991px) {
  .certificate-card {
    padding: 1.25rem;
  }
  
  .certificate-org-logo {
    width: 70px;
    height: 70px;
  }
  
  .certificate-title {
    font-size: 1rem;
  }
  
  .certificate-description {
    font-size: 0.8rem;
  }
}

@media (max-width: 767px) {
  .certificates-container .row {
    justify-content: center;
  }
  
  .certificate-card {
    padding: 1rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
  }
  
  .certificate-org-logo {
    width: 60px;
    height: 60px;
  }
  
  .certificate-title {
    font-size: 0.95rem;
  }
  
  .certificate-organization {
    font-size: 0.9rem;
  }
  
  .certificate-description {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .certificate-card {
    padding: 0.875rem;
    max-width: 100%;
  }
  
  .certificate-org-logo {
    width: 50px;
    height: 50px;
  }
  
  .certificate-title {
    font-size: 0.9rem;
  }
  
  .certificate-click-hint {
    font-size: 0.7rem;
  }
}

/* Animation for certificate cards */
.certificate-card:not(.visible) {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.certificate-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for certificate cards */
.certificate-card:nth-child(1) {
  transition-delay: 0.1s;
}

.certificate-card:nth-child(2) {
  transition-delay: 0.2s;
}

.certificate-card:nth-child(3) {
  transition-delay: 0.3s;
}

/* Honor Box Styles */
.honor-card {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(33, 150, 243, 0.1);
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.1);
  transition: all 0.3s ease;
  height: 100%;
}

.honor-card:hover,
.honor-card.visible:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px rgba(10, 36, 99, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
}

/* Animation for honor cards */
.honor-card:not(.visible) {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.honor-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for honor cards */
.honor-card:nth-child(1) {
  transition-delay: 0.1s;
}

.honor-card:nth-child(2) {
  transition-delay: 0.2s;
}

.honor-card:nth-child(3) {
  transition-delay: 0.3s;
}

/* Honor Cards Color Customization */
/* Second Honor Cards - Light Silver */
.honor-category:nth-child(1) .honor-card {
  background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 50%, #6b7280 100%) !important;
  border: 1px solid #d1d5db !important;
  color: #1f2937 !important;
}

.honor-category:nth-child(1) .honor-card:hover {
  background: linear-gradient(135deg, #e5e7eb 0%, #a5acb8 50%, #7c838f 100%) !important;
  transform: translateY(-8px) !important;
  box-shadow: 0 12px 24px rgba(156, 163, 175, 0.3) !important;
}

.honor-category:nth-child(1) .honor-card i {
  color: #374151 !important;
}

.honor-category:nth-child(1) .honor-card h6 {
  color: #111827 !important;
}

.honor-category:nth-child(1) .honor-card small {
  color: #4b5563 !important;
}

/* Third Honor Cards - Light Bronze */
.honor-category:nth-child(2) .honor-card {
  background: linear-gradient(135deg, #e6b88a 0%, #d4a574 50%, #c19660 100%) !important;
  border: 1px solid #e6b88a !important;
  color: #451a03 !important;
}

.honor-category:nth-child(2) .honor-card:hover {
  background: linear-gradient(135deg, #f0c499 0%, #ddb484 50%, #d4a574 100%) !important;
  transform: translateY(-8px) !important;
  box-shadow: 0 12px 24px rgba(214, 165, 132, 0.3) !important;
}

.honor-category:nth-child(2) .honor-card i {
  color: #7c2d12 !important;
}

.honor-category:nth-child(2) .honor-card h6 {
  color: #451a03 !important;
}

.honor-category:nth-child(2) .honor-card small {
  color: #78350f !important;
}

/* Personal Projects Section Styles */
.personal-projects-section {
  border: 1px solid rgba(40, 167, 69, 0.1);
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.1);
  margin-top: 2rem;
}

.personal-project-card {
  background: linear-gradient(145deg,
    rgba(240, 255, 240, 0.95) 0%,
    rgba(248, 255, 248, 0.9) 25%,
    rgba(250, 255, 250, 0.85) 50%,
    rgba(248, 255, 248, 0.9) 75%,
    rgba(240, 255, 240, 0.95) 100%);
  border-radius: 12px;
  box-shadow:
    0 4px 15px rgba(40, 167, 69, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(40, 167, 69, 0.2);
  transition: all 0.3s ease;
  height: 100%;
  overflow: hidden;
  position: relative;
  padding: 1.5rem;
}

.personal-project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 50%,
    rgba(40, 167, 69, 0.05) 100%);
  border-radius: 12px;
  pointer-events: none;
}

.personal-project-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 25px rgba(40, 167, 69, 0.25),
    0 3px 10px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  border-color: rgba(40, 167, 69, 0.3);
}

.personal-project-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.personal-project-icon {
  font-size: 2rem;
  color: #28a745;
  margin-right: 1rem;
  flex-shrink: 0;
}

.personal-project-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-right: 1rem;
  flex-shrink: 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.personal-project-logo:hover {
  transform: scale(1.05);
}

.personal-project-title {
  color: #155724;
  font-weight: 600;
  margin-bottom: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.personal-project-body {
  position: relative;
  z-index: 1;
}

.personal-project-description {
  color: #2c3e50;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.personal-project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.personal-project-tech .badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  transition: all 0.3s ease;
}

/* Technology Badge Colors */
.tech-badge-html {
  background-color: #e34c26;
  color: white;
}

.tech-badge-css {
  background-color: #1572b6;
  color: white;
}

.tech-badge-bootstrap {
  background-color: #7952b3;
  color: white;
}

.tech-badge-js {
  background-color: #f7df1e;
  color: #000;
}

.tech-badge-mysql {
  background-color: #4479a1;
  color: white;
}

.tech-badge-php {
  background-color: #777bb4;
  color: white;
}

.tech-badge-ajax {
  background-color: #3c3c3c;
  color: white;
}

.tech-badge-flutter {
  background-color: #02569b;
  color: white;
}

.tech-badge-dart {
  background-color: #00a2e5;
  color: white;
}

.tech-badge-firebase {
  background-color: #ffca28;
  color: #000;
}

.tech-badge-sqlite {
  background-color: #003b57;
  color: white;
}

.tech-badge-python {
  background-color: #3776ab;
  color: white;
}

.tech-badge-nodejs {
  background-color: #339933;
  color: white;
}

.tech-badge-crypto {
  background-color: #6b46c1;
  color: white;
}

.tech-badge-websockets {
  background-color: #010101;
  color: white;
}

.tech-badge-java {
  background-color: #f89820;
  color: white;
}

.tech-badge-xml {
  background-color: #0060ac;
  color: white;
}

.tech-badge-android {
  background-color: #3ddc84;
  color: #000;
}

.personal-project-tech .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.personal-project-btn {
  background: linear-gradient(135deg, #28a745, #20c997);
  border: none;
  color: white;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.personal-project-btn:hover {
  background: linear-gradient(135deg, #218838, #1ea085);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
  color: white;
  text-decoration: none;
}

.personal-project-btn i {
  font-size: 0.8rem;
}

/* Responsive adjustments for personal projects */
@media (max-width: 768px) {
  .personal-project-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .personal-project-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
  }
  
  .personal-project-logo {
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
  }
  
  .personal-project-title {
    font-size: 1rem;
  }
  
  .personal-project-description {
    font-size: 0.85rem;
  }
  
  .personal-project-tech .badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
  
  .personal-projects-btn {
    font-size: 1rem !important;
    padding: 12px 25px !important;
  }
}

@media (max-width: 480px) {
  .personal-project-card {
    padding: 0.75rem;
  }
  
  .personal-project-header {
    flex-direction: column;
    text-align: center;
    margin-bottom: 0.75rem;
  }
  
  .personal-project-icon {
    font-size: 1.25rem;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  
  .personal-project-logo {
    width: 36px;
    height: 36px;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  
  .personal-project-title {
    font-size: 0.95rem;
  }
  
  .personal-project-description {
    font-size: 0.8rem;
  }
  
  .personal-project-tech .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
  }
  
  .personal-projects-btn {
    font-size: 0.9rem !important;
    padding: 10px 20px !important;
  }
}

/* Technology Badge Colors for Fieldz Project */
.tech-badge-flutter {
  background-color: #02569B !important;
  color: white !important;
}

.tech-badge-firebase {
  background-color: #FFCA28 !important;
  color: #000 !important;
}

.tech-badge-dart {
  background-color: #00A2E5 !important;
  color: white !important;
}

.tech-badge-maps {
  background-color: #4285F4 !important;
  color: white !important;
}

.tech-badge-mobile {
  background-color: #3DDC84 !important;
  color: #000 !important;
}

.tech-badge-crossplatform {
  background-color: #7952B3 !important;
  color: white !important;
}

.tech-badge-payment {
  background-color: #FF6B35 !important;
  color: white !important;
}

.tech-badge-pattern {
  background-color: #6B46C1 !important;
  color: white !important;
}