@import url('https://fonts.googleapis.com/css2?family=Titillium+Web&display=swap');

:root {
  --main-background: #0b0c0f;
  --main-fonts-color: #fff;
  --main-decor-color: #b842df;
  --main-header-background: #4c0065;
  --main-font-family:
    'Titillium Web', 'Segoe UI', tahoma, geneva, verdana, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: var(--main-background);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    opacity 0.5s ease-in-out,
    visibility 0.5s;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-video {
  max-width: 80%;
  max-height: 80%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* Ensure consistent background wallpaper only on main root elements */
html,
body {
  background: url('images/wallpaper-background.jpg') no-repeat center center;
  background-size: cover; /* Cover the viewport while maintaining aspect ratio */
  background-attachment: fixed; /* Restored fixed attachment for proper wallpaper display */
  background-color: var(
    --main-background
  ); /* Fallback color if image fails to load */
  min-height: 100vh;
  /* Prevent horizontal overflow */
  overflow-x: hidden;
  max-width: 100vw;
  /* Performance optimizations - removed backface-visibility to prevent glitching */
  will-change: auto;
  /* Lighthouse optimizations */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* M1 MacBook Pro specific optimizations */
@media (width >= 2560px) {
  .technology-links {
    padding: 40px;
    max-width: 1800px;
    overflow: visible;
  }

  .technology-links p {
    gap: 35px;
    margin: 30px 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .technology-links a {
    margin: 10px;
  }

  .technology-links img {
    width: 60px;
    height: 60px;
    background: transparent;
    mix-blend-mode: multiply;
  }

  .intro {
    max-width: 1000px;
    padding: 50px;
  }

  /* Social media icons for large screens */
  .social-media {
    padding: 25px;
    gap: 20px;
    margin: 30px 0;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--main-fonts-color) !important;
  }
}

/* High DPI displays (Retina) optimizations */
@media (min-device-pixel-ratio: 2), (resolution >= 192dpi) {
  .technology-links img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Desktop/Laptop optimizations for technology section */
@media (width >= 1024px) {
  .technology-links {
    padding: 30px;
    margin-top: 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
  }

  .technology-links p {
    gap: 25px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .technology-links a {
    margin: 5px;
  }

  .technology-links img {
    width: 50px;
    height: 50px;
    background: transparent;
    mix-blend-mode: multiply;
  }

  /* Social media icons for laptop screens */
  .social-media {
    padding: 20px;
    gap: 18px;
    margin: 25px 0;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a {
    width: 55px;
    height: 55px;
    font-size: 1.6rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--main-fonts-color) !important;
  }
}

@media (width >= 1200px) {
  .technology-links {
    padding: 35px;
    max-width: 1600px;
    overflow: visible;
  }

  .technology-links p {
    gap: 30px;
    margin: 25px 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .technology-links a {
    margin: 8px;
  }

  .technology-links img {
    width: 55px;
    height: 55px;
    background: transparent;
    mix-blend-mode: multiply;
  }

  /* Social media icons for desktop screens */
  .social-media {
    padding: 22px;
    gap: 19px;
    margin: 27px 0;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a {
    width: 57px;
    height: 57px;
    font-size: 1.7rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--main-fonts-color) !important;
  }
}

/* Mobile background optimizations */
@media (width <= 768px) {
  html,
  body {
    background-attachment: fixed; /* Keep fixed attachment for proper wallpaper display */
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center; /* Center the background */
    background-repeat: no-repeat; /* Prevent tiling */
    /* Removed backface-visibility to prevent glitching */
    image-rendering: auto; /* Better quality rendering */
    /* Performance optimizations for mobile */
    will-change: auto;
    /* Prevent background from causing layout shifts */
    background-color: var(--main-background);
  }
}

/* Small mobile devices */
@media (width <= 480px) {
  html,
  body {
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center; /* Center the background */
    background-attachment: fixed; /* Keep fixed for proper wallpaper display */
    image-rendering: auto; /* Better quality */
  }
}

/* Extra small mobile devices */
@media (width <= 393px) {
  html,
  body {
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center; /* Center for small screens */
    background-attachment: fixed; /* Keep fixed for proper wallpaper display */
    image-rendering: auto; /* Better quality */
  }
}

/* Ultra small devices */
@media (width <= 360px) {
  html,
  body {
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center; /* Centered positioning */
    background-attachment: fixed; /* Keep fixed for proper wallpaper display */
    image-rendering: auto; /* Better quality */
  }
}

/* High DPI mobile devices */
@media (width <= 768px) and (-webkit-min-device-pixel-ratio: 2),
  (width <= 768px) and (min-resolution: 192dpi) {
  html,
  body {
    background-image: url('images/wallpaper-background.jpg');
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center;
    background-attachment: fixed; /* Keep fixed for proper wallpaper display */
    image-rendering: auto; /* Better quality rendering */
  }
}

/* Landscape mobile orientation */
@media (width <= 768px) and (orientation: landscape) {
  html,
  body {
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center;
    background-attachment: fixed; /* Keep fixed for proper wallpaper display */
    image-rendering: auto; /* Better quality */
  }
}

/* Portrait mobile orientation */
@media (width <= 768px) and (orientation: portrait) {
  html,
  body {
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center;
    background-attachment: fixed; /* Keep fixed for proper wallpaper display */
    image-rendering: auto; /* Better quality */
  }
}

/* Enhanced mobile background with wallpaper - matching desktop */
@media (width <= 768px) {
  html,
  body {
    /* Match desktop wallpaper exactly */
    background: url('images/wallpaper-background.jpg') no-repeat center center !important;
    background-size: cover !important; /* Cover viewport while maintaining aspect ratio */
    background-attachment: fixed !important; /* Match desktop behavior */
    background-color: var(
      --main-background
    ) !important; /* Fallback color if image fails to load */
    min-height: 100vh;
    /* Performance optimizations */
    will-change: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Small mobile devices - matching desktop wallpaper */
@media (width <= 480px) {
  html,
  body {
    /* Match desktop wallpaper exactly */
    background: url('images/wallpaper-background.jpg') no-repeat center center !important;
    background-size: cover !important; /* Cover viewport while maintaining aspect ratio */
    background-attachment: fixed !important; /* Match desktop behavior */
    background-color: var(
      --main-background
    ) !important; /* Fallback color if image fails to load */
    min-height: 100vh;
    /* Performance optimizations */
    will-change: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Extra small devices - matching desktop wallpaper */
@media (width <= 393px) {
  html,
  body {
    /* Match desktop wallpaper exactly */
    background: url('images/wallpaper-background.jpg') no-repeat center center !important;
    background-size: cover !important; /* Cover viewport while maintaining aspect ratio */
    background-attachment: fixed !important; /* Match desktop behavior */
    background-color: var(
      --main-background
    ) !important; /* Fallback color if image fails to load */
    min-height: 100vh;
    /* Performance optimizations */
    will-change: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Ultra small devices - matching desktop wallpaper */
@media (width <= 360px) {
  html,
  body {
    /* Match desktop wallpaper exactly */
    background: url('images/wallpaper-background.jpg') no-repeat center center !important;
    background-size: cover !important; /* Cover viewport while maintaining aspect ratio */
    background-attachment: fixed !important; /* Match desktop behavior */
    background-color: var(
      --main-background
    ) !important; /* Fallback color if image fails to load */
    min-height: 100vh;
    /* Performance optimizations */
    will-change: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

.container {
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

main {
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ────────────────── 
       header
────────────────── */

/* Ensure header is always sticky - Global rule */
header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
}

/* Make header sticky */
header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important; /* Increased z-index to ensure it stays on top */
  margin: 0 auto;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgb(0 0 0 / 0.1) !important;
  backdrop-filter: blur(5px) !important; /* Reduced blur to prevent glitching */
  transition: background-color 0.3s ease !important; /* Simplified transition */
  padding: 0 20px;
  max-width: 100vw;
  box-sizing: border-box;
  /* Removed will-change to prevent glitching */
}

.nav-show {
  background: var(--main-header-background);
  backdrop-filter: blur(8px); /* Reduced blur */
  box-shadow: 0 4px 30px rgb(0 0 0 / 0.4);
}

header:hover {
  background: var(--main-header-background);
  backdrop-filter: blur(8px); /* Reduced blur */
  box-shadow: 0 4px 30px rgb(0 0 0 / 0.4);
}

/* Sticky header scroll behavior */
header.scrolled {
  background: var(--main-header-background);
  backdrop-filter: blur(8px); /* Reduced blur */
  box-shadow: 0 6px 40px rgb(0 0 0 / 0.5);
  border-bottom: 1px solid rgba(184, 66, 223, 0.2);
}

/* Smooth scroll behavior for sticky header */
html {
  scroll-padding-top: 0px; /* No padding needed for sticky header */
}

/* Mobile scroll padding adjustments - not needed for sticky header */
@media (width <= 768px) {
  html {
    scroll-padding-top: 0px; /* No padding needed for sticky header */
  }
}

@media (width <= 480px) {
  html {
    scroll-padding-top: 0px; /* No padding needed for sticky header */
  }
}

@media (width <= 393px) {
  html {
    scroll-padding-top: 0px; /* No padding needed for sticky header */
  }
}

@media (width <= 360px) {
  html {
    scroll-padding-top: 0px; /* No padding needed for sticky header */
  }
}

/* Desktop Navigation - Always visible on desktop */
.nav-bar {
  list-style: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hamburger Menu - Hidden on Desktop, Visible on Mobile */
.hamburger {
  display: none;
  visibility: hidden;
  opacity: 0;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 6px;
  z-index: 1001;
  transition: all 0.3s ease;
}

/* Hamburger lines */
.hamburger div {
  width: 22px;
  height: 2px;
  background-color: white;
  margin: 2px 0;
  transition: 0.3s ease;
  border-radius: 1px;
}

/* Hamburger animation states */
.hamburger.toggle .line1 {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.toggle .line2 {
  opacity: 0;
}

.hamburger.toggle .line3 {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Responsive Header */
@media (width <= 768px) {
  header {
    height: 60px;
    padding: 0 15px;
    max-width: 100vw;
    overflow: visible;
    box-sizing: border-box;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo img {
    width: 35px;
    height: 35px;
    background: transparent;
    mix-blend-mode: multiply;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: spiderPulse 3s ease-in-out infinite;
  }

  .logo img:hover {
    transform: scale(1.2);
    animation: spiderHover 0.6s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.6));
  }

  .resumeButton {
    padding: 8px 16px;
    font-size: 12px;
  }

  /* Hide nav-bar by default on mobile */
  .nav-bar {
    display: none !important;
    position: fixed !important;
    top: 60px !important;
    left: -100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: 400px !important;
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 30px 20px !important;
    transition: left 0.3s ease !important;
    z-index: 1001 !important;
    border-top: 1px solid rgba(184, 66, 223, 0.3) !important;
    border-radius: 0 0 15px 15px !important;
    overflow-y: auto !important;
    visibility: hidden !important;
    opacity: 0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  }

  /* Show nav-bar only when hamburger is active */
  .nav-bar.nav-active {
    display: flex !important;
    left: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Show hamburger on mobile */
@media (width <= 768px) {
  header {
    justify-content: space-between; /* Keep space-between for proper layout */
    gap: 15px; /* Reduced gap to prevent overflow */
    flex-wrap: nowrap; /* Prevent wrapping */
  }

  .resume-dropdown {
    flex-shrink: 0; /* Prevent resume button from shrinking */
    margin-left: auto; /* Push resume button to the right */
    order: 3; /* Resume button appears last */
  }

  .hamburger {
    display: flex !important;
    flex-shrink: 0; /* Prevent hamburger from shrinking */
    visibility: visible !important;
    opacity: 1 !important;
    order: 2; /* Hamburger appears second (after logo) */
    background: rgba(184, 66, 223, 0.1) !important;
    border: 1px solid rgba(184, 66, 223, 0.3) !important;
    border-radius: 6px !important;
    padding: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
  }

  .hamburger:hover {
    background: rgba(184, 66, 223, 0.2) !important;
    border-color: rgba(184, 66, 223, 0.5) !important;
    transform: scale(1.05) !important;
  }

  .nav {
    order: 4; /* Nav appears last (hidden on mobile) */
  }
}

/* Mobile Navigation Animations */
@keyframes navLinkFade {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Mobile Navigation Menu */
@media (width <= 768px) {
  .nav-bar li {
    margin: 8px 0;
    list-style: none;
    opacity: 1;
    visibility: visible;
    animation: navLinkFade 0.5s ease forwards;
  }

  .nav-bar .nav-link {
    font-size: 1rem !important;
    padding: 12px 25px !important;
    display: block !important;
    text-align: center !important;
    width: 180px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    color: white !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    margin: 0 !important;
    text-transform: none !important;
    background: rgb(255 255 255 / 0.05);
    backdrop-filter: blur(10px);
  }

  .nav-bar .nav-link:hover {
    background: rgb(184 66 223 / 0.3) !important;
    border-color: rgb(184 66 223 / 0.6) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgb(184 66 223 / 0.4) !important;
  }

  .nav-bar .nav-link.active {
    background: rgb(184 66 223 / 0.4) !important;
    border-color: rgb(184 66 223 / 0.7) !important;
    box-shadow: 0 2px 10px rgb(184 66 223 / 0.3) !important;
  }

  .resume-dropdown-content a {
    padding: 10px 15px;
    font-size: 13px;
  }
}

@media (width <= 480px) {
  header {
    height: 55px;
    padding: 0 10px;
    gap: 10px; /* Even closer spacing on smaller screens */
    max-width: 100vw;
    overflow: visible;
    box-sizing: border-box;
    flex-wrap: nowrap;
    justify-content: space-between;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    display: flex;
    align-items: center;
  }

  .hamburger {
    order: 2;
    flex-shrink: 0;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .resume-dropdown {
    order: 3;
    margin-left: auto;
    flex-shrink: 0;
  }

  .logo img {
    width: 30px;
    height: 30px;
    background: transparent;
    mix-blend-mode: multiply;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: spiderPulse 3s ease-in-out infinite;
  }

  .logo img:hover {
    transform: scale(1.2);
    animation: spiderHover 0.6s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.6));
  }

  .resumeButton {
    padding: 6px 10px;
    font-size: 10px;
  }

  .nav-bar {
    top: 55px !important;
    height: auto !important;
    max-height: 350px !important;
    padding: 25px 15px !important;
  }

  .resume-dropdown-content a {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* iPhone 15 Pro Max and larger phones */
@media (width >= 430px) and (width <= 480px) {
  .technology-links {
    padding: 18px;
    max-width: 100%;
  }

  .technology-links p {
    gap: 8px;
    margin: 8px 0;
  }

  .technology-links img {
    width: 36px;
    height: 36px;
    background: transparent;
    mix-blend-mode: multiply;
  }

  .intro {
    padding: 18px;
    max-width: 95%;
  }

  .intro h1 {
    font-size: 2.2rem;
  }

  .intro p {
    font-size: 0.95rem;
  }

  .intro .subtitle {
    font-size: 1.15rem;
  }
}

/* iPhone 15 and similar devices */
@media (width <= 393px) {
  header {
    height: 50px;
    padding: 0 12px;
    gap: 12px;
    overflow: visible;
    justify-content: flex-start;
    max-width: 100vw;
    box-sizing: border-box;
    flex-wrap: nowrap;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
  }

  .hamburger {
    order: 2;
    flex-shrink: 0;
  }

  .resume-dropdown {
    order: 3;
    margin-left: auto;
    flex-shrink: 0;
  }

  .logo img {
    width: 32px;
    height: 32px;
    background: transparent;
    mix-blend-mode: multiply;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: spiderPulse 3s ease-in-out infinite;
  }

  .nav-bar {
    top: 50px !important;
    height: auto !important;
    max-height: 300px !important;
    padding: 20px 15px !important;
  }

  .nav-bar .nav-link {
    font-size: 0.9rem !important;
    padding: 10px 20px !important;
    width: 160px !important;
  }

  .logo img:hover {
    transform: scale(1.2);
    animation: spiderHover 0.6s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.6));
  }

  .resumeButton {
    padding: 6px 12px;
    font-size: 11px;
  }

  .hamburger {
    padding: 6px;
  }

  .hamburger div {
    width: 20px;
    height: 2px;
  }

  /* Mobile dropdown positioning handled by main rules */

  .resume-dropdown-content a {
    padding: 8px 12px;
    font-size: 11px;
  }
}

/* Extra small screens */
@media (width <= 360px) {
  header {
    padding: 0 8px;
    gap: 8px;
    overflow: visible;
    justify-content: flex-start;
    max-width: 100vw;
    box-sizing: border-box;
    flex-wrap: nowrap;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
  }

  .hamburger {
    order: 2;
    flex-shrink: 0;
    padding: 6px;
  }

  .resume-dropdown {
    order: 3;
    margin-left: auto;
    flex-shrink: 0;
  }

  .logo img {
    width: 28px;
    height: 28px;
    background: transparent;
    mix-blend-mode: multiply;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: spiderPulse 3s ease-in-out infinite;
  }

  .nav-bar {
    top: 45px !important;
    height: auto !important;
    max-height: 280px !important;
    padding: 15px 10px !important;
  }

  .nav-bar .nav-link {
    font-size: 0.85rem !important;
    padding: 8px 15px !important;
    width: 140px !important;
  }

  .logo img:hover {
    transform: scale(1.2);
    animation: spiderHover 0.6s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.6));
  }

  .resumeButton {
    padding: 5px 8px;
    font-size: 9px;
  }

  .hamburger div {
    width: 18px;
    height: 2px;
  }
}

/* Spider animation keyframes */
@keyframes spiderPulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
  }
  25% {
    transform: scale(1.05) rotate(1deg);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
  }
  50% {
    transform: scale(1.1) rotate(0deg);
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
  }
  75% {
    transform: scale(1.05) rotate(-1deg);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
  }
}

@keyframes spiderHover {
  0% {
    transform: scale(1.2) rotate(0deg);
  }
  25% {
    transform: scale(1.3) rotate(2deg);
  }
  50% {
    transform: scale(1.4) rotate(0deg);
  }
  75% {
    transform: scale(1.3) rotate(-2deg);
  }
  100% {
    transform: scale(1.2) rotate(0deg);
  }
}

.logo img {
  padding-top: 5px;
  height: 50px;
  cursor: pointer;
  background: transparent;
  mix-blend-mode: multiply;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: spiderPulse 3s ease-in-out infinite;
}

.logo img:hover {
  transform: scale(1.2);
  animation: spiderHover 0.6s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.6));
}

a.nav-link {
  margin: 2px;
  padding: 5px 10px;
  text-decoration: none;
  color: var(--main-fonts-color);
  font-family: var(--main-font-family);
  cursor: pointer;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all 0.3s ease;
}

a.nav-link:focus {
  outline: 2px solid var(--main-decor-color);
  outline-offset: 2px;
}

.active {
  background: var(--main-decor-color);
}

.nav-link:hover {
  color: #000;
  background: var(--main-decor-color);
}

/* ──────────────────
       home
────────────────── */

#home {
  margin: auto;
  min-height: 100vh;
  color: var(--main-fonts-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 40px 20px; /* No need to account for fixed header with sticky */
  box-sizing: border-box;
  max-width: 100vw;
  width: 100%;
}

#home .filter {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background: rgb(0 0 0 / 0.3);
}

.intro {
  text-align: center;
  color: var(--main-fonts-color);
  z-index: 1;
  margin: auto;
  padding: 40px;
  background: rgb(0 0 0 / 0.15);
  backdrop-filter: blur(25px) saturate(180%);
  border-radius: 25px;
  border: 1px solid rgb(255 255 255 / 0.1);
  box-shadow:
    0 25px 50px rgb(0 0 0 / 0.3),
    0 0 80px rgb(184 66 223 / 0.15),
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(0 0 0 / 0.1);
  max-width: 800px;
  position: relative;
  overflow: hidden;
}

.intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgb(0 0 0 / 0.1) 0%,
    rgb(0 0 0 / 0.05) 50%,
    rgb(0 0 0 / 0.1) 100%
  );
  z-index: -1;
}

.intro::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgb(184 66 223 / 0.05) 0%,
    transparent 70%
  );
  animation: liquidFlow 8s ease-in-out infinite;
  z-index: -1;
}

/* Skills and Resume sections with same styling but no overlap */
.skills-intro,
.resume-intro {
  text-align: center;
  color: var(--main-fonts-color);
  z-index: 1;
  margin: 40px auto;
  padding: 40px;
  background: rgb(0 0 0 / 0.15);
  backdrop-filter: blur(25px) saturate(180%);
  border-radius: 25px;
  border: 1px solid rgb(255 255 255 / 0.1);
  box-shadow:
    0 15px 35px rgb(0 0 0 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
  max-width: 800px;
  position: relative;
  overflow: visible;
}

/* More compact skills section */
.skills-intro {
  margin: 20px auto;
  padding: 25px;
  max-width: 700px;
}

.skills-intro::before,
.resume-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgb(0 0 0 / 0.1) 0%,
    rgb(0 0 0 / 0.05) 50%,
    rgb(0 0 0 / 0.1) 100%
  );
  z-index: -1;
}

.skills-intro h2,
.resume-intro h2 {
  font-size: 2.5rem;
  color: white;
  font-family: var(--main-font-family);
  font-weight: 600;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.6),
    0 0 30px rgba(255, 255, 255, 0.4),
    0 0 40px rgba(184, 66, 223, 0.6),
    0 0 50px rgba(184, 66, 223, 0.4);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

@keyframes liquidFlow {
  0%,
  100% {
    transform: translate(-10%, -10%) rotate(0deg);
  }

  50% {
    transform: translate(10%, 10%) rotate(180deg);
  }
}

.intro p {
  margin: 8px;
  font-size: 1.3rem;
  font-family: var(--main-font-family);
  text-align: center;
  line-height: 1.6;
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.8);
}

.intro .subtitle {
  font-size: 2.8rem;
  color: var(--main-decor-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 15px 0;
  text-shadow:
    0 0 10px var(--main-decor-color),
    0 2px 4px rgb(0 0 0 / 0.8);
  position: relative;
}

.intro .subtitle::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--main-decor-color),
    transparent
  );
}

h1,
h3 {
  padding-bottom: 15px;
  letter-spacing: 2px;
  font-family: var(--main-font-family);
  font-style: normal;
  font-size: 90px;
  color: var(--main-fonts-color);
  text-shadow:
    0 0 20px var(--main-decor-color),
    0 0 40px var(--main-decor-color),
    0 0 60px var(--main-decor-color),
    2px 2px 4px rgb(0 0 0 / 0.8);
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow:
      0 0 20px var(--main-decor-color),
      0 0 40px var(--main-decor-color),
      0 0 60px var(--main-decor-color),
      2px 2px 4px rgb(0 0 0 / 0.8);
  }

  to {
    text-shadow:
      0 0 30px var(--main-decor-color),
      0 0 50px var(--main-decor-color),
      0 0 80px var(--main-decor-color),
      2px 2px 4px rgb(0 0 0 / 0.8);
  }
}

/* ──────────────────
    technology links
────────────────── */

.technology-section {
  margin-top: 30px;
  text-align: center;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
  padding: 0 20px;
}

.technology-title {
  font-size: 2rem;
  color: var(--main-decor-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-shadow:
    0 0 20px var(--main-decor-color),
    0 0 40px var(--main-decor-color),
    0 0 60px var(--main-decor-color),
    2px 2px 4px rgb(0 0 0 / 0.8);
  font-family: var(--main-font-family);
  position: relative;
  animation: glow 2s ease-in-out infinite alternate;
}

.technology-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--main-decor-color),
    transparent
  );
  border-radius: 2px;
}

