/* Prevent horizontal scrolling on all devices */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Ensure all containers respect viewport bounds */
* {
  max-width: 100%;
}

/* Fix for potential wide elements */
.container {
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Ensure grid containers don't overflow */
.grid {
  max-width: 100%;
  overflow: hidden;
}

/* Fix for any absolutely positioned elements */
.absolute {
  max-width: 100vw;
  box-sizing: border-box;
}

/* Fix for any fixed positioned elements */
.fixed {
  max-width: 100vw;
  box-sizing: border-box;
}

/* Optimized Enhanced Project Section */
.project-card {
  box-shadow: 0 4px 20px 0 rgba(0,0,0,0.08);
  border-radius: 1.25rem;
  background: var(--tw-bg-opacity,1) #fff;
  position: relative;
  transition: all 0.3s ease; /* Faster transition */
  overflow: hidden;
  backdrop-filter: blur(5px); /* Reduced blur */
  border: 1px solid rgba(0, 0, 0, 0.1); /* Visible border for light mode */
  will-change: transform, box-shadow;
  transform: translateZ(0);
}

/* Enhanced border visibility for light mode */
.project-card {
  /* Add stronger border visibility and subtle glow for light mode */
  box-shadow: 
    0 4px 20px 0 rgba(0,0,0,0.08),
    inset 0 0 0 1px rgba(45, 212, 191, 0.08),
    0 0 8px rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.2); /* More visible border */
}

.dark .project-card {
  /* Enhanced border for dark mode with subtle glow */
  box-shadow: 
    0 4px 20px 0 rgba(0,0,0,0.3),
    0 0 10px rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.25);
}

/* Simplified hover effect */
.project-card:hover, .project-card:focus-within {
  box-shadow: 
    0 15px 35px 0 rgba(45,212,191,0.25), 
    0 8px 20px 0 rgba(0,0,0,0.1),
    0 0 25px rgba(45, 212, 191, 0.2),
    0 0 50px rgba(45, 212, 191, 0.1);
  transform: translateY(-8px) scale(1.01); /* Reduced scale */
  border: 1px solid rgba(45, 212, 191, 0.5); /* Enhanced border on hover */
  z-index: 10;
}

.dark .project-card:hover {
  box-shadow: 
    0 15px 35px 0 rgba(45,212,191,0.35), 
    0 8px 20px 0 rgba(0,0,0,0.2),
    0 0 30px rgba(45, 212, 191, 0.25),
    0 0 60px rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.6); /* Enhanced border on hover for dark mode */
}

/* Enhanced focus state for accessibility */
.project-card:focus {
  outline: none;
  border: 2px solid rgba(45, 212, 191, 0.5);
  box-shadow: 
    0 4px 20px 0 rgba(0,0,0,0.08),
    0 0 0 3px rgba(45, 212, 191, 0.1);
}

.dark .project-card:focus {
  border: 2px solid rgba(45, 212, 191, 0.7);
  box-shadow: 
    0 4px 20px 0 rgba(0,0,0,0.3),
    0 0 0 3px rgba(45, 212, 191, 0.2);
}

.project-card .project-img {
  border-radius: 1.25rem 1.25rem 0 0;
  transition: all 0.4s ease; /* Faster transition */
  position: relative;
  z-index: 2;
}

.project-card:hover .project-img {
  filter: brightness(1.05) saturate(1.1); /* Reduced filter intensity */
  transform: scale(1.03); /* Reduced scale */
}



/* Optimized Timeline nodes - Reduced complexity */
.timeline-node {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  will-change: transform, opacity;
}

.timeline-node::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.2);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.timeline-node:hover::before,
.timeline-node.active::before {
  opacity: 1;
}

/* Simplified pulse animation - Less GPU intensive */
@keyframes simple-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.timeline-node.active {
  animation: simple-pulse 1.5s ease-in-out infinite;
}

/* Optimized Circuit background animation - Reduced complexity */
#circuit-background {
  transition: opacity 0.3s ease;
  will-change: opacity;
}

#circuit-path {
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: circuit-flow-light 6s ease-in-out infinite;
  will-change: stroke-dashoffset;
}

#circuit-dot {
  animation: dot-pulse-light 3s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Lighter circuit animations */
@keyframes circuit-flow-light {
  0% {
    stroke-dashoffset: 500;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -500;
  }
}

@keyframes dot-pulse-light {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.9;
  }
}
/* Enhanced Tech tag micro-interactions */
.tech-tag {
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  backdrop-filter: blur(10px);
}

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

.tech-tag:hover::before {
  left: 100%;
}

.tech-tag:hover, .tech-tag:focus {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(45, 212, 191, 0.3),
    0 0 0 2px rgba(45, 212, 191, 0.2);
}

.dark .tech-tag:hover, .dark .tech-tag:focus {
  box-shadow: 
    0 8px 25px rgba(45, 212, 191, 0.4),
    0 0 0 2px rgba(45, 212, 191, 0.3);
}

/* Enhanced project link animations */
.project-link {
  font-weight: 700;
  text-decoration: none;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0.5rem 0;
}

.project-link .arrow {
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1.2em;
}

.project-link:hover .arrow, .project-link:focus .arrow {
  transform: translateX(8px) scale(1.2);
}

