/*--------------------------------------------------------------
# Material Icons
--------------------------------------------------------------*/
/* PERFORMANCE: Removed @import (blocks parallel loading) - moved to HTML with font-display:swap */

/*--------------------------------------------------------------
# Universal Tap Highlight Removal
--------------------------------------------------------------*/
/* Remove blue/gray tap highlight on ALL interactive elements */
*, *::before, *::after {
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
}

/*--------------------------------------------------------------
# PERFORMANCE: GPU Acceleration for Smooth Animations
--------------------------------------------------------------*/
/* Force GPU acceleration for frequently animated/scrolled elements */
#header, .nav-menu, .mobile-nav, section, .portfolio-wrap, .venobox, canvas {
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Optimize transition performance */
* {
  transition-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
}

/*--------------------------------------------------------------
# Image Protection - Prevent Dragging (Desktop & Mobile)
--------------------------------------------------------------*/
/* PERFORMANCE OPTIMIZED: Removed touch-action:none which was blocking scroll */
img {
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  user-drag: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  pointer-events: auto !important;
  /* Mobile-specific: allow scroll while preventing drag */
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  /* CRITICAL FIX: Removed touch-action:none - it was blocking all scrolling! */
  /* Now handled by smart JS logic that allows scroll but prevents drag */
}

/*--------------------------------------------------------------
# Link Protection - Prevent Dragging (Desktop & Mobile)
--------------------------------------------------------------*/
/* PERFORMANCE OPTIMIZED: Kept touch-action:manipulation for better responsiveness */
a, a *, button, button * {
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  user-drag: none !important;
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  /* manipulation = faster clicks, allows pinch-zoom, allows scroll */
  touch-action: manipulation !important;
  /* Prevent text selection on tap */
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  /* TOUCH PERFORMANCE FIX #6: GPU acceleration for all interactive elements */
  /* Ensures buttery smooth touch response on 120Hz+ devices */
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/*--------------------------------------------------------------
# Global Font Override - Ensure everything uses Bungee
--------------------------------------------------------------*/
* {
  font-family: "Bungee", sans-serif !important;
}

/* Exception for Material Icons */
.material-icons,
[class*="material-icons"] {
  font-family: 'Material Icons' !important;
}

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
  font-family: "Bungee", sans-serif;
  color: #000000;
  position: relative;
  background: transparent;
  font-size: 17px;
  /* Increased from default (typically 16px) */
}

body::before {
  content: "";
  position: fixed;
  background: #ffffff;
  background-size: cover;
  left: 0;
  right: 0;
  top: 0;
  height: 100vh;
}

@media (min-width: 1024px) {
  body::before {
    background-attachment: fixed;
  }
}

a {
  color: #4285F4;
}

a:hover {
  color: #4285F4;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Bungee", sans-serif;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
  transition: none;
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  z-index: 997;
  overflow-y: auto;
}

#header * {
  transition: none;
}

#header h1 {
  font-size: 42px;
  margin-top: 0px;
  margin-right: 15px;
  padding: 0;
  line-height: 1;
  font-weight: 700;
  font-family: "Bungee", sans-serif;
}

#header h1 a,
#header h1 a:hover {
  color: #000000;
  line-height: 1;
  display: inline-block;
}

#header h2 {
  font-size: 24px;
  margin-top: 20px;
  color: #240072;
}

#header h2 span {
  color: #000000;
  border-bottom: 5px solid #000000;
  padding-bottom: 5px;
}

#header img {
  padding: 0;
  margin: 0;
}

#header .social-links {
  margin-top: 40px;
  display: flex;
}

#header .social-links a {
  font-size: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  margin-right: 8px;
}

@media (max-width: 992px) {
  #header h1 {
    font-size: 36px;
  }

  #header h2 {
    font-size: 20px;
    line-height: 30px;
  }

  #header .social-links {
    margin-top: 15px;
  }

  #header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop Navigation */
.nav-menu {
  margin-top: 35px;
}

.nav-menu ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu li+li {
  margin-left: 30px;
}

.nav-menu a {
  display: block;
  position: relative;
  color: #fff;
  font-size: 19px;
  font-family: "Bungee", sans-serif;
  font-weight: 400;
}

.nav-menu a:before {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #9e7f25;
  visibility: hidden;
  width: 0px;
  /* TOUCH PERFORMANCE FIX #7: Specific transition properties for better GPU performance */
  transition: width 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.nav-menu a:hover:before,
.nav-menu li:hover>a:before,
.nav-menu .active>a:before {
  visibility: visible;
  width: 25px;
}

.nav-menu a:hover,
.nav-menu .active>a,
.nav-menu li:hover>a {
  color: #12d640;
  text-decoration: none;
}

/*--------------------------------------------------------------
# Desktop Header Optimization - Reduced Gaps and Font Sizes
--------------------------------------------------------------*/
@media (min-width: 993px) {

  /* Reduce font sizes by 10% for desktop with !important to override inline styles */
  #header.header-tops h1 {
    font-size: 37.8px !important;
    /* 42px - 10% = 37.8px */
  }

  #header.header-tops h2 {
    font-size: 21.6px !important;
    /* 24px - 10% = 21.6px */
    margin-top: 18px !important;
    /* 20px - 10% = 18px */
  }

  #header.header-tops .nav-menu {
    margin-top: 31.5px !important;
    /* 35px - 10% = 31.5px */
  }

  #header.header-tops .nav-menu a {
    font-size: 17.1px !important;
    /* 19px - 10% = 17.1px */
  }

  #header.header-tops .social-links {
    margin-top: 36px !important;
    /* 40px - 10% = 36px */
  }

  #header.header-tops .social-links a {
    font-size: 27px !important;
    /* 30px - 10% = 27px */
  }

  #header.header-tops .nav-menu li+li {
    margin-left: 27px !important;
    /* 30px - 10% = 27px */
  }
}