.technology-links {
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  background: transparent;
  border-radius: 0;
  border: none;
  backdrop-filter: none;
  box-shadow: none;
  position: relative;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
}

.technology-links p {
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.technology-links a {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  display: inline-block;
  background: transparent;
}

.technology-links img {
  background: transparent;
  mix-blend-mode: multiply;
}

.technology-links a:hover {
  transform: scale(1.15) translateY(-8px);
}

/* Technology tooltip styling */
.technology-links a {
  position: relative;
}

.technology-links a::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.technology-links a::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 1001;
  pointer-events: none;
}

.technology-links a:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

.technology-links a:hover::before {
  opacity: 1;
  visibility: visible;
}

/* ──────────────────
    social media
────────────────── */

.social-media {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 20px;
  margin: 20px 0;
  visibility: visible !important;
  opacity: 1 !important;
}

.social-media a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: transparent;
  backdrop-filter: none;
  border: none;
  color: var(--main-fonts-color);
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  visibility: visible !important;
  opacity: 1 !important;
}

.social-media a .hover-bg {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-color), #9c27b0);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
  z-index: 0;
}

.social-media a i {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--main-fonts-color) !important;
}

/* Clean SVG icons with currentColor - no background rectangles */
.social-media a .social-icon {
  width: 100%;
  height: 100%;
  max-width: 30px;
  max-height: 30px;
  object-fit: contain;
  filter: none;
  color: var(--main-fonts-color);
}