.project-link::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; 
  right: 0; 
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, currentColor 0%, transparent 100%);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-link:hover::after, .project-link:focus::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Optimized floating animations for project cards - Lighter performance */
@keyframes float-project-light {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Conditional animations - only run when not interacting */
.project-card {
  animation: float-project-light 6s ease-in-out infinite;
  animation-play-state: paused; /* Start paused */
}

.project-card.enable-float:nth-child(1) {
  animation-play-state: running;
  animation-delay: 0s;
}

.project-card.enable-float:nth-child(2) {
  animation-play-state: running;
  animation-delay: -2s;
}

.project-card.enable-float:nth-child(3) {
  animation-play-state: running;
  animation-delay: -4s;
}

.project-card:hover,
.project-card:focus {
  animation-play-state: paused;
}

/* Mobile-specific enhancements for project cards */
.active-mobile {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 15px 40px rgba(45, 212, 191, 0.3) !important;
  z-index: 10 !important;
}



/* Project card initial states for scroll animation */
.project-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Simple section title styling with subtle glow */
.section-title {
  position: relative;
  text-shadow: 0 0 10px rgba(45, 212, 191, 0.3);
  transition: text-shadow 0.3s ease;
}

.dark .section-title {
  text-shadow: 0 0 15px rgba(45, 212, 191, 0.4);
}

/* Accessibility: Reduce glow for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .section-title {
        text-shadow: none;
        transition: none;
    }
    
    .dark .section-title {
        text-shadow: none;
    }
}

/* Enhanced focus state for section titles */
.section-title:focus {
    outline: 2px solid rgba(45, 212, 191, 0.5);
    outline-offset: 4px;
}

/* Circuit pattern enhancements */
#circuit-background {
  color: #2dd4bf;
  opacity: 0.15;
  transition: all 0.5s ease;
}

.dark #circuit-background {
  color: #2dd4bf;
  opacity: 0.25;
}

/* Performance optimizations for project section */
.project-card,
.timeline-node,
.tech-tag {
  will-change: auto;
  backface-visibility: hidden;
  transform-style: flat;
}

.project-card:hover {
  will-change: transform, box-shadow;
}

/* Mobile optimizations - Fix scroll trigger issues */
@media (max-width: 768px) {
  /* Projects Section Mobile Optimizations */
  #projects {
    position: relative;
    overflow: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
  }
  
  .projects-container {
    position: relative;
    overflow: visible !important;
    touch-action: pan-y !important; /* Allow vertical scrolling only */
    -webkit-overflow-scrolling: touch !important;
  }
  
  .project-card {
    backdrop-filter: none;
    max-width: 100%;
    overflow: hidden;
    position: relative !important;
    /* Remove all transforms that can interfere with scrolling */
    transform: none !important;
    will-change: auto !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
    /* Ensure proper touch behavior */
    touch-action: manipulation !important;
    pointer-events: auto !important;
  }
  
  .project-card:hover,
  .project-card:focus,
  .project-card:active {
    transform: none !important; /* Completely disable transform on mobile */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(45, 212, 191, 0.3) !important;
    z-index: auto !important; /* Prevent z-index conflicts */
  }
  
  /* Disable scroll-triggered animations that can interfere */
  .project-card.in-view {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
  
  /* Disable floating animations completely on mobile */
  .project-card.enable-float,
  .project-card:not(.enable-float) {
    animation: none !important;
  }
  
  /* Optimize grid layouts for mobile */
  .grid {
    gap: 1rem;
    max-width: 100%;
    overflow: visible !important;
  }
  
  /* Ensure images don't overflow */
  .project-img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    transition: none !important; /* Disable image animations on mobile */
  }
  
  /* Remove hover effects on images for mobile */
  .project-card:hover .project-img {
    transform: none !important;
    filter: none !important;
  }
  
  /* Ensure all child elements allow touch scrolling */
  .project-card *,
  .project-card a,
  .project-card div {
    touch-action: manipulation !important;
    pointer-events: auto !important;
  }
  
  /* Optimize circuit background for mobile */
  #circuit-path,
  #circuit-dot {
    animation-duration: 8s;
    will-change: auto;
  }
  
  .project-card:hover,
  .project-card:focus,
  .project-card:active {
    transform: none !important; /* Completely disable transform on mobile */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(45, 212, 191, 0.3) !important;
    z-index: auto !important; /* Prevent z-index conflicts */
  }
  
  /* Disable scroll-triggered animations that can interfere */
  .project-card.in-view {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
  
  /* Disable floating animations completely on mobile */
  .project-card.enable-float,
  .project-card:not(.enable-float) {
    animation: none !important;
  }
  
  /* Optimize grid layouts for mobile */
  .grid {
    gap: 1rem;
    max-width: 100%;
    overflow: visible !important;
  }
  
  /* Ensure images don't overflow */
  .project-img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    transition: none !important; /* Disable image animations on mobile */
  }
  
  /* Remove hover effects on images for mobile */
  .project-card:hover .project-img {
    transform: none !important;
    filter: none !important;
  }
  
  /* Ensure all child elements allow touch scrolling */
  .project-card *,
  .project-card a,
  .project-card div {
    touch-action: manipulation !important;
    pointer-events: auto !important;
  }
  
  /* Optimize circuit background for mobile */
  #circuit-path,
  #circuit-dot {
    animation-duration: 8s;
    will-change: auto;
  }
}

