/*-----------------------------------*\
  #SKELETON LOADING UI FRAMEWORK
\*-----------------------------------*/

/*-----------------------------------*\
  #BASE SKELETON STYLES
\*-----------------------------------*/

/* Base skeleton element */
.skeleton {
  background: var(--eerie-black-1);
  background-image: linear-gradient(
    90deg,
    var(--eerie-black-1) 0%,
    var(--jet) 20%,
    var(--eerie-black-1) 40%,
    var(--eerie-black-1) 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

/* Shimmer animation */
.skeleton-shimmer {
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Alternative pulse animation for reduced motion */
.skeleton-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
}

/* Fade transition for skeleton to content */
.skeleton-fade {
  transition: opacity 0.3s ease-in-out;
}

.skeleton-fade.hidden {
  opacity: 0;
}

/*-----------------------------------*\
  #SKELETON COMPONENT VARIANTS
\*-----------------------------------*/

/* Text skeleton variants */
.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
  border-radius: 4px;
}

.skeleton-text-25 { width: 25%; }
.skeleton-text-50 { width: 50%; }
.skeleton-text-75 { width: 75%; }
.skeleton-text-100 { width: 100%; }

/* Specific text sizes matching existing typography */
.skeleton-text-h2 {
  height: var(--fs-1);
  margin-bottom: 15px;
  border-radius: 6px;
}

.skeleton-text-h3 {
  height: var(--fs-2);
  margin-bottom: 10px;
  border-radius: 5px;
}

.skeleton-text-h4 {
  height: var(--fs-4);
  margin-bottom: 7px;
  border-radius: 4px;
}

.skeleton-text-body {
  height: var(--fs-6);
  margin-bottom: 8px;
  border-radius: 3px;
}

/* Image skeleton variants */
.skeleton-image {
  background: var(--eerie-black-2);
  border-radius: 8px;
  display: block;
}

.skeleton-avatar {
  width: 80px;
  height: 80px;
  border-radius: 20px;
}

.skeleton-service-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.skeleton-award-image {
  width: 100%;
  height: 200px;
  border-radius: 12px;
}

.skeleton-project-image {
  width: 100%;
  height: 200px;
  border-radius: 16px;
}

.skeleton-blog-image {
  width: 100%;
  height: 200px;
  border-radius: 12px;
}

/* Card skeleton variants */
.skeleton-card {
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  position: relative;
  z-index: 1;
}

/* General skeleton content container */
.skeleton-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.skeleton-service-card {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 18px;
  padding: 30px;
}

.skeleton-award-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.skeleton-project-card {
  background: var(--border-gradient-onyx);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-4);
  position: relative;
  z-index: 1;
}

.skeleton-project-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--eerie-black-1);
  z-index: -1;
}

.skeleton-blog-card {
  background: var(--border-gradient-onyx);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-4);
  position: relative;
  z-index: 1;
}

.skeleton-blog-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--eerie-black-1);
  z-index: -1;
}

/* List skeleton variants */
.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.skeleton-timeline-item {
  position: relative;
  margin-bottom: 20px;
  margin-left: 45px;
}

.skeleton-timeline-item::before {
  content: "";
  position: absolute;
  top: -25px;
  left: -30px;
  width: 1px;
  height: calc(100% + 50px);
  background: var(--jet);
}

.skeleton-timeline-item::after {
  content: "";
  position: absolute;
  top: 5px;
  left: -33px;
  height: 6px;
  width: 6px;
  background: var(--text-gradient-yellow);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--jet);
}

.skeleton-skills-item {
  background: var(--border-gradient-onyx);
  box-shadow: var(--shadow-2);
  border: 2px solid #413e2c;
  border-radius: 5px;
  padding: 11px;
  height: 40px;
  min-width: 80px;
}

/*-----------------------------------*\
  #SECTION-SPECIFIC SKELETON LAYOUTS
\*-----------------------------------*/

/* About section skeleton */
.skeleton-about {
  margin-bottom: 40px;
}

.skeleton-about .skeleton-text:nth-child(1) { width: 85%; }
.skeleton-about .skeleton-text:nth-child(2) { width: 100%; }
.skeleton-about .skeleton-text:nth-child(3) { width: 70%; }

/* Services section skeleton */
.skeleton-services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.skeleton-services .skeleton-service-card .skeleton-content {
  flex: 1;
}

.skeleton-services .skeleton-service-card .skeleton-text:nth-child(1) { width: 75%; }
.skeleton-services .skeleton-service-card .skeleton-text:nth-child(2) { width: 100%; }
.skeleton-services .skeleton-service-card .skeleton-text:nth-child(3) { width: 85%; }

/* Awards section skeleton */
.skeleton-awards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.skeleton-award-item {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
}

.skeleton-award-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.skeleton-award-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  height: 200px;
  margin-bottom: 10px;
}

.skeleton-award-icon-box .skeleton-award-image {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.skeleton-award-content-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  gap: 8px;
}

.skeleton-award-content-box .skeleton-text:nth-child(1) { 
  width: 80%; 
  margin: 0 auto 8px; 
  height: 20px;
}

.skeleton-award-content-box .skeleton-text:nth-child(2) { 
  width: 90%; 
  margin: 0 auto; 
  height: 16px;
}

/* Skills section skeleton */
.skeleton-skills {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Timeline section skeleton */
.skeleton-timeline {
  margin-left: 45px;
}

.skeleton-timeline .skeleton-timeline-item .skeleton-text:nth-child(1) { width: 70%; }
.skeleton-timeline .skeleton-timeline-item .skeleton-text:nth-child(2) { width: 85%; }
.skeleton-timeline .skeleton-timeline-item .skeleton-text:nth-child(3) { width: 40%; }

/* Projects section skeleton */
.skeleton-projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 10px;
}

.skeleton-projects .skeleton-project-card .skeleton-content {
  padding: 15px;
}

.skeleton-projects .skeleton-project-card .skeleton-text:nth-child(1) { width: 75%; margin-bottom: 5px; }
.skeleton-projects .skeleton-project-card .skeleton-text:nth-child(2) { width: 50%; margin-bottom: 10px; }
.skeleton-projects .skeleton-project-card .skeleton-text:nth-child(3) { width: 100%; }
.skeleton-projects .skeleton-project-card .skeleton-text:nth-child(4) { width: 85%; }

/* Blog section skeleton */
.skeleton-blog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.skeleton-blog .skeleton-blog-card .skeleton-content {
  padding: 15px;
}

.skeleton-blog .skeleton-blog-card .skeleton-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.skeleton-blog .skeleton-blog-card .skeleton-meta .skeleton-text {
  height: 12px;
  margin-bottom: 0;
}

.skeleton-blog .skeleton-blog-card .skeleton-meta .skeleton-text:nth-child(1) { width: 60px; }
.skeleton-blog .skeleton-blog-card .skeleton-meta .skeleton-dot {
  width: 4px;
  height: 4px;
  border-radius: 4px;
  background: var(--light-gray-70);
}
.skeleton-blog .skeleton-blog-card .skeleton-meta .skeleton-text:nth-child(3) { width: 80px; }