.social-media a:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgb(138 43 226 / 0.4);
}

.social-media a:hover .hover-bg {
  opacity: 0.2;
}

.social-media a:hover i {
  color: white;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.social-media a:hover .social-icon {
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
  transform: scale(1.1);
}

.social-media a:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}

.social-media a:active {
  transform: translateY(-1px) scale(1.05);
}

/* Hover labels for social media icons */
.social-media a::after {
  content: attr(aria-label);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-media a:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Arrow for tooltip */
.social-media a::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
}

.social-media a:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

.pdfResume {
  margin-top: 20px;
  position: center;
  margin-right: 50px;
}

/* ──────────────────
      skills
────────────────── */

#skills {
  margin-top: 100px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--main-fonts-color);
  padding: 40px 20px;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
}

#skills h2 {
  padding-top: 70px;
  margin-bottom: 10px;
  color: white;
  font-family: var(--main-font-family);
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow:
    0 0 10px rgb(255 255 255 / 0.8),
    0 0 20px rgb(255 255 255 / 0.6),
    0 0 30px rgb(255 255 255 / 0.4),
    0 0 40px rgb(255 255 255 / 0.2),
    0 0 15px rgb(184 66 223 / 0.8),
    0 0 25px rgb(184 66 223 / 0.6),
    0 0 35px rgb(184 66 223 / 0.4);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1000px;
  width: 100%;
  margin-top: 30px;
  overflow-x: hidden;
  box-sizing: border-box;
}