/* Smooth scroll behavior for project section */
#projects {
  scroll-margin-top: 80px;
}

/* Enhanced project link hover states */
.project-link:hover {
  text-shadow: 0 0 8px currentColor;
}

/* Additional mobile optimizations - Prevent animation conflicts */
@media (max-width: 640px) {
  /* Force complete reset of all animations and transforms on small screens */
  .project-card {
    border-radius: 1rem;
    margin-bottom: 1rem;
    transform: none !important;
    will-change: auto !important;
    animation: none !important;
    position: relative !important;
    overflow: hidden !important;
    touch-action: pan-y !important; /* Critical: Only allow vertical scrolling */
  }
  
  .project-card:hover,
  .project-card:focus,
  .project-card:active {
    transform: none !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
    animation: none !important;
  }
  
  /* Disable all scroll-triggered animations */
  .project-card.in-view,
  .project-card[data-aos] {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
    animation: none !important;
  }
  
  /* Optimize tech tags for mobile */
  .tech-tag {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    transition: none !important;
    transform: none !important;
  }
  
  .tech-tag:hover {
    transform: none !important;
  }
  
  .project-link {
    font-size: 0.9rem;
    transition: color 0.2s ease !important;
  }
  
  /* Ensure smooth scrolling without animation interference */
  #projects {
    scroll-behavior: smooth !important;
    overflow: visible !important;
    position: relative !important;
    touch-action: pan-y !important;
  }
  
  .projects-container {
    touch-action: pan-y !important;
    overflow: visible !important;
    position: relative !important;
  }
  
  /* Disable AOS animations on mobile for projects section */
  #projects [data-aos] {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}

/* Dark mode specific enhancements */
.dark .project-card {
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(45, 212, 191, 0.1);
}

.dark .project-card:hover {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(45, 212, 191, 0.25);
}

/* Loading animation for project cards */
@keyframes project-card-load {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-card.loaded {
  animation: project-card-load 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Responsive enhancements */
@media (max-width: 768px) {
  .project-card {
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12); /* Slightly more visible border on mobile */
  }
  
  .dark .project-card {
    border: 1px solid rgba(45, 212, 191, 0.15); /* Enhanced dark mode border on mobile */
  }
  
  .project-card:hover {
    transform: translateY(-8px) scale(1.02);
    border: 1px solid rgba(45, 212, 191, 0.25); /* Enhanced hover border */
  }
  
  .dark .project-card:hover {
    border: 1px solid rgba(45, 212, 191, 0.4); /* Enhanced dark mode hover border */
  }
  
  .timeline-node {
    display: none !important;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .project-card {
    animation: none;
  }
  
  .project-card:hover {
    transform: translateY(-4px);
  }
  
  #circuit-path,
  #circuit-dot {
    animation: none;
  }
}
/* Back to Top Button Styles */
#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  background: linear-gradient(135deg, #2dd4bf 60%, #3b82f6 100%);
  color: #fff;
  padding: 0.75rem;
  border-radius: 9999px;
  box-shadow: 0 4px 24px 0 #2dd4bf55, 0 1.5px 8px 0 #3b82f655;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  outline: none;
  display: none;
}

#back-to-top:hover, #back-to-top:focus {
  transform: scale(1.12);
  box-shadow: 0 8px 32px 0 #2dd4bf99, 0 3px 16px 0 #3b82f699;
}

