/* Shared 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;
}

/* 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: 0.95rem;
  text-shadow: 0 1px 2px rgba(33, 150, 243, 0.2);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.navbar-brand {
  font-weight: 700;
  color: var(--deep-blue) !important;
  transition: all 0.3s ease;
  padding: 0.5rem 0.5rem !important;
  min-width: 80px;
  text-align: center;
}

.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 0.75rem !important;
  margin: 0 0.2rem;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.25rem;
  min-width: 65px;
}

.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: 1rem;
  transition: transform 0.3s ease;
  margin-bottom: 0.1rem;
}

.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");
}

/* 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;
  }
}

/* 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%);
}

/* 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;
  position: relative;
  overflow: hidden;
}

#experience::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 25% 30%, rgba(33, 150, 243, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 75% 70%, rgba(3, 169, 244, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

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


/* 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);
}



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

/* Footer Links Container */
.footer-links {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Footer Navigation Links */
.footer-nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.footer-nav-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Footer Platform Links */
.footer-platform-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-platform-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-platform-link:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-platform-separator {
  color: rgba(255, 255, 255, 0.4);
}

/* Footer coming soon link */
.footer-platform-coming-soon {
  color: rgba(255, 255, 255, 0.5);
  cursor: default;
  font-style: italic;
}

.footer-platform-coming-soon:hover {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

/* Mobile responsive adjustments for footer links */
@media (max-width: 576px) {
  .footer-nav-links,
  .footer-platform-links {
    gap: 0.75rem;
  }

  .footer-nav-link,
  .footer-platform-link {
    font-size: 0.8rem;
  }
}

/* Animation Classes - Unified Scroll Animation System */
/* Base animation class - shared across all animated elements */
.scroll-animate,
.fade-in,
.section-title,
.project-card:not(.visible),
.work-experience-item:not(.visible),
.education-item,
.education-vertical,
.certificate-card:not(.visible),
.honor-card:not(.visible) {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Visible state - triggers animation */
.scroll-animate.visible,
.fade-in.visible,
.section-title.visible,
.project-card.visible,
.work-experience-item.visible,
.education-item.visible,
.education-vertical.visible,
.certificate-card.visible,
.honor-card.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%;
}

/* ========================================
   COMPACT SKILL BADGES - New Design
   ======================================== */

/* Compact skill category container */
.skill-category-compact {
  width: 100%;
  margin-bottom: 1.5rem;
}

/* Category title styling */
.skill-category-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(33, 150, 243, 0.1);
}

.skill-category-title i {
  color: var(--blue);
  font-size: 1rem;
}

/* Compact badges container */
.skill-badges-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: center;
}

/* Individual skill badge */
.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: default;
  white-space: nowrap;
}

.skill-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  filter: brightness(1.1);
}

.skill-badge i {
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Responsive adjustments for compact badges */
@media (max-width: 767px) {
  .skill-category-title {
    font-size: 1rem;
  }

  .skill-badges-compact {
    gap: 0.5rem;
  }

  .skill-badge {
    font-size: 0.8rem;
    padding: 0.425rem 0.75rem;
  }

  .skill-badge i {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .skill-badges-compact {
    gap: 0.375rem;
  }

  .skill-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
  }

  .skill-badge i {
    font-size: 0.8rem;
  }
}

/* Animation for badges */
.skill-badge {
  animation: fadeInUp 0.5s ease backwards;
}

.skill-badge:nth-child(1) { animation-delay: 0.05s; }
.skill-badge:nth-child(2) { animation-delay: 0.1s; }
.skill-badge:nth-child(3) { animation-delay: 0.15s; }
.skill-badge:nth-child(4) { animation-delay: 0.2s; }
.skill-badge:nth-child(5) { animation-delay: 0.25s; }
.skill-badge:nth-child(6) { animation-delay: 0.3s; }
.skill-badge:nth-child(7) { animation-delay: 0.35s; }
.skill-badge:nth-child(8) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.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;
  }
}

/* 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);
}

/* 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;
}

/* Honor Box - Container for individual honor cards */
.honor-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  height: 100%;
}

.honor-box i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

/* Honor Cards Mobile Responsiveness */
@media (max-width: 767px) {
  /* Stack honor cards vertically */
  .honor-category .row {
    flex-direction: column;
  }

  .honor-category .row > div {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Reduce icon size on mobile */
  .honor-box i {
    font-size: 1.25rem;
  }

  /* Reduce padding on mobile */
  .honor-box {
    padding: 1rem;
  }

  /* Center everything */
  .honor-box {
    align-items: center;
    text-align: center;
  }

  /* Adjust heading sizes */
  .honor-box h6 {
    font-size: 0.95rem;
  }

  .honor-box small {
    font-size: 0.85rem;
  }
}

/* Honor Cards Tablet Responsiveness */
@media (max-width: 991px) {
  /* Ensure proper spacing on tablet */
  .honor-box {
    padding: 1.25rem;
  }

  /* Slightly smaller icons */
  .honor-box i {
    font-size: 1.4rem;
  }
}

/* ============================================
   CERTIFICATE MODAL POPUP
   ============================================ */

/* Certificate Modal Popup */
.certificate-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.certificate-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.certificate-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease;
}

.certificate-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s ease;
}

.certificate-modal-close:hover {
  color: var(--blue);
}

.certificate-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.certificate-modal-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

.certificate-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive modal */
@media (max-width: 768px) {
  .certificate-modal-content {
    max-width: 95%;
    padding: 1.5rem;
  }

  .certificate-modal-image {
    max-height: 60vh;
  }

  .certificate-modal-close {
    font-size: 1.5rem;
  }
}