.skill-category {
  background: rgb(255 255 255 / 0.05);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgb(255 255 255 / 0.1);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--main-decor-color);
}

.skill-category h3 {
  color: var(--main-decor-color);
  margin-bottom: 20px;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skill-item {
  margin-bottom: 15px;
  text-align: left;
}

.skill-item span {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--main-fonts-color);
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: rgb(255 255 255 / 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--main-decor-color), #9932cc);
  border-radius: 4px;
  width: 0%;
  transition: width 1.5s ease-in-out;
  position: relative;
}

.skill-progress[data-width] {
  animation: skillBarLoad 2s ease-in-out 0.5s forwards;
}

@keyframes skillBarLoad {
  to {
    width: var(--target-width, 75%);
  }
}

.skill-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(255 255 255 / 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

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

/* ──────────────────
          video
    ────────────────── */
#video {
  margin-top: 100px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--main-fonts-color);
  padding: 40px 20px;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
}

#video h2 {
  padding-top: 70px;
  margin-bottom: 10px;
  color: white;
  font-family: var(--main-font-family);
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow:
    0 0 10px rgb(255 255 255 / 0.8),
    0 0 20px rgb(255 255 255 / 0.6),
    0 0 30px rgb(255 255 255 / 0.4),
    0 0 40px rgb(255 255 255 / 0.2),
    0 0 15px rgb(184 66 223 / 0.8),
    0 0 25px rgb(184 66 223 / 0.6),
    0 0 35px rgb(184 66 223 / 0.4);
}

.video-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  max-width: 1000px;
  width: 100%;
  margin-top: 30px;
}

.video-wrapper {
  width: 100%;
  max-width: 800px;
  background: rgb(0 0 0 / 0.15);
  backdrop-filter: blur(25px) saturate(180%);
  border-radius: 25px;
  border: 1px solid rgb(255 255 255 / 0.1);
  box-shadow:
    0 25px 50px rgb(0 0 0 / 0.3),
    0 0 80px rgb(184 66 223 / 0.15),
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(0 0 0 / 0.1);
  padding: 20px;
  overflow: hidden;
  position: relative;
}

.video-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgb(0 0 0 / 0.1) 0%,
    rgb(0 0 0 / 0.05) 50%,
    rgb(0 0 0 / 0.1) 100%
  );
  border-radius: 25px;
  z-index: -1;
  pointer-events: none;
}