/* Mobile: Enhanced visibility for light mode */
@media (max-width: 768px) {
  #back-to-top {
    bottom: 1rem;
    right: 1rem;
    padding: 0.625rem;
    /* Enhanced background with stronger contrast for light mode */
    background: linear-gradient(135deg, #14b8a6 60%, #2563eb 100%);
    box-shadow: 
      0 4px 20px rgba(20, 184, 166, 0.4),
      0 2px 8px rgba(37, 99, 235, 0.3),
      0 0 0 1px rgba(8, 72, 75, 0.8);
    border: 2px solid rgba(0, 196, 176, 0.9);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  /* Force icon visibility on mobile */
  #back-to-top svg {
    color: #007a74 !important;
    fill: none !important;
    stroke: #00c79c !important;
    stroke-width: 3 !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  }
  
  #back-to-top:hover, #back-to-top:focus {
    transform: scale(1.12);
    box-shadow: 
      0 8px 30px rgba(20, 184, 166, 0.6),
      0 4px 15px rgba(37, 99, 235, 0.5),
      0 0 0 1px rgba(255, 255, 255, 1);
    background: linear-gradient(135deg, #0f766e 60%, #1d4ed8 100%);
  }
  
  #back-to-top:hover svg {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8));
  }
}
/* Custom styles untuk melengkapi Tailwind CSS */
body {
    font-family: 'Inter', sans-serif;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-effect {
    background: rgba(17, 24, 39, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Styling untuk link navigasi */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2dd4bf; /* teal-400 */
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link-mobile {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.nav-link-mobile:hover {
    background-color: rgba(209, 213, 219, 1); /* gray-300 */
}

.dark .nav-link-mobile:hover {
    background-color: rgba(55, 65, 81, 1); /* gray-700 */
}


/* Judul Section - Pure text with subtle glow */
.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 0 10px rgba(45, 212, 191, 0.3);
    transition: text-shadow 0.3s ease;
}

.dark .section-title {
    text-shadow: 0 0 15px rgba(45, 212, 191, 0.4);
}

/* Accessibility: Reduce glow for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .section-title {
        text-shadow: none;
        transition: none;
    }
    
    .dark .section-title {
        text-shadow: none;
    }
}

/* Enhanced focus state for section titles */
.section-title:focus {
    outline: 2px solid rgba(45, 212, 191, 0.5);
    outline-offset: 4px;
}

/* Tombol Utama & Sekunder - Perfect Text Centering */
.btn-primary {
    background-color: #14b8a6;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    transform: translateZ(0);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    min-height: 3rem !important;
    box-sizing: border-box !important;
}

.btn-primary:hover {
    background-color: #0d9488;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #374151;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    transform: translateZ(0);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    min-height: 3rem !important;
    box-sizing: border-box !important;
}

.btn-secondary:hover {
    background-color: #4b5563;
    transform: translateY(-2px);
}

/* Efek Glow pada Hero Section */
.hero-glow {
    box-shadow: 
        0 0 60px 15px rgba(45, 212, 191, 0.3),
        0 0 100px 25px rgba(45, 212, 191, 0.2),
        0 0 140px 35px rgba(45, 212, 191, 0.1);
    animation: pulse-glow 4s infinite ease-in-out;
    position: relative;
}

.hero-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at center, 
        rgba(45, 212, 191, 0.2) 0%, 
        rgba(45, 212, 191, 0.1) 30%, 
        transparent 70%);
    animation: pulse-glow-inner 4s infinite ease-in-out;
    z-index: -1;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 0 60px 15px rgba(45, 212, 191, 0.3),
            0 0 100px 25px rgba(45, 212, 191, 0.2),
            0 0 140px 35px rgba(45, 212, 191, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 0 80px 20px rgba(45, 212, 191, 0.4),
            0 0 120px 30px rgba(45, 212, 191, 0.3),
            0 0 160px 40px rgba(45, 212, 191, 0.15);
        transform: scale(1.02);
    }
}

@keyframes pulse-glow-inner {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Kartu Keahlian (Skill Card) - Ultra optimized for smooth animation */
.skill-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    perspective: 1000px;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dark .skill-card {
    background-color: #1f2937;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.1), transparent);
    transition: left 0.5s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(45, 212, 191, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.5rem;
}

.skill-card:hover::after {
    opacity: 1;
}

.skill-card:hover {
    transform: translateY(-15px) scale(1.05) translateZ(0);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    animation-play-state: paused;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark .skill-card:hover {
    box-shadow: 0 20px 40px rgba(45, 212, 191, 0.2);
    background: linear-gradient(145deg, #2d3748, #1a202c);
    animation-play-state: paused;
}

.skill-icon {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    width: 4rem;
    height: 4rem;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
    text-align: center !important;
    flex-direction: column !important;
}

.skill-icon img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(1);
    display: none; /* Hide by default, show via JavaScript */
    margin: 0 auto; /* Center the image */
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.skill-icon i {
    width: 3rem;
    height: 3rem;
    color: #14b8a6;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative !important;
    left: 0 !important;
    transform: translateX(0) !important;
}

.skill-card:hover .skill-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 8px 16px rgba(45, 212, 191, 0.3));
}

.skill-card:hover .skill-icon img {
    filter: brightness(1.1) saturate(1.2);
}

.skill-card:hover .skill-icon i {
    color: #0d9488;
}

.skill-title {
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.skill-card:hover .skill-title {
    color: #0d9488;
    transform: translateY(-2px);
}

.skill-desc {
    font-size: 0.875rem;
    color: #6b7280;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    margin-top: 0.25rem;
}

.dark .skill-desc {
    color: #9ca3af;
}

.skill-card:hover .skill-desc {
    color: #4b5563;
    transform: translateY(2px);
}

.dark .skill-card:hover .skill-desc {
    color: #d1d5db;
}

/* Ultra-smooth floating animation untuk skill cards */
@keyframes float-smooth {
    0% { 
        transform: translate3d(0, 0px, 0);
    }
    33.33% { 
        transform: translate3d(0, -4px, 0);
    }
    66.66% { 
        transform: translate3d(0, -2px, 0);
    }
    100% { 
        transform: translate3d(0, 0px, 0);
    }
}

@keyframes float-smooth-reverse {
    0% { 
        transform: translate3d(0, 0px, 0);
    }
    33.33% { 
        transform: translate3d(0, -2px, 0);
    }
    66.66% { 
        transform: translate3d(0, -4px, 0);
    }
    100% { 
        transform: translate3d(0, 0px, 0);
    }
}

.skill-card:nth-child(odd) {
    animation: float-smooth 10s ease-in-out infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.skill-card:nth-child(even) {
    animation: float-smooth-reverse 10s ease-in-out infinite;
    animation-delay: -2.5s;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.skill-card:hover {
    animation-play-state: paused;
}


/* Kartu Proyek (Project Card) */
.project-card {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08); /* Subtle border for light mode */
    transition: all 0.3s ease;
}

.dark .project-card {
    background-color: #111827;
    border: 1px solid rgba(45, 212, 191, 0.1); /* Teal border for dark mode */
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    border: 1px solid rgba(45, 212, 191, 0.2); /* Enhanced border on hover */
}

.dark .project-card:hover {
    box-shadow: 0 20px 25px -5px rgb(45 212 191 / 0.2), 0 8px 10px -6px rgb(45 212 191 / 0.2);
    border: 1px solid rgba(45, 212, 191, 0.3); /* Enhanced border on hover for dark mode */
}

.project-card img {
    transition: transform 0.4s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.tech-tag {
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}

.project-link {
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    text-decoration: underline;
}


/* Ikon Sosial Media - Enhanced with strict sizing control */
.social-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: #6b7280 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.social-icon:hover {
    color: #2dd4bf !important;
    transform: scale(1.05) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.dark .social-icon {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #9ca3af !important;
}

.dark .social-icon:hover {
    color: #5eead4 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Social Icon Container - untuk mengelola ikon PNG dan fallback SVG */
.social-icon-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

/* Social Media Icons using SVG/PNG - strict size control with perfect centering */
.social-icon img {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain !important;
    filter: brightness(0.8) !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.social-icon:hover img {
    filter: brightness(1.2) !important;
    transform: scale(1.1) rotate(5deg) !important;
}

/* Fallback SVG icons (Lucide) - strict size control with perfect centering */
.social-icon i[data-lucide] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    stroke-width: 2 !important;
    flex-shrink: 0 !important;
}

.social-icon:hover i[data-lucide] {
    transform: scale(1.1) rotate(5deg) !important;
}

/* Dark mode adjustments for social icons */
.dark .social-icon img {
    filter: brightness(1.2) invert(1) !important;
}

.dark .social-icon:hover img {
    filter: brightness(1.5) invert(1) !important;
}

/* Specific colors for social media icons on hover - with strict sizing */
.social-icon[title="LinkedIn"]:hover {
    background-color: rgba(0, 119, 181, 0.1) !important;
    border-color: rgba(0, 119, 181, 0.3) !important;
    box-shadow: 0 8px 20px rgba(0, 119, 181, 0.2) !important;
}

.social-icon[title="GitHub"]:hover {
    background-color: rgba(51, 51, 51, 0.1) !important;
    border-color: rgba(51, 51, 51, 0.3) !important;
    box-shadow: 0 8px 20px rgba(51, 51, 51, 0.2) !important;
}

.social-icon[title="Instagram"]:hover {
    background-color: rgba(225, 48, 108, 0.1) !important;
    border-color: rgba(225, 48, 108, 0.3) !important;
    box-shadow: 0 8px 20px rgba(225, 48, 108, 0.2) !important;
}

.social-icon[title="YouTube"]:hover {
    background-color: rgba(255, 0, 0, 0.1) !important;
    border-color: rgba(255, 0, 0, 0.3) !important;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.2) !important;
}

.dark .social-icon[title="LinkedIn"]:hover {
    background-color: rgba(0, 119, 181, 0.15) !important;
    border-color: rgba(0, 119, 181, 0.4) !important;
    box-shadow: 0 8px 20px rgba(0, 119, 181, 0.3) !important;
}

.dark .social-icon[title="GitHub"]:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2) !important;
}

.dark .social-icon[title="Instagram"]:hover {
    background-color: rgba(225, 48, 108, 0.15) !important;
    border-color: rgba(225, 48, 108, 0.4) !important;
    box-shadow: 0 8px 20px rgba(225, 48, 108, 0.3) !important;
}

.dark .social-icon[title="YouTube"]:hover {
    background-color: rgba(255, 0, 0, 0.15) !important;
    border-color: rgba(255, 0, 0, 0.4) !important;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3) !important;
}

/* Responsive sizing for social icons */
@media (max-width: 768px) {
    .social-icon {
        width: 36px !important;
        height: 36px !important;
    }
    
    .social-icon img,
    .social-icon i[data-lucide] {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
    }
    
    .social-icon:hover img,
    .social-icon:hover i[data-lucide] {
        transform: scale(1.1) rotate(5deg) !important;
    }
}



/* Canvas untuk Partikel */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none; /* Mencegah canvas mengganggu interaksi */
}

/* Menyembunyikan elemen untuk animasi GSAP */
.hero-content > * {
    opacity: 0;
    transform: translateY(20px);
}

/* Perbaikan Layout dan Responsivitas */
* {
    box-sizing: border-box;
    max-width: 100%; /* Prevent any element from exceeding viewport */
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll */
    max-width: 100vw;
}

body {
    overflow-x: hidden; /* Double protection against horizontal scroll */
    max-width: 100vw;
    position: relative;
}

/* Perbaikan untuk container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%; /* Ensure full width utilization */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Mobile container optimizations */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem; /* Slightly reduce padding for more space */
        max-width: 100vw;
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem; /* Even more space on very small screens */
    }
}