.skeleton-blog .skeleton-blog-card .skeleton-text:nth-child(1) { width: 85%; margin-bottom: 10px; }
.skeleton-blog .skeleton-blog-card .skeleton-text:nth-child(2) { width: 100%; }
.skeleton-blog .skeleton-blog-card .skeleton-text:nth-child(3) { width: 75%; }

/*-----------------------------------*\
  #STAGGERED ANIMATIONS
\*-----------------------------------*/

/* Stagger animation delays for visual appeal */
.skeleton-services .skeleton-service-card:nth-child(1) { animation-delay: 0s; }
.skeleton-services .skeleton-service-card:nth-child(2) { animation-delay: 0.1s; }
.skeleton-services .skeleton-service-card:nth-child(3) { animation-delay: 0.2s; }
.skeleton-services .skeleton-service-card:nth-child(4) { animation-delay: 0.3s; }

.skeleton-awards .skeleton-award-item:nth-child(1) { animation-delay: 0s; }
.skeleton-awards .skeleton-award-item:nth-child(2) { animation-delay: 0.1s; }
.skeleton-awards .skeleton-award-item:nth-child(3) { animation-delay: 0.2s; }
.skeleton-awards .skeleton-award-item:nth-child(4) { animation-delay: 0.3s; }

.skeleton-projects .skeleton-project-card:nth-child(1) { animation-delay: 0s; }
.skeleton-projects .skeleton-project-card:nth-child(2) { animation-delay: 0.1s; }
.skeleton-projects .skeleton-project-card:nth-child(3) { animation-delay: 0.2s; }
.skeleton-projects .skeleton-project-card:nth-child(4) { animation-delay: 0.3s; }
.skeleton-projects .skeleton-project-card:nth-child(5) { animation-delay: 0.4s; }
.skeleton-projects .skeleton-project-card:nth-child(6) { animation-delay: 0.5s; }

.skeleton-blog .skeleton-blog-card:nth-child(1) { animation-delay: 0s; }
.skeleton-blog .skeleton-blog-card:nth-child(2) { animation-delay: 0.1s; }
.skeleton-blog .skeleton-blog-card:nth-child(3) { animation-delay: 0.2s; }

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

.skeleton-timeline .skeleton-timeline-item:nth-child(1) { animation-delay: 0s; }
.skeleton-timeline .skeleton-timeline-item:nth-child(2) { animation-delay: 0.1s; }
.skeleton-timeline .skeleton-timeline-item:nth-child(3) { animation-delay: 0.2s; }
.skeleton-timeline .skeleton-timeline-item:nth-child(4) { animation-delay: 0.3s; }

/*-----------------------------------*\
  #ACCESSIBILITY & PERFORMANCE
\*-----------------------------------*/

/* Enhanced prefers-reduced-motion support */
@media (prefers-reduced-motion: reduce) {
  /* Disable all shimmer animations */
  .skeleton-shimmer {
    animation: none;
    background-image: none;
    background: var(--eerie-black-2);
  }
  
  /* Use subtle pulse instead of shimmer for reduced motion */
  .skeleton-pulse {
    animation: pulse-reduced 3s ease-in-out infinite;
  }
  
  @keyframes pulse-reduced {
    0%, 100% {
      opacity: 0.7;
    }
    50% {
      opacity: 0.9;
    }
  }
  
  /* Disable all complex animations and transforms */
  .skeleton-fade-in,
  .skeleton-fade-out,
  .content-fade-in,
  .skeleton-transition,
  .content-transition,
  .staggered-fade-in {
    animation: none !important;
    transition: opacity 0.2s ease !important;
    transform: none !important;
  }
  
  /* Simplified immediate transitions for reduced motion */
  .skeleton-fade-in {
    opacity: 1;
    transform: none;
  }
  
  .skeleton-fade-out {
    opacity: 0;
    transform: none;
  }
  
  .content-fade-in {
    opacity: 1;
    transform: none;
  }
  
  .staggered-fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
  
  /* Disable loading bar animation */
  .loading-skeleton::before {
    animation: none;
    display: none;
  }
  
  /* Disable all staggered animations */
  .content-fade-in .service-item,
  .content-fade-in .award-item,
  .content-fade-in .skills-item,
  .content-fade-in .timeline-item,
  .content-fade-in .project-item,
  .content-fade-in .blog-post-item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    animation-delay: 0s !important;
  }
  
  /* Disable hover animations */
  .skeleton-card:hover {
    transform: none !important;
    transition: none !important;
  }
  
  .skeleton-project-card:hover,
  .skeleton-blog-card:hover {
    transform: none !important;
    transition: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .skeleton {
    background: #000;
    background-image: linear-gradient(
      90deg,
      #000 0%,
      #333 20%,
      #000 40%,
      #000 100%
    );
    border: 1px solid #fff;
  }
  
  .skeleton-card {
    border: 2px solid #fff;
    background: #000;
  }
  
  .skeleton-card::before {
    background: #111;
    border: 1px solid #333;
  }
}