.video-wrapper::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgb(184 66 223 / 0.05) 0%,
    transparent 70%
  );
  animation: liquidFlow 8s ease-in-out infinite;
  border-radius: 25px;
  z-index: -1;
}

.video-wrapper iframe {
  width: 100%;
  height: 400px;
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.3);
}

.video-description {
  text-align: center;
  max-width: 600px;
  background: rgb(0 0 0 / 0.1);
  backdrop-filter: blur(20px) saturate(150%);
  border-radius: 20px;
  border: 1px solid rgb(255 255 255 / 0.08);
  box-shadow:
    0 15px 35px rgb(0 0 0 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.video-description::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    rgb(0 0 0 / 0.05) 0%,
    rgb(0 0 0 / 0.02) 50%,
    rgb(0 0 0 / 0.05) 100%
  );
  z-index: -1;
}

.video-description h3 {
  color: var(--main-decor-color);
  margin-bottom: 15px;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow:
    0 0 20px var(--main-decor-color),
    0 0 40px var(--main-decor-color),
    0 0 60px var(--main-decor-color),
    2px 2px 4px rgb(0 0 0 / 0.8);
  font-family: var(--main-font-family);
}

.video-description p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--main-fonts-color);
  font-family: var(--main-font-family);
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.8);
}

/* Responsive Video */
@media only screen and (width <= 768px) {
  .video-wrapper iframe {
    height: 250px;
  }

  .video-description {
    padding: 20px;
  }

  .video-description h3 {
    font-size: 1.2rem;
  }

  .video-description p {
    font-size: 1rem;
  }
}

@media only screen and (width <= 480px) {
  .video-wrapper iframe {
    height: 200px;
  }

  .video-description {
    padding: 15px;
  }

  .video-description h3 {
    font-size: 1rem;
  }

  .video-description p {
    font-size: 0.9rem;
  }
}

/* ──────────────────
      projects
────────────────── */

/* ────────────────── 
      Carousel Styles
────────────────── */

.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 25px;
  background: rgb(0 0 0 / 0.25);
  backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgb(255 255 255 / 0.15);
  box-shadow:
    0 25px 50px rgb(0 0 0 / 0.4),
    0 0 80px rgb(184 66 223 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.3),
    inset 0 -1px 0 rgb(0 0 0 / 0.2);
  padding: 40px 20px;
  z-index: 10;
  isolation: isolate;
  max-width: 1400px;
  margin: 0 auto;
  height: 650px; /* Increased height for better card display */
  min-height: 650px; /* Ensure minimum height */
}

/* Projects Section Styling */
#projects {
  text-align: center;
  color: var(--main-fonts-color);
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
  padding: 0 20px;
}

#projects h2 {
  padding-top: 70px;
  margin-bottom: 10px;
  color: white;
  font-family: var(--main-font-family);
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow:
    0 0 10px rgb(255 255 255 / 0.8),
    0 0 20px rgb(255 255 255 / 0.6),
    0 0 30px rgb(255 255 255 / 0.4),
    0 0 40px rgb(255 255 255 / 0.2),
    0 0 15px rgb(184 66 223 / 0.8),
    0 0 25px rgb(184 66 223 / 0.6),
    0 0 35px rgb(184 66 223 / 0.4);
}

#projects h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgb(184 66 223 / 0.8) 50%,
    transparent 100%
  );
  border-radius: 2px;
  box-shadow: 0 0 10px rgb(184 66 223 / 0.5);
}

#projects p {
  text-align: center;
  margin: 30px auto;
  max-width: 600px;
  color: var(--main-fonts-color);
  font-family: var(--main-font-family);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.6;
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.5);
  background: rgb(0 0 0 / 0.1);
  padding: 15px 25px;
  border-radius: 15px;
  border: 1px solid rgb(184 66 223 / 0.2);
  backdrop-filter: blur(5px) saturate(120%);
  box-shadow:
    0 5px 15px rgb(0 0 0 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
}

/* Projects Grid Styling */

#projects p {
  text-align: center;
  margin: 30px auto;
  max-width: 600px;
  color: var(--main-fonts-color);
  font-family: var(--main-font-family);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.6;
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.5);
  background: rgb(0 0 0 / 0.1);
  padding: 15px 25px;
  border-radius: 15px;
  border: 1px solid rgb(184 66 223 / 0.2);
  backdrop-filter: blur(5px) saturate(120%);
  box-shadow:
    0 5px 15px rgb(0 0 0 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 0 20px;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* Project Cards Styles */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgb(0 0 0 / 0.12);
  border-radius: 20px;
  border: 1px solid rgb(255 255 255 / 0.08);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    0 15px 35px rgb(0 0 0 / 0.25),
    0 0 30px rgb(184 66 223 / 0.18);
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  color: var(--main-fonts-color);
  padding: 0;
  margin: 0;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 25px 50px rgb(0 0 0 / 0.4),
    0 0 50px rgb(184 66 223 / 0.3);
  border-color: rgb(184 66 223 / 0.3);
}

/* Project Card Image */
.project-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: block;
}

/* Project Card Content */
.project-card-content {
  padding: 20px;
  background: rgb(0 0 0 / 0.05);
  text-align: center;
  color: var(--main-fonts-color);
  font-family: var(--main-font-family);
  backdrop-filter: blur(15px) saturate(120%);
  border-top: 1px solid rgb(255 255 255 / 0.05);
  position: relative;
  z-index: 1;
  flex-grow: 1;
}

/* Project Card Title */
.project-card-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-decoration: underline;
}

/* Project Card Description */
.project-card-description {
  font-size: 1rem;
  color: var(--main-fonts-color);
  margin-bottom: 15px;
  line-height: 1.5;
}

/* Project Metrics */
.project-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
  padding: 12px;
  background: rgb(0 0 0 / 0.1);
  border-radius: 12px;
  border: 1px solid rgb(255 255 255 / 0.05);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}