/* Perbaikan untuk mobile menu */
#mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
}

/* Perbaikan untuk hero section */
#hero {
    padding-top: 80px;
}

/* Perbaikan untuk images */
img {
    max-width: 100%;
    height: auto;
}

/* Perbaikan untuk grid responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
        text-shadow: 0 0 8px rgba(45, 212, 191, 0.25);
    }
    
    .hero-content h1 {
        font-size: 2rem !important;
    }
    
    .hero-content p {
        font-size: 1rem !important;
    }
    
    .skill-card {
        padding: 1rem;
    }
    
    .project-card {
        margin-bottom: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.1); /* Ensure border visibility on medium screens */
    }
    
    .dark .project-card {
        border: 1px solid rgba(45, 212, 191, 0.12); /* Dark mode border for medium screens */
    }
}

/* Perbaikan untuk dark mode transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Memastikan z-index yang benar */
.glass-effect {
    position: relative;
    z-index: 50;
}

main {
    position: relative;
    z-index: 10;
}

footer {
    position: relative;
    z-index: 10;
}

/* Perbaikan untuk animasi skill cards yang lebih smooth */
.skill-card {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(45, 212, 191, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.5rem;
}

.skill-card:hover::after {
    opacity: 1;
}

/* Optimasi untuk performa animasi skill cards */
.skill-card, .skill-icon, .skill-title, .skill-desc {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    transform: translateZ(0);
}

/* Enable GPU acceleration for all skill card elements */
.skill-card * {
    transform: translateZ(0);
}

/* Prevent layout thrashing */
.skill-card {
    contain: layout style paint;
}

/* Perbaikan untuk mobile - Reduced animation untuk performa */
@media (max-width: 768px) {
    .skill-card:hover {
        transform: translateY(-10px) scale(1.02) translateZ(0);
        animation-play-state: paused;
    }
    
    .skill-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .skill-icon img,
    .skill-icon i {
        width: 2rem;
        height: 2rem;
    }
    
    /* Reduce floating animation on mobile for better performance */
    .skill-card:nth-child(odd) {
        animation: float-smooth 10s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    }
    
    .skill-card:nth-child(even) {
        animation: float-smooth-reverse 10s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
        animation-delay: -2.5s;
    }
}

/* Import placeholder styles */
@import url('assets/icons/placeholder-styles.css');

/* Additional styles for better icon handling */
.skill-icon img {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(1);
}

.skill-card:hover .skill-icon img {
    filter: brightness(1.1) saturate(1.2);
}

/* Ensure icons are properly centered */
.skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-icon img,
.skill-icon i,
.skill-icon-placeholder {
    flex-shrink: 0;
}

/* Animasi Interaktif untuk Foto About Section */
.photo-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.photo-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(45, 212, 191, 0.3), transparent);
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.photo-container:hover::before {
    opacity: 1;
}

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