/* Enhanced screen reader accessibility */
.skeleton[aria-label]::after {
  content: attr(aria-label);
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Screen reader only content for skeleton states */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Enhanced loading announcements for screen readers */
.skeleton-container[aria-live="polite"]::before {
  content: "Loading content, please wait...";
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skeleton-container.loaded[aria-live="polite"]::before {
  content: "Content loaded successfully";
}

/* Enhanced ARIA live region styling */
.skeleton-container[role="status"] {
  position: relative;
}

.skeleton-container[role="status"]::after {
  content: attr(aria-label);
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Screen reader announcements for different loading states */
.skeleton-container[data-loading-state="initial"]::before {
  content: "Initializing content, please wait...";
}

.skeleton-container[data-loading-state="loading"]::before {
  content: "Loading content, please wait...";
}

.skeleton-container[data-loading-state="error"]::before {
  content: "Error loading content, please try again";
}

.skeleton-container[data-loading-state="complete"]::before {
  content: "Content loaded successfully";
}

/* Enhanced focus management during skeleton states */
.skeleton-container:focus-within {
  outline: 2px solid var(--orange-yellow-crayola);
  outline-offset: 2px;
}

/* Keyboard navigation support */
.skeleton-container[tabindex="0"]:focus {
  outline: 2px solid var(--orange-yellow-crayola);
  outline-offset: 2px;
  background-color: rgba(255, 183, 3, 0.1);
}

/* Enhanced focus indicators for skeleton elements */
.skeleton-container:focus-visible {
  outline: 3px solid var(--orange-yellow-crayola);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link for skeleton content */
.skeleton-skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--orange-yellow-crayola);
  color: var(--eerie-black-1);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skeleton-skip-link:focus {
  top: 6px;
}

/* Screen reader context for skeleton types */
.skeleton-text[aria-label]::before {
  content: "Loading text: " attr(aria-label);
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skeleton-image[aria-label]::before {
  content: "Loading image: " attr(aria-label);
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skeleton-card[aria-label]::before {
  content: "Loading card: " attr(aria-label);
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Performance optimizations for low-end devices */
@media (max-width: 480px) and (max-height: 800px) {
  /* Reduce animation complexity and duration for low-end devices */
  .skeleton-shimmer {
    animation-duration: 2s;
    animation-timing-function: ease-out;
    will-change: background-position;
  }
  
  .skeleton-fade-in,
  .skeleton-fade-out,
  .content-fade-in {
    animation-duration: 0.2s;
    animation-timing-function: ease;
  }
  
  /* Simplified gradient for better performance */
  .skeleton {
    background-image: linear-gradient(
      90deg,
      var(--eerie-black-1) 0%,
      var(--jet) 50%,
      var(--eerie-black-1) 100%
    );
    background-size: 200% 100%;
  }
  
  /* Optimize skeleton grid gaps for small screens */
  .skeleton-services,
  .skeleton-awards,
  .skeleton-projects,
  .skeleton-blog {
    gap: 10px;
  }
  
  /* Reduce skeleton card complexity */
  .skeleton-card::before {
    display: none;
  }
  
  .skeleton-project-card::before,
  .skeleton-blog-card::before {
    display: none;
  }
  
  /* Disable box-shadows on low-end devices for better performance */
  .skeleton-card,
  .skeleton-service-card,
  .skeleton-award-item,
  .skeleton-project-card,
  .skeleton-blog-card {
    box-shadow: none;
  }
  
  /* Reduce border-radius complexity */
  .skeleton-card,
  .skeleton-project-card,
  .skeleton-blog-card {
    border-radius: 8px;
  }
  
  /* Optimize will-change properties */
  .skeleton-shimmer {
    will-change: background-position;
  }
  
  .skeleton-transition {
    will-change: opacity;
  }
}

/* Battery and CPU optimization for mobile devices */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  /* Limit animation iterations to save battery */
  .skeleton-shimmer {
    animation-duration: 1.8s;
    animation-iteration-count: 5;
    animation-fill-mode: forwards;
  }
  
  /* Stagger animations to reduce simultaneous processing */
  .skeleton-shimmer:nth-child(even) {
    animation-delay: 0.2s;
  }
  
  .skeleton-shimmer:nth-child(3n) {
    animation-delay: 0.4s;
  }
  
  /* Optimize rendering performance */
  .skeleton-card {
    will-change: auto;
    transform: translateZ(0); /* Force hardware acceleration */
  }
  
  .skeleton-shimmer {
    will-change: background-position;
    transform: translateZ(0);
  }
  
  /* Reduce skeleton complexity on mobile for better performance */
  .skeleton-service-card,
  .skeleton-award-item,
  .skeleton-project-card,
  .skeleton-blog-card {
    box-shadow: var(--shadow-2);
  }
  
  /* Optimize animation timing for mobile */
  .skeleton-transition,
  .content-transition {
    transition-duration: 0.3s;
    transition-timing-function: ease-out;
  }
}

/* Performance optimization for devices with limited memory */
@media (max-width: 480px) and (max-device-memory: 2) {
  /* Disable complex animations on low-memory devices */
  .skeleton-shimmer {
    animation: none;
    background: var(--eerie-black-2);
    background-image: none;
  }
  
  /* Use simple opacity changes instead */
  .skeleton-pulse {
    animation: simple-pulse 2s ease-in-out infinite;
  }
  
  @keyframes simple-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
  }
  
  /* Disable all transform animations */
  .skeleton-transition,
  .content-transition,
  .skeleton-fade-in,
  .skeleton-fade-out,
  .content-fade-in {
    transform: none !important;
    transition: opacity 0.2s ease !important;
  }
  
  /* Remove will-change to reduce memory usage */
  .skeleton-shimmer,
  .skeleton-card,
  .skeleton-transition {
    will-change: auto;
  }
}

/* CPU optimization for older devices */
@media (max-width: 768px) and (max-device-pixel-ratio: 1) {
  /* Reduce animation complexity for low-DPI devices */
  .skeleton-shimmer {
    animation-duration: 2.5s;
    animation-timing-function: linear;
  }
  
  /* Simplify gradients */
  .skeleton {
    background-image: linear-gradient(
      90deg,
      var(--eerie-black-1) 25%,
      var(--jet) 50%,
      var(--eerie-black-1) 75%
    );
  }
  
  /* Disable complex pseudo-elements */
  .skeleton-card::before,
  .skeleton-project-card::before,
  .skeleton-blog-card::before {
    display: none;
  }
}

/* Responsive skeleton improvements for foldable devices */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .skeleton-services {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  
  .skeleton-awards {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  
  .skeleton-projects {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  
  .skeleton-blog {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
}

/* Responsive skeleton for ultra-wide mobile screens */
@media (min-width: 480px) and (max-width: 767px) and (orientation: landscape) {
  .skeleton-services {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  
  .skeleton-awards {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  
  .skeleton-projects {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  
  .skeleton-blog {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  
  /* Optimize skeleton heights for landscape mobile */
  .skeleton-project-image,
  .skeleton-blog-image {
    height: 120px;
  }
  
  .skeleton-award-icon-box {
    height: 100px;
    max-width: 180px;
  }
}

/* Dark mode accessibility enhancements */
@media (prefers-color-scheme: dark) {
  .skeleton {
    background: var(--eerie-black-1);
    background-image: linear-gradient(
      90deg,
      var(--eerie-black-1) 0%,
      var(--jet) 20%,
      var(--eerie-black-1) 40%,
      var(--eerie-black-1) 100%
    );
  }
  
  .skeleton-card {
    background: var(--border-gradient-onyx);
    box-shadow: var(--shadow-2);
  }
}

/* Light mode accessibility (fallback) */
@media (prefers-color-scheme: light) {
  .skeleton {
    background: #f0f0f0;
    background-image: linear-gradient(
      90deg,
      #f0f0f0 0%,
      #e0e0e0 20%,
      #f0f0f0 40%,
      #f0f0f0 100%
    );
  }
  
  .skeleton-card {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .skeleton-card::before {
    background: #fff;
    border: 1px solid #f0f0f0;
  }
}

/* Touch device optimizations */
@media (pointer: coarse) {
  .skeleton-card {
    min-height: 44px; /* Minimum touch target size */
  }
  
  .skeleton-skills-item {
    min-height: 44px;
    min-width: 44px;
  }
  
  .skeleton-service-icon {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Hover device optimizations */
@media (hover: hover) {
  .skeleton-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
  }
  
  .skeleton-project-card:hover,
  .skeleton-blog-card:hover {
    box-shadow: var(--shadow-4), 0 8px 25px rgba(255, 183, 3, 0.15);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
  }
}

/* Forced colors mode (Windows High Contrast) */
@media (forced-colors: active) {
  .skeleton {
    background: ButtonFace;
    border: 1px solid ButtonText;
    forced-color-adjust: none;
  }
  
  .skeleton-card {
    background: Canvas;
    border: 2px solid ButtonText;
    forced-color-adjust: none;
  }
  
  .skeleton-shimmer {
    animation: none;
  }
}

/* Transparency preference support */
@media (prefers-reduced-transparency: reduce) {
  .skeleton-card::before {
    opacity: 1;
  }
  
  .skeleton-fade-in,
  .skeleton-fade-out {
    opacity: 1;
  }
  
  .skeleton-transition.fade-out {
    opacity: 0;
    visibility: hidden;
  }
  
  .skeleton-transition.fade-in {
    opacity: 1;
    visibility: visible;
  }
}

/*-----------------------------------*\
  #RESPONSIVE DESIGN
\*-----------------------------------*/

/* Mobile first approach - base styles are for mobile */

/* Extra small mobile devices (320px and up) */
@media (min-width: 320px) {
  .skeleton-card {
    padding: 12px;
  }
  
  .skeleton-service-card {
    padding: 16px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  
  .skeleton-service-icon {
    width: 32px;
    height: 32px;
  }
  
  .skeleton-project-image,
  .skeleton-blog-image {
    height: 160px;
  }
  
  .skeleton-about .skeleton-text {
    margin-bottom: 6px;
  }
  
  /* Optimize skeleton sizes for small screens */
  .skeleton-text-h2 {
    height: 20px;
  }
  
  .skeleton-text-h3 {
    height: 18px;
  }
  
  .skeleton-text-h4 {
    height: 16px;
  }
  
  .skeleton-text-body {
    height: 14px;
  }
  
  /* Adjust grid layouts for mobile */
  .skeleton-services {
    gap: 12px;
  }
  
  .skeleton-awards {
    gap: 12px;
  }
  
  .skeleton-projects {
    gap: 16px;
  }
  
  .skeleton-blog {
    gap: 12px;
  }
  
  /* Mobile-specific skeleton adjustments */
  .skeleton-award-icon-box {
    height: 100px;
    max-width: 200px;
  }
  
  .skeleton-skills {
    gap: 6px;
    padding: 15px;
  }
  
  .skeleton-skills-item {
    padding: 6px 10px;
    min-width: 60px;
    height: 32px;
    font-size: 12px;
  }
}

/* Small mobile devices (450px and up) - Align with main CSS breakpoint */
@media (min-width: 450px) {
  .skeleton-card {
    padding: 18px;
  }
  
  .skeleton-service-card {
    padding: 22px;
    gap: 14px;
  }
  
  .skeleton-service-icon {
    width: 36px;
    height: 36px;
  }
  
  .skeleton-project-image,
  .skeleton-blog-image {
    height: 170px;
  }
  
  .skeleton-award-icon-box {
    height: 110px;
    max-width: 220px;
  }
  
  .skeleton-skills {
    gap: 7px;
    padding: 16px;
  }
  
  .skeleton-skills-item {
    padding: 7px 11px;
    min-width: 65px;
    height: 34px;
  }
  
  /* Improve text skeleton sizing */
  .skeleton-text-h2 {
    height: 22px;
  }
  
  .skeleton-text-h3 {
    height: 19px;
  }
  
  .skeleton-text-h4 {
    height: 17px;
  }
  
  .skeleton-text-body {
    height: 15px;
  }
}

/* Medium mobile devices (480px and up) */
@media (min-width: 480px) {
  .skeleton-card {
    padding: 20px;
  }
  
  .skeleton-service-card {
    padding: 25px;
    gap: 16px;
  }
  
  .skeleton-service-icon {
    width: 38px;
    height: 38px;
  }
  
  .skeleton-project-image,
  .skeleton-blog-image {
    height: 190px;
  }
  
  .skeleton-award-icon-box {
    height: 120px;
    max-width: 240px;
  }
  
  .skeleton-skills {
    gap: 8px;
  }
  
  .skeleton-skills-item {
    padding: 8px 12px;
    min-width: 70px;
    height: 36px;
  }
}

/* Tablet responsive adjustments (580px and up) - Align with main CSS breakpoint */
@media (min-width: 580px) {
  .skeleton-services {
    grid-template-columns: 1fr;
  }
  
  .skeleton-services .skeleton-service-card {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 18px;
    padding: 30px;
    flex-direction: row;
    text-align: left;
  }
  
  .skeleton-service-icon {
    width: 40px;
    height: 40px;
  }
  
  .skeleton-avatar {
    width: 120px;
    height: 120px;
    border-radius: 30px;
  }
  
  .skeleton-card {
    padding: 30px;
  }
  
  .skeleton-project-card .skeleton-content,
  .skeleton-blog-card .skeleton-content {
    padding: 25px;
  }
  
  .skeleton-project-image,
  .skeleton-blog-image {
    height: 200px;
  }
  
  .skeleton-award-icon-box {
    height: 150px;
    max-width: 280px;
  }
  
  .skeleton-skills {
    gap: 10px;
  }
  
  .skeleton-skills-item {
    padding: 10px 15px;
    min-width: 80px;
    height: 38px;
  }
  
  /* Enhanced grid layouts for tablet */
  .skeleton-services {
    gap: 20px;
  }
  
  .skeleton-awards {
    gap: 20px;
  }
  
  .skeleton-projects {
    gap: 22px;
  }
  
  .skeleton-blog {
    gap: 20px;
  }
  
  /* Improve text skeleton proportions for tablet */
  .skeleton-text-h2 {
    height: var(--fs-1);
  }
  
  .skeleton-text-h3 {
    height: var(--fs-2);
  }
  
  .skeleton-text-h4 {
    height: var(--fs-4);
  }
  
  .skeleton-text-body {
    height: var(--fs-6);
  }
}

/* Medium tablet (768px and up) - Align with main CSS breakpoint */
@media (min-width: 768px) {
  .skeleton-projects {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  
  .skeleton-blog {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  
  .skeleton-timeline {
    margin-left: 65px;
  }
  
  .skeleton-timeline .skeleton-timeline-item::before {
    left: -40px;
  }
  
  .skeleton-timeline .skeleton-timeline-item::after {
    left: -43px;
    height: 8px;
    width: 8px;
  }
  
  .skeleton-award-icon-box {
    height: 180px;
    max-width: 320px;
  }
  
  .skeleton-services {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .skeleton-skills {
    gap: 12px;
  }
  
  .skeleton-skills-item {
    padding: 11px 16px;
    min-width: 85px;
    height: 40px;
  }
  
  /* Enhanced spacing for tablet layout */
  .skeleton-awards {
    gap: 25px;
  }
  
  /* Better proportions for larger screens */
  .skeleton-avatar {
    width: 140px;
    height: 140px;
    border-radius: 35px;
  }
  
  /* Optimize skeleton animations for tablet */
  .skeleton-shimmer {
    animation-duration: 1.4s;
  }
}

/* Large tablet/Small desktop (1024px and up) - Align with main CSS breakpoint */
@media (min-width: 1024px) {
  .skeleton-services {
    grid-template-columns: 1fr 1fr;
    gap: 20px 25px;
  }
  
  .skeleton-projects {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  
  .skeleton-blog {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  
  .skeleton-blog-image {
    height: 230px;
  }
  
  .skeleton-project-image {
    height: 220px;
  }
  
  .skeleton-award-icon-box {
    height: 200px;
    max-width: 350px;
  }
  
  .skeleton-skills {
    gap: 15px;
  }
  
  .skeleton-skills-item {
    padding: 12px 18px;
    min-width: 90px;
    height: 42px;
  }
  
  /* Enhanced layouts for desktop */
  .skeleton-awards {
    gap: 30px;
  }
  
  /* Better avatar sizing for desktop */
  .skeleton-avatar {
    width: 150px;
    height: 150px;
    border-radius: 40px;
  }
  
  /* Optimize skeleton card layouts */
  .skeleton-service-card {
    padding: 35px;
    gap: 20px;
  }
  
  .skeleton-project-card .skeleton-content,
  .skeleton-blog-card .skeleton-content {
    padding: 30px;
  }
}

/* Desktop (1200px and up) - Align with main CSS breakpoint */
@media (min-width: 1200px) {
  .skeleton-awards {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .skeleton-services {
    gap: 25px 30px;
  }
  
  .skeleton-projects {
    gap: 35px;
  }
  
  .skeleton-blog {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  
  .skeleton-skills {
    gap: 18px;
  }
  
  /* Enhanced skeleton proportions for desktop */
  .skeleton-award-icon-box {
    height: 220px;
    max-width: 380px;
  }
  
  .skeleton-avatar {
    width: 160px;
    height: 160px;
    border-radius: 45px;
  }
  
  /* Improved text skeleton sizing for desktop */
  .skeleton-text-h2 {
    height: 28px;
    margin-bottom: 18px;
  }
  
  .skeleton-text-h3 {
    height: 22px;
    margin-bottom: 12px;
  }
  
  .skeleton-text-h4 {
    height: 18px;
    margin-bottom: 8px;
  }
  
  .skeleton-text-body {
    height: 16px;
    margin-bottom: 10px;
  }
  
  /* Enhanced card layouts */
  .skeleton-service-card {
    padding: 40px;
    gap: 22px;
  }
  
  .skeleton-card {
    padding: 35px;
  }
}

/* Large desktop (1250px and up) - Align with main CSS breakpoint */
@media (min-width: 1250px) {
  .skeleton-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50px;
  }
  
  /* Adjust skeleton sizes for larger screens */
  .skeleton-text-h2 {
    height: 32px;
    margin-bottom: 20px;
  }
  
  .skeleton-text-h3 {
    height: 24px;
    margin-bottom: 15px;
  }
  
  .skeleton-text-h4 {
    height: 20px;
    margin-bottom: 10px;
  }
  
  .skeleton-text-body {
    height: 17px;
    margin-bottom: 12px;
  }
  
  .skeleton-award-icon-box {
    height: 240px;
    max-width: 400px;
  }
  
  /* Enhanced spacing and sizing */
  .skeleton-service-card {
    padding: 45px;
    gap: 25px;
  }
  
  .skeleton-service-icon {
    width: 45px;
    height: 45px;
  }
  
  .skeleton-card {
    padding: 40px;
  }
  
  .skeleton-project-card .skeleton-content,
  .skeleton-blog-card .skeleton-content {
    padding: 35px;
  }
  
  .skeleton-skills-item {
    padding: 14px 20px;
    min-width: 95px;
    height: 44px;
  }
}

/* Extra large desktop (1440px and up) */
@media (min-width: 1440px) {
  .skeleton-services {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 35px;
  }
  
  .skeleton-awards {
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
  }
  
  .skeleton-projects {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  
  .skeleton-blog {
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
  }
}

/* Ultra-wide screens (1920px and up) */
@media (min-width: 1920px) {
  .skeleton-services {
    grid-template-columns: repeat(3, 1fr);
    gap: 35px 40px;
  }
  
  .skeleton-awards {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
  }
  
  .skeleton-projects {
    grid-template-columns: repeat(4, 1fr);
    gap: 45px;
  }
  
  .skeleton-blog {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
  }
}

/* High DPI/Retina display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .skeleton {
    background-size: 400% 100%;
  }
  
  .skeleton-shimmer {
    animation-duration: 1.2s;
  }
  
  /* Enhance skeleton borders for high DPI */
  .skeleton-card {
    border: 0.5px solid var(--jet);
  }
  
  .skeleton-service-icon,
  .skeleton-award-image,
  .skeleton-project-image,
  .skeleton-blog-image {
    border: 0.5px solid var(--eerie-black-2);
  }
}

/* Responsive skeleton grid improvements */
@media (min-width: 320px) and (max-width: 479px) {
  /* Stack all skeleton cards vertically on small mobile */
  .skeleton-services,
  .skeleton-awards,
  .skeleton-projects,
  .skeleton-blog {
    grid-template-columns: 1fr;
  }
  
  /* Optimize skeleton card spacing for small screens */
  .skeleton-service-card {
    margin-bottom: 8px;
  }
  
  .skeleton-award-item {
    margin-bottom: 8px;
  }
  
  /* Reduce skeleton animation complexity on small screens */
  .skeleton-shimmer {
    animation-duration: 2s;
    animation-timing-function: ease-out;
  }
}

@media (min-width: 480px) and (max-width: 579px) {
  /* Optimize for medium mobile screens */
  .skeleton-services {
    grid-template-columns: 1fr;
  }
  
  .skeleton-awards {
    grid-template-columns: 1fr;
  }
  
  .skeleton-projects {
    grid-template-columns: 1fr;
  }
  
  .skeleton-blog {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 580px) and (max-width: 767px) {
  /* Small tablet optimizations */
  .skeleton-projects {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .skeleton-blog {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .skeleton-services {
    grid-template-columns: 1fr;
  }
  
  .skeleton-awards {
    grid-template-columns: 1fr;
  }
}

/* Responsive skeleton text width adjustments */
@media (max-width: 479px) {
  .skeleton-about .skeleton-text:nth-child(1) { width: 90%; }
  .skeleton-about .skeleton-text:nth-child(2) { width: 100%; }
  .skeleton-about .skeleton-text:nth-child(3) { width: 75%; }
  
  .skeleton-services .skeleton-service-card .skeleton-text:nth-child(1) { width: 80%; }
  .skeleton-services .skeleton-service-card .skeleton-text:nth-child(2) { width: 100%; }
  .skeleton-services .skeleton-service-card .skeleton-text:nth-child(3) { width: 90%; }
  
  .skeleton-projects .skeleton-project-card .skeleton-text:nth-child(1) { width: 80%; }
  .skeleton-projects .skeleton-project-card .skeleton-text:nth-child(2) { width: 60%; }
  .skeleton-projects .skeleton-project-card .skeleton-text:nth-child(3) { width: 100%; }
  .skeleton-projects .skeleton-project-card .skeleton-text:nth-child(4) { width: 90%; }
}

/* Touch-friendly skeleton interactions */
@media (pointer: coarse) {
  .skeleton-card {
    min-height: 44px; /* Minimum touch target size */
  }
  
  .skeleton-skills-item {
    min-height: 44px;
    min-width: 44px;
  }
  
  .skeleton-service-icon {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Increase skeleton button sizes for touch */
  .skeleton-button {
    min-height: 48px;
  }
  
  .skeleton-input {
    min-height: 52px;
  }
}

/* Landscape orientation adjustments for mobile/tablet */
@media (orientation: landscape) and (max-height: 600px) {
  .skeleton-card {
    padding: 15px 20px;
  }
  
  .skeleton-service-card {
    padding: 20px 25px;
  }
  
  .skeleton-project-image,
  .skeleton-blog-image {
    height: 140px;
  }
  
  .skeleton-award-icon-box {
    height: 120px;
  }
  
  /* Optimize for landscape mobile viewing */
  .skeleton-services {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  .skeleton-projects {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
  
  .skeleton-blog {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  /* Reduce skeleton heights for landscape */
  .skeleton-text-h2 {
    height: 18px;
  }
  
  .skeleton-text-h3 {
    height: 16px;
  }
  
  .skeleton-text-h4 {
    height: 14px;
  }
  
  .skeleton-text-body {
    height: 12px;
  }
}

/* Responsive skeleton container heights to prevent layout shift */
@media (max-width: 479px) {
  .skeleton-container.skeleton-services {
    min-height: 320px;
  }
  
  .skeleton-container.skeleton-awards {
    min-height: 280px;
  }
  
  .skeleton-container.skeleton-projects {
    min-height: 500px;
  }
  
  .skeleton-container.skeleton-blog {
    min-height: 350px;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .skeleton-container.skeleton-services {
    min-height: 380px;
  }
  
  .skeleton-container.skeleton-awards {
    min-height: 320px;
  }
  
  .skeleton-container.skeleton-projects {
    min-height: 550px;
  }
  
  .skeleton-container.skeleton-blog {
    min-height: 400px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .skeleton-container.skeleton-services {
    min-height: 420px;
  }
  
  .skeleton-container.skeleton-awards {
    min-height: 360px;
  }
  
  .skeleton-container.skeleton-projects {
    min-height: 600px;
  }
  
  .skeleton-container.skeleton-blog {
    min-height: 450px;
  }
}

@media (min-width: 1024px) {
  .skeleton-container.skeleton-services {
    min-height: 480px;
  }
  
  .skeleton-container.skeleton-awards {
    min-height: 400px;
  }
  
  .skeleton-container.skeleton-projects {
    min-height: 700px;
  }
  
  .skeleton-container.skeleton-blog {
    min-height: 500px;
  }
}

/* Print media - disable animations and optimize for print */
@media print {
  .skeleton,
  .skeleton-shimmer,
  .skeleton-pulse {
    animation: none !important;
    background: #f5f5f5 !important;
    background-image: none !important;
  }
  
  .skeleton-container {
    display: none !important;
  }
}

/*-----------------------------------*\
  #REUSABLE SKELETON COMPONENTS
\*-----------------------------------*/

/* Skeleton wrapper for easy integration */
.skeleton-wrapper {
  position: relative;
  overflow: hidden;
}

.skeleton-wrapper.loading .skeleton-container {
  display: block;
}

.skeleton-wrapper.loading .actual-content {
  display: none;
}

.skeleton-wrapper:not(.loading) .skeleton-container {
  display: none;
}

.skeleton-wrapper:not(.loading) .actual-content {
  display: block;
}

/* Skeleton content placeholders */
.skeleton-content-placeholder {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-content-placeholder.horizontal {
  flex-direction: row;
  align-items: center;
}

/* Skeleton icon placeholders */
.skeleton-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--eerie-black-2);
}

.skeleton-icon.large {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.skeleton-icon.small {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Skeleton button placeholders */
.skeleton-button {
  height: 40px;
  border-radius: 14px;
  background: var(--border-gradient-onyx);
  position: relative;
}

.skeleton-button::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
}

.skeleton-button.small {
  height: 32px;
  border-radius: 8px;
}

.skeleton-button.large {
  height: 48px;
  border-radius: 16px;
}

/* Skeleton form elements */
.skeleton-input {
  height: 48px;
  border-radius: 14px;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
}

.skeleton-textarea {
  height: 120px;
  border-radius: 14px;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
}

/* Skeleton navigation elements */
.skeleton-nav-item {
  height: 20px;
  width: 60px;
  border-radius: 4px;
  background: var(--eerie-black-2);
}

/* Skeleton contact elements */
.skeleton-contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.skeleton-contact-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--border-gradient-onyx);
  position: relative;
}

.skeleton-contact-icon::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--eerie-black-1);
  border-radius: inherit;
}

.skeleton-contact-info {
  flex: 1;
}

.skeleton-contact-info .skeleton-text:first-child {
  width: 40%;
  height: 12px;
  margin-bottom: 4px;
}

.skeleton-contact-info .skeleton-text:last-child {
  width: 70%;
  height: 14px;
}

/*-----------------------------------*\
  #SKELETON STATE MANAGEMENT
\*-----------------------------------*/

/* Hide skeleton when content is loaded */
.content-loaded .skeleton-container {
  display: none;
}

/* Show skeleton during loading */
.loading-skeleton .skeleton-container {
  display: block;
}

/* Enhanced smooth transition between skeleton and content */
.skeleton-transition {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skeleton-transition.fade-out {
  opacity: 0;
  transform: translateY(-15px) scale(0.98);
  visibility: hidden;
}

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

/* Content transition states */
.content-transition {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-transition.fade-out {
  opacity: 0;
  transform: translateY(15px) scale(0.98);
}

.content-transition.fade-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Enhanced skeleton fade animations */
.skeleton-fade-in {
  animation: skeletonFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.skeleton-fade-out {
  animation: skeletonFadeOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes skeletonFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes skeletonFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

/* Enhanced content fade in animation */
.content-fade-in {
  animation: contentFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Enhanced staggered content animations for list items */
.content-fade-in .service-item,
.content-fade-in .award-item,
.content-fade-in .skills-item,
.content-fade-in .timeline-item,
.content-fade-in .project-item,
.content-fade-in .blog-post-item {
  animation: staggeredFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

/* Individual staggered animation class */
.staggered-fade-in {
  animation: staggeredFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

/* Enhanced staggered animation delays for services */
.content-fade-in .service-item:nth-child(1) { animation-delay: 0.1s; }
.content-fade-in .service-item:nth-child(2) { animation-delay: 0.2s; }
.content-fade-in .service-item:nth-child(3) { animation-delay: 0.3s; }
.content-fade-in .service-item:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced staggered animation delays for awards */
.content-fade-in .award-item:nth-child(1) { animation-delay: 0.1s; }
.content-fade-in .award-item:nth-child(2) { animation-delay: 0.2s; }
.content-fade-in .award-item:nth-child(3) { animation-delay: 0.3s; }
.content-fade-in .award-item:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced staggered animation delays for skills */
.content-fade-in .skills-item:nth-child(1) { animation-delay: 0.05s; }
.content-fade-in .skills-item:nth-child(2) { animation-delay: 0.1s; }
.content-fade-in .skills-item:nth-child(3) { animation-delay: 0.15s; }
.content-fade-in .skills-item:nth-child(4) { animation-delay: 0.2s; }
.content-fade-in .skills-item:nth-child(5) { animation-delay: 0.25s; }
.content-fade-in .skills-item:nth-child(6) { animation-delay: 0.3s; }
.content-fade-in .skills-item:nth-child(7) { animation-delay: 0.35s; }
.content-fade-in .skills-item:nth-child(8) { animation-delay: 0.4s; }
.content-fade-in .skills-item:nth-child(9) { animation-delay: 0.45s; }
.content-fade-in .skills-item:nth-child(10) { animation-delay: 0.5s; }

/* Enhanced staggered animation delays for timeline */
.content-fade-in .timeline-item:nth-child(1) { animation-delay: 0.1s; }
.content-fade-in .timeline-item:nth-child(2) { animation-delay: 0.2s; }
.content-fade-in .timeline-item:nth-child(3) { animation-delay: 0.3s; }
.content-fade-in .timeline-item:nth-child(4) { animation-delay: 0.4s; }
.content-fade-in .timeline-item:nth-child(5) { animation-delay: 0.5s; }
.content-fade-in .timeline-item:nth-child(6) { animation-delay: 0.6s; }

/* Enhanced staggered animation delays for projects */
.content-fade-in .project-item:nth-child(1) { animation-delay: 0.1s; }
.content-fade-in .project-item:nth-child(2) { animation-delay: 0.2s; }
.content-fade-in .project-item:nth-child(3) { animation-delay: 0.3s; }
.content-fade-in .project-item:nth-child(4) { animation-delay: 0.4s; }
.content-fade-in .project-item:nth-child(5) { animation-delay: 0.5s; }
.content-fade-in .project-item:nth-child(6) { animation-delay: 0.6s; }

/* Enhanced staggered animation delays for blog posts */
.content-fade-in .blog-post-item:nth-child(1) { animation-delay: 0.1s; }
.content-fade-in .blog-post-item:nth-child(2) { animation-delay: 0.2s; }
.content-fade-in .blog-post-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes staggeredFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Enhanced layout shift prevention during transitions */
.skeleton-container,
.actual-content {
  min-height: 0;
  transition: min-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure skeleton containers maintain layout structure to prevent shift */
.skeleton-container.skeleton-about {
  min-height: 120px;
}

.skeleton-container.skeleton-services {
  min-height: 400px;
}

.skeleton-container.skeleton-awards {
  min-height: 300px;
}

.skeleton-container.skeleton-skills {
  min-height: 100px;
}

.skeleton-container.skeleton-timeline {
  min-height: 300px;
}

.skeleton-container.skeleton-projects {
  min-height: 600px;
}

.skeleton-container.skeleton-blog {
  min-height: 400px;
}

/* Enhanced smooth height transitions to prevent layout shift */
.service-list,
.award-list,
.skills-list,
.timeline-list,
.project-list,
.blog-posts-list,
.about-text {
  transition: min-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent content jump during skeleton-to-content transition */
.skeleton-wrapper {
  position: relative;
  overflow: hidden;
  min-height: inherit;
}

.skeleton-wrapper .skeleton-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 2;
}

.skeleton-wrapper .actual-content {
  position: relative;
  z-index: 1;
}

.skeleton-wrapper.loading .skeleton-container {
  position: relative;
  z-index: 2;
}

.skeleton-wrapper.loading .actual-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  opacity: 0;
  z-index: 1;
}

.skeleton-wrapper:not(.loading) .skeleton-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  opacity: 0;
  z-index: 1;
}

.skeleton-wrapper:not(.loading) .actual-content {
  position: relative;
  z-index: 2;
}

/* Loading state indicators */
.loading-skeleton {
  position: relative;
}

.loading-skeleton::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--orange-yellow-crayola), transparent);
  animation: loadingBar 2s ease-in-out infinite;
  z-index: 9999;
}

@keyframes loadingBar {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Content loaded state */
.content-loaded {
  position: relative;
}

.content-loaded::before {
  display: none;
}

/* Enhanced accessibility improvements for transitions */
@media (prefers-reduced-motion: reduce) {
  .skeleton-fade-in,
  .skeleton-fade-out,
  .content-fade-in,
  .skeleton-transition,
  .content-transition,
  .staggered-fade-in {
    animation: none !important;
    transition: none !important;
  }
  
  .skeleton-fade-in {
    opacity: 1;
    transform: none;
  }
  
  .skeleton-fade-out {
    opacity: 0;
    transform: none;
  }
  
  .content-fade-in {
    opacity: 1;
    transform: none;
  }
  
  .staggered-fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .skeleton-transition.fade-out {
    opacity: 0;
    transform: none;
    visibility: hidden;
  }
  
  .skeleton-transition.fade-in,
  .content-transition.fade-in {
    opacity: 1;
    transform: none;
    visibility: visible;
  }
  
  .content-fade-in .service-item,
  .content-fade-in .award-item,
  .content-fade-in .skills-item,
  .content-fade-in .timeline-item,
  .content-fade-in .project-item,
  .content-fade-in .blog-post-item {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  
  .loading-skeleton::before {
    animation: none;
  }
  
  /* Ensure immediate transitions for reduced motion */
  .service-list,
  .award-list,
  .skills-list,
  .timeline-list,
  .project-list,
  .blog-posts-list,
  .about-text {
    transition: none !important;
  }
}

/* Battery saving mode optimizations */
.battery-saving-mode .skeleton-shimmer {
  animation: none;
  background-image: none;
  background: var(--eerie-black-2);
}

.battery-saving-mode .skeleton-pulse {
  animation-duration: 3s;
  animation-iteration-count: 2;
}

.battery-saving-mode .skeleton-transition,
.battery-saving-mode .content-transition {
  transition-duration: 0.1s;
}

.battery-saving-mode .loading-skeleton::before {
  display: none;
}

/* Low-end device optimizations */
.low-end-device .skeleton-card::before,
.low-end-device .skeleton-project-card::before,
.low-end-device .skeleton-blog-card::before {
  display: none;
}

.low-end-device .skeleton-shimmer {
  animation-duration: 2.5s;
  animation-timing-function: ease-out;
}

.low-end-device .skeleton {
  background-image: linear-gradient(
    90deg,
    var(--eerie-black-1) 30%,
    var(--jet) 50%,
    var(--eerie-black-1) 70%
  );
}

/* High contrast mode enhancements */
.high-contrast .skeleton {
  border: 2px solid currentColor;
  background: transparent;
}

.high-contrast .skeleton-card {
  border: 3px solid currentColor;
  background: transparent;
}

/* Reduced transparency mode */
.reduced-transparency .skeleton-fade-in,
.reduced-transparency .skeleton-fade-out,
.reduced-transparency .content-fade-in {
  opacity: 1 !important;
}

.reduced-transparency .skeleton-transition.fade-out {
  visibility: hidden;
  opacity: 1;
}

.reduced-transparency .skeleton-transition.fade-in {
  visibility: visible;
  opacity: 1;
}

/* Error Handling and Fallback States */
.error-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 2rem;
    margin: 2rem 0;
    background: var(--bg-gradient-jet);
    border: 1px solid var(--jet);
    border-radius: 20px;
    text-align: center;
}

.error-content {
    max-width: 500px;
    width: 100%;
}

.error-icon {
    font-size: 4rem;
    color: var(--orange-yellow-crayola);
    margin-bottom: 1rem;
}

.error-title {
    color: var(--white-2);
    font-size: var(--fs-3);
    font-weight: var(--fw-500);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--light-gray);
    font-size: var(--fs-6);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.error-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-gradient-yellow-1);
    color: var(--smoky-black);
    border: none;
    border-radius: 14px;
    font-size: var(--fs-6);
    font-weight: var(--fw-500);
    cursor: pointer;
    transition: var(--transition-1);
    min-width: 180px;
    justify-content: center;
}

.error-actions button:hover {
    background: var(--bg-gradient-yellow-2);
    transform: translateY(-2px);
}

.error-actions button:focus {
    outline: 2px solid var(--orange-yellow-crayola);
    outline-offset: 2px;
}

.btn-retry {
    background: var(--bg-gradient-yellow-1) !important;
}

.btn-offline {
    background: var(--bg-gradient-jet) !important;
    color: var(--white-2) !important;
    border: 1px solid var(--jet) !important;
}

.btn-contact {
    background: transparent !important;
    color: var(--orange-yellow-crayola) !important;
    border: 1px solid var(--orange-yellow-crayola) !important;
}

/* User Messages */
.user-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    background: var(--bg-gradient-jet);
    border: 1px solid var(--jet);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-2);
    animation: slideInRight 0.3s ease-out;
}

.user-message-error {
    border-color: #ff6b6b;
    background: linear-gradient(to bottom right, 
        hsla(0, 100%, 70%, 0.1), 
        hsla(0, 100%, 70%, 0.05)
    );
}

.user-message-warning {
    border-color: var(--orange-yellow-crayola);
    background: linear-gradient(to bottom right, 
        hsla(45, 100%, 72%, 0.1), 
        hsla(45, 100%, 72%, 0.05)
    );
}

.user-message-success {
    border-color: #51cf66;
    background: linear-gradient(to bottom right, 
        hsla(142, 76%, 73%, 0.1), 
        hsla(142, 76%, 73%, 0.05)
    );
}

.message-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message-content ion-icon:first-child {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-text {
    color: var(--white-2);
    font-size: var(--fs-7);
    flex: 1;
}

.message-close {
    background: none;
    border: none;
    color: var(--light-gray);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition-1);
    flex-shrink: 0;
}

.message-close:hover {
    color: var(--white-2);
    background: var(--jet);
}

.message-close ion-icon {
    font-size: 1.25rem;
}

/* Contact Fallback */
.contact-fallback {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-gradient-jet);
    border-radius: 20px;
    margin: 2rem 0;
}

.contact-content h2 {
    color: var(--white-2);
    font-size: var(--fs-2);
    margin-bottom: 1rem;
}

.contact-content p {
    color: var(--light-gray);
    font-size: var(--fs-6);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white-2);
    font-size: var(--fs-6);
}

.contact-item ion-icon {
    font-size: 1.5rem;
    color: var(--orange-yellow-crayola);
}

.contact-item a {
    color: var(--orange-yellow-crayola);
    text-decoration: none;
    transition: var(--transition-1);
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design for Error States */
@media (max-width: 768px) {
    .error-fallback {
        margin: 1rem;
        padding: 1.5rem;
        min-height: 300px;
    }
    
    .error-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .error-actions button {
        width: 100%;
        min-width: auto;
    }
    
    .user-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .contact-methods {
        align-items: flex-start;
    }
    
    .contact-item {
        justify-content: center;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .error-fallback {
        border: 2px solid var(--white-2);
        background: var(--smoky-black);
    }
    
    .error-actions button {
        border: 2px solid currentColor;
    }
    
    .user-message {
        border: 2px solid currentColor;
        background: var(--smoky-black);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .user-message {
        animation: none;
    }
    
    .error-actions button {
        transition: none;
    }
    
    .error-actions button:hover {
        transform: none;
    }
}

/* Battery Saving Mode */
.battery-saving-mode .error-fallback,
.battery-saving-mode .user-message {
    animation: none;
    transition: none;
}

.battery-saving-mode .error-actions button {
    transition: none;
}

.battery-saving-mode .error-actions button:hover {
    transform: none;
}/* 
Skeleton Error States */
.skeleton-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 2rem;
    background: var(--bg-gradient-jet);
    border: 1px solid var(--jet);
    border-radius: 16px;
    margin: 1rem 0;
}

.skeleton-error-content {
    text-align: center;
    max-width: 300px;
}

.skeleton-error-icon {
    font-size: 2.5rem;
    color: var(--orange-yellow-crayola);
    margin-bottom: 1rem;
}

.skeleton-error-message {
    color: var(--light-gray);
    font-size: var(--fs-7);
    margin-bottom: 1.5rem;
}

.skeleton-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-gradient-yellow-1);
    color: var(--smoky-black);
    border: none;
    border-radius: 10px;
    font-size: var(--fs-8);
    font-weight: var(--fw-500);
    cursor: pointer;
    transition: var(--transition-1);
}

.skeleton-retry-btn:hover {
    background: var(--bg-gradient-yellow-2);
    transform: translateY(-1px);
}

.skeleton-retry-btn:focus {
    outline: 2px solid var(--orange-yellow-crayola);
    outline-offset: 2px;
}

/* Section-specific error skeleton sizing */
.skeleton-error-about {
    min-height: 150px;
}

.skeleton-error-services {
    min-height: 200px;
}

.skeleton-error-projects {
    min-height: 250px;
}

.skeleton-error-blog {
    min-height: 200px;
}

/* Responsive error skeletons */
@media (max-width: 768px) {
    .skeleton-error {
        padding: 1.5rem;
        min-height: 150px;
    }
    
    .skeleton-error-icon {
        font-size: 2rem;
    }
    
    .skeleton-retry-btn {
        padding: 0.75rem 1.25rem;
        font-size: var(--fs-7);
    }
}

/* High contrast mode for error skeletons */
@media (prefers-contrast: high) {
    .skeleton-error {
        border: 2px solid var(--white-2);
        background: var(--smoky-black);
    }
    
    .skeleton-retry-btn {
        border: 2px solid var(--smoky-black);
    }
}

/* Reduced motion for error skeletons */
@media (prefers-reduced-motion: reduce) {
    .skeleton-retry-btn {
        transition: none;
    }
    
    .skeleton-retry-btn:hover {
        transform: none;
    }
}