.metric {
  background: rgb(184 66 223 / 0.15);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow:
    0 2px 8px rgb(0 0 0 / 0.2),
    0 0 10px rgb(184 66 223 / 0.1);
  border: 1px solid rgb(184 66 223 / 0.2);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.metric:hover {
  background: rgb(184 66 223 / 0.25);
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgb(0 0 0 / 0.3),
    0 0 15px rgb(184 66 223 / 0.2);
}

/* Project Card Buttons */
.project-card-buttons {
  display: flex;
  gap: 8px;
  padding: 15px;
  background: rgb(0 0 0 / 0.05);
  backdrop-filter: blur(15px) saturate(120%);
  border-top: 1px solid rgb(255 255 255 / 0.05);
}

/* Project Card Buttons - Single Button (No Live Demo) */
.project-card-buttons.single-button {
  justify-content: center;
  padding: 20px 15px;
}

.project-card-buttons.single-button .project-button {
  flex: none;
  min-width: 200px;
  max-width: 300px;
}

.project-button {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  text-decoration: none;
  border-radius: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgb(255 255 255 / 0.1);
}

.demo-button {
  background: linear-gradient(
    135deg,
    rgb(76 175 80 / 0.3) 0%,
    rgb(69 160 73 / 0.4) 50%,
    rgb(76 175 80 / 0.3) 100%
  );
  color: white;
  box-shadow:
    0 6px 20px rgb(76 175 80 / 0.3),
    0 0 25px rgb(76 175 80 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(0 0 0 / 0.1);
  border: 2px solid rgb(76 175 80 / 0.4);
  position: relative;
  overflow: hidden;
  font-weight: 700;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}

.code-button {
  background: linear-gradient(
    135deg,
    rgb(184 66 223 / 0.3) 0%,
    rgb(153 50 204 / 0.4) 50%,
    rgb(184 66 223 / 0.3) 100%
  );
  color: white;
  box-shadow:
    0 6px 20px rgb(184 66 223 / 0.4),
    0 0 30px rgb(184 66 223 / 0.3),
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(0 0 0 / 0.1);
  border: 2px solid rgb(184 66 223 / 0.5);
  position: relative;
  overflow: hidden;
  font-weight: 700;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}

.project-button:hover {
  transform: translateY(-3px);
  backdrop-filter: blur(15px) saturate(180%);
}

.demo-button:hover {
  background: linear-gradient(
    135deg,
    rgb(76 175 80 / 0.5) 0%,
    rgb(69 160 73 / 0.6) 50%,
    rgb(76 175 80 / 0.5) 100%
  );
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 12px 35px rgb(76 175 80 / 0.4),
    0 0 40px rgb(76 175 80 / 0.3),
    inset 0 1px 0 rgb(255 255 255 / 0.3),
    inset 0 -1px 0 rgb(0 0 0 / 0.2);
  border-color: rgb(76 175 80 / 0.6);
  backdrop-filter: blur(20px) saturate(200%);
}

.code-button:hover {
  background: linear-gradient(
    135deg,
    rgb(184 66 223 / 0.5) 0%,
    rgb(153 50 204 / 0.6) 50%,
    rgb(184 66 223 / 0.5) 100%
  );
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 12px 35px rgb(184 66 223 / 0.5),
    0 0 50px rgb(184 66 223 / 0.4),
    inset 0 1px 0 rgb(255 255 255 / 0.3),
    inset 0 -1px 0 rgb(0 0 0 / 0.2);
  border-color: rgb(184 66 223 / 0.7);
  backdrop-filter: blur(20px) saturate(200%);
}

/* Responsive Grid */
@media (width <= 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0 15px;
    margin: 20px 0;
  }

  .project-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
  }

  .project-card-image {
    height: 220px;
    border-radius: 15px 15px 0 0;
  }

  .project-card-content {
    padding: 20px;
  }

  .project-card-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
  }

  .project-card-description {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

@media (width <= 480px) {
  .projects-grid {
    gap: 20px;
    padding: 0 10px;
  }

  .project-card-image {
    height: 200px;
  }

  .project-card-content {
    padding: 18px;
  }

  .project-card-title {
    font-size: 1.3rem;
  }

  .project-card-description {
    font-size: 0.9rem;
  }

  .project-card-buttons {
    padding: 15px;
    flex-direction: column;
  }

  .project-button {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}

/* Resume Button Styling */
.resumeButton {
  background: rgb(0 0 0 / 0.15);
  border: 1px solid rgb(255 255 255 / 0.2);
  color: white;
  padding: 12px 24px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  backdrop-filter: blur(15px) saturate(150%);
  box-shadow:
    0 2px 10px rgb(0 0 0 / 0.3),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  font-family: var(--main-font-family);
}

.resumeButton:hover {
  background: rgb(184 66 223 / 0.4);
  border-color: rgb(184 66 223 / 0.5);
  color: white;
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px rgb(0 0 0 / 0.4),
    0 0 30px rgb(184 66 223 / 0.3),
    inset 0 1px 0 rgb(255 255 255 / 0.3);
  backdrop-filter: blur(25px) saturate(200%);
}

/* Prevent flickering when dropdown is active */
.resume-dropdown:hover .resumeButton,
.pdfResume-dropdown:hover .resumeButton {
  transform: translateY(-2px) !important;
  background: rgb(184 66 223 / 0.4) !important;
  border-color: rgb(184 66 223 / 0.5) !important;
}

/* Smooth dropdown transitions */
.resume-dropdown-content,
.pdfResume-dropdown-content {
  transition:
    opacity 0.2s ease-in-out,
    transform 0.2s ease-in-out !important;
}

/* Resume Dropdown Styling */
.resume-dropdown,
.pdfResume-dropdown {
  position: relative !important;
  display: inline-block !important;
  z-index: 10000 !important;
  overflow: visible !important;
  max-width: 100% !important;
  min-width: 0 !important;
  contain: layout style !important;
}

/* Ensure parent containers don't clip dropdown */
.resume-intro,
.skills-intro,
.intro,
header {
  overflow: visible !important;
  /* Boundary protection for parent containers */
  position: relative;
  contain: layout;
  /* Prevent overflow from parent affecting dropdown */
  max-width: 100%;
  min-width: 0;
}

/* PDF dropdown uses same base styling as regular dropdown */

/* PDF resume dropdown content positioning handled by JavaScript */

/* Standalone resume button styling */
.standalone-resume-button {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px auto;
  padding: 20px;
  max-width: 300px;
}

.standalone-resume-button .resumeButton {
  background: linear-gradient(135deg, var(--accent-color), #9c27b0);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    0 8px 25px rgb(138 43 226 / 0.3),
    0 0 20px rgb(184 66 223 / 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.standalone-resume-button .resumeButton:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 35px rgb(138 43 226 / 0.4),
    0 0 30px rgb(184 66 223 / 0.3);
  background: linear-gradient(135deg, #9c27b0, var(--accent-color));
}

.standalone-resume-button .resumeButton:active {
  transform: translateY(-1px);
}

/* Mobile responsive for standalone button */
@media (width <= 768px) {
  .standalone-resume-button {
    margin: 20px auto;
    padding: 15px;
    max-width: 250px;
  }

  .standalone-resume-button .resumeButton {
    padding: 12px 25px;
    font-size: 1rem;
  }
}

@media (width <= 480px) {
  .standalone-resume-button {
    margin: 15px auto;
    padding: 10px;
    max-width: 200px;
  }

  .standalone-resume-button .resumeButton {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

.resume-dropdown-content,
.pdfResume-dropdown-content {
  display: none !important;
  position: absolute !important;
  background: rgb(0 0 0 / 0.15) !important;
  backdrop-filter: blur(20px) saturate(150%) !important;
  min-width: 200px !important;
  max-width: min(90vw, 280px) !important; /* Smaller max width */
  max-height: min(80vh, 300px) !important; /* Smaller max height */
  box-shadow:
    0 15px 35px rgb(0 0 0 / 0.3),
    0 0 20px rgb(184 66 223 / 0.1),
    inset 0 1px 0 rgb(255 255 255 / 0.1) !important;
  z-index: 10000 !important;
  overflow: hidden !important;
  overflow-y: auto !important;
  contain: layout style paint !important;
  top: 100% !important;
  left: 0 !important;
  right: auto !important;
  margin-top: 8px !important;
  border-radius: 12px !important;
  border: 1px solid rgb(255 255 255 / 0.1) !important;
  opacity: 0 !important;
  transform: translateY(-10px) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  visibility: hidden !important;
  pointer-events: auto !important;
  white-space: nowrap !important;
}

/* PDF resume dropdown content positioning */
.pdfResume-dropdown-content {
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(8px) !important;
  z-index: 10001 !important;
}

/* Smart positioning to prevent off-screen dropdowns */
.resume-dropdown-content {
  /* Auto-adjust if dropdown would go off-screen */
  left: 0 !important;
  right: auto !important;
}

/* If dropdown would go off right edge, align to right */
.resume-dropdown-content.right-aligned {
  left: auto !important;
  right: 0 !important;
}

/* If dropdown would go off bottom edge, show above button */
.resume-dropdown-content.above-button {
  top: auto !important;
  bottom: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

.resume-dropdown-content a,
.pdfResume-dropdown-content a {
  color: white;
  padding: 14px 18px;
  text-decoration: none;
  display: block;
  font-family: var(--main-font-family);
  background: rgb(0 0 0 / 0.05);
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
  cursor: pointer;
  pointer-events: auto;
}

.resume-dropdown-content a:hover,
.pdfResume-dropdown-content a:hover {
  background: rgb(184 66 223 / 0.2);
  color: white;
  transform: translateX(5px);
  box-shadow: inset 0 0 20px rgb(184 66 223 / 0.1);
  backdrop-filter: blur(15px) saturate(180%);
}

.resume-dropdown-content.show,
.pdfResume-dropdown-content.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  position: absolute !important;
  z-index: 10001 !important;
  max-width: min(90vw, 280px) !important; /* Smaller max width */
  max-height: min(80vh, 300px) !important; /* Smaller max height */
  top: 100% !important;
  left: 0 !important;
  right: auto !important;
  margin-top: 8px !important;
}

/* Specific transform for PDF resume dropdown when shown */
.pdfResume-dropdown-content.show {
  transform: translateX(-50%) translateY(0) !important;
  left: 50% !important;
  z-index: 10001 !important;
}

/* Mobile responsive adjustments */
@media (width <= 768px) {
  .resume-dropdown-content,
  .pdfResume-dropdown-content {
    max-width: min(95vw, 250px) !important; /* Smaller mobile width */
    max-height: min(70vh, 250px) !important; /* Smaller mobile height */
  }

  .resume-dropdown-content.show,
  .pdfResume-dropdown-content.show {
    max-width: min(95vw, 250px) !important; /* Smaller mobile width */
    max-height: min(70vh, 250px) !important; /* Smaller mobile height */
  }

  /* Mobile dropdown positioning - keep relative to parent */
  .resume-dropdown-content,
  .pdfResume-dropdown-content {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    transform: translateY(8px) !important;
    max-width: min(90vw, 250px) !important; /* Smaller mobile width */
    max-height: min(70vh, 250px) !important; /* Smaller mobile height */
    overflow-y: auto !important;
    z-index: 10000 !important;
  }

  /* Header resume dropdown - shift left on mobile to stay visible */
  header .resume-dropdown-content {
    left: -50px !important; /* Shift left to keep dropdown visible */
    transform: translateY(8px) !important;
  }

  /* PDF dropdown maintains center positioning on mobile */
  .pdfResume-dropdown-content {
    left: 50% !important;
    transform: translateX(-50%) translateY(8px) !important;
  }

  .pdfResume-dropdown-content.show {
    transform: translateX(-50%) translateY(0) !important;
    left: 50% !important;
  }
}

/* Mobile responsive styles for intro section */
@media (width <= 768px) {
  /* Main content improvements */
  main {
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }

  #home {
    padding: 20px 15px 40px 15px; /* Better spacing */
    min-height: calc(100vh - 60px); /* Account for header height */
  }

  .intro {
    margin: 20px auto;
    padding: 25px 20px;
    max-width: 95%;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.4); /* Better contrast for text */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .skills-intro,
  .resume-intro {
    margin: 20px auto;
    padding: 25px 20px;
    max-width: 95%;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .skills-intro {
    margin: 15px auto;
    padding: 20px 15px;
    max-width: 90%;
  }

  .intro h1 {
    font-size: 2.2rem; /* Slightly smaller for better mobile fit */
    margin-bottom: 15px;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  }

  .intro p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
  }

  .intro .subtitle {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--main-decor-color);
    font-weight: 600;
  }

  .social-media {
    padding: 20px;
    gap: 15px;
    display: flex !important;
    visibility: visible !important;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 1 !important;
  }

  .social-media a {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--main-fonts-color) !important;
  }

  .technology-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .technology-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-align: center;
    color: var(--main-decor-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  }

  .technology-links {
    padding: 20px;
    margin-top: 20px;
    border-radius: 15px;
    overflow: visible;
    max-width: 100%;
    background: rgba(0, 0, 0, 0.2);
  }

  .technology-links p {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    align-items: center;
  }

  .technology-links a {
    margin: 2px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
  }

  .technology-links a:hover {
    transform: scale(1.1);
  }

  .technology-links img {
    width: 36px; /* Better visibility on mobile */
    height: 36px;
    background: transparent;
    mix-blend-mode: multiply;
    flex-shrink: 0; /* Prevent image shrinking */
  }
}

@media (width <= 480px) {
  #home {
    padding: 12px 12px 25px 12px; /* No need to account for fixed header with sticky */
  }

  .intro {
    margin: 15px auto;
    padding: 15px;
    max-width: 98%;
  }

  .skills-intro,
  .resume-intro {
    margin: 15px auto;
    padding: 15px;
    max-width: 98%;
  }

  .skills-intro {
    margin: 12px auto;
    padding: 12px;
    max-width: 95%;
  }

  .intro h1 {
    font-size: 2rem;
  }

  .intro p {
    font-size: 0.9rem;
  }

  .intro .subtitle {
    font-size: 1.1rem;
  }

  .social-media a {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--main-fonts-color) !important;
  }

  .technology-title {
    font-size: 1.3rem;
  }

  .technology-links {
    padding: 12px;
    overflow: visible;
    max-width: 100%;
  }

  .technology-links p {
    gap: 4px; /* Even smaller gap for tighter screens */
    margin: 6px 0;
  }

  .technology-links a {
    margin: 1px;
    flex-shrink: 0;
  }

  .technology-links img {
    width: 28px; /* Maintain good visibility */
    height: 28px;
    background: transparent;
    mix-blend-mode: multiply;
    flex-shrink: 0;
  }
}

@media (width <= 393px) {
  #home {
    padding: 10px 10px 20px 10px; /* No need to account for fixed header with sticky */
  }

  .intro {
    margin: 10px auto;
    padding: 12px;
  }

  .skills-intro,
  .resume-intro {
    margin: 10px auto;
    padding: 12px;
  }

  .skills-intro {
    margin: 8px auto;
    padding: 10px;
  }

  .intro h1 {
    font-size: 1.8rem;
  }

  .intro p {
    font-size: 0.85rem;
  }

  .intro .subtitle {
    font-size: 1rem;
  }

  .social-media a {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--main-fonts-color) !important;
  }

  .technology-title {
    font-size: 1.2rem;
  }

  .technology-links {
    padding: 10px;
    overflow: visible;
    max-width: 100%;
  }

  .technology-links p {
    gap: 3px; /* Minimal gap for iPhone 15 */
    margin: 5px 0;
  }

  .technology-links a {
    margin: 0.5px;
    flex-shrink: 0;
  }

  .technology-links img {
    width: 26px; /* Good size for iPhone 15 */
    height: 26px;
    background: transparent;
    mix-blend-mode: multiply;
    flex-shrink: 0;
  }
}