.about-photo {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateZ(0);
    position: relative;
    z-index: 10;
}

.photo-container:hover .about-photo {
    transform: scale(1.05) rotateY(5deg);
    filter: brightness(1.1) contrast(1.1) saturate(1.2);
}

.photo-overlay {
    background: linear-gradient(45deg, 
        rgba(45, 212, 191, 0.1) 0%, 
        rgba(20, 184, 166, 0.2) 50%, 
        rgba(13, 148, 136, 0.1) 100%);
    z-index: 5;
}

.photo-container:hover .photo-overlay {
    opacity: 1;
}

.photo-glow {
    background: radial-gradient(circle at center, 
        rgba(45, 212, 191, 0.4) 0%, 
        rgba(45, 212, 191, 0.2) 30%, 
        transparent 70%);
    filter: blur(20px);
    z-index: 2;
}

.photo-container:hover .photo-glow {
    opacity: 1;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.4;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Efek Floating untuk Container */
.photo-container {
    animation: float-photo 6s ease-in-out infinite;
}

@keyframes float-photo {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
    }
    33% { 
        transform: translateY(-10px) rotate(1deg);
    }
    66% { 
        transform: translateY(-5px) rotate(-1deg);
    }
}

.photo-container:hover {
    animation: none;
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(45, 212, 191, 0.3);
}

/* Efek Parallax untuk Foto */
.photo-container:hover .about-photo {
    transform: scale(1.05) translateZ(20px);
}

/* Responsive untuk Mobile */
@media (max-width: 768px) {
    .photo-container:hover {
        transform: translateY(-10px) scale(1.01);
    }
    
    .photo-container:hover .about-photo {
        transform: scale(1.03);
    }
}

/* Efek Shimmer */
.photo-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.5s ease;
    z-index: 15;
}

.photo-container:hover::after {
    left: 100%;
}

/* Download Section Styling - Perfect Layout with Enhanced Border Glow */
.download-card {
    transition: all 0.3s ease;
    transform: translateY(0);
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 500px !important;
    position: relative;
    border: 1px solid rgba(45, 212, 191, 0.25);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(45, 212, 191, 0.15),
        0 0 10px rgba(45, 212, 191, 0.08);
}

.dark .download-card {
    border: 1px solid rgba(45, 212, 191, 0.3);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(45, 212, 191, 0.2),
        0 0 15px rgba(45, 212, 191, 0.12);
}

/* Ensure grid items have equal height */
.download-section .grid {
    align-items: stretch !important;
    display: grid !important;
}