/* Mobile Navigation */
.mobile-nav-toggle {
  position: fixed;
  right: 12px;
  top: 5px;
  z-index: 9998;
  background: 0;
  border: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle img {
  display: block;
}

.mobile-nav-toggle .nav-open-icon {
  display: block;
}

.mobile-nav-toggle .nav-close-icon {
  display: none;
}

body.mobile-nav-active .mobile-nav-toggle .nav-open-icon {
  display: none;
}

body.mobile-nav-active .mobile-nav-toggle .nav-close-icon {
  display: block;
}

.mobile-nav {
  position: fixed;
  top: 60px;
  /* Account for mobile header height */
  left: 0;
  width: 55vw;
  height: calc(100vh - 100px);
  /* Subtract header height (80px) + footer height (45px) */
  z-index: 9999;
  background: rgba(255, 255, 255, 0.2);
  /* Pure semi-transparent white */
  backdrop-filter: blur(20px);
  /* Glassmorphism blur */
  -webkit-backdrop-filter: blur(20px);
  /* Ensure support on Safari */
  overflow: hidden auto;
  transform: translateX(-100%);
  /* TOUCH PERFORMANCE FIX #14: Optimize mobile nav transition for 120Hz screens */
  will-change: transform;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overscroll-behavior: contain;
  border-radius: 0px;
  /* Smooth rounded edges */
  /* GPU acceleration for ultra-smooth slide animation */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mobile-nav-active .mobile-nav {
  transform: translateX(0);
}

.mobile-nav ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 0;
  /* Zero padding as requested */
  margin: 0;
  list-style: none;
}

.mobile-nav a {
  color: #fff;
  padding: 12px 16px;
  /* Reduced from 14px 16px */
  font: 500 16px/1.5 "Bungee", sans-serif;
  text-decoration: none;
  display: block;
  transform: translateZ(0);
  border-bottom: 4px solid rgba(255, 255, 255, 0.3);
  /* TOUCH PERFORMANCE FIX #15: Optimize nav item touch response */
  will-change: color, background-color;
  transition: color 0.2s ease, background-color 0.2s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mobile-nav a:active {
  color: #000000;
}

.mobile-nav li:last-child a {
  border-bottom: none;
}

.mobile-nav-overly,
.mobile-nav *:before,
.mobile-nav *:after {
  display: none !important;
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop Navigation */
/* MATERIAL ICONS FONT LOADING */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src:
    local('Material Icons'),
    local('MaterialIcons-Regular'),
    url(https://fonts.gstatic.com/s/materialicons/v140/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}

/* MOBILE NAVIGATION ICONS */
.mobile-nav a {
  display: flex !important;
  align-items: center !important;
  padding: 8px 20px !important;
  /* Reduced padding to accommodate larger icons */
  position: relative !important;
}

.mobile-nav a .mobile-menu-icon {
  /* Sizing & Spacing */
  width: 32px !important;
  height: 32px !important;
  margin-right: 10px !important;
  flex-shrink: 0 !important;
  /* Display */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  /* Rendering */
  object-fit: contain !important;
}

/* ACTIVE STATE */
.mobile-nav .active a .mobile-menu-icon {
  transform: scale(1.1) !important;
  filter: brightness(1.1) !important;
}

/* Hover effect for better UX */
.mobile-nav a:hover .mobile-menu-icon {
  transform: scale(1.05) !important;
  transition: transform 0.2s ease !important;
}

/* QR Code Overlay Styling */
.qr-code-overlay {
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 9996 !important;
  background: transparent !important;
}

.qr-code-container {
  position: relative !important;
  z-index: 9996 !important;
}

.qr-code-container h3,
.qr-code-container p {
  font-family: "Bungee", sans-serif !important;
}

.icon-btn {
  /* TOUCH PERFORMANCE FIX #11: Optimize button transitions for touch */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* GPU acceleration for instant touch feedback */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.icon-btn:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
}

.icon-btn:active {
  transform: scale(0.95) !important;
}

.copy-link-btn:hover {
  background: #f9ab00 !important;
}

.nfc-share-btn:hover {
  background: #2d8e47 !important;
}

.qr-close-btn:hover {
  background: #c5221f !important;
}

#qrcode {
  display: inline-block;
}

#qrcode img {
  display: block;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .qr-code-container {
    padding: 20px !important;
  }
  
  .qr-code-container h3 {
    font-size: 18px !important;
  }
  
  #qrcode {
    max-width: 240px !important;
  }
  
  #qrcode img {
    width: 100% !important;
    height: auto !important;
  }
  
  .icon-btn {
    width: 45px !important;
    height: 45px !important;
  }
  
  .icon-btn i {
    font-size: 24px !important;
  }
}