@media (width <= 360px) {
  #home {
    padding: 8px 8px 18px 8px; /* No need to account for fixed header with sticky */
  }

  .intro {
    margin: 8px auto;
    padding: 10px;
  }

  .skills-intro,
  .resume-intro {
    margin: 8px auto;
    padding: 10px;
  }

  .skills-intro {
    margin: 6px auto;
    padding: 8px;
  }

  .intro h1 {
    font-size: 1.6rem;
  }

  .intro p {
    font-size: 0.8rem;
  }

  .intro .subtitle {
    font-size: 0.95rem;
  }

  .social-media a {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--main-fonts-color) !important;
  }

  .technology-title {
    font-size: 1.1rem;
  }

  .technology-links {
    padding: 8px;
    overflow: visible;
    max-width: 100%;
  }

  .technology-links p {
    gap: 2px; /* Very minimal gap for extra small screens */
    margin: 4px 0;
  }

  .technology-links a {
    margin: 0.5px;
    flex-shrink: 0;
  }

  .technology-links img {
    width: 24px; /* Minimum viable size */
    height: 24px;
    background: transparent;
    mix-blend-mode: multiply;
    flex-shrink: 0;
  }
}

/* Additional mobile background optimizations */
@media (width <= 480px) {
  html,
  body {
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center; /* Center the background */
    background-repeat: no-repeat; /* Prevent tiling */
    background-attachment: fixed; /* Keep fixed for proper wallpaper display */
  }
}