.download-section .grid > div {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.download-card:hover {
    transform: translateY(-10px);
    border: 1px solid rgba(45, 212, 191, 0.6);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(45, 212, 191, 0.5),
        0 0 25px rgba(45, 212, 191, 0.25),
        0 0 50px rgba(45, 212, 191, 0.1);
}

.dark .download-card:hover {
    border: 1px solid rgba(45, 212, 191, 0.8);
    box-shadow: 
        0 20px 40px rgba(45, 212, 191, 0.1),
        0 0 0 1px rgba(45, 212, 191, 0.6),
        0 0 30px rgba(45, 212, 191, 0.35),
        0 0 60px rgba(45, 212, 191, 0.15);
}

/* Download card content layout */
.download-card-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    height: 100% !important;
    min-height: 100% !important;
}

.download-card-header {
    flex-shrink: 0 !important;
}

.download-card-body {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.download-card-description {
    flex-grow: 1 !important;
    margin-bottom: 1.5rem !important;
}

.download-card-description p {
    margin-bottom: 0 !important;
}

.download-card-tags {
    flex-shrink: 0 !important;
    margin-bottom: 1.5rem !important;
}

.download-card-tags span {
    white-space: nowrap;
}

/* Responsive download cards */
@media (max-width: 768px) {
    .download-card {
        min-height: 450px !important;
    }
}

@media (max-width: 480px) {
    .download-card {
        min-height: 420px !important;
    }
}

.download-card .btn-primary,
.download-card .btn-secondary {
    transition: all 0.3s ease;
}

.download-card .btn-primary:hover,
.download-card .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Fix for Download Button Clickability - Perfect Text Centering */
.download-card .btn-primary,
.download-card .btn-secondary {
    position: relative;
    z-index: 100;
    pointer-events: auto;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    transition: all 0.3s ease;
    transform: translateZ(0);
    min-height: 3rem !important;
    box-sizing: border-box !important;
}

.download-card .btn-primary {
    background-color: #14b8a6;
    color: white;
}

.download-card .btn-secondary {
    background-color: #14b8a6;
    color: white;
}

.download-card .btn-primary:hover {
    background-color: #0d9488;
    transform: translateY(-2px);
}

.download-card .btn-secondary:hover {
    background-color: #4b5563;
    transform: translateY(-2px);
}

/* Perfect text centering for all button content */
.btn-primary span,
.btn-secondary span,
.download-card .btn-primary span,
.download-card .btn-secondary span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    width: 100% !important;
}

/* Perfect icon centering in buttons */
.btn-primary i,
.btn-secondary i,
.download-card .btn-primary i,
.download-card .btn-secondary i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* Contact section button perfect centering */
#copy-email-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    min-height: 3.5rem !important;
    box-sizing: border-box !important;
}

/* Mobile specific centering for contact section */
@media (max-width: 768px) {
    #copy-email-btn {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    #contact {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    #contact .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    /* Ensure button container is perfectly centered */
    #contact > .container > div {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

#copy-email-btn span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

#email-text {
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* Final universal button centering */
button, .btn-primary, .btn-secondary {
    text-align: center !important;
    font-size: inherit !important;
}

/* Ensure download card pseudo-elements don't block clicks */
.download-card::before,
.download-card::after {
    pointer-events: none;
    z-index: 1;
}

.download-card {
    position: relative;
    z-index: 10;
}

/* Force clickable area for download buttons */
.download-card a[download] {
    position: relative;
    z-index: 1000 !important;
    pointer-events: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ensure icons in download buttons are not blocking clicks */
.download-card a[download] i {
    pointer-events: none;
    z-index: 1;
}

/* Remove any potential overlay blocking */
.download-card * {
    pointer-events: auto;
}

.download-card .download-icon {
    pointer-events: none;
}

.download-card .download-icon * {
    pointer-events: none;
}

/* Additional perfect centering rules for social icons */
.social-icon {
    box-sizing: border-box !important;
}

.social-icon img,
.social-icon i[data-lucide] {
    box-sizing: border-box !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    transition: all 0.3s ease !important;
}

.social-icon:hover img {
    transform: translate(-50%, -50%) scale(1.1) rotate(5deg) !important;
}

.social-icon:hover i[data-lucide] {
    transform: translate(-50%, -50%) scale(1.1) rotate(5deg) !important;
}

/* Ensure container is properly positioned */
.social-icon-container {
    position: relative !important;
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .skill-card:nth-child(odd),
    .skill-card:nth-child(even) {
        animation: none;
    }
    
    .skill-card {
        transition: transform 0.2s ease;
    }
}

/* Extra Mobile Scrollbar Hiding for Edge Cases */
@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
  /* This specifically targets touch devices */
  ::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  
  /* For iOS Safari */
  @supports (-webkit-touch-callout: none) {
    html {
      scrollbar-width: none !important;
      -ms-overflow-style: none !important;
    }
  }
  
  /* Prevent any potential scrollbar flicker */
  body {
    overflow: -moz-scrollbars-none !important;
  }
}

/* Sembunyikan scrollbar default di semua browser */
html, body {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}
html::-webkit-scrollbar, body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}