/* Header Top */
/* Header Top */
#header.header-top {
  height: 90px;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  /* Pure white with low opacity for glassmorphism */
  backdrop-filter: blur(20px);
  /* Blur effect for frosted glass */
  -webkit-backdrop-filter: blur(20px);
  /* Safari compatibility */
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  /* Subtle white border for depth */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* Soft shadow for glassmorphism */
  z-index: 9997;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
  #header.header-top {
    background: rgba(255, 255, 255, 0.5);
    /* Slightly more opaque fallback */
  }
}

#header.header-top .social-links,
#header.header-top h2 {
  display: none;
}

#header.header-top h1 {
  margin-right: auto;
  font-size: 36px;
}

#header.header-top .container {
  display: flex;
  align-items: center;
}

#header.header-top .nav-menu {
  margin: 0;
}

@media (max-width: 768px) {
  #header.header-top {
    height: 60px;
  }

  #header.header-top h1 {
    font-size: 26px;
  }
}

/*--------------------------------------------------------------
# Sections General
--------------------------------------------------------------*/
section {
  overflow: hidden;
  position: absolute;
  width: 100%;
  top: 120px;
  /* Reduced from 140px */
  bottom: 100%;
  opacity: 0;
  z-index: 2;
  /* SECTION ANIMATION REMOVAL: Removed transition properties for instant section changes */
  /* Removed: will-change: opacity, top; */
  /* Removed: transition: opacity 0.35s ease-in-out, top 0.35s ease-in-out; */
  /* Removed: backface-visibility: hidden; */
  /* Removed: -webkit-backface-visibility: hidden; */
  /* Removed: transform: translateZ(0); */
  /* Removed: -webkit-transform: translateZ(0); */
}

section.section-show {
  top: 70px;
  bottom: auto;
  opacity: 1;
  padding-bottom: 0px;
}

section .container {
  background: rgba(0, 0, 0, 0);
  padding: 30px;
}

@media (max-width: 768px) {
  section {
    top: 20px;
    /* Reduced from 120px */
  }

  section.section-show {
    position: fixed;
    top: 30px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 30px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* SECTION ANIMATION REMOVAL: Mobile sections now render instantly */
    /* Note: No transition properties inherited - instant section changes */
  }
}

.section-title h2 {
  font-size: 14px;
  font-weight: 700;
  padding: 0;
  line-height: 1px;
  margin: 0 0 15px 0;
  /* Reduced from 20px */
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000000;
  font-family: "Bungee", sans-serif;
}

.section-title h2::after {
  content: "";
  width: 120px;
  height: 4px;
  display: inline-block;
  background: #000000;
  margin: 4px 10px;
}

.section-title p {
  margin: 0;
  margin: -15px 0 10px 0;
  /* Reduced from 15px */
  font-size: 36px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: "Bungee", sans-serif;
  color: #fff;
}

section {
  padding-bottom: 50px !important;
}

/*--------------------------------------------------------------
# About
--------------------------------------------------------------*/
.about-me .content h3 {
  font-weight: 700;
  font-size: 26px;
  color: #1c7d32;
}

.about-me .content ul {
  list-style: none;
  padding: 0;
}

.about-me .content ul li {
  padding-bottom: 10px;
}

.about-me .content ul i {
  font-size: 20px;
  padding-right: 2px;
  color: #1c7d32;
}

.about-me .content p:last-child {
  margin-bottom: 0;
}