@media (width <= 393px) {
  html,
  body {
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Keep fixed for proper wallpaper display */
  }
}

@media (width <= 360px) {
  html,
  body {
    background-size: cover; /* Cover viewport while maintaining aspect ratio */
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Keep fixed for proper wallpaper display */
  }
}

/* Additional mobile navigation visibility and improvements */
@media (width <= 768px) {
  .hamburger {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: rgb(184 66 223 / 0.1) !important;
    border: 1px solid rgb(184 66 223 / 0.3) !important;
    position: relative !important;
    z-index: 1002 !important;
  }

  .hamburger:hover {
    background: rgb(184 66 223 / 0.2) !important;
    border-color: rgb(184 66 223 / 0.5) !important;
    transform: scale(1.05) !important;
  }

  .nav-bar.nav-active {
    left: 0 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }

  .nav-bar.nav-active li {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    animation: navLinkFade 0.5s ease forwards;
  }

  .nav-bar.nav-active .nav-link {
    opacity: 1 !important;
    visibility: visible !important;
    color: white !important;
    transform: translateX(0) !important;
  }

  /* Ensure proper header layout on mobile */
  header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(5px) !important;
    transition: background-color 0.3s ease !important;
    padding: 0 15px !important;
    height: 60px !important;
    max-width: 100vw !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  /* Logo positioning */
  .logo {
    order: 1 !important;
    flex-shrink: 0 !important;
  }

  /* Resume dropdown positioning */
  .resume-dropdown {
    order: 3 !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }
}

/* Desktop rules - MUST come AFTER mobile rules to override them */
@media (min-width: 769px) {
  /* Ensure hamburger is hidden on desktop */
  .hamburger {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* Ensure nav-bar is visible on desktop */
  .nav-bar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
  }

  /* Reset mobile nav-bar overrides */
  .nav-bar li {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  /* Ensure header shows properly on desktop */
  header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
}

#contact {
  margin: auto;
  margin-top: 40px;
  padding-bottom: 20px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--main-fonts-color);
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
  padding: 40px 20px 20px 20px;
}

#contact h2 {
  margin-bottom: 5px;
  color: white;
  font-family: var(--main-font-family);
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow:
    0 0 10px rgb(255 255 255 / 0.8),
    0 0 20px rgb(255 255 255 / 0.6),
    0 0 30px rgb(255 255 255 / 0.4),
    0 0 40px rgb(255 255 255 / 0.2),
    0 0 15px rgb(184 66 223 / 0.8),
    0 0 25px rgb(184 66 223 / 0.6),
    0 0 35px rgb(184 66 223 / 0.4);
}

#contact p {
  padding: 5px;
  text-align: center;
  font-size: 1.2rem;
  font-family: var(--main-font-family);
  margin-bottom: 5px;
}

/* Secure Contact Form Styles */
.contact-form-container {
  max-width: 800px; /* Increased from 600px to 800px */
  margin: 0 auto;
  padding: 20px;
  background: rgb(0 0 0 / 0.15);
  backdrop-filter: blur(25px) saturate(180%);
  border-radius: 25px;
  border: 1px solid rgb(255 255 255 / 0.1);
  box-shadow:
    0 15px 35px rgb(0 0 0 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
}

.contact-form-container h3 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--main-fonts-color);
  font-size: 1.5rem;
  font-weight: 600;
}

.secure-contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--main-fonts-color);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.05);
  color: var(--main-fonts-color);
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgb(138 43 226 / 0.2);
  background: rgb(255 255 255 / 0.1);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgb(255 71 87 / 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgb(255 255 255 / 0.5);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.submit-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-color), #9c27b0);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgb(138 43 226 / 0.4);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.error-message {
  color: #ff4757;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.form-status {
  margin-top: 20px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  display: none;
}

.form-status .error {
  background: rgb(255 71 87 / 0.1);
  color: #ff4757;
  border: 1px solid rgb(255 71 87 / 0.3);
}

.form-status .success {
  background: rgb(46 204 113 / 0.1);
  color: #2ecc71;
  border: 1px solid rgb(46 204 113 / 0.3);
}

/* Duplicate social media styles removed - using main styles above */

/* Email Box Styling */
.emailBox {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px auto;
  padding: 10px;
  max-width: 100%;
  overflow: hidden;
}

.emailBox iframe,
.emailBox div {
  max-width: 100%;
  overflow: hidden;
}

/* Responsive Email Box */
@media (width <= 768px) {
  .emailBox {
    margin: 20px auto;
    padding: 10px;
  }

  #contact {
    min-height: 300px;
    margin-top: 40px;
  }
}

@media (width <= 480px) {
  .emailBox {
    margin: 15px auto;
    padding: 5px;
  }

  #contact {
    min-height: 250px;
    margin-top: 20px;
  }

  .social-media {
    gap: 10px;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .social-media a i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--main-fonts-color) !important;
  }
}

/* Footer Styling */
footer {
  width: 100%;
  min-height: 60px;
  background-color: var(--main-header-background);
  margin-top: auto;
}

.copyright {
  color: #fff;
  font-size: 1.2rem;
  line-height: 40px;
  text-align: center;
}

.copyright a {
  color: var(--main-fonts-color);
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--main-font-family);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow:
    0 0 20px var(--main-decor-color),
    0 0 40px var(--main-decor-color),
    0 0 60px var(--main-decor-color),
    2px 2px 4px rgb(0 0 0 / 0.8);
  transition: all 0.3s ease;
  position: relative;
}

.copyright a:hover {
  color: var(--main-decor-color);
  text-shadow:
    0 0 30px var(--main-decor-color),
    0 0 50px var(--main-decor-color),
    0 0 80px var(--main-decor-color),
    0 0 100px var(--main-decor-color),
    2px 2px 4px rgb(0 0 0 / 0.8);
  transform: scale(1.05);
}