/* Hide Scrollbars on Mobile Only - Keep Desktop Unchanged */
@media (max-width: 768px) {
  /* Hide scrollbar for Chrome, Safari and Opera on mobile */
  html::-webkit-scrollbar,
  body::-webkit-scrollbar,
  *::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
    background: transparent !important;
  }
  
  /* Hide scrollbar for IE, Edge and Firefox on mobile */
  html,
  body {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  
  /* Ensure all elements hide scrollbars on mobile */
  * {
    -webkit-scrollbar-width: none !important;
    -moz-scrollbar-width: none !important;
    -ms-scrollbar-width: none !important;
    scrollbar-width: none !important;
  }
  
  *::-webkit-scrollbar {
    width: 0px !important;
    height: 0px !important;
    background: transparent !important;
    display: none !important;
  }
  
  *::-webkit-scrollbar-track {
    background: transparent !important;
    display: none !important;
  }
  
  *::-webkit-scrollbar-thumb {
    background: transparent !important;
    display: none !important;
  }
  
  *::-webkit-scrollbar-corner {
    background: transparent !important;
    display: none !important;
  }
  
  /* Specifically target containers */
  .container,
  .projects-container,
  #projects,
  section,
  main {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  
  .container::-webkit-scrollbar,
  .projects-container::-webkit-scrollbar,
  #projects::-webkit-scrollbar,
  section::-webkit-scrollbar,
  main::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
  }
}

/* Ensure desktop scrollbars remain unchanged */
@media (min-width: 769px) {
  /* Desktop scrollbar styling remains default/unchanged */
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }
  
  /* Keep default scrollbar behavior on desktop - no changes needed */
}

/* Mobile-specific fixes untuk hero photo, menu button, dan theme toggle */
@media (max-width: 768px) {
    /* Hide profile photo on mobile only in hero section */
    #hero .hero-content > div:first-child {
        display: none !important;
    }
    
    /* Ensure menu button icon is visible on mobile */
    #menu-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.75rem !important;
        border-radius: 0.5rem !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: currentColor !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    #menu-btn:hover {
        background-color: rgba(156, 163, 175, 0.2) !important;
        border-color: rgba(156, 163, 175, 0.3) !important;
        transform: scale(1.05) !important;
    }
    
    .dark #menu-btn {
        background-color: rgba(0, 0, 0, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .dark #menu-btn:hover {
        background-color: rgba(75, 85, 99, 0.3) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Style for PNG menu icon */
    #menu-btn .menu-icon {
        width: 24px !important;
        height: 24px !important;
        display: block !important;
        object-fit: contain !important;
        filter: brightness(0.8) !important;
        flex-shrink: 0 !important;
    }
    
    #menu-btn:hover .menu-icon {
        filter: brightness(1.2) !important;
        transform: rotate(90deg) !important;
    }
    
    .dark #menu-btn .menu-icon {
        filter: brightness(1.2) invert(1) !important;
    }
    
    .dark #menu-btn:hover .menu-icon {
        filter: brightness(1.5) invert(1) !important;
    }
    
    /* Legacy Lucide icon support (fallback) */
    #menu-btn i[data-lucide="menu"] {
        width: 24px !important;
        height: 24px !important;
        display: block !important;
        stroke-width: 2 !important;
        color: currentColor !important;
        fill: none !important;
        stroke: currentColor !important;
    }
    
    /* Larger theme toggle button for mobile */
    #theme-toggle {
        padding: 0.75rem !important;
        width: 48px !important;
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        transition: all 0.2s ease !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    #theme-toggle svg {
        width: 22px !important;
        height: 22px !important;
        color: currentColor !important;
    }
    
    #theme-toggle:hover {
        background-color: rgba(156, 163, 175, 0.15) !important;
        transform: scale(1.05) !important;
    }
    
    .dark #theme-toggle:hover {
        background-color: rgba(75, 85, 99, 0.2) !important;
    }
}

/* Force menu button visibility dengan kontras tinggi */
@media (max-width: 768px) {
    /* Extra visibility untuk menu button */
    #menu-btn {
        background-color: rgba(45, 212, 191, 0.15) !important;
        border: 2px solid rgba(45, 212, 191, 0.3) !important;
        box-shadow: 0 2px 8px rgba(45, 212, 191, 0.2) !important;
    }
    
    #menu-btn:hover {
        background-color: rgba(45, 212, 191, 0.25) !important;
        border-color: rgba(45, 212, 191, 0.5) !important;
        box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3) !important;
    }
    
    .dark #menu-btn {
        background-color: rgba(45, 212, 191, 0.2) !important;
        border-color: rgba(45, 212, 191, 0.4) !important;
        box-shadow: 0 2px 8px rgba(45, 212, 191, 0.3) !important;
    }
    
    .dark #menu-btn:hover {
        background-color: rgba(45, 212, 191, 0.3) !important;
        border-color: rgba(45, 212, 191, 0.6) !important;
        box-shadow: 0 4px 12px rgba(45, 212, 191, 0.4) !important;
    }
    
    /* High contrast untuk icon */
    #menu-btn .menu-icon {
        filter: brightness(0.7) contrast(1.2) !important;
    }
    
    .dark #menu-btn .menu-icon {
        filter: brightness(1.5) invert(1) contrast(1.2) !important;
    }
}

/* Ultimate fallback untuk menu button visibility */
@media (max-width: 768px) {
    /* Force display dengan specificity tinggi */
    header #menu-btn {
        display: flex !important;
        position: relative !important;
        z-index: 9999 !important;
    }
  }