/*--------------------------------------------------------------
# Interests
--------------------------------------------------------------*/
.interests .icon-box {
  display: flex;
  align-items: center;
  padding: 20px;
  background: #ffffff;
  border: 15px solid #f6f8f9;
  border-radius: 10px;
  /* TOUCH PERFORMANCE FIX #8: Specific transition for GPU-friendly property */
  transition: background-color 0.3s ease-in-out;
  /* GPU acceleration for hover/touch interactions */
  will-change: background-color;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.interests .icon-box i {
  font-size: 30px;
  padding-right: 10px;
  line-height: 1;
}

.interests .icon-box h3 {
  font-weight: 700;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: 16px;
  color: #fff;
}

.interests .icon-box:hover {
  background: rgba(66, 132, 244, 0.2);
  /* 65% transparency */
}

/*--------------------------------------------------------------
# Services
--------------------------------------------------------------*/
.services .icon-box {
  text-align: center;
  background: #09203a;
  padding: 40px 40px;
  /* TOUCH PERFORMANCE FIX #9: Specific transitions for GPU compositing */
  transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
  margin: 10px;
  /* GPU acceleration for smooth touch interactions */
  will-change: background-color;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.services .icon-box .icon {
  margin: 0 auto;
  width: 64px;
  height: 64px;
  background: #f6f8f9;
  border-radius: 5px;
  /* TOUCH PERFORMANCE FIX #10: Optimize for transform-based animations */
  transition: transform 0.3s ease-out, background-color 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transform-style: preserve-3d;
  /* GPU acceleration for touch interactions */
  will-change: transform, background-color;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.services .icon-box .icon i {
  color: #fff;
  font-size: 28px;
}

.services .icon-box .icon::before {
  position: absolute;
  content: '';
  left: -8px;
  top: -8px;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  transition: all .3s ease-out 0s;
  transform: translateZ(-1px);
}

.services .icon-box h4 {
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 24px;
}

.services .icon-box h4 a {
  color: #fff;
}

.services .icon-box p {
  line-height: 24px;
  font-size: 14px;
  margin-bottom: 0;
}

.services .icon-box:hover {
  background: #042e5f;
  border-color: #f6f8f9;
}

.services .icon-box:hover .icon {
  background: #fff;
}

.services .icon-box:hover .icon i {
  color: #f6f8f9;
}

.services .icon-box:hover .icon::before {
  background: #4284f4;
}

.services .icon-box:hover h4 a,
.services .icon-box:hover p {
  color: #4284f4;
}

/*--------------------------------------------------------------
# Portfolio
--------------------------------------------------------------*/
.portfolio .portfolio-item {
  margin-bottom: 30px;
  transform: translateZ(0);
  /* Hardware acceleration */
  backface-visibility: hidden;
  /* Prevent flickering */
}

.portfolio .portfolio-item h4 {
  margin-bottom: 15px;
}

@media (max-width: 767px) {
  .portfolio .portfolio-item h4 {
    margin-bottom: 15px;
  }
}

.portfolio .portfolio-wrap {
  /* TOUCH PERFORMANCE FIX #13: Specific transitions for GPU-friendly properties */
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: transparent;
  margin-bottom: 10px;
  transform: translateZ(0);
  /* Hardware acceleration */
  will-change: transform, opacity;
  /* Optimize for animations */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@media (max-width: 767px) {
  .portfolio .portfolio-wrap {
    margin-bottom: 15px;
    padding-top: 10px;
  }
}

.portfolio .portfolio-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  /* Semi-transparent white */
  border: 15px solid #f6f8f9;
  border-radius: 0;
  transition: all ease-in-out 0.3s;
  z-index: 2;
  opacity: 1;
}

.portfolio .portfolio-wrap .portfolio-info {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  z-index: 3;
  transition: all ease-in-out 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

@supports not (backdrop-filter: blur(10px)) {
  .portfolio .portfolio-wrap .portfolio-info {
    background: rgba(255, 255, 255, 0.5) !important;
  }
}

.portfolio .portfolio-wrap .portfolio-info::before {
  display: block;
  content: "";
  width: 48px;
  height: 48px;
  position: absolute;
  top: 35px;
  left: 35px;
  border-top: 5px solid #ffffff;
  border-left: 5px solid #fffefe;
  transition: all 0.5s ease 0s;
  z-index: 9994;
}

.portfolio .portfolio-wrap .portfolio-info::after {
  display: block;
  content: "";
  width: 48px;
  height: 48px;
  position: absolute;
  bottom: 35px;
  right: 35px;
  border-bottom: 5px solid #ffffff;
  border-right: 5px solid #ffffff;
  transition: all 0.5s ease 0s;
  z-index: 9994;
}

.portfolio .portfolio-wrap .portfolio-info h4 {
  font-size: 20px;
  color: #000000;
  font-weight: 600;
}

.portfolio .portfolio-wrap .portfolio-info p {
  color: #ffffff;
  font-size: 14px;
  text-transform: uppercase;
  padding: 0;
  margin: 0;
}

.portfolio .portfolio-wrap .portfolio-links {
  text-align: center;
  z-index: 4;
}

.portfolio .portfolio-wrap .portfolio-links a {
  color: #fff;
  margin: 0 2px;
  font-size: 28px;
  display: inline-block;
  transition: 0.3s;
  z-index: 10;
  position: relative;
  pointer-events: auto;
}

.portfolio .portfolio-wrap .portfolio-links a img {
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
  position: relative;
}

.portfolio .portfolio-wrap .portfolio-links a:hover {
  color: #4285f4;
}

.portfolio .portfolio-wrap:hover::before {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 1;
}

.portfolio .portfolio-wrap:hover .portfolio-info {
  opacity: 1;
}

.portfolio .portfolio-wrap:hover .portfolio-info::before {
  top: 15px;
  left: 15px;
}

.portfolio .portfolio-wrap:hover .portfolio-info::after {
  bottom: 15px;
  right: 15px;
}

/*--------------------------------------------------------------
# Certification
--------------------------------------------------------------*/
.certification-container .cert-item {
  margin-bottom: 30px;
}

.certification-container .portfolio-wrap {
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: transparent;
  margin-bottom: 10px;
}

/* Ensure certification links work like project links */
.services .portfolio .portfolio-wrap .portfolio-links {
  text-align: center;
  z-index: 4;
}

.services .portfolio .portfolio-wrap .portfolio-links a {
  color: #fff;
  margin: 0 2px;
  font-size: 28px;
  display: inline-block;
  transition: 0.3s;
  z-index: 10;
  position: relative;
  pointer-events: auto;
}

.services .portfolio .portfolio-wrap .portfolio-links a img {
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
  position: relative;
}

.services .portfolio .portfolio-wrap .portfolio-links a:hover {
  color: #4285f4;
}

/*--------------------------------------------------------------
# Projects Container Optimization
--------------------------------------------------------------*/
.projects-container {
  position: relative;
}

.projects-container .portfolio-item {
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  display: block;
  /* Ensure items are visible by default */
}

/* Ensure Isotope filtering works properly */
.projects-container .portfolio-item.isotope-hidden {
  pointer-events: none;
  z-index: 1;
}

.projects-container .portfolio-item,
.projects-container .portfolio-item.isotope-item {
  z-index: 2;
}

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/
.contact .info-box {
  color: #444444;
  padding: 20px;
  width: 100%;
  background: #ffffff;
  /* Pure solid white */
  border: 15px solid #f6f8f9;
  /* Matching solid border */
  border-radius: 8px;
  /* Slightly rounded corners */
}

.contact .info-box {
  display: flex;
  /* Enables Flexbox */
  justify-content: space-evenly;
  /* Ensures even spacing between icons */
  align-items: center;
}

.contact .info-box i.bx {
  font-size: 20px;
  color: #ffffff;
  border-radius: 20%;
  padding: 18px;
  background: rgb(0, 0, 0);
  margin: 10px;
  /* Adjust as needed to fine-tune spacing */
}

.contact .info-box h3 {
  font-size: 20px;
  color: #4284F4;
  font-weight: 700;
  margin: 10px 0 8px 68px;
}

.contact .info-box p {
  padding: 0;
  color: #000000;
  line-height: 24px;
  font-size: 14px;
  margin: 0 0 0 68px;
}

.contact .info-box .social-links {
  margin: 5px 0 0 68px;
  display: flex;
}

.contact .info-box .social-links a {
  font-size: 23px;
  display: inline-block;
  color: #fff;
  line-height: 1;
  margin-right: 12px;
  transition: 0.3s;
}

.contact .info-box .social-links a:hover {
  color: #4285f4;
}

.contact .php-email-form {
  padding: 30px;
  background: rgba(255, 255, 255, 0.08);
}

.contact .php-email-form .validate {
  display: none;
  color: red;
  margin: 0 0 15px 0;
  font-weight: 400;
  font-size: 13px;
}

.contact .php-email-form .error-message {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  background: #ed3c0d;
  text-align: center;
  padding: 15px;
  font-weight: 600;
}

.contact .php-email-form .sent-message {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  background: #1c7d32;
  text-align: center;
  padding: 15px;
  font-weight: 600;
}

.contact .php-email-form .loading {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 15px;
}

.contact .php-email-form .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid #1c7d32;
  border-top-color: #eee;
  -webkit-animation: animate-loading 1s linear infinite;
  animation: animate-loading 1s linear infinite;
  /* ANIMATION SMOOTHNESS FIX #2: GPU acceleration for loading spinner */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.contact .php-email-form input,
.contact .php-email-form textarea {
  border-radius: 0;
  box-shadow: none;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  /* TOUCH PERFORMANCE FIX #17: Specific transition for input focus */
  transition: background-color 0.3s ease;
  color: #fff;
  /* GPU acceleration for instant touch feedback */
  will-change: background-color;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.contact .php-email-form input:focus,
.contact .php-email-form textarea:focus {
  background-color: rgba(255, 255, 255, 0.11);
}

.contact .php-email-form input::-webkit-input-placeholder,
.contact .php-email-form textarea::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.contact .php-email-form input::-moz-placeholder,
.contact .php-email-form textarea::-moz-placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.contact .php-email-form input:-ms-input-placeholder,
.contact .php-email-form textarea:-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.contact .php-email-form input::-ms-input-placeholder,
.contact .php-email-form textarea::-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.contact .php-email-form input::placeholder,
.contact .php-email-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.contact .php-email-form input {
  padding: 20px 15px;
}

.contact .php-email-form textarea {
  padding: 12px 15px;
}

.contact .php-email-form button[type="submit"] {
  background: #1c7d32;
  border: 0;
  padding: 10px 30px;
  color: #fff;
  /* TOUCH PERFORMANCE FIX #12: Specific transition for background color */
  transition: background-color 0.4s ease;
  border-radius: 4px;
  /* GPU acceleration for touch interactions */
  will-change: background-color;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.contact .php-email-form button[type="submit"]:hover {
  background: #15bb62;
}

@-webkit-keyframes animate-loading {
  0% {
    transform: rotate(0deg);
  }

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

/* ANIMATION SMOOTHNESS FIX #1: Optimized loading spinner for 120Hz displays */
@keyframes animate-loading {
  0% {
    transform: rotate(0deg);
  }

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

/* Apply to loading spinner element */
.php-email-form .loading:after {
  /* GPU acceleration for buttery smooth rotation */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Fix portfolio item background */
.portfolio .portfolio-wrap {
  background: transparent !important;
}

.portfolio .portfolio-wrap::before {
  content: "";
  background: rgba(246, 248, 249, 0) !important;
  /* Soft transparency for glass effect */
  backdrop-filter: blur(0px);
  /* Glassmorphism blur */
  -webkit-backdrop-filter: blur(10px);
  /* Safari support */
  position: absolute;
  inset: 0;
  /* Auto width and height */
  /* TOUCH PERFORMANCE FIX #16: Optimize pseudo-element transitions */
  transition: opacity 0.3s ease-in-out, backdrop-filter 0.3s ease-in-out;
  z-index: 2;
  opacity: 1;
  /* GPU acceleration for smooth hover/touch effects */
  will-change: opacity;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Prevent white flashes on scroll */
html,
body {
  background: #ffffff !important;
  /* Pure white background */
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  /* Ensures border fits within the layout */
}

/* Fix for iOS/Safari rendering */
body::before {
  height: 100% !important;
  z-index: -1 !important;
}

/* Mobile-specific fixes for tap functionality */
@media (max-width: 768px) {

  /* Enable tap highlighting for links only */
  a,
  button {
    -webkit-tap-highlight-color: rgba(66, 133, 244, 0.3);
  }

  /* Remove tap highlight for containers to prevent conflicts */
  .portfolio-wrap,
  .cert-item {
    -webkit-tap-highlight-color: transparent;
  }

  /* Ensure chain.png links are tappable */
  .portfolio-links a,
  .portfolio-links a img {
    -webkit-tap-highlight-color: rgba(66, 133, 244, 0.5) !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Make chain icons larger on mobile for easier tapping */
  .portfolio-links a img {
    width: 40px !important;
    height: 40px !important;
  }
}

/* Fix for venobox iframe container */
.vbox-overlay {
  background: rgba(255, 255, 255, 0.2);
  /* Semi-transparent white */
  backdrop-filter: blur(10px);
  /* Glassmorphism blur effect */
  -webkit-backdrop-filter: blur(10px);
  /* Cross-browser support */
}

.vbox-container {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.vbox-content {
  background: transparent !important;
  border: none !important;
}

.venobox iframe {
  background: transparent !important;
  -webkit-backdrop-filter: blur(10px);
  /* Cross-browser support */
  ;
  backdrop-filter: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.portfolio .portfolio-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent !important;
  border: 15px solid #f6f8f9;
  border-radius: 0;
  transition: all ease-in-out 0.3s;
  z-index: 2;
  opacity: 1;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.portfolio .portfolio-info {
  background: #ffffff !important;
}

/* Prevent white flashes during transitions */
.vbox-overlay,
.vbox-container {
  transition: none !important;
  animation: none !important;
}

/* ANIMATION SMOOTHNESS FIX #3: Optimized pulse animation for 120Hz displays */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Apply GPU acceleration to any element using pulse animation */
.pulse-animated {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Fix Google Material Close Button */
.vbox-close {
  display: block !important;
  position: fixed;
  top: 15px;
  right: 15px;
  background: transparent !important;
  border: none !important;
  font-size: 32px !important;
  color: #fff !important;
  cursor: pointer;
  z-index: 10000;
  padding: 5px;
  /* ANIMATION SMOOTHNESS FIX #4: Specific transitions for Venobox close button */
  transition: color 0.3s ease, transform 0.3s ease;
  /* GPU acceleration for smooth hover animation */
  will-change: transform, color;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.vbox-close:hover {
  color: #d61212 !important;
  transform: scale(1.1) translateZ(0);
}

.vbox-close i {
  font-family: 'Material Icons';
  font-size: inherit !important;
  color: inherit !important;
}

/* Custom gamepad close button for mobile */
.vbox-overlay {
  background: rgba(255, 255, 255, 0.2);
  /* Semi-transparent white */
  backdrop-filter: blur(10px);
  /* Glassmorphism blur effect */
  -webkit-backdrop-filter: blur(10px);
  /* Cross-browser support */
}

/* Add this to ensure default buttons are visible */
.vbox-close,
.vbox-prev,
.vbox-next {
  display: block !important;
}

/* Custom styling for Venobox close, previous, and next buttons */
/* Custom styling for Venobox close, previous, and next buttons */
/* Custom Venobox Button Styling */
.vbox-close,
.vbox-next,
.vbox-prev {
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

/* Button icons */
.vbox-close:before,
.vbox-next:before,
.vbox-prev:before {
  color: #4284F4 !important;
  font-weight: 900 !important;
  font-size: 8px !important;
  text-shadow: none !important;
}

/* Position adjustments */
.vbox-close {
  top: 20px !important;
  right: 20px !important;
}

.vbox-next,
.vbox-prev {
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.vbox-prev {
  left: 20px !important;
}

.vbox-next {
  right: 20px !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {

  .vbox-close,
  .vbox-next,
  .vbox-prev {
    width: 35px !important;
    height: 35px !important;
  }

  .vbox-close:before,
  .vbox-next:before,
  .vbox-prev:before {
    font-size: 18px !important;
  }
}

/* ANIMATION SMOOTHNESS FIX #5: Duplicate pulse keyframes - GPU optimized */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Global scrollbar styling - hidden but functional */
html {
  overflow-y: scroll;
  /* Force scrollbar to prevent shifting */
  scrollbar-width: none;
  /* Firefox - hide scrollbar */
  /* ANIMATION SMOOTHNESS FIX #6: Optimize scroll behavior for 120Hz displays */
  scroll-behavior: smooth;
  /* Smooth scrolling for all devices */
  overscroll-behavior: contain;
  /* Prevent overscroll bounce for better control */
  touch-action: pan-y;
  /* Optimize touch scrolling on mobile */
  -webkit-overflow-scrolling: touch;
  /* Enable momentum scrolling on iOS */
}

body {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

body::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Opera */
}

/* Section scroll handling */
section {
  overflow-y: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  overscroll-behavior: contain;
  /* Prevent overscroll bounce in sections */
  touch-action: pan-y;
  /* Optimize touch scrolling on mobile */
  -webkit-overflow-scrolling: touch;
  /* Enable momentum scrolling on iOS */
}

section::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Opera */
}

/* Iframe scroll handling */
iframe {
  scrollbar-width: none !important;
  /* Firefox - force hide scrollbar */
  -ms-overflow-style: none !important;
  /* IE/Edge - force hide scrollbar */
  overflow: -moz-scrollbars-none !important;
  /* Legacy Firefox support */
  overscroll-behavior: contain;
  /* Prevent overscroll bounce in iframes */
  touch-action: pan-y;
  /* Optimize touch scrolling on mobile */
  -webkit-overflow-scrolling: touch;
  /* Enable momentum scrolling on iOS */
}

iframe::-webkit-scrollbar {
  display: none !important;
  /* Chrome/Safari/Opera - force hide scrollbar */
}

/* Ensure proper scrolling container */
.section-show {
  height: calc(100vh - 70px);
  overflow-y: auto;
}

/* Fix for header when scrolled */
#header.header-top {
  position: fixed;
  width: 100%;
  z-index: 9997;
}

/* Adjust section positioning to account for fixed header */
section.section-show {
  padding-top: 15px;
  margin-top: 0;
}

/* Prevent flash of unstyled content */
body.loaded {
  visibility: visible;
  opacity: 1;
}

/* Style Research Profiles heading to match Birthday/Email format - All screen sizes */
.about .about-me .content h5 {
  display: none;
  /* Hide in mobile by default */
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #4285F4 !important;
}

.about .about-me .content h5 .material-icons {
  font-size: 1.5em !important;
  color: black !important;
  margin-right: 0 !important;
}

/* Match about section image width to interest section box width in desktop view */
@media (min-width: 992px) {

  /* Show Research Profiles heading in desktop view */
  .about .about-me .content h5 {
    display: flex !important;
  }

  /* Set about image column to 25% width (like col-lg-3) */
  .about .about-me .col-lg-4 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
  }

  /* Set image to fill column width to match .icon-box with border */
  .about .about-me .col-lg-4 img {
    width: calc(100% - 15px);
    max-width: calc(100% - 15px);
    height: auto;
    display: block;
    margin: 0;
  }

  /* Tight gutter for about section */
  section#about .about-me .row {
    --bs-gutter-x: 10px !important;
  }

  /* Remove top padding from text column */
  section#about .about-me .col-lg-8.pt-4.pt-lg-0 {
    padding-top: 0 !important;
  }

  /* Make text column fill remaining space */
  .about .about-me .col-lg-8 {
    flex: 1 !important;
    max-width: none !important;
  }
}

/* Universal badge styling for ALL sections (research, contact, skills) - Both mobile and desktop */
/* Badge container styling */
body .research-badges,
body .badge-container,
body .skill-badges {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  justify-content: flex-start !important;
  align-items: center !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  padding-bottom: 10px !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  /* SMOOTH SCROLL FIX #1: Hardware acceleration for buttery smooth scrolling */
  will-change: scroll-position !important;
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  /* SMOOTH SCROLL FIX #2: Enable momentum scrolling on iOS/Safari */
  -webkit-overflow-scrolling: touch !important;
  /* SMOOTH SCROLL FIX #3: Prevent scroll chaining to parent */
  overscroll-behavior-x: contain !important;
  /* SMOOTH SCROLL FIX #4: Optimize pointer events for scroll performance */
  pointer-events: auto !important;
}

body .research-badges::-webkit-scrollbar,
body .badge-container::-webkit-scrollbar,
body .skill-badges::-webkit-scrollbar {
  display: none !important;
}

/* Individual badge styling */
body .research-badges .badge,
body .badge-container .badge,
body .skill-badges .badge {
  height: auto !important;
  width: auto !important;
  min-width: fit-content !important;
  max-width: none !important;
  display: inline-flex !important;
  align-items: center !important;
  background-color: #f7f9f9 !important;
  border-radius: 6px !important;
  padding: 13px 12px !important;
  text-decoration: none !important;
  font-weight: bold !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  border-left-width: 5px !important;
  border-left-style: solid !important;
  transition: border-left-color 0.2s ease !important;
  white-space: nowrap !important;
  /* SMOOTH SCROLL FIX #5: GPU acceleration for individual badges to prevent repaint lag */
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  /* SMOOTH SCROLL FIX #6: Optimize rendering during scroll */
  will-change: transform !important;
}

/* Tap/click effect for sidebar color */
body .research-badges .badge:active,
body .research-badges .badge:focus,
body .badge-container .badge:active,
body .badge-container .badge:focus,
body .skill-badges .badge:active,
body .skill-badges .badge:focus {
  border-left-color: #4285F4 !important;
}

/* Badge logo styling */
body .research-badges .badge-logo,
body .badge-container .badge-logo,
body .skill-badges .badge-logo {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  margin-right: 8px !important;
  flex-shrink: 0 !important;
}

/* Badge text styling */
body .research-badges .badge-text,
body .badge-container .badge-text,
body .skill-badges .badge-text {
  font-size: 14px !important;
  font-weight: bold !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  color: inherit !important;
}

/* Specific badge colors for research section */
body .research-badges .badge.orcid {
  color: #9d1620 !important;
}

body .research-badges .badge.researchgate {
  color: #000000 !important;
}

body .research-badges .badge.googlescholar {
  color: #4285f4 !important;
}

body .research-badges .badge.ieee {
  color: #00629b !important;
}

/* Ensure text inherits badge color */
body .research-badges .badge.orcid .badge-text,
body .research-badges .badge.researchgate .badge-text,
body .research-badges .badge.googlescholar .badge-text,
body .research-badges .badge.ieee .badge-text {
  color: inherit !important;
}

/* Mobile view: Enhanced scrolling for badges */
@media (max-width: 767.98px) {
  body .research-badges,
  body .badge-container,
  body .skill-badges {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-behavior: smooth !important;
    padding: 0 !important;
    padding-bottom: 10px !important;
    touch-action: pan-x !important;
    display: flex !important;
  }

  body .research-badges::-webkit-scrollbar,
  body .badge-container::-webkit-scrollbar,
  body .skill-badges::-webkit-scrollbar {
    display: none !important;
  }

  body .research-badges .badge,
  body .badge-container .badge,
  body .skill-badges .badge {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    min-width: 120px !important;
    max-width: none !important;
    white-space: nowrap !important;
  }
}

/* Certification section: 4 items per row in desktop view */
@media (min-width: 992px) {

  #certification .portfolio-container>.col-lg-4,
  .services .certification-container>.col-lg-4 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }

  /* Project section: 4 items per row in desktop view */
  #portfolio .portfolio-container>.col-lg-4,
  .portfolio .projects-container>.col-lg-4 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}

/*--------------------------------------------------------------
# Connecting Dots Background Animation (All Devices)
--------------------------------------------------------------*/
.dots-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  background: transparent;
  filter: blur(28px);
  -webkit-filter: blur(28px);
}



/* ANIMATION SMOOTHNESS FIX #7: Optimized solidPulse animation for 120Hz displays */
@keyframes solidPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.8;
  }
}

/* Apply GPU acceleration to elements using solidPulse */
.solid-pulse-animated {
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Already has translateZ in the transform */
}

/*--------------------------------------------------------------
# REMOVED: Live Code Playground CSS
# All playground-related styles have been surgically removed
# This includes: Monaco Editor overrides, editor tabs, panels,
# output container, examples content, template buttons, and mobile responsive styles
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# SAFE ANTI-FLICKERING OPTIMIZATIONS
--------------------------------------------------------------*/

/* Font Smoothing for Better Text Rendering */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Text Selection Styling */
::selection {
  background-color: rgba(66, 133, 244, 0.3);
  color: inherit;
}

::-moz-selection {
  background-color: rgba(66, 133, 244, 0.3);
  color: inherit;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/*--------------------------------------------------------------
# ANIMATION SMOOTHNESS FIX #12: GPU-Accelerated Fade Utilities for 120Hz Displays
--------------------------------------------------------------*/

/* Smooth fade-in animation */
@keyframes smoothFadeIn {
  from {
    opacity: 0;
    transform: translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateZ(0);
  }
}

/* Smooth fade-out animation */
@keyframes smoothFadeOut {
  from {
    opacity: 1;
    transform: translateZ(0);
  }
  to {
    opacity: 0;
    transform: translateZ(0);
  }
}

/* Utility classes for GPU-accelerated fades */
.fade-in-smooth {
  animation: smoothFadeIn 0.3s ease-in-out forwards;
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.fade-out-smooth {
  animation: smoothFadeOut 0.3s ease-in-out forwards;
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Faster fades for 120Hz displays */
@media (min-resolution: 120dpi) and (min-refresh-rate: 90Hz), 
       (min--moz-device-pixel-ratio: 1.5) {
  .fade-in-smooth {
    animation-duration: 0.2s;
  }
  .fade-out-smooth {
    animation-duration: 0.2s;
  }
}




