/* Custom CSS with Animations and Styling */

:root {
  --code-font: 'Fira Code', monospace;
  --primary-color: #dc2626;
  --secondary-color: #991b1b;
  --accent-color: #ef4444;
  --light-color: #f9fafb;
  --dark-color: #0a0a0a;
  --darker-color: #000000;
  --gray-color: #374151;
  --red-glow: rgba(220, 38, 38, 0.3);
  --red-light: rgba(239, 68, 68, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 0.375rem;
  --box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --red-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
  --vh: 1vh; /* Variable for viewport height fixes on mobile */
}

/* Base styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  position: relative;
  background: linear-gradient(135deg, 
    #000000 0%, 
    #0a0a0a 15%, 
    #0d1117 30%, 
    #161b22 45%, 
    #0a0a0a 60%, 
    #0d0d0d 75%, 
    #000000 100%);
  background-attachment: fixed;
  background-size: 100% 100%;
}

/* Support for dark mode */
html.dark {
  color-scheme: dark;
}

/* Improved mobile menu styles */
#mobile-menu {
  width: 100%;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

/* Extra small screen adjustments */
@media (max-width: 360px) {
  .text-xl {
    font-size: 1.1rem !important;
  }
  
  .h-16 {
    height: 3.5rem !important;
  }
  
  #mobile-menu-button {
    padding: 0.25rem !important;
  }
}

@media (max-width: 767px) {
  .max-w-7xl {
    width: 100%;
    padding: 0 1rem;
  }
  
  /* Fix font size on mobile */
  .text-5xl {
    font-size: 2.5rem !important;
  }
  
  /* Fix layout on mobile */
  .container {
    width: 100%;
    padding: 0 1rem;
  }
}

/* Profile Image Hover Effects - 3D Card Flip */
.profile-card {
  width: 320px;
  height: 320px;
  position: relative;
  perspective: 1500px;
  cursor: pointer;
  margin: 0 auto;
  transition: transform 0.5s ease;
}

.profile-card:hover {
  transform: translateY(-10px);
}

@media (min-width: 768px) {
  .profile-card {
    width: 340px;
    height: 340px;
  }
}

/* Modern frame with smoother edges */
.profile-frame {
  position: absolute;
  width: 100%;
  height: 100%;
  background: none; /* Remove bloom background */
  border-radius: 50%;
  box-shadow: none; /* Remove heavy shadow */
  border: 3px solid var(--primary-color);
  animation: none; /* Remove frameGlow animation */
  z-index: 1;
}

.profile-frame::before {
  content: none; /* Remove bloom pseudo-element entirely */
}

/* Profile image with improved shape */
.profile-image-container {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  transition: transform 0.5s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.profile-card:hover .profile-image-container {
  transform: scale(1.05);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) brightness(1.05);
  transition: filter 0.3s ease, transform 0.5s ease;
}

.profile-card:hover .profile-image {
  transform: scale(1.1);
}

/* Glitch effect overlay - improved cleaner version */
.glitch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0.5;
}

.glitch-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-layer:nth-child(1) {
  background: var(--primary-color);
  mix-blend-mode: overlay;
  animation: glitch1 6s infinite;
  filter: blur(1px);
}

.glitch-layer:nth-child(2) {
  background: var(--accent-color);
  mix-blend-mode: color-dodge;
  animation: glitch2 4s infinite;
  filter: blur(0.5px);
}

/* Improved "Click Me" arrow */
.click-arrow {
  position: absolute;
  right: -40px;
  top: 15%;
  z-index: 10;
  pointer-events: none;
}

.arrow-bubble {
  background: var(--light-color);
  color: var(--darker-color);
  padding: 8px 15px;
  border-radius: 20px 20px 20px 5px;
  font-size: 14px;
  font-weight: bold;
  border: 3px solid var(--primary-color);
  position: relative;
  transform: rotate(-15deg);
  animation: bounce 2s infinite, wiggle 3s infinite;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Profile card flip functionality with improved animation - fixed for Firefox */
.profile-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-card:hover .profile-card-inner {
  transform: rotateY(180deg);
}

.profile-card-front, .profile-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 50%;
}

/* Front card stays visible by default */
.profile-card-front {
  z-index: 2; /* Higher z-index by default */
  transform: rotateY(0deg);
}

/* Fix for Firefox - front disappears when flipped */
.profile-card:hover .profile-card-front {
  z-index: 1; /* Lower z-index when card is flipped */
}

.profile-card-back {
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a); 
  color: var(--light-color);
  transform: rotateY(180deg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid var(--primary-color);
  box-shadow: var(--red-shadow);
  position: relative;
  overflow: hidden;
  z-index: 1; /* Lower z-index by default */
}

/* Fix for Firefox - back becomes visible when flipped */
.profile-card:hover .profile-card-back {
  z-index: 2; /* Higher z-index when card is flipped */
}

.profile-card-back::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, var(--primary-color), transparent, var(--primary-color));
  z-index: -1;
  opacity: 0.2;
  animation: rotateGradient 8s linear infinite;
  filter: blur(10px);
}

.profile-card-back h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--light-color);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.profile-card-back p {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: var(--accent-color);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin: 1.2rem 0;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0.5rem 0.75rem;
  background-color: rgba(220, 38, 38, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.profile-stat:hover {
  transform: translateY(-5px);
  background-color: rgba(220, 38, 38, 0.2);
}

.profile-stat::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 30%;
  height: 3px;
  background-color: var(--primary-color);
  transform: translateX(-50%);
  border-radius: 2px;
}

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--light-color);
  text-shadow: 0 0 5px rgba(220, 38, 38, 0.5);
}

.profile-stat-label {
  font-size: 0.8rem;
  color: #aaa;
}

.profile-social-icons {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.profile-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #101010, #1a1a1a);
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.profile-social-icon:hover {
  transform: translateY(-5px) rotate(5deg);
  background: var(--primary-color);
  color: var(--light-color);
  box-shadow: 0 5px 15px rgba(220, 38, 38, 0.5);
}

@keyframes frameGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
  }
}

@keyframes borderPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.03);
  }
}

@keyframes glitch1 {
  0%, 100% {
    opacity: 0;
  }
  10%, 15% {
    opacity: 0.3;
    transform: translate(-5px, 2px);
  }
  20%, 25% {
    opacity: 0;
  }
  30%, 35% {
    opacity: 0.3;
    transform: translate(5px, -2px);
  }
}

@keyframes glitch2 {
  0%, 100% {
    opacity: 0;
  }
  25%, 30% {
    opacity: 0.3;
    transform: translate(-5px, -2px);
  }
  45%, 50% {
    opacity: 0;
  }
  60%, 65% {
    opacity: 0.3;
    transform: translate(5px, 2px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) rotate(-15deg);
  }
  50% {
    transform: translateY(-10px) rotate(-15deg);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(-15deg);
  }
  25% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(-18deg);
  }
  75% {
    transform: rotate(-12deg);
  }
}

@keyframes pointPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateY(-50%) rotate(45deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) rotate(45deg) scale(1.2);
  }
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hover effects */
.profile-card:hover .profile-image-container {
  transform: rotate(-5deg) scale(1.25);
}

.profile-card:hover .profile-image {
  filter: contrast(1.2) brightness(1.1) hue-rotate(10deg);
}

.profile-card:hover .click-arrow {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.5s ease;
}

.profile-card:hover .glitch-layer:nth-child(1) {
  animation: glitchActive1 0.3s infinite;
}

.profile-card:hover .glitch-layer:nth-child(2) {
  animation: glitchActive2 0.3s infinite;
}

/* Keyframe animations */
@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navigation with unique styling */
.nav-link {
  position: relative;
  font-weight: 500;
  padding: 0.5rem;
  transition: var(--transition);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--red-light), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
  border-radius: 3px;
  box-shadow: 0 0 5px var(--red-glow);
}

.nav-link:hover::after {
  width: 100%;
}

/* Unique button styles */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  color: white;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(220, 38, 38, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.7s ease;
  z-index: -1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0), rgba(255,255,255,0.1), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(220, 38, 38, 0.5);
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Hexagonal design elements */
.hex-element {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Glitch text effect for headings */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-text::before {
  color: var(--primary-color);
  animation: glitchText1 3s infinite;
}

.glitch-text::after {
  color: var(--accent-color);
  animation: glitchText2 3s infinite;
}

@keyframes glitchText1 {
  0%, 100% { transform: translate(0); opacity: 0; }
  1% { transform: translate(-2px, 2px); opacity: 0.7; }
  2% { transform: translate(0); opacity: 0; }
  3% { transform: translate(2px, -2px); opacity: 0.5; }
  4% { transform: translate(0); opacity: 0; }
}

/* === PRIVATE CONTENT TERMINAL REDESIGN START === */
/* Place new styles for the overhauled private-content.html below this line */

/* === PRIVATE CONTENT TERMINAL REDESIGN END === */

/* ===== VIRUS ATTACK EFFECTS ===== */
.virus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 0, 0, 0.1);
    z-index: 99999;
    pointer-events: none;
    animation: virusGlow 2s ease-in-out infinite alternate;
}

@keyframes virusGlow {
    0% { background: rgba(255, 0, 0, 0.1); }
    100% { background: rgba(255, 0, 0, 0.3); }
}

.error-window {
    position: absolute;
    width: 300px;
    height: 200px;
    background: #1a1a1a;
    border: 2px solid #ff0000;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    transform: scale(0);
    opacity: 0;
    transition: all 0.5s ease-out;
    z-index: 100000;
}

.error-window.spread {
    transform: scale(1);
    opacity: 1;
}

.error-header {
    background: #ff0000;
    color: white;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px 6px 0 0;
    font-weight: bold;
    font-size: 14px;
}

.error-close {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.error-close:hover {
    color: #ffcccc;
}

.error-content {
    padding: 20px;
    text-align: center;
    color: #ff0000;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: errorBlink 1s ease-in-out infinite;
}

@keyframes errorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.error-message {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.error-details {
    font-size: 14px;
    opacity: 0.8;
}

/* Terminal output styling for virus messages */
.terminal-output pre {
    white-space: pre;
    font-family: 'Courier New', monospace;
    line-height: 1;
    margin: 0;
    padding: 0;
}

/* ===== END VIRUS ATTACK EFFECTS ===== */

.profile-card:hover .profile-image {
  transform: scale(1.1);
}

/* Glitch effect overlay - improved cleaner version */
.glitch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0.5;
}

.glitch-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-layer:nth-child(1) {
  background: var(--primary-color);
  mix-blend-mode: overlay;
  animation: glitch1 6s infinite;
  filter: blur(1px);
}

.glitch-layer:nth-child(2) {
  background: var(--accent-color);
  mix-blend-mode: color-dodge;
  animation: glitch2 4s infinite;
  filter: blur(0.5px);
}

/* Improved "Click Me" arrow */
.click-arrow {
  position: absolute;
  right: -40px;
  top: 15%;
  z-index: 10;
  pointer-events: none;
}

.arrow-bubble {
  background: var(--light-color);
  color: var(--darker-color);
  padding: 8px 15px;
  border-radius: 20px 20px 20px 5px;
  font-size: 14px;
  font-weight: bold;
  border: 3px solid var(--primary-color);
  position: relative;
  transform: rotate(-15deg);
  animation: bounce 2s infinite, wiggle 3s infinite;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Profile card flip functionality with improved animation - fixed for Firefox */
.profile-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-card:hover .profile-card-inner {
  transform: rotateY(180deg);
}

.profile-card-front, .profile-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 50%;
}

/* Front card stays visible by default */
.profile-card-front {
  z-index: 2; /* Higher z-index by default */
  transform: rotateY(0deg);
}

/* Fix for Firefox - front disappears when flipped */
.profile-card:hover .profile-card-front {
  z-index: 1; /* Lower z-index when card is flipped */
}

.profile-card-back {
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a); 
  color: var(--light-color);
  transform: rotateY(180deg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid var(--primary-color);
  box-shadow: var(--red-shadow);
  position: relative;
  overflow: hidden;
  z-index: 1; /* Lower z-index by default */
}

/* Fix for Firefox - back becomes visible when flipped */
.profile-card:hover .profile-card-back {
  z-index: 2; /* Higher z-index when card is flipped */
}

.profile-card-back::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, var(--primary-color), transparent, var(--primary-color));
  z-index: -1;
  opacity: 0.2;
  animation: rotateGradient 8s linear infinite;
  filter: blur(10px);
}

.profile-card-back h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--light-color);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.profile-card-back p {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: var(--accent-color);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin: 1.2rem 0;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0.5rem 0.75rem;
  background-color: rgba(220, 38, 38, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.profile-stat:hover {
  transform: translateY(-5px);
  background-color: rgba(220, 38, 38, 0.2);
}

.profile-stat::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 30%;
  height: 3px;
  background-color: var(--primary-color);
  transform: translateX(-50%);
  border-radius: 2px;
}

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--light-color);
  text-shadow: 0 0 5px rgba(220, 38, 38, 0.5);
}

.profile-stat-label {
  font-size: 0.8rem;
  color: #aaa;
}

.profile-social-icons {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.profile-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #101010, #1a1a1a);
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.profile-social-icon:hover {
  transform: translateY(-5px) rotate(5deg);
  background: var(--primary-color);
  color: var(--light-color);
  box-shadow: 0 5px 15px rgba(220, 38, 38, 0.5);
}

@keyframes frameGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
  }
}

@keyframes borderPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.03);
  }
}

@keyframes glitch1 {
  0%, 100% {
    opacity: 0;
  }
  10%, 15% {
    opacity: 0.3;
    transform: translate(-5px, 2px);
  }
  20%, 25% {
    opacity: 0;
  }
  30%, 35% {
    opacity: 0.3;
    transform: translate(5px, -2px);
  }
}

@keyframes glitch2 {
  0%, 100% {
    opacity: 0;
  }
  25%, 30% {
    opacity: 0.3;
    transform: translate(-5px, -2px);
  }
  45%, 50% {
    opacity: 0;
  }
  60%, 65% {
    opacity: 0.3;
    transform: translate(5px, 2px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) rotate(-15deg);
  }
  50% {
    transform: translateY(-10px) rotate(-15deg);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(-15deg);
  }
  25% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(-18deg);
  }
  75% {
    transform: rotate(-12deg);
  }
}

@keyframes pointPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateY(-50%) rotate(45deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) rotate(45deg) scale(1.2);
  }
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hover effects */
.profile-card:hover .profile-image-container {
  transform: rotate(-5deg) scale(1.25);
}

.profile-card:hover .profile-image {
  filter: contrast(1.2) brightness(1.1) hue-rotate(10deg);
}

.profile-card:hover .click-arrow {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.5s ease;
}

.profile-card:hover .glitch-layer:nth-child(1) {
  animation: glitchActive1 0.3s infinite;
}

.profile-card:hover .glitch-layer:nth-child(2) {
  animation: glitchActive2 0.3s infinite;
}

/* Keyframe animations */
@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navigation with unique styling */
.nav-link {
  position: relative;
  font-weight: 500;
  padding: 0.5rem;
  transition: var(--transition);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--red-light), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
  border-radius: 3px;
  box-shadow: 0 0 5px var(--red-glow);
}

.nav-link:hover::after {
  width: 100%;
}

/* Unique button styles */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  color: white;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(220, 38, 38, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.7s ease;
  z-index: -1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0), rgba(255,255,255,0.1), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(220, 38, 38, 0.5);
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Hexagonal design elements */
.hex-element {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Glitch text effect for headings */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-text::before {
  color: var(--primary-color);
  animation: glitchText1 3s infinite;
}

.glitch-text::after {
  color: var(--accent-color);
  animation: glitchText2 3s infinite;
}

@keyframes glitchText1 {
  0%, 100% { transform: translate(0); opacity: 0; }
  1% { transform: translate(-2px, 2px); opacity: 0.7; }
  2% { transform: translate(0); opacity: 0; }
  3% { transform: translate(2px, -2px); opacity: 0.5; }
  4% { transform: translate(0); opacity: 0; }
}

@keyframes glitchText2 {
  0%, 100% { transform: translate(0); opacity: 0; }
  2% { transform: translate(1px, -1px); opacity: 0.6; }
  3% { transform: translate(0); opacity: 0; }
  4% { transform: translate(-1px, 1px); opacity: 0.8; }
  5% { transform: translate(0); opacity: 0; }
}

/* Additional cyberpunk text effects */
.cyberpunk-text {
  text-shadow: 0 0 2px rgba(220, 38, 38, 0.4);
  transition: text-shadow 0.3s ease;
}

.cyberpunk-text:hover {
  text-shadow: 0 0 4px rgba(220, 38, 38, 0.8);
}

/* Occasional glitch animation */
@keyframes text-glitch {
  0% {
    transform: translate(0);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
  2% {
    transform: translate(-2px, 1px);
    text-shadow: -1px 0 1px rgba(220, 38, 38, 0.5), 1px -1px 1px rgba(0, 255, 255, 0.5);
  }
  4% {
    transform: translate(0);
    text-shadow: -1px 0 1px rgba(220, 38, 38, 0.5), 3px -1px 1px rgba(0, 255, 255, 0.5);
  }
  6% {
    transform: translate(0);
    text-shadow: -1px -1px 0 rgba(220, 38, 38, 0.5), 0px 1px 0 rgba(0, 255, 255, 0.5);
  }
  8% {
    transform: translate(0);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
  100% {
    transform: translate(0);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
}

.glitch-active {
  animation: text-glitch 3s infinite;
}

/* Edgy Scrollbar */
::-webkit-scrollbar {
  width: 6px; /* Thinner width for more modern look */
}

::-webkit-scrollbar-track {
  background: var(--dark-color);
  border-left: 1px solid rgba(220, 38, 38, 0.1); /* Subtle red border */
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color); /* Solid color for cleaner look */
  border-radius: 0; /* Sharp edges for edgy look */
  box-shadow: inset 0 0 3px var(--red-glow); /* Inset shadow for depth */
  border-left: 1px solid rgba(239, 68, 68, 0.5); /* Highlight edge */
  border-right: 1px solid rgba(153, 27, 27, 0.5); /* Shadow edge */
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
  box-shadow: inset 0 0 5px var(--red-glow); /* Stronger glow on hover */
}

/* For Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--dark-color);
}

/* Hero Section */
.hero-blob {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.2), rgba(153, 27, 27, 0.05), rgba(220, 38, 38, 0.15));
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  filter: blur(25px);
  animation: blob-animation 15s infinite alternate, blob-pulse 5s infinite alternate, blob-rotate 20s infinite linear;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-blob-secondary {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.1), rgba(153, 27, 27, 0.2));
  border-radius: 60% 40% 30% 70% / 40% 50% 60% 50%;
  filter: blur(8px);
  animation: blob-animation-secondary 15s infinite alternate, blob-pulse-secondary 4s infinite alternate, blob-rotate-secondary 25s infinite linear;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.7;
}

@keyframes blob-animation {
  0% {
    border-radius: 30% 70% 60% 40% / 40% 50% 60% 50%;
    transform: translate(-50%, -50%) scale(1);
  }
  25% {
    border-radius: 35% 65% 65% 35% / 35% 65% 35% 65%;
  }
  50% {
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    transform: translate(-50%, -50%) scale(1.05);
  }
  75% {
    border-radius: 40% 60% 50% 50% / 40% 40% 60% 60%;
  }
  100% {
    border-radius: 30% 70% 60% 40% / 40% 50% 60% 50%;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes blob-pulse {
  0% {
    box-shadow: 0 0 30px 10px rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 0 50px 15px rgba(220, 38, 38, 0.3);
  }
  100% {
    box-shadow: 0 0 30px 10px rgba(220, 38, 38, 0.2);
  }
}

@keyframes blob-rotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes blob-animation-secondary {
  0% {
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
  50% {
    border-radius: 40% 60% 60% 40% / 40% 60% 40% 60%;
    transform: translate(-50%, -50%) rotate(25deg) scale(1.08);
  }
  100% {
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
}

@keyframes blob-pulse-secondary {
  0% {
    box-shadow: 0 0 30px 5px rgba(239, 68, 68, 0.15);
  }
  100% {
    box-shadow: 0 0 40px 10px rgba(239, 68, 68, 0.25);
  }
}

@keyframes blob-rotate-secondary {
  0% {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(405deg);
  }
}

.typing-text {
  display: inline-block;
  position: relative;
  font-weight: bold;
  padding: 0 5px;
}

/* Remove custom cursor - letting Typed.js handle the cursor */
/* 
.typing-text::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 5%;
  height: 90%;
  width: 2px;
  background-color: var(--primary-color);
  animation: cursor-blink 1.2s infinite;
}
*/

/* Typed.js cursor styling */
.typed-cursor {
  color: var(--primary-color);
  font-weight: normal;
  animation: cursor-blink 1.2s infinite;
  opacity: 1;
}

@keyframes cursor-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* About Section */
.about-image-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.about-image {
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 0.5s ease;
  border-radius: 10px;
}

.about-image-wrapper:hover .about-image {
  transform: scale(1.05);
}

.about-image-wrapper::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  opacity: 0.2;
  z-index: -1;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  border-radius: 50%;
  opacity: 0.2;
  z-index: -1;
}

.about-info-item {
  margin-bottom: 0.5rem;
}

.about-info-title {
  font-weight: 600;
  color: #d1d5db;
  margin-right: 0.5rem;
}

.dark .about-info-title {
  color: #d1d5db;
}

.about-info-value {
  color: var(--primary-color);
  font-weight: 500;
}

.about-social {
  margin-top: 1.5rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  color: #d1d5db;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(220, 38, 38, 0.4);
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dark .social-icon {
  background-color: rgba(0, 0, 0, 0.8);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(220, 38, 38, 0.5);
}

.social-icon:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(220, 38, 38, 0.4);
  border-color: transparent;
}

.social-icon:hover::before {
  opacity: 1;
}

.contact-social .social-icon {
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
}

/* Skills Section */
.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 9999px;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
  position: relative;
  overflow: hidden;
}

.skill-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0) 100%);
  width: 45px;
  height: 100%;
  animation: shimmer 2s infinite;
  transform: skewX(-20deg);
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) skewX(-20deg);
  }
  100% {
    transform: translateX(400%) skewX(-20deg);
  }
}

.skill-item {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  border: 1px solid rgba(220, 38, 38, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.skill-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(220, 38, 38, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.skill-item:hover::before {
  opacity: 1;
  animation: skill-shimmer 3s infinite alternate;
}

.featured-skill {
  border: 1px solid rgba(220, 38, 38, 0.3);
  background-color: rgba(220, 38, 38, 0.05);
}

.featured-skill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 25px;
  height: 25px;
  background: linear-gradient(135deg, transparent 50%, var(--primary-color) 50%);
  z-index: 1;
}

.skill-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skill-tag {
  font-size: 0.7rem;
  color: var(--primary-color);
  margin-top: 0.25rem;
  font-family: var(--code-font);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.skill-item:hover .skill-tag {
  opacity: 1;
  transform: translateY(2px);
}

@keyframes skill-shimmer {
  0% {
    opacity: 0.1;
    background-position: -100% 0;
  }
  100% {
    opacity: 0.3;
    background-position: 200% 0;
  }
}

.dark .skill-item {
  background-color: rgba(31, 41, 55, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--darker-color), #1a1a1a);
  color: var(--primary-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  position: relative;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.skill-icon.ionic-icon {
  color: #3880ff;
  animation: ionic-glow 3s infinite alternate;
}

.skill-icon.react-icon {
  color: #61dafb;
  animation: react-spin 8s linear infinite;
}

.skill-icon.nodejs-icon {
  color: #68a063;
}

.skill-icon.bootstrap-icon {
  color: #7952b3;
}

.skill-icon.mysql-icon {
  color: #4479a1;
}

.skill-icon.git-icon {
  color: #f05032;
}

.skill-icon.laravel-icon {
  color: #ff2d20;
}

.skill-icon.aws-icon {
  color: #ff9900;
}

.skill-icon.docker-icon {
  color: #2496ed;
}

@keyframes react-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.skill-item:hover .react-icon i {
  animation: react-spin 3s linear infinite;
}

/* Enhanced grid layout for framework items */
@media (min-width: 768px) {
  .skill-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  .skill-item:nth-child(odd):hover {
    transform: translateY(-10px) rotate(-1deg);
  }
  
  .skill-item:nth-child(even):hover {
    transform: translateY(-10px) rotate(1deg);
  }
}

/* Framework badge */
.framework-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 10px;
  transform: rotate(15deg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  font-family: var(--code-font);
  opacity: 0;
  transition: all 0.3s ease;
}

.skill-item:hover .framework-badge {
  opacity: 1;
  animation: badge-pulse 1s ease infinite alternate;
}

@keyframes badge-pulse {
  0% {
    transform: rotate(15deg) scale(1);
  }
  100% {
    transform: rotate(15deg) scale(1.1);
  }
}

/* Framework section header styling */
.framework-title {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.tech-badge {
  font-family: var(--code-font);
  font-size: 0.7rem;
  white-space: nowrap;
}

.code-keyword {
  color: #569CD6;
}

.code-var {
  color: #9CDCFE;
}

.code-string {
  color: #CE9178;
}

@media (max-width: 640px) {
  .tech-badge {
    display: none;
  }
}

/* Back to Top Button - Modern Design */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(100px) scale(0.8);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 999;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(220, 38, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.back-to-top.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.backtop-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 3;
  transition: all 0.4s ease;
}

.back-to-top i {
  font-size: 1.3rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.backtop-ring {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 12px;
  background: linear-gradient(45deg, 
    var(--primary-color), 
    rgba(220, 38, 38, 0.6), 
    transparent,
    rgba(220, 38, 38, 0.6),
    var(--primary-color)
  );
  opacity: 0;
  z-index: 1;
  animation: pulse-glow 2s ease-in-out infinite alternate;
  transition: opacity 0.3s ease;
}

.backtop-tooltip {
  position: absolute;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(180, 30, 30, 0.9));
  backdrop-filter: blur(10px);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  right: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) translateX(15px) scale(0.8);
  white-space: nowrap;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.backtop-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(220, 38, 38, 0.9);
}

.back-to-top:hover .backtop-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

.back-to-top:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.4);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 4px 20px rgba(220, 38, 38, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.back-to-top:hover .backtop-ring {
  opacity: 1;
  animation: pulse-glow 1s ease-in-out infinite alternate;
}

.back-to-top:hover i {
  color: #ffffff;
  transform: translateY(-4px) scale(1.1);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.back-to-top:active {
  transform: translateY(-6px) scale(1.02);
  transition: all 0.2s ease;
}

@keyframes pulse-glow {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 0.6;
    transform: scale(1.02);
  }
}

@media (max-width: 640px) {
  .back-to-top {
    width: 42px;
    height: 42px;
    bottom: 20px;
    right: 20px;
    border-radius: 10px;
  }
  
  .back-to-top i {
    font-size: 1.0rem;
  }
  
  .backtop-ring {
    border-radius: 10px;
  }
  
  .backtop-tooltip {
    display: none;
  }
  
  .back-to-top:hover {
    transform: translateY(-4px) scale(1.03);
  }
}

/* Footer styling with red accents */
footer {
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  opacity: 0.6;
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center top, rgba(220, 38, 38, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Enhanced Contact Form */
.terminal-form-wrapper {
  position: relative;
  overflow: hidden;
}

.terminal-form-wrapper::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(15px);
}

.terminal-form-wrapper::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(20px);
}

.terminal-input {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: white;
  padding: 0.75rem;
  border-radius: 0.25rem;
  width: 100%;
  font-family: var(--code-font);
  transition: all 0.3s ease;
  resize: none;
  position: relative;
  overflow: hidden;
}

.terminal-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.terminal-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  background-color: rgba(0, 0, 0, 0.6);
}

.terminal-input:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.terminal-button-submit {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.terminal-button-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent);
  transform: rotate(45deg);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 0;
}

.terminal-button-submit:hover::after {
  opacity: 1;
  left: 100%;
  top: 100%;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: translateX(-50%) translateY(-8px) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateX(-50%) translateY(-8px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-8px) scale(1);
    opacity: 0.5;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Cyberpunk Typing Animation Effect */
.cyberpunk-text {
  position: relative;
  display: inline-block;
  font-family: var(--code-font);
}

.cyberpunk-text::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--accent-color);
  animation: cyberpunk-cursor 0.8s infinite;
}

@keyframes cyberpunk-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cyberpunk-glitch {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent-color);
  z-index: 1;
  mix-blend-mode: difference;
  animation: cyberpunk-glitch 0.1s ease infinite;
  opacity: 0.5;
}

@keyframes cyberpunk-glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

/* Container for cyberpunk animation */
.cyberpunk-container {
  position: relative;
  overflow: hidden;
  display: block;
}

/* Animated paragraph text */
.animated-about-text {
  min-height: 5.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.cyberpunk-typing {
  position: relative;
  display: inline;
  color: var(--light-color);
}

.reveal-cursor {
  color: var(--accent-color);
  opacity: 0;
  animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .about-image-wrapper::before,
  .about-image-wrapper::after {
    display: none;
  }
  
  .hero-blob {
    width: 300px;
    height: 300px;
  }
}

/* Dark mode specific styles */
.dark .skill-progress {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.dark .loading {
  background: #111827;
}

.loading.hide {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(220, 38, 38, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Reveal animations */
.reveal {
  position: relative;
  opacity: 0;
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
}

.reveal.fade-bottom {
  transform: translateY(20px);
}

.reveal.fade-bottom.active {
  transform: translateY(0);
}

.reveal.fade-left {
  transform: translateX(-20px);
}

.reveal.fade-left.active {
  transform: translateX(0);
}

.reveal.fade-right {
  transform: translateX(20px);
}

.reveal.fade-right.active {
  transform: translateX(0);
}

/* Enhanced Project Cards */
.project-card {
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  border: 1px solid rgba(220, 38, 38, 0.2);
  position: relative;
  z-index: 1;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, transparent 20%, rgba(220, 38, 38, 0.1), transparent 80%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.5s ease;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.dark .project-card {
  background-color: rgba(17, 24, 39, 0.8);
  border-color: rgba(220, 38, 38, 0.2);
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
}

.project-card:hover::before {
  opacity: 1;
  animation: card-shimmer 2s infinite alternate;
}

.project-card:hover::after {
  transform: scaleX(1);
}

@keyframes card-shimmer {
  0% {
    opacity: 0.1;
  }
  100% {
    opacity: 0.3;
  }
}

.project-img {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
  filter: saturate(0.9) contrast(1.1);
}

.project-card:hover .project-img img {
  transform: scale(1.1) rotate(2deg);
  filter: saturate(1.1) contrast(1.2);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0.3), 
    rgba(220, 38, 38, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  backdrop-filter: blur(3px);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 15px;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  opacity: 0;
}

.project-card:hover .project-links {
  transform: translateY(0);
  opacity: 1;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
}

.project-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.project-info {
  padding: 1.5rem;
  position: relative;
  background: linear-gradient(to bottom, 
    rgba(17, 24, 39, 0.6),
    rgba(17, 24, 39, 0.8));
  transition: all 0.3s ease;
}

.project-card:hover .project-info {
  background: linear-gradient(to bottom, 
    rgba(17, 24, 39, 0.7),
    rgba(17, 24, 39, 0.9));
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
  position: relative;
  display: inline-block;
}

.project-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.project-card:hover .project-title::after {
  width: 100%;
}

.project-description {
  color: #d1d5db;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background-color: rgba(0, 0, 0, 0.4);
  color: #d1d5db;
  border-radius: 4px;
  font-family: var(--code-font);
  border: 1px solid rgba(220, 38, 38, 0.3);
  transition: all 0.3s ease;
}

.project-card:hover .project-tech span {
  background-color: rgba(220, 38, 38, 0.2);
  color: #f3f4f6;
  transform: translateY(-2px);
}

/* Project section heading */
#projects .section-title {
  position: relative;
  display: inline-block;
}

#projects .section-title::before,
#projects .section-title::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  border: 2px solid var(--primary-color);
  opacity: 0.3;
}

#projects .section-title::before {
  top: -10px;
  left: -15px;
  border-right: none;
  border-bottom: none;
}

#projects .section-title::after {
  bottom: -10px;
  right: -15px;
  border-left: none;
  border-top: none;
}

/* Enhanced grid for project cards */
@media (min-width: 1024px) {
  .project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .project-card:nth-child(3n+1) {
    transform: translateY(20px);
  }
  
  .project-card:nth-child(3n+3) {
    transform: translateY(-20px);
  }
  
  .project-card:nth-child(3n+1):hover {
    transform: translateY(10px) scale(1.02);
  }
  
  .project-card:nth-child(3n+3):hover {
    transform: translateY(-30px) scale(1.02);
  }
}

/* Quick Navigation Cards for Home Section */
.quick-nav-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.quick-nav-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.quick-nav-card:active {
  transform: translateY(-4px);
}

/* Mobile responsiveness for quick nav cards */
@media (max-width: 640px) {
  .quick-nav-card {
    padding: 1rem;
  }
  
  .quick-nav-card h3 {
    font-size: 1rem;
  }
  
  .quick-nav-card p {
    font-size: 0.8rem;
  }
  
  .quick-nav-card .text-3xl {
    font-size: 1.5rem;
  }
}

/* Enhanced typing animation styles */
.typing-text {
  position: relative;
  display: inline-block;
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from {
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
  }
  to {
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.6), 0 0 30px rgba(220, 38, 38, 0.4);
  }
}

/* Scroll indicator animation */
.animate-bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0,-30px,0);
  }
  70% {
    transform: translate3d(0,-15px,0);
  }
  90% {
    transform: translate3d(0,-4px,0);
  }
}

/* About section profile image enhancements */
.about-profile-container {
  position: relative;
  overflow: hidden;
}

.about-profile-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(220, 38, 38, 0.3), transparent 30%);
  animation: rotate 4s linear infinite;
  border-radius: 50%;
}

.about-profile-container::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: #000;
  border-radius: inherit;
  z-index: 1;
}

/* Cyberpunk text effect for about section */
.cyberpunk-text {
  position: relative;
  color: inherit;
  transition: all 0.3s ease;
}

.cyberpunk-text:hover {
  text-shadow: 0 0 5px currentColor;
}

/* Improved mobile layout for about section */
@media (max-width: 1023px) {
  .about-profile-container {
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
  }
  
  #about .lg\:w-1\/3 {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  #about .lg\:w-2\/3 {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .about-profile-container {
    width: 250px;
    height: 250px;
  }
  
  #about h3 {
    font-size: 1.5rem;
  }
  
  #about .text-lg {
    font-size: 1rem;
  }
  
  #about .grid {
    grid-template-columns: 1fr;
  }
  
  /* Stack action buttons on mobile */
  #about .flex-wrap {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  #about .inline-flex {
    justify-content: center;
    width: 100%;
  }
}

/* Enhanced button hover effects */
.btn-primary, .btn-secondary {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before, .btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
  left: 100%;
}

/* Grid layout improvements for mobile */
@media (max-width: 767px) {
  .grid {
    gap: 1rem;
  }
  
  .grid-cols-1 {
    grid-template-columns: 1fr;
  }
  
  .sm\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Container and spacing adjustments for mobile */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .mb-16 {
    margin-bottom: 2rem;
  }
  
  .mb-12 {
    margin-bottom: 2rem;
  }
  
  .gap-12 {
    gap: 2rem;
  }
}

/* Text size adjustments for very small screens */
@media (max-width: 360px) {
  .text-4xl {
    font-size: 1.875rem !important;
  }
  
  .text-5xl {
    font-size: 2.25rem !important;
  }
  
  .text-7xl {
    font-size: 3rem !important;
  }
  
  .text-xl {
    font-size: 1.125rem !important;
  }
  
  .text-2xl {
    font-size: 1.25rem !important;
  }
  
  .text-3xl {
    font-size: 1.5rem !important;
  }
}

/* Enhanced typing animation states */
.typing-text.typing-active {
  text-shadow: 0 0 15px rgba(220, 38, 38, 0.8), 0 0 25px rgba(220, 38, 38, 0.6);
  transform: scale(1.02);
  transition: all 0.2s ease;
}

/* Scroll indicator responsive adjustments */
@media (max-width: 640px) {
  .animate-bounce {
    bottom: 1rem;
  }
  
  .animate-bounce svg {
    height: 1.5rem;
    width: 1.5rem;
  }
}

/* Profile image container improvements */
.about-profile-container img {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-profile-container:hover img {
  transform: scale(1.05);
}

/* Skills highlight cards hover effects */
.bg-gradient-to-r:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Improved focus states for accessibility */
.quick-nav-card:focus,
.btn-primary:focus,
.btn-secondary:focus {
  outline: 2px solid rgba(220, 38, 38, 0.6);
  outline-offset: 2px;
}

/* Loading states for better UX */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Dark mode specific adjustments */
.dark .loading-shimmer {
  background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
  background-size: 200% 100%;
}

/* Password Modal Styles - Fix for broken modal */
.password-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
}

.password-modal.active {
  display: flex;
  opacity: 1;
}

.password-modal-content {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 20, 0.95));
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
              0 0 30px rgba(220, 38, 38, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-modal.active .password-modal-content {
  transform: scale(1) translateY(0);
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.pin-digit {
  width: 3rem;
  height: 3rem;
  border: 2px solid rgba(220, 38, 38, 0.3);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #dc2626;
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Fira Code', monospace;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.pin-digit:hover {
  border-color: rgba(220, 38, 38, 0.6);
  background: rgba(220, 38, 38, 0.05);
}

.pin-digit.filled {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.pin-digit.filled::after {
  content: '●';
  color: #dc2626;
  font-size: 1.5rem;
}

/* Add focus indicator for active PIN input */
.password-modal.active .pin-digit {
  animation: pinPulse 2s infinite;
}

@keyframes pinPulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
  }
}

.password-input {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 1px;
  opacity: 0;
  z-index: -1;
  border: none;
  background: transparent;
  color: transparent;
  outline: none;
  caret-color: transparent;
}

.password-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: 'Fira Code', monospace;
}

.password-error.show {
  opacity: 1;
}

.password-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}

.password-button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 600;
  font-size:     0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.password-cancel {
  background: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.password-cancel:hover {
  background: rgba(107, 114, 128, 0.3);
  transform: translateY(-1px);
}

.password-submit {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  border: 1px solid rgba(220, 38, 38, 0.5);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.password-submit:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.password-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Glitch effect for password modal header */
.password-modal h3 {
  position: relative;
  font-family: 'Fira Code', monospace;
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.password-modal h3::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #00ffff;
  z-index: -1;
  animation: glitch-1 0.5s infinite alternate-reverse;
}

.password-modal h3::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #ff0040;
  z-index: -2;
  animation: glitch-2 0.5s infinite alternate-reverse;
}

@keyframes glitch-1 {
  0% {
    clip-path: inset(40% 0 61% 0);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
  }
  40% {
    clip-path: inset(43% 0 1% 0);
  }
  60% {
    clip-path: inset(25% 0 58% 0);
  }
  80% {
    clip-path: inset(54% 0 7% 0);
  }
  100% {
    clip-path: inset(58% 0 43% 0);
  }
}

@keyframes glitch-2 {
  0% {
    clip-path: inset(25% 0 58% 0);
  }
  20% {
    clip-path: inset(54% 0 7% 0);
  }
  40% {
    clip-path: inset(58% 0 43% 0);
  }
  60% {
    clip-path: inset(40% 0 61% 0);
  }
  80% {
    clip-path: inset(92% 0 1% 0);
  }
  100% {
    clip-path: inset(43% 0 1% 0);
  }
}

/* Password Info Button Styles */
.password-info-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(220, 38, 38, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  z-index: 10;
}

.password-info-btn:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
  color: rgba(220, 38, 38, 1);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
  transform: scale(1.05);
}

.password-info-btn:active {
  transform: scale(0.95);
}

/* Password Hint Tooltip */
.password-hint {
  position: absolute;
  top: 3.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
              0 0 10px rgba(220, 38, 38, 0.2);
  opacity: 0;
  transform: translateY(-10px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 15;
}

.password-hint.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.password-hint::before {
  content: '';
  position: absolute;
  top: -4px;
  right: 1rem;
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.95);
  border-left: 1px solid rgba(220, 38, 38, 0.4);
  border-top: 1px solid rgba(220, 38, 38, 0.4);
  transform: rotate(45deg);
}

.password-hint .hint-text {
  color: rgba(220, 38, 38, 0.9);
  font-family: 'Fira Code', monospace;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

/* Mobile responsiveness for password modal */
@media (max-width: 640px) {
  .password-modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .pin-digit {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
  
  .pin-display {
    gap: 0.5rem;
  }
  
  .password-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .password-info-btn {
    top: 0.75rem;
    right: 0.75rem;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }
  
  .password-hint {
    top: 3rem;
    right: 0.25rem;
    font-size: 0.625rem;
    padding: 0.375rem 0.5rem;
  }
  
  .password-hint::before {
    right: 0.75rem;
  }
  
  .password-button {
    width: 100%;
    padding: 1rem;
  }
}

/* Additional fixes for password modal positioning and display */
body.modal-open {
  overflow: hidden;
}

.password-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  display: none;
  background: rgba(0, 0, 0, 0.95);
}

.password-modal.active,
.password-modal.show {
  display: flex !important;
}

/* Ensure modal content is properly centered */
.password-modal-content {
  margin: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Fix for potential navigation overlap */
.navbar-fixed-top {
  z-index: 1040 !important;
}

nav.fixed {
  z-index: 40 !important;
}

/* Ensure mobile menu doesn't interfere */
#mobile-menu {
  z-index: 39 !important;
}

/* Fix for any other potential modal conflicts */
.modal-backdrop {
  z-index: 1050 !important;
}

/* Quick fix for modal display issues */
.password-modal * {
  box-sizing: border-box;
}

/* Shake animation for incorrect password */
@keyframes shake {
  0%, 100% {
    transform: scale(1) translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: scale(1) translateX(-10px);
  }
  20%, 40%, 60%, 80% {
    transform: scale(1) translateX(10px);
  }
}

.password-modal-content.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Ensure proper modal initialization */
.password-modal {
  visibility: hidden;
}

.password-modal.active {
  visibility: visible !important;
}

/* Fix for modal not appearing */
.password-modal.show,
.password-modal.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Enhanced profile image styles for timeline design */
.timeline-profile-image {
  position: relative;
  overflow: visible;
}

.timeline-profile-image img {
  transition: transform 0.3s ease;
}

.timeline-profile-image:hover img {
  transform: scale(1.05);
}

.timeline-profile-image::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: conic-gradient(from 0deg, #dc2626, #3b82f6, #dc2626);
  border-radius: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.timeline-profile-image:hover::before {
  opacity: 0.3;
  animation: rotate 3s linear infinite;
}

/* Status indicator positioning */
.profile-status-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background: #10b981;
  border: 2px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.profile-status-indicator .pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: white;
  border-radius: 50%;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.9);
  }
}

/* Ensure proper containment */
.profile-image-container {
  position: relative;
  display: inline-block;
}

/* Mobile adjustments for square image */
@media (max-width: 640px) {
  .profile-status-indicator {
    width: 1.25rem;
    height: 1.25rem;
    top: 0.25rem;
    right: 0.25rem;
  }
  
  .profile-status-indicator .pulse-dot {
    width: 0.375rem;
    height: 0.375rem;
  }
}

/* Seamless Section Backgrounds */
section {
  position: relative;
  background: transparent !important;
}

/* Subtle section overlays for visual depth */
#home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center top, 
    rgba(220, 38, 38, 0.05) 0%, 
    rgba(220, 38, 38, 0.02) 30%, 
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}

#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(153, 27, 27, 0.03) 50%, 
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

#education::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, 
    rgba(239, 68, 68, 0.04) 0%, 
    rgba(153, 27, 27, 0.02) 40%, 
    transparent 70%);
  pointer-events: none;
  z-index: 1;
}

#skills::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    transparent 0%, 
    rgba(220, 38, 38, 0.03) 30%, 
    rgba(153, 27, 27, 0.02) 60%, 
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

#projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center bottom, 
    rgba(220, 38, 38, 0.04) 0%, 
    rgba(239, 68, 68, 0.02) 30%, 
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, 
    rgba(153, 27, 27, 0.05) 0%, 
    rgba(220, 38, 38, 0.02) 30%, 
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure content appears above overlays */
section > * {
  position: relative;
  z-index: 2;
}

/* Enhanced Matrix Background Effect */
#code-background {
  opacity: 0.15 !important;
  filter: hue-rotate(15deg) saturate(0.8);
  background: linear-gradient(to bottom, 
    rgba(0, 20, 0, 0.1) 0%, 
    rgba(0, 40, 20, 0.05) 50%, 
    rgba(0, 20, 0, 0.02) 100%);
}

/* Additional visual enhancements for seamless experience */
.container, .max-w-7xl, .max-w-6xl, .max-w-4xl {
  position: relative;
  z-index: 2;
}

/* Enhance glass morphism elements to work with new background */
.glassmorphism,
.skill-item,
.about-image-wrapper,
.project-card {
  backdrop-filter: blur(10px) saturate(1.2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(220, 38, 38, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(220, 38, 38, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Subtle ambient lighting effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, 
    rgba(220, 38, 38, 0.02) 0%, 
    transparent 50%),
  radial-gradient(ellipse at 80% 20%, 
    rgba(239, 68, 68, 0.015) 0%, 
    transparent 50%),
  radial-gradient(ellipse at 40% 80%, 
    rgba(153, 27, 27, 0.01) 0%, 
    transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure navigation stays above everything */
nav {
  z-index: 50 !important;
}

/* Ensure modals and overlays work properly */
.password-modal,
.project-modal,
.education-modal {
  z-index: 100 !important;
}

/* --- CONTACT FORM STYLES START --- */

/* Content from contact-form.css below. If you encounter contact form style bugs, check this section. */

/* Enhanced Contact Form Styles */

/* Contact Cards */
.contact-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #ef4444;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-card-icon {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(239, 68, 68, 0.2));
    transform: scale(1.05);
}

.contact-card-content {
    margin-top: 1rem;
}

.contact-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.contact-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 6px;
    color: #dc2626;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-action-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.5);
    color: #ef4444;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.4);
    color: #ef4444;
    transform: translateX(4px);
}

/* Enhanced Contact Form Container */
.contact-form-container {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Terminal Header */
.terminal-header {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9));
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.terminal-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px currentColor;
}

.terminal-title {
    display: flex;
    align-items: center;
    color: #d1d5db;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
}

.terminal-status {
    display: flex;
    align-items: center;
}

.status-text {
    color: #22c55e;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
}

/* Terminal Body */
.terminal-body {
    padding: 2rem;
    font-family: 'Fira Code', monospace;
}

.terminal-prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: #d1d5db;
}

.prompt-symbol {
    color: #ef4444;
    font-weight: bold;
}

.prompt-text {
    color: #22c55e;
}

/* Enhanced Form Styles */
.enhanced-contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-comment {
    color: #6b7280;
    font-size: 0.875rem;
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    color: #d1d5db;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Custom CSS with Animations and Styling */

:root {
  --code-font: 'Fira Code', monospace;
  --primary-color: #dc2626;
  --secondary-color: #991b1b;
  --accent-color: #ef4444;
  --light-color: #f9fafb;
  --dark-color: #0a0a0a;
  --darker-color: #000000;
  --gray-color: #374151;
  --red-glow: rgba(220, 38, 38, 0.3);
  --red-light: rgba(239, 68, 68, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 0.375rem;
  --box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --red-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
  --vh: 1vh; /* Variable for viewport height fixes on mobile */
}

/* Base styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  position: relative;
  background: linear-gradient(135deg, 
    #000000 0%, 
    #0a0a0a 15%, 
    #0d1117 30%, 
    #161b22 45%, 
    #0a0a0a 60%, 
    #0d0d0d 75%, 
    #000000 100%);
  background-attachment: fixed;
  background-size: 100% 100%;
}

/* Support for dark mode */
html.dark {
  color-scheme: dark;
}

/* Improved mobile menu styles */
#mobile-menu {
  width: 100%;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

/* Extra small screen adjustments */
@media (max-width: 360px) {
  .text-xl {
    font-size: 1.1rem !important;
  }
  
  .h-16 {
    height: 3.5rem !important;
  }
  
  #mobile-menu-button {
    padding: 0.25rem !important;
  }
}

@media (max-width: 767px) {
  .max-w-7xl {
    width: 100%;
    padding: 0 1rem;
  }
  
  /* Fix font size on mobile */
  .text-5xl {
    font-size: 2.5rem !important;
  }
  
  /* Fix layout on mobile */
  .container {
    width: 100%;
    padding: 0 1rem;
  }
}

/* Profile Image Hover Effects - 3D Card Flip */
.profile-card {
  width: 320px;
  height: 320px;
  position: relative;
  perspective: 1500px;
  cursor: pointer;
  margin: 0 auto;
  transition: transform 0.5s ease;
}

.profile-card:hover {
  transform: translateY(-10px);
}

@media (min-width: 768px) {
  .profile-card {
    width: 340px;
    height: 340px;
  }
}

/* Modern frame with smoother edges */
.profile-frame {
  position: absolute;
  width: 100%;
  height: 100%;
  background: none; /* Remove bloom background */
  border-radius: 50%;
  box-shadow: none; /* Remove heavy shadow */
  border: 3px solid var(--primary-color);
  animation: none; /* Remove frameGlow animation */
  z-index: 1;
}

.profile-frame::before {
  content: none; /* Remove bloom pseudo-element entirely */
}

/* Profile image with improved shape */
.profile-image-container {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  transition: transform 0.5s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.profile-card:hover .profile-image-container {
  transform: scale(1.05);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) brightness(1.05);
  transition: filter 0.3s ease, transform 0.5s ease;
}

.profile-card:hover .profile-image {
  transform: scale(1.1);
}

/* Glitch effect overlay - improved cleaner version */
.glitch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0.5;
}

.glitch-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-layer:nth-child(1) {
  background: var(--primary-color);
  mix-blend-mode: overlay;
  animation: glitch1 6s infinite;
  filter: blur(1px);
}

.glitch-layer:nth-child(2) {
  background: var(--accent-color);
  mix-blend-mode: color-dodge;
  animation: glitch2 4s infinite;
  filter: blur(0.5px);
}

/* Improved "Click Me" arrow */
.click-arrow {
  position: absolute;
  right: -40px;
  top: 15%;
  z-index: 10;
  pointer-events: none;
}

.arrow-bubble {
  background: var(--light-color);
  color: var(--darker-color);
  padding: 8px 15px;
  border-radius: 20px 20px 20px 5px;
  font-size: 14px;
  font-weight: bold;
  border: 3px solid var(--primary-color);
  position: relative;
  transform: rotate(-15deg);
  animation: bounce 2s infinite, wiggle 3s infinite;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Profile card flip functionality with improved animation - fixed for Firefox */
.profile-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-card:hover .profile-card-inner {
  transform: rotateY(180deg);
}

.profile-card-front, .profile-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 50%;
}

/* Front card stays visible by default */
.profile-card-front {
  z-index: 2; /* Higher z-index by default */
  transform: rotateY(0deg);
}

/* Fix for Firefox - front disappears when flipped */
.profile-card:hover .profile-card-front {
  z-index: 1; /* Lower z-index when card is flipped */
}

.profile-card-back {
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a); 
  color: var(--light-color);
  transform: rotateY(180deg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid var(--primary-color);
  box-shadow: var(--red-shadow);
  position: relative;
  overflow: hidden;
  z-index: 1; /* Lower z-index by default */
}

/* Fix for Firefox - back becomes visible when flipped */
.profile-card:hover .profile-card-back {
  z-index: 2; /* Higher z-index when card is flipped */
}

.profile-card-back::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, var(--primary-color), transparent, var(--primary-color));
  z-index: -1;
  opacity: 0.2;
  animation: rotateGradient 8s linear infinite;
  filter: blur(10px);
}

.profile-card-back h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--light-color);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.profile-card-back p {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: var(--accent-color);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin: 1.2rem 0;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0.5rem 0.75rem;
  background-color: rgba(220, 38, 38, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.profile-stat:hover {
  transform: translateY(-5px);
  background-color: rgba(220, 38, 38, 0.2);
}

.profile-stat::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 30%;
  height: 3px;
  background-color: var(--primary-color);
  transform: translateX(-50%);
  border-radius: 2px;
}

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--light-color);
  text-shadow: 0 0 5px rgba(220, 38, 38, 0.5);
}

.profile-stat-label {
  font-size: 0.8rem;
  color: #aaa;
}

.profile-social-icons {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.profile-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #101010, #1a1a1a);
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.profile-social-icon:hover {
  transform: translateY(-5px) rotate(5deg);
  background: var(--primary-color);
  color: var(--light-color);
  box-shadow: 0 5px 15px rgba(220, 38, 38, 0.5);
}

@keyframes frameGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
  }
}

@keyframes borderPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.03);
  }
}

@keyframes glitch1 {
  0%, 100% {
    opacity: 0;
  }
  10%, 15% {
    opacity: 0.3;
    transform: translate(-5px, 2px);
  }
  20%, 25% {
    opacity: 0;
  }
  30%, 35% {
    opacity: 0.3;
    transform: translate(5px, -2px);
  }
}

@keyframes glitch2 {
  0%, 100% {
    opacity: 0;
  }
  25%, 30% {
    opacity: 0.3;
    transform: translate(-5px, -2px);
  }
  45%, 50% {
    opacity: 0;
  }
  60%, 65% {
    opacity: 0.3;
    transform: translate(5px, 2px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) rotate(-15deg);
  }
  50% {
    transform: translateY(-10px) rotate(-15deg);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(-15deg);
  }
  25% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(-18deg);
  }
  75% {
    transform: rotate(-12deg);
  }
}

@keyframes pointPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateY(-50%) rotate(45deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) rotate(45deg) scale(1.2);
  }
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hover effects */
.profile-card:hover .profile-image-container {
  transform: rotate(-5deg) scale(1.25);
}

.profile-card:hover .profile-image {
  filter: contrast(1.2) brightness(1.1) hue-rotate(10deg);
}

.profile-card:hover .click-arrow {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.5s ease;
}

.profile-card:hover .glitch-layer:nth-child(1) {
  animation: glitchActive1 0.3s infinite;
}

.profile-card:hover .glitch-layer:nth-child(2) {
  animation: glitchActive2 0.3s infinite;
}

/* Keyframe animations */
@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navigation with unique styling */
.nav-link {
  position: relative;
  font-weight: 500;
  padding: 0.5rem;
  transition: var(--transition);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--red-light), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
  border-radius: 3px;
  box-shadow: 0 0 5px var(--red-glow);
}

.nav-link:hover::after {
  width: 100%;
}

/* Unique button styles */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  color: white;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(220, 38, 38, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.7s ease;
  z-index: -1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0), rgba(255,255,255,0.1), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(220, 38, 38, 0.5);
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Hexagonal design elements */
.hex-element {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Glitch text effect for headings */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-text::before {
  color: var(--primary-color);
  animation: glitchText1 3s infinite;
}

.glitch-text::after {
  color: var(--accent-color);
  animation: glitchText2 3s infinite;
}

@keyframes glitchText1 {
  0%, 100% { transform: translate(0); opacity: 0; }
  1% { transform: translate(-2px, 2px); opacity: 0.7; }
  2% { transform: translate(0); opacity: 0; }
  3% { transform: translate(2px, -2px); opacity: 0.5; }
  4% { transform: translate(0); opacity: 0; }
}

/* Custom CSS with Animations and Styling */

:root {
  --code-font: 'Fira Code', monospace;
  --primary-color: #dc2626;
  --secondary-color: #991b1b;
  --accent-color: #ef4444;
  --light-color: #f9fafb;
  --dark-color: #0a0a0a;
  --darker-color: #000000;
  --gray-color: #374151;
  --red-glow: rgba(220, 38, 38, 0.3);
  --red-light: rgba(239, 68, 68, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 0.375rem;
  --box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --red-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
  --vh: 1vh; /* Variable for viewport height fixes on mobile */
}

/* Base styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  position: relative;
  background: linear-gradient(135deg, 
    #000000 0%, 
    #0a0a0a 15%, 
    #0d1117 30%, 
    #161b22 45%, 
    #0a0a0a 60%, 
    #0d0d0d 75%, 
    #000000 100%);
  background-attachment: fixed;
  background-size: 100% 100%;
}

/* Support for dark mode */
html.dark {
  color-scheme: dark;
}

/* Improved mobile menu styles */
#mobile-menu {
  width: 100%;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

/* Extra small screen adjustments */
@media (max-width: 360px) {
  .text-xl {
    font-size: 1.1rem !important;
  }
  
  .h-16 {
    height: 3.5rem !important;
  }
  
  #mobile-menu-button {
    padding: 0.25rem !important;
  }
}

@media (max-width: 767px) {
  .max-w-7xl {
    width: 100%;
    padding: 0 1rem;
  }
  
  /* Fix font size on mobile */
  .text-5xl {
    font-size: 2.5rem !important;
  }
  
  /* Fix layout on mobile */
  .container {
    width: 100%;
    padding: 0 1rem;
  }
}

/* Profile Image Hover Effects - 3D Card Flip */
.profile-card {
  width: 320px;
  height: 320px;
  position: relative;
  perspective: 1500px;
  cursor: pointer;
  margin: 0 auto;
  transition: transform 0.5s ease;
}

.profile-card:hover {
  transform: translateY(-10px);
}

@media (min-width: 768px) {
  .profile-card {
    width: 340px;
    height: 340px;
  }
}

/* Modern frame with smoother edges */
.profile-frame {
  position: absolute;
  width: 100%;
  height: 100%;
  background: none; /* Remove bloom background */
  border-radius: 50%;
  box-shadow: none; /* Remove heavy shadow */
  border: 3px solid var(--primary-color);
  animation: none; /* Remove frameGlow animation */
  z-index: 1;
}

.profile-frame::before {
  content: none; /* Remove bloom pseudo-element entirely */
}

/* Profile image with improved shape */
.profile-image-container {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  transition: transform 0.5s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.profile-card:hover .profile-image-container {
  transform: scale(1.05);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) brightness(1.05);
  transition: filter 0.3s ease, transform 0.5s ease;
}

.profile-card:hover .profile-image {
  transform: scale(1.1);
}

/* Glitch effect overlay - improved cleaner version */
.glitch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0.5;
}

.glitch-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-layer:nth-child(1) {
  background: var(--primary-color);
  mix-blend-mode: overlay;
  animation: glitch1 6s infinite;
  filter: blur(1px);
}

.glitch-layer:nth-child(2) {
  background: var(--accent-color);
  mix-blend-mode: color-dodge;
  animation: glitch2 4s infinite;
  filter: blur(0.5px);
}

/* Improved "Click Me" arrow */
.click-arrow {
  position: absolute;
  right: -40px;
  top: 15%;
  z-index: 10;
  pointer-events: none;
}

.arrow-bubble {
  background: var(--light-color);
  color: var(--darker-color);
  padding: 8px 15px;
  border-radius: 20px 20px 20px 5px;
  font-size: 14px;
  font-weight: bold;
  border: 3px solid var(--primary-color);
  position: relative;
  transform: rotate(-15deg);
  animation: bounce 2s infinite, wiggle 3s infinite;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Profile card flip functionality with improved animation - fixed for Firefox */
.profile-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-card:hover .profile-card-inner {
  transform: rotateY(180deg);
}

.profile-card-front, .profile-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 50%;
}

/* Front card stays visible by default */
.profile-card-front {
  z-index: 2; /* Higher z-index by default */
  transform: rotateY(0deg);
}

/* Fix for Firefox - front disappears when flipped */
.profile-card:hover .profile-card-front {
  z-index: 1; /* Lower z-index when card is flipped */
}

.profile-card-back {
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a); 
  color: var(--light-color);
  transform: rotateY(180deg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid var(--primary-color);
  box-shadow: var(--red-shadow);
  position: relative;
  overflow: hidden;
  z-index: 1; /* Lower z-index by default */
}

/* Fix for Firefox - back becomes visible when flipped */
.profile-card:hover .profile-card-back {
  z-index: 2; /* Higher z-index when card is flipped */
}

.profile-card-back::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, var(--primary-color), transparent, var(--primary-color));
  z-index: -1;
  opacity: 0.2;
  animation: rotateGradient 8s linear infinite;
  filter: blur(10px);
}

.profile-card-back h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--light-color);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.profile-card-back p {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: var(--accent-color);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin: 1.2rem 0;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0.5rem 0.75rem;
  background-color: rgba(220, 38, 38, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.profile-stat:hover {
  transform: translateY(-5px);
  background-color: rgba(220, 38, 38, 0.2);
}

.profile-stat::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 30%;
  height: 3px;
  background-color: var(--primary-color);
  transform: translateX(-50%);
  border-radius: 2px;
}

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--light-color);
  text-shadow: 0 0 5px rgba(220, 38, 38, 0.5);
}

.profile-stat-label {
  font-size: 0.8rem;
  color: #aaa;
}

.profile-social-icons {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.profile-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #101010, #1a1a1a);
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.profile-social-icon:hover {
  transform: translateY(-5px) rotate(5deg);
  background: var(--primary-color);
  color: var(--light-color);
  box-shadow: 0 5px 15px rgba(220, 38, 38, 0.5);
}

@keyframes frameGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
  }
}

@keyframes borderPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.03);
  }
}

@keyframes glitch1 {
  0%, 100% {
    opacity: 0;
  }
  10%, 15% {
    opacity: 0.3;
    transform: translate(-5px, 2px);
  }
  20%, 25% {
    opacity: 0;
  }
  30%, 35% {
    opacity: 0.3;
    transform: translate(5px, -2px);
  }
}

@keyframes glitch2 {
  0%, 100% {
    opacity: 0;
  }
  25%, 30% {
    opacity: 0.3;
    transform: translate(-5px, -2px);
  }
  45%, 50% {
    opacity: 0;
  }
  60%, 65% {
    opacity: 0.3;
    transform: translate(5px, 2px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) rotate(-15deg);
  }
  50% {
    transform: translateY(-10px) rotate(-15deg);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(-15deg);
  }
  25% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(-18deg);
  }
  75% {
    transform: rotate(-12deg);
  }
}

@keyframes pointPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateY(-50%) rotate(45deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) rotate(45deg) scale(1.2);
  }
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hover effects */
.profile-card:hover .profile-image-container {
  transform: rotate(-5deg) scale(1.25);
}

.profile-card:hover .profile-image {
  filter: contrast(1.2) brightness(1.1) hue-rotate(10deg);
}

.profile-card:hover .click-arrow {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.5s ease;
}

.profile-card:hover .glitch-layer:nth-child(1) {
  animation: glitchActive1 0.3s infinite;
}

.profile-card:hover .glitch-layer:nth-child(2) {
  animation: glitchActive2 0.3s infinite;
}

/* Keyframe animations */
@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navigation with unique styling */
.nav-link {
  position: relative;
  font-weight: 500;
  padding: 0.5rem;
  transition: var(--transition);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--red-light), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
  border-radius: 3px;
  box-shadow: 0 0 5px var(--red-glow);
}

.nav-link:hover::after {
  width: 100%;
}

/* Unique button styles */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  color: white;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(220, 38, 38, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.7s ease;
  z-index: -1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0), rgba(255,255,255,0.1), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(220, 38, 38, 0.5);
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Hexagonal design elements */
.hex-element {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Glitch text effect for headings */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-text::before {
  color: var(--primary-color);
  animation: glitchText1 3s infinite;
}

.glitch-text::after {
  color: var(--accent-color);
  animation: glitchText2 3s infinite;
}

@keyframes glitchText1 {
  0%, 100% { transform: translate(0); opacity: 0; }
  1% { transform: translate(-2px, 2px); opacity: 0.7; }
  2% { transform: translate(0); opacity: 0; }
  3% { transform: translate(2px, -2px); opacity: 0.5; }
  4% { transform: translate(0); opacity: 0; }
}

@keyframes glitchText2 {
  0%, 100% { transform: translate(0); opacity: 0; }
  2% { transform: translate(1px, -1px); opacity: 0.6; }
  3% { transform: translate(0); opacity: 0; }
  4% { transform: translate(-1px, 1px); opacity: 0.8; }
  5% { transform: translate(0); opacity: 0; }
}

/* Additional cyberpunk text effects */
.cyberpunk-text {
  text-shadow: 0 0 2px rgba(220, 38, 38, 0.4);
  transition: text-shadow 0.3s ease;
}

.cyberpunk-text:hover {
  text-shadow: 0 0 4px rgba(220, 38, 38, 0.8);
}

/* Occasional glitch animation */
@keyframes text-glitch {
  0% {
    transform: translate(0);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
  2% {
    transform: translate(-2px, 1px);
    text-shadow: -1px 0 1px rgba(220, 38, 38, 0.5), 1px -1px 1px rgba(0, 255, 255, 0.5);
  }
  4% {
    transform: translate(0);
    text-shadow: -1px 0 1px rgba(220, 38, 38, 0.5), 3px -1px 1px rgba(0, 255, 255, 0.5);
  }
  6% {
    transform: translate(0);
    text-shadow: -1px -1px 0 rgba(220, 38, 38, 0.5), 0px 1px 0 rgba(0, 255, 255, 0.5);
  }
  8% {
    transform: translate(0);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
  100% {
    transform: translate(0);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
}

.glitch-active {
  animation: text-glitch 3s infinite;
}

/* Edgy Scrollbar */
::-webkit-scrollbar {
  width: 6px; /* Thinner width for more modern look */
}

::-webkit-scrollbar-track {
  background: var(--dark-color);
  border-left: 1px solid rgba(220, 38, 38, 0.1); /* Subtle red border */
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color); /* Solid color for cleaner look */
  border-radius: 0; /* Sharp edges for edgy look */
  box-shadow: inset 0 0 3px var(--red-glow); /* Inset shadow for depth */
  border-left: 1px solid rgba(239, 68, 68, 0.5); /* Highlight edge */
  border-right: 1px solid rgba(153, 27, 27, 0.5); /* Shadow edge */
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
  box-shadow: inset 0 0 5px var(--red-glow); /* Stronger glow on hover */
}

/* For Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--dark-color);
}

/* Hero Section */
.hero-blob {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.2), rgba(153, 27, 27, 0.05), rgba(220, 38, 38, 0.15));
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  filter: blur(25px);
  animation: blob-animation 15s infinite alternate, blob-pulse 5s infinite alternate, blob-rotate 20s infinite linear;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-blob-secondary {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.1), rgba(153, 27, 27, 0.2));
  border-radius: 60% 40% 30% 70% / 40% 50% 60% 50%;
  filter: blur(8px);
  animation: blob-animation-secondary 15s infinite alternate, blob-pulse-secondary 4s infinite alternate, blob-rotate-secondary 25s infinite linear;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.7;
}

@keyframes blob-animation {
  0% {
    border-radius: 30% 70% 60% 40% / 40% 50% 60% 50%;
    transform: translate(-50%, -50%) scale(1);
  }
  25% {
    border-radius: 35% 65% 65% 35% / 35% 65% 35% 65%;
  }
  50% {
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    transform: translate(-50%, -50%) scale(1.05);
  }
  75% {
    border-radius: 40% 60% 50% 50% / 40% 40% 60% 60%;
  }
  100% {
    border-radius: 30% 70% 60% 40% / 40% 50% 60% 50%;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes blob-pulse {
  0% {
    box-shadow: 0 0 30px 10px rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 0 50px 15px rgba(220, 38, 38, 0.3);
  }
  100% {
    box-shadow: 0 0 30px 10px rgba(220, 38, 38, 0.2);
  }
}

@keyframes blob-rotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes blob-animation-secondary {
  0% {
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
  50% {
    border-radius: 40% 60% 60% 40% / 40% 60% 40% 60%;
    transform: translate(-50%, -50%) rotate(25deg) scale(1.08);
  }
  100% {
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
}

@keyframes blob-pulse-secondary {
  0% {
    box-shadow: 0 0 30px 5px rgba(239, 68, 68, 0.15);
  }
  100% {
    box-shadow: 0 0 40px 10px rgba(239, 68, 68, 0.25);
  }
}

@keyframes blob-rotate-secondary {
  0% {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(405deg);
  }
}

.typing-text {
  display: inline-block;
  position: relative;
  font-weight: bold;
  padding: 0 5px;
}

/* Remove custom cursor - letting Typed.js handle the cursor */
/* 
.typing-text::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 5%;
  height: 90%;
  width: 2px;
  background-color: var(--primary-color);
  animation: cursor-blink 1.2s infinite;
}
*/

/* Typed.js cursor styling */
.typed-cursor {
  color: var(--primary-color);
  font-weight: normal;
  animation: cursor-blink 1.2s infinite;
  opacity: 1;
}

@keyframes cursor-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* About Section */
.about-image-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.about-image {
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 0.5s ease;
  border-radius: 10px;
}

.about-image-wrapper:hover .about-image {
  transform: scale(1.05);
}

.about-image-wrapper::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  opacity: 0.2;
  z-index: -1;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  border-radius: 50%;
  opacity: 0.2;
  z-index: -1;
}

.about-info-item {
  margin-bottom: 0.5rem;
}

.about-info-title {
  font-weight: 600;
  color: #d1d5db;
  margin-right: 0.5rem;
}

.dark .about-info-title {
  color: #d1d5db;
}

.about-info-value {
  color: var(--primary-color);
  font-weight: 500;
}

.about-social {
  margin-top: 1.5rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  color: #d1d5db;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(220, 38, 38, 0.4);
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dark .social-icon {
  background-color: rgba(0, 0, 0, 0.8);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(220, 38, 38, 0.5);
}

.social-icon:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(220, 38, 38, 0.4);
  border-color: transparent;
}

.social-icon:hover::before {
  opacity: 1;
}

.contact-social .social-icon {
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
}

/* Skills Section */
.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 9999px;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
  position: relative;
  overflow: hidden;
}

.skill-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0) 100%);
  width: 45px;
  height: 100%;
  animation: shimmer 2s infinite;
  transform: skewX(-20deg);
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) skewX(-20deg);
  }
  100% {
    transform: translateX(400%) skewX(-20deg);
  }
}

.skill-item {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  border: 1px solid rgba(220, 38, 38, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.skill-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(220, 38, 38, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.skill-item:hover::before {
  opacity: 1;
  animation: skill-shimmer 3s infinite alternate;
}

.featured-skill {
  border: 1px solid rgba(220, 38, 38, 0.3);
  background-color: rgba(220, 38, 38, 0.05);
}

.featured-skill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 25px;
  height: 25px;
  background: linear-gradient(135deg, transparent 50%, var(--primary-color) 50%);
  z-index: 1;
}

.skill-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skill-tag {
  font-size: 0.7rem;
  color: var(--primary-color);
  margin-top: 0.25rem;
  font-family: var(--code-font);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.skill-item:hover .skill-tag {
  opacity: 1;
  transform: translateY(2px);
}

@keyframes skill-shimmer {
  0% {
    opacity: 0.1;
    background-position: -100% 0;
  }
  100% {
    opacity: 0.3;
    background-position: 200% 0;
  }
}

.dark .skill-item {
  background-color: rgba(31, 41, 55, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--darker-color), #1a1a1a);
  color: var(--primary-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  position: relative;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.skill-icon.ionic-icon {
  color: #3880ff;
  animation: ionic-glow 3s infinite alternate;
}

.skill-icon.react-icon {
  color: #61dafb;
  animation: react-spin 8s linear infinite;
}

.skill-icon.nodejs-icon {
  color: #68a063;
}

.skill-icon.bootstrap-icon {
  color: #7952b3;
}

.skill-icon.mysql-icon {
  color: #4479a1;
}

.skill-icon.git-icon {
  color: #f05032;
}

.skill-icon.laravel-icon {
  color: #ff2d20;
}

.skill-icon.aws-icon {
  color: #ff9900;
}

.skill-icon.docker-icon {
  color: #2496ed;
}

@keyframes react-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.skill-item:hover .react-icon i {
  animation: react-spin 3s linear infinite;
}

/* Enhanced grid layout for framework items */
@media (min-width: 768px) {
  .skill-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  .skill-item:nth-child(odd):hover {
    transform: translateY(-10px) rotate(-1deg);
  }
  
  .skill-item:nth-child(even):hover {
    transform: translateY(-10px) rotate(1deg);
  }
}

/* Framework badge */
.framework-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 10px;
  transform: rotate(15deg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  font-family: var(--code-font);
  opacity: 0;
  transition: all 0.3s ease;
}

.skill-item:hover .framework-badge {
  opacity: 1;
  animation: badge-pulse 1s ease infinite alternate;
}

@keyframes badge-pulse {
  0% {
    transform: rotate(15deg) scale(1);
  }
  100% {
    transform: rotate(15deg) scale(1.1);
  }
}

/* Framework section header styling */
.framework-title {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.tech-badge {
  font-family: var(--code-font);
  font-size: 0.7rem;
  white-space: nowrap;
}

.code-keyword {
  color: #569CD6;
}

.code-var {
  color: #9CDCFE;
}

.code-string {
  color: #CE9178;
}

@media (max-width: 640px) {
  .tech-badge {
    display: none;
  }
}

/* Back to Top Button - Modern Design */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(100px) scale(0.8);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 999;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(220, 38, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.back-to-top.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.backtop-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 3;
  transition: all 0.4s ease;
}

.back-to-top i {
  font-size: 1.3rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.backtop-ring {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 12px;
  background: linear-gradient(45deg, 
    var(--primary-color), 
    rgba(220, 38, 38, 0.6), 
    transparent,
    rgba(220, 38, 38, 0.6),
    var(--primary-color)
  );
  opacity: 0;
  z-index: 1;
  animation: pulse-glow 2s ease-in-out infinite alternate;
  transition: opacity 0.3s ease;
}

.backtop-tooltip {
  position: absolute;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(180, 30, 30, 0.9));
  backdrop-filter: blur(10px);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  right: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) translateX(15px) scale(0.8);
  white-space: nowrap;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.backtop-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(220, 38, 38, 0.9);
}

.back-to-top:hover .backtop-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

.back-to-top:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.4);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 4px 20px rgba(220, 38, 38, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.back-to-top:hover .backtop-ring {
  opacity: 1;
  animation: pulse-glow 1s ease-in-out infinite alternate;
}

.back-to-top:hover i {
  color: #ffffff;
  transform: translateY(-4px) scale(1.1);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.back-to-top:active {
  transform: translateY(-6px) scale(1.02);
  transition: all 0.2s ease;
}

@keyframes pulse-glow {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 0.6;
    transform: scale(1.02);
  }
}

@media (max-width: 640px) {
  .back-to-top {
    width: 42px;
    height: 42px;
    bottom: 20px;
    right: 20px;
    border-radius: 10px;
  }
  
  .back-to-top i {
    font-size: 1.0rem;
  }
  
  .backtop-ring {
    border-radius: 10px;
  }
  
  .backtop-tooltip {
    display: none;
  }
  
  .back-to-top:hover {
    transform: translateY(-4px) scale(1.03);
  }
}

/* Footer styling with red accents */
footer {
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  opacity: 0.6;
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center top, rgba(220, 38, 38, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Enhanced Contact Form */
.terminal-form-wrapper {
  position: relative;
  overflow: hidden;
}

.terminal-form-wrapper::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(15px);
}

.terminal-form-wrapper::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(20px);
}

.terminal-input {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: white;
  padding: 0.75rem;
  border-radius: 0.25rem;
  width: 100%;
  font-family: var(--code-font);
  transition: all 0.3s ease;
  resize: none;
  position: relative;
  overflow: hidden;
}

.terminal-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.terminal-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  background-color: rgba(0, 0, 0, 0.6);
}

.terminal-input:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.terminal-button-submit {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.terminal-button-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent);
  transform: rotate(45deg);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 0;
}

.terminal-button-submit:hover::after {
  opacity: 1;
  left: 100%;
  top: 100%;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: translateX(-50%) translateY(-8px) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateX(-50%) translateY(-8px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-8px) scale(1);
    opacity: 0.5;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Cyberpunk Typing Animation Effect */
.cyberpunk-text {
  position: relative;
  display: inline-block;
  font-family: var(--code-font);
}

.cyberpunk-text::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--accent-color);
  animation: cyberpunk-cursor 0.8s infinite;
}

@keyframes cyberpunk-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cyberpunk-glitch {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent-color);
  z-index: 1;
  mix-blend-mode: difference;
  animation: cyberpunk-glitch 0.1s ease infinite;
  opacity: 0.5;
}

@keyframes cyberpunk-glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

/* Container for cyberpunk animation */
.cyberpunk-container {
  position: relative;
  overflow: hidden;
  display: block;
}

/* Animated paragraph text */
.animated-about-text {
  min-height: 5.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.cyberpunk-typing {
  position: relative;
  display: inline;
  color: var(--light-color);
}

.reveal-cursor {
  color: var(--accent-color);
  opacity: 0;
  animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .about-image-wrapper::before,
  .about-image-wrapper::after {
    display: none;
  }
  
  .hero-blob {
    width: 300px;
    height: 300px;
  }
}

/* Dark mode specific styles */
.dark .skill-progress {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.dark .loading {
  background: #111827;
}

.loading.hide {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(220, 38, 38, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Reveal animations */
.reveal {
  position: relative;
  opacity: 0;
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
}

.reveal.fade-bottom {
  transform: translateY(20px);
}

.reveal.fade-bottom.active {
  transform: translateY(0);
}

.reveal.fade-left {
  transform: translateX(-20px);
}

.reveal.fade-left.active {
  transform: translateX(0);
}

.reveal.fade-right {
  transform: translateX(20px);
}

.reveal.fade-right.active {
  transform: translateX(0);
}

/* Enhanced Project Cards */
.project-card {
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  border: 1px solid rgba(220, 38, 38, 0.2);
  position: relative;
  z-index: 1;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, transparent 20%, rgba(220, 38, 38, 0.1), transparent 80%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.5s ease;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.dark .project-card {
  background-color: rgba(17, 24, 39, 0.8);
  border-color: rgba(220, 38, 38, 0.2);
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
}

.project-card:hover::before {
  opacity: 1;
  animation: card-shimmer 2s infinite alternate;
}

.project-card:hover::after {
  transform: scaleX(1);
}

@keyframes card-shimmer {
  0% {
    opacity: 0.1;
  }
  100% {
    opacity: 0.3;
  }
}

.project-img {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
  filter: saturate(0.9) contrast(1.1);
}

.project-card:hover .project-img img {
  transform: scale(1.1) rotate(2deg);
  filter: saturate(1.1) contrast(1.2);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0.3), 
    rgba(220, 38, 38, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  backdrop-filter: blur(3px);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 15px;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  opacity: 0;
}

.project-card:hover .project-links {
  transform: translateY(0);
  opacity: 1;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
}

.project-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.project-info {
  padding: 1.5rem;
  position: relative;
  background: linear-gradient(to bottom, 
    rgba(17, 24, 39, 0.6),
    rgba(17, 24, 39, 0.8));
  transition: all 0.3s ease;
}

.project-card:hover .project-info {
  background: linear-gradient(to bottom, 
    rgba(17, 24, 39, 0.7),
    rgba(17, 24, 39, 0.9));
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
  position: relative;
  display: inline-block;
}

.project-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.project-card:hover .project-title::after {
  width: 100%;
}

.project-description {
  color: #d1d5db;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background-color: rgba(0, 0, 0, 0.4);
  color: #d1d5db;
  border-radius: 4px;
  font-family: var(--code-font);
  border: 1px solid rgba(220, 38, 38, 0.3);
  transition: all 0.3s ease;
}

.project-card:hover .project-tech span {
  background-color: rgba(220, 38, 38, 0.2);
  color: #f3f4f6;
  transform: translateY(-2px);
}

/* Project section heading */
#projects .section-title {
  position: relative;
  display: inline-block;
}

#projects .section-title::before,
#projects .section-title::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  border: 2px solid var(--primary-color);
  opacity: 0.3;
}

#projects .section-title::before {
  top: -10px;
  left: -15px;
  border-right: none;
  border-bottom: none;
}

#projects .section-title::after {
  bottom: -10px;
  right: -15px;
  border-left: none;
  border-top: none;
}

/* Enhanced grid for project cards */
@media (min-width: 1024px) {
  .project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .project-card:nth-child(3n+1) {
    transform: translateY(20px);
  }
  
  .project-card:nth-child(3n+3) {
    transform: translateY(-20px);
  }
  
  .project-card:nth-child(3n+1):hover {
    transform: translateY(10px) scale(1.02);
  }
  
  .project-card:nth-child(3n+3):hover {
    transform: translateY(-30px) scale(1.02);
  }
}

/* Quick Navigation Cards for Home Section */
.quick-nav-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.quick-nav-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.quick-nav-card:active {
  transform: translateY(-4px);
}

/* Mobile responsiveness for quick nav cards */
@media (max-width: 640px) {
  .quick-nav-card {
    padding: 1rem;
  }
  
  .quick-nav-card h3 {
    font-size: 1rem;
  }
  
  .quick-nav-card p {
    font-size: 0.8rem;
  }
  
  .quick-nav-card .text-3xl {
    font-size: 1.5rem;
  }
}

/* Enhanced typing animation styles */
.typing-text {
  position: relative;
  display: inline-block;
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from {
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
  }
  to {
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.6), 0 0 30px rgba(220, 38, 38, 0.4);
  }
}

/* Scroll indicator animation */
.animate-bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0,-30px,0);
  }
  70% {
    transform: translate3d(0,-15px,0);
  }
  90% {
    transform: translate3d(0,-4px,0);
  }
}

/* About section profile image enhancements */
.about-profile-container {
  position: relative;
  overflow: hidden;
}

.about-profile-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(220, 38, 38, 0.3), transparent 30%);
  animation: rotate 4s linear infinite;
  border-radius: 50%;
}

.about-profile-container::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: #000;
  border-radius: inherit;
  z-index: 1;
}

/* Cyberpunk text effect for about section */
.cyberpunk-text {
  position: relative;
  color: inherit;
  transition: all 0.3s ease;
}

.cyberpunk-text:hover {
  text-shadow: 0 0 5px currentColor;
}

/* Improved mobile layout for about section */
@media (max-width: 1023px) {
  .about-profile-container {
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
  }
  
  #about .lg\:w-1\/3 {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  #about .lg\:w-2\/3 {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .about-profile-container {
    width: 250px;
    height: 250px;
  }
  
  #about h3 {
    font-size: 1.5rem;
  }
  
  #about .text-lg {
    font-size: 1rem;
  }
  
  #about .grid {
    grid-template-columns: 1fr;
  }
  
  /* Stack action buttons on mobile */
  #about .flex-wrap {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  #about .inline-flex {
    justify-content: center;
    width: 100%;
  }
}

/* Enhanced button hover effects */
.btn-primary, .btn-secondary {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before, .btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
  left: 100%;
}

/* Grid layout improvements for mobile */
@media (max-width: 767px) {
  .grid {
    gap: 1rem;
  }
  
  .grid-cols-1 {
    grid-template-columns: 1fr;
  }
  
  .sm\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Container and spacing adjustments for mobile */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .mb-16 {
    margin-bottom: 2rem;
  }
  
  .mb-12 {
    margin-bottom: 2rem;
  }
  
  .gap-12 {
    gap: 2rem;
  }
}

/* Text size adjustments for very small screens */
@media (max-width: 360px) {
  .text-4xl {
    font-size: 1.875rem !important;
  }
  
  .text-5xl {
    font-size: 2.25rem !important;
  }
  
  .text-7xl {
    font-size: 3rem !important;
  }
  
  .text-xl {
    font-size: 1.125rem !important;
  }
  
  .text-2xl {
    font-size: 1.25rem !important;
  }
  
  .text-3xl {
    font-size: 1.5rem !important;
  }
}

/* Enhanced typing animation states */
.typing-text.typing-active {
  text-shadow: 0 0 15px rgba(220, 38, 38, 0.8), 0 0 25px rgba(220, 38, 38, 0.6);
  transform: scale(1.02);
  transition: all 0.2s ease;
}

/* Scroll indicator responsive adjustments */
@media (max-width: 640px) {
  .animate-bounce {
    bottom: 1rem;
  }
  
  .animate-bounce svg {
    height: 1.5rem;
    width: 1.5rem;
  }
}

/* Profile image container improvements */
.about-profile-container img {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-profile-container:hover img {
  transform: scale(1.05);
}

/* Skills highlight cards hover effects */
.bg-gradient-to-r:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Improved focus states for accessibility */
.quick-nav-card:focus,
.btn-primary:focus,
.btn-secondary:focus {
  outline: 2px solid rgba(220, 38, 38, 0.6);
  outline-offset: 2px;
}

/* Loading states for better UX */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Dark mode specific adjustments */
.dark .loading-shimmer {
  background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
  background-size: 200% 100%;
}

/* Password Modal Styles - Fix for broken modal */
.password-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
}

.password-modal.active {
  display: flex;
  opacity: 1;
}

.password-modal-content {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 20, 0.95));
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
              0 0 30px rgba(220, 38, 38, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-modal.active .password-modal-content {
  transform: scale(1) translateY(0);
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.pin-digit {
  width: 3rem;
  height: 3rem;
  border: 2px solid rgba(220, 38, 38, 0.3);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #dc2626;
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Fira Code', monospace;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.pin-digit:hover {
  border-color: rgba(220, 38, 38, 0.6);
  background: rgba(220, 38, 38, 0.05);
}

.pin-digit.filled {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.pin-digit.filled::after {
  content: '●';
  color: #dc2626;
  font-size: 1.5rem;
}

/* Add focus indicator for active PIN input */
.password-modal.active .pin-digit {
  animation: pinPulse 2s infinite;
}

@keyframes pinPulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
  }
}

.password-input {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 1px;
  opacity: 0;
  z-index: -1;
  border: none;
  background: transparent;
  color: transparent;
  outline: none;
  caret-color: transparent;
}

.password-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: 'Fira Code', monospace;
}

.password-error.show {
  opacity: 1;
}

.password-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}

.password-button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 600;
  font-size:     0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.password-cancel {
  background: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.password-cancel:hover {
  background: rgba(107, 114, 128, 0.3);
  transform: translateY(-1px);
}

.password-submit {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  border: 1px solid rgba(220, 38, 38, 0.5);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.password-submit:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.password-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Glitch effect for password modal header */
.password-modal h3 {
  position: relative;
  font-family: 'Fira Code', monospace;
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.password-modal h3::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #00ffff;
  z-index: -1;
  animation: glitch-1 0.5s infinite alternate-reverse;
}

.password-modal h3::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #ff0040;
  z-index: -2;
  animation: glitch-2 0.5s infinite alternate-reverse;
}

@keyframes glitch-1 {
  0% {
    clip-path: inset(40% 0 61% 0);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
  }
  40% {
    clip-path: inset(43% 0 1% 0);
  }
  60% {
    clip-path: inset(25% 0 58% 0);
  }
  80% {
    clip-path: inset(54% 0 7% 0);
  }
  100% {
    clip-path: inset(58% 0 43% 0);
  }
}

@keyframes glitch-2 {
  0% {
    clip-path: inset(25% 0 58% 0);
  }
  20% {
    clip-path: inset(54% 0 7% 0);
  }
  40% {
    clip-path: inset(58% 0 43% 0);
  }
  60% {
    clip-path: inset(40% 0 61% 0);
  }
  80% {
    clip-path: inset(92% 0 1% 0);
  }
  100% {
    clip-path: inset(43% 0 1% 0);
  }
}

/* Password Info Button Styles */
.password-info-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(220, 38, 38, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  z-index: 10;
}

.password-info-btn:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
  color: rgba(220, 38, 38, 1);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
  transform: scale(1.05);
}

.password-info-btn:active {
  transform: scale(0.95);
}

/* Password Hint Tooltip */
.password-hint {
  position: absolute;
  top: 3.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
              0 0 10px rgba(220, 38, 38, 0.2);
  opacity: 0;
  transform: translateY(-10px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 15;
}

.password-hint.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.password-hint::before {
  content: '';
  position: absolute;
  top: -4px;
  right: 1rem;
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.95);
  border-left: 1px solid rgba(220, 38, 38, 0.4);
  border-top: 1px solid rgba(220, 38, 38, 0.4);
  transform: rotate(45deg);
}

.password-hint .hint-text {
  color: rgba(220, 38, 38, 0.9);
  font-family: 'Fira Code', monospace;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

/* Mobile responsiveness for password modal */
@media (max-width: 640px) {
  .password-modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .pin-digit {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
  
  .pin-display {
    gap: 0.5rem;
  }
  
  .password-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .password-info-btn {
    top: 0.75rem;
    right: 0.75rem;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }
  
  .password-hint {
    top: 3rem;
    right: 0.25rem;
    font-size: 0.625rem;
    padding: 0.375rem 0.5rem;
  }
  
  .password-hint::before {
    right: 0.75rem;
  }
  
  .password-button {
    width: 100%;
    padding: 1rem;
  }
}

/* Additional fixes for password modal positioning and display */
body.modal-open {
  overflow: hidden;
}

.password-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  display: none;
  background: rgba(0, 0, 0, 0.95);
}

.password-modal.active,
.password-modal.show {
  display: flex !important;
}

/* Ensure modal content is properly centered */
.password-modal-content {
  margin: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Fix for potential navigation overlap */
.navbar-fixed-top {
  z-index: 1040 !important;
}

nav.fixed {
  z-index: 40 !important;
}

/* Ensure mobile menu doesn't interfere */
#mobile-menu {
  z-index: 39 !important;
}

/* Fix for any other potential modal conflicts */
.modal-backdrop {
  z-index: 1050 !important;
}

/* Quick fix for modal display issues */
.password-modal * {
  box-sizing: border-box;
}

/* Shake animation for incorrect password */
@keyframes shake {
  0%, 100% {
    transform: scale(1) translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: scale(1) translateX(-10px);
  }
  20%, 40%, 60%, 80% {
    transform: scale(1) translateX(10px);
  }
}

.password-modal-content.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Ensure proper modal initialization */
.password-modal {
  visibility: hidden;
}

.password-modal.active {
  visibility: visible !important;
}

/* Fix for modal not appearing */
.password-modal.show,
.password-modal.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Enhanced profile image styles for timeline design */
.timeline-profile-image {
  position: relative;
  overflow: visible;
}

.timeline-profile-image img {
  transition: transform 0.3s ease;
}

.timeline-profile-image:hover img {
  transform: scale(1.05);
}

.timeline-profile-image::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: conic-gradient(from 0deg, #dc2626, #3b82f6, #dc2626);
  border-radius: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.timeline-profile-image:hover::before {
  opacity: 0.3;
  animation: rotate 3s linear infinite;
}

/* Status indicator positioning */
.profile-status-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background: #10b981;
  border: 2px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.profile-status-indicator .pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: white;
  border-radius: 50%;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.9);
  }
}

/* Ensure proper containment */
.profile-image-container {
  position: relative;
  display: inline-block;
}

/* Mobile adjustments for square image */
@media (max-width: 640px) {
  .profile-status-indicator {
    width: 1.25rem;
    height: 1.25rem;
    top: 0.25rem;
    right: 0.25rem;
  }
  
  .profile-status-indicator .pulse-dot {
    width: 0.375rem;
    height: 0.375rem;
  }
}

/* Seamless Section Backgrounds */
section {
  position: relative;
  background: transparent !important;
}

/* Subtle section overlays for visual depth */
#home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center top, 
    rgba(220, 38, 38, 0.05) 0%, 
    rgba(220, 38, 38, 0.02) 30%, 
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}

#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(153, 27, 27, 0.03) 50%, 
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

#education::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, 
    rgba(239, 68, 68, 0.04) 0%, 
    rgba(153, 27, 27, 0.02) 40%, 
    transparent 70%);
  pointer-events: none;
  z-index: 1;
}

#skills::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    transparent 0%, 
    rgba(220, 38, 38, 0.03) 30%, 
    rgba(153, 27, 27, 0.02) 60%, 
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

#projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center bottom, 
    rgba(220, 38, 38, 0.04) 0%, 
    rgba(239, 68, 68, 0.02) 30%, 
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, 
    rgba(153, 27, 27, 0.05) 0%, 
    rgba(220, 38, 38, 0.02) 30%, 
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure content appears above overlays */
section > * {
  position: relative;
  z-index: 2;
}

/* Enhanced Matrix Background Effect */
#code-background {
  opacity: 0.15 !important;
  filter: hue-rotate(15deg) saturate(0.8);
  background: linear-gradient(to bottom, 
    rgba(0, 20, 0, 0.1) 0%, 
    rgba(0, 40, 20, 0.05) 50%, 
    rgba(0, 20, 0, 0.02) 100%);
}

/* Additional visual enhancements for seamless experience */
.container, .max-w-7xl, .max-w-6xl, .max-w-4xl {
  position: relative;
  z-index: 2;
}

/* Enhance glass morphism elements to work with new background */
.glassmorphism,
.skill-item,
.about-image-wrapper,
.project-card {
  backdrop-filter: blur(10px) saturate(1.2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(220, 38, 38, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(220, 38, 38, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Subtle ambient lighting effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, 
    rgba(220, 38, 38, 0.02) 0%, 
    transparent 50%),
  radial-gradient(ellipse at 80% 20%, 
    rgba(239, 68, 68, 0.015) 0%, 
    transparent 50%),
  radial-gradient(ellipse at 40% 80%, 
    rgba(153, 27, 27, 0.01) 0%, 
    transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure navigation stays above everything */
nav {
  z-index: 50 !important;
}

/* Ensure modals and overlays work properly */
.password-modal,
.project-modal,
.education-modal {
  z-index: 100 !important;
}

/* --- CONTACT FORM STYLES START --- */

/* Content from contact-form.css below. If you encounter contact form style bugs, check this section. */

/* Enhanced Contact Form Styles */

/* Contact Cards */
.contact-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #ef4444;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-card-icon {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(239, 68, 68, 0.2));
    transform: scale(1.05);
}

.contact-card-content {
    margin-top: 1rem;
}

.contact-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.contact-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 6px;
    color: #dc2626;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-action-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.5);
    color: #ef4444;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.4);
    color: #ef4444;
    transform: translateX(4px);
}

/* Enhanced Contact Form Container */
.contact-form-container {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Terminal Header */
.terminal-header {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9));
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.terminal-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px currentColor;
}

.terminal-title {
    display: flex;
    align-items: center;
    color: #d1d5db;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
}

.terminal-status {
    display: flex;
    align-items: center;
}

.status-text {
    color: #22c55e;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
}

/* Terminal Body */
.terminal-body {
    padding: 2rem;
    font-family: 'Fira Code', monospace;
}

.terminal-prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: #d1d5db;
}

.prompt-symbol {
    color: #ef4444;
    font-weight: bold;
}

.prompt-text {
    color: #22c55e;
}

/* Enhanced Form Styles */
.enhanced-contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-comment {
    color: #6b7280;
    font-size: 0.875rem;
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    color: #d1d5db;
    font-size: 0.875rem;
    font-weight: 500;
}

.label-required {
    color: #ef4444;
}

.label-optional {
    color: #6b7280;
    font-size: 0.75rem;
}

.input-wrapper {
    position: relative;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    padding: 1rem;
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    resize: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(220, 38, 38, 0.6);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(156, 163, 175, 0.6);
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    transition: width 0.3s ease;
}

.form-input:focus + .input-focus-line,
.form-select:focus + .input-focus-line,
.form-textarea:focus + .input-focus-line {
    width: 100%;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-select:focus + .select-arrow + .input-focus-line {
    width: 100%;
}

.textarea-counter {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.field-error {
    display: none;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 500;
}

.field-error.show {
    display: block;
}

/* Form Status Messages */
.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.5;
}

.form-status.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.form-status.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.form-status.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

/* Enhanced form validation styles */
.form-input.error,
.form-textarea.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

/* Anti-spam and security indicator animations */
@keyframes securityPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.security-feature i {
    animation: securityPulse 2s ease-in-out infinite;
}

.security-feature:nth-child(1) i { animation-delay: 0s; }
.security-feature:nth-child(2) i { animation-delay: 0.5s; }
.security-feature:nth-child(3) i { animation-delay: 1s; }

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(220, 38, 38, 0.2);
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

.form-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.response-time,
.security-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.button-group {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .button-group {
        width: 100%;
    }
}

.btn-primary,
.btn-secondary {
    position: relative;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: 2px solid #dc2626;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

.btn-secondary:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.5);
    color: #ef4444;
}

.btn-loading,
.btn-success {
    display: none;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .btn-loading {
    display: flex;
    align-items: center;
}

.btn-primary.success .btn-text,
.btn-primary.success .btn-loading {
    display: none;
}

.btn-primary.success .btn-success {
    display: flex;
    align-items: center;
}

/* Contact Form Status Messages */
.contact-form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-form-status.status-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    display: block;
}

.contact-form-status.status-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: block;
}

.contact-form-status.status-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    display: block;
}

/* Terminal Output */
.terminal-output {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(220, 38, 38, 0.2);
}

.output-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.output-prompt {
    color: #ef4444;
}

.output-text {
    color: #9ca3af;
}

/* reCAPTCHA Status Indicators */
.recaptcha-status {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.recaptcha-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    position: relative;
}

.recaptcha-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.5;
}

.recaptcha-info.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.recaptcha-info.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.recaptcha-info.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.recaptcha-info i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.status-text {
    flex: 1;
    line-height: 1.4;
}

.status-text strong {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.status-text small {
    opacity: 0.8;
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Enhanced terminal output for debugging */
.terminal-output .output-line {
    margin: 0.25rem 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.terminal-output .output-line:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 0.125rem 0.25rem;
    margin: 0.125rem -0.25rem;
}

.output-prompt {
    color: #6b7280;
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .recaptcha-info {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .recaptcha-info i {
        font-size: 1rem;
    }
    
    .status-text {
        font-size: 0.8rem;
    }
    
    .status-text small {
        font-size: 0.7rem;
    }
}

/* --- CONTACT FORM STYLES END --- */

/* --- CV MODAL STYLES START --- */

/* Content from cv-modal.css below. If you encounter CV modal style bugs, check this section. */

/* CV Modal Styles */
.cv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cv-modal.active {
    display: flex;
    opacity: 1;
}

.cv-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 90vh;
    max-height: 1000px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.cv-modal.active .cv-modal-content {
    transform: scale(1);
}

.cv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.cv-modal-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Fira Code', monospace;
}

.cv-modal-close {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-modal-close:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

/* Enhanced zoom controls info */
.cv-zoom-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-family: 'Fira Code', monospace;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: left;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 38, 38, 0.3);
    max-width: 200px;
    z-index: 12;
}

.cv-modal.active .cv-zoom-info {
    opacity: 1;
    animation: fadeInOut 6s ease-in-out;
}

.cv-zoom-info.hidden {
    opacity: 0;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.cv-image-container {
    position: relative;
    width: 100%;
    height: calc(100% - 80px);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
}

.cv-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease-out;
    transform-origin: center center;
    cursor: zoom-in;
    
    /* Disable right-click and selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    
    /* Disable context menu */
    pointer-events: auto;
}

/* Remove zoom-specific cursor classes since we handle it in JS */
.cv-image.zoomed {
    cursor: grab;
}

.cv-image.dragging {
    cursor: grabbing;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .cv-modal {
        padding: 10px;
    }
    
    .cv-modal-content {
        width: 95%;
        height: 95vh;
        border-radius: 10px;
    }
    
    .cv-modal-header {
        padding: 15px 20px;
    }
    
    .cv-modal-title {
        font-size: 1.2rem;
    }
    
    .cv-modal-close {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
    
    .cv-image-container {
        padding: 15px;
    }
}

/* Mobile responsive adjustments for CV button */
@media (max-width: 640px) {
    .cv-modal-content {
        width: 98%;
        height: 95vh;
        margin: 0;
    }
    
    .cv-modal-header {
        padding: 12px 15px;
    }
    
    .cv-modal-title {
        font-size: 1rem;
    }
      .cv-zoom-controls {
        top: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .cv-zoom-btn, .cv-download-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Prevent zoom on mobile devices for security */
@media (max-width: 768px) {
    .cv-image {
        touch-action: none;
        -ms-touch-action: none;
    }
}

/* Protection overlay */
.cv-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
    pointer-events: all;
}

/* Disable text selection on the entire modal */
.cv-modal * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Zoom controls */
.cv-zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 11;
}

.cv-zoom-btn {
    background: rgba(220, 38, 38, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cv-zoom-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

.cv-zoom-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(220, 38, 38, 0.4);
}

.cv-zoom-btn:disabled:hover {
    transform: none;
    background: rgba(220, 38, 38, 0.4);
}

/* Download button styling */
.cv-download-btn {
    background: rgba(34, 197, 94, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-left: 5px;
}

.cv-download-btn:hover {
    background: rgba(34, 197, 94, 1);
    transform: scale(1.1);
}

.cv-download-btn:active {
    transform: scale(0.95);
}

/* Loading spinner */
.cv-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(220, 38, 38, 0.3);
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Warning message */
.cv-warning {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Fira Code', monospace;
    text-align: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeInOut 4s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* --- CV MODAL STYLES END --- */

/* --- EDUCATION MODAL NEW STYLES START --- */

/* Content from education-modal-new.css below. If you encounter education modal style bugs, check this section. */

/* Education Modal Styles - Streamlined and Modern */
.education-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
    padding: 1rem;
}

.education-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.education-modal {
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.education-modal-overlay.active .education-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.education-modal-header {
    position: relative;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.education-modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding-right: 3rem;
}

.close-modal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 1.5rem;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    color: #dc2626;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.close-modal-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateY(-50%) scale(1.05);
}

.education-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Modal Quick Info Section */
.modal-quick-info {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tab Navigation */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.modal-tab {
    padding: 1rem 1.5rem;
    color: #a0aec0;
    font-size: 0.95rem;
    font-weight: 600;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.modal-tab:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.03);
}

.modal-tab.active {
    color: #dc2626;
    border-bottom: 2px solid #dc2626;
    background: rgba(220, 38, 38, 0.05);
}

/* Tab Content */
.tab-panel {
    display: none;
    padding: 1.5rem;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Highlight Cards */
.highlights-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.highlight-card {
    background: rgba(17, 24, 39, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.highlight-card:hover {
    border-color: rgba(220, 38, 38, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.highlight-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.highlight-header i {
    font-size: 1.25rem;
}

.highlight-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f9fafb;
}

.highlight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlight-list li {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: #d1d5db;
    transition: all 0.2s ease;
}

.highlight-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Accordion Styles */
.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.5);
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.accordion-header:hover {
    background: rgba(0, 0, 0, 0.3);
}

.accordion-header i:first-child {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.accordion-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f9fafb;
    flex: 1;
}

.accordion-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.modal-list {
    list-style: none;
    padding: 1rem;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-list li {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
    color: #d1d5db;
    line-height: 1.4;
}

.modal-list li i {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.modal-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modal-list li:last-child {
    margin-bottom: 0;
}

/* Gallery Styles */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 16/9;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-caption p {
    margin: 0;
    font-size: 0.8rem;
    color: #f9fafb;
    text-align: center;
}

/* Fullscreen image view */
.fullscreen-image {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.fullscreen-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fullscreen-image img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.close-fullscreen {
    position: absolute;
    top: -20px;
    right: -20px;
    background: rgba(220, 38, 38, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.close-fullscreen:hover {
    background: rgba(220, 38, 38, 0.7);
    transform: scale(1.1);
}

.fullscreen-caption {
    margin-top: 1rem;
    color: #f9fafb;
    font-size: 1rem;
    text-align: center;
}

.fullscreen-controls {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.prev-img, .next-img {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
}

.prev-img:hover, .next-img:hover {
    background: rgba(255, 255, 255, 0.2);
}

.prev-img[disabled], .next-img[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.img-counter {
    color: #d1d5db;
    font-size: 0.9rem;
}

/* Institution and period badges */
.institution-badge, .period-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.modal-description {
    color: #d1d5db;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0.75rem 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .education-modal-overlay {
        padding: 0.5rem;
    }
    
    .education-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .education-modal-header {
        padding: 1rem;
    }
    
    .education-modal-header h2 {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .close-modal-btn {
        width: 36px;
        height: 36px;
        right: 1rem;
    }
    
    .modal-quick-info {
        padding: 1rem;
    }
    
    .modal-tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .tab-panel {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .institution-badge, .period-badge {
        font-size: 0.8rem;
    }
    
    .gallery-item {
        aspect-ratio: 1/1;
    }
    
    .modal-description {
        font-size: 0.9rem;
    }
    
    .highlight-list li, .modal-list li {
        font-size: 0.85rem;
    }
}

/* --- EDUCATION MODAL NEW STYLES END --- */

/* =============================
   START floating-assistant.css
   ============================= */
/* Floating Assistant Button - iOS Assistive Touch Style */

/* Main floating button */
.floating-assistant {
    position: fixed;
    bottom: 100px; /* Position above back-to-top button */
    right: 20px; /* Consistent with JavaScript positioning */
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    border: 2px solid rgba(220, 38, 38, 0.6);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(220, 38, 38, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.floating-assistant:hover {
    transform: scale(1.1);
    border-color: rgba(220, 38, 38, 0.8);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(220, 38, 38, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.floating-assistant.active {
    transform: scale(0.95);
    background: rgba(220, 38, 38, 0.2);
}

.floating-assistant-icon {
    color: #dc2626;
    font-size: 24px;
    transition: all 0.3s ease;
}

.floating-assistant.active .floating-assistant-icon {
    transform: rotate(45deg);
}

/* Settings panel */
.floating-settings-panel {
    position: fixed !important;
    bottom: 170px; /* Position above floating assistant */
    right: 30px !important;
    left: auto !important; /* Override any left positioning */
    width: 280px !important;
    margin: 0 !important; /* Remove any margin that could center it */
    max-height: 70vh; /* Limit height to 70% of viewport */
    overflow-y: auto; /* Add scroll if needed */    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    padding: 16px; /* Reduced from 20px */
    z-index: 9998;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(220, 38, 38, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    transform: scale(0) translate(20px, 20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right !important;
}

/* Custom scrollbar for the panel */
.floating-settings-panel::-webkit-scrollbar {
    width: 4px;
}

.floating-settings-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.floating-settings-panel::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.6);
    border-radius: 2px;
}

.floating-settings-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.8);
}

.floating-settings-panel.show {
    transform: scale(1) translate(0, 0);
    opacity: 1;
    visibility: visible;
}

.floating-settings-panel::before {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 25px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(220, 38, 38, 0.3);
}

/* Panel header */
.settings-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px; /* Reduced from 20px */
    padding-bottom: 12px; /* Reduced from 15px */
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.settings-header-icon {
    color: #dc2626;
    font-size: 18px; /* Reduced from 20px */
    margin-right: 8px; /* Reduced from 10px */
}

.settings-header-title {
    color: #ffffff;
    font-size: 15px; /* Reduced from 16px */
    font-weight: 600;
    font-family: 'Fira Code', monospace;
}

/* Settings groups */
.settings-group {
    margin-bottom: 16px; /* Reduced from 20px */
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group-title {
    color: #cccccc;
    font-size: 13px; /* Reduced from 14px */
    font-weight: 500;
    margin-bottom: 10px; /* Reduced from 12px */
    font-family: 'Fira Code', monospace;
    display: flex;
    align-items: center;
}

.settings-group-title i {
    margin-right: 6px; /* Reduced from 8px */
    color: #dc2626;
    font-size: 14px; /* Reduced from 16px */
}

/* Toggle switches */
.setting-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0; /* Reduced from 10px */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-toggle:last-child {
    border-bottom: none;
}

.setting-label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    flex: 1;
    cursor: pointer;
}

.setting-description {
    color: #888888;
    font-size: 12px;
    margin-top: 2px;
}

/* Custom toggle switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-switch.active {
    background: linear-gradient(45deg, #dc2626, #ef4444);
    border-color: #dc2626;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-switch.active::before {
    transform: translateX(20px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Fix for toggle switches in optimized mode - ensure correct visual state without animations */
body.optimized-mode .toggle-switch.active::before {
    transform: translateX(20px) !important;
    transition: none !important;
}

body.optimized-mode .toggle-switch::before {
    transform: translateX(0px) !important;
    transition: none !important;
}

/* Ensure active state background is maintained in optimized mode */
body.optimized-mode .toggle-switch.active {
    background: #666666 !important;
    border-color: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .toggle-switch {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    transition: none !important;
}

/* Volume control */
.volume-control {
    margin-top: 12px;
}

.volume-slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    position: relative;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.volume-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
    color: #888888;
}

/* Music status indicator */
.music-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    font-size: 12px;
    color: #cccccc;
}

.music-status-icon {
    color: #dc2626;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Music Player Controls */
.music-player-controls {
    width: 100%;
    margin-top: 10px; /* Reduced from 12px */
    padding: 12px; /* Reduced from 16px */
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px; /* Reduced from 12px */
    border: 1px solid rgba(220, 38, 38, 0.2);
    transition: all 0.3s ease;
}

.music-player-controls.playing {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(220, 38, 38, 0.4);
    box-shadow: 
        0 0 20px rgba(220, 38, 38, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.track-info {
    width: 100%;
    margin-bottom: 12px; /* Reduced from 16px */
}

.track-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    height: 20px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(90deg, rgba(0,0,0,0.1) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
    border-radius: 4px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
}

.track-name-text {
    white-space: nowrap;
    display: block;
    width: 100%;
}

/* Only scroll for long text */
.track-name.long-text .track-name-text {
    animation: scroll-text 15s linear infinite;
}

/* Marquee effect for long track names */
@keyframes scroll-text {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Pause scrolling on hover */
.track-name:hover.long-text .track-name-text {
    animation-play-state: paused;
}

.track-progress {
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(220, 38, 38, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #ef4444, #dc2626);
    background-size: 200% 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    box-shadow: 
        0 0 12px rgba(220, 38, 38, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    animation: progress-glow 2s ease-in-out infinite alternate;
}

@keyframes progress-glow {
    0% { 
        background-position: 0% 50%;
        box-shadow: 0 0 12px rgba(220, 38, 38, 0.6);
    }
    100% { 
        background-position: 100% 50%;
        box-shadow: 0 0 16px rgba(220, 38, 38, 0.8);
    }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ffffff, #ffcccc);
    border-radius: 0 4px 4px 0;
    box-shadow: 
        0 0 6px rgba(255, 255, 255, 0.8),
        -1px 0 2px rgba(220, 38, 38, 0.5);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #cccccc;
    margin-top: 6px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.player-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px; /* Reduced from 16px */
    margin: 12px 0; /* Reduced from 16px */
}

.player-btn {
    width: 38px; /* Reduced from 44px */
    height: 38px; /* Reduced from 44px */
    border: none;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(220, 38, 38, 0.8), rgba(239, 68, 68, 0.8));
    color: #ffffff;
    cursor: pointer;
    font-size: 14px; /* Reduced from 16px */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 12px rgba(220, 38, 38, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.player-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #b91c1c, #dc2626);
}

.player-btn:active {
    transform: scale(0.95);
}

.play-pause-btn {
    width: 46px; /* Reduced from 52px */
    height: 46px; /* Reduced from 52px */
    font-size: 18px; /* Reduced from 20px */
    background: linear-gradient(45deg, #dc2626, #ef4444);
    box-shadow: 
        0 6px 16px rgba(220, 38, 38, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Refresh button specific styles */
.refresh-btn, .scan-btn {
    opacity: 0.8;
    background: linear-gradient(45deg, rgba(34, 197, 94, 0.8), rgba(59, 130, 246, 0.8)) !important;
    border-color: rgba(34, 197, 94, 0.5) !important;
}

.refresh-btn:hover, .scan-btn:hover {
    opacity: 1;
    background: linear-gradient(45deg, rgba(34, 197, 94, 1), rgba(59, 130, 246, 1)) !important;
    box-shadow: 
        0 6px 16px rgba(34, 197, 94, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

.refresh-btn.spinning i, .scan-btn:disabled i {
    animation: spin 1s linear infinite;
}

.scan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Music Scanner Button */
.scanner-button-container {
    margin: 12px 0;
}

.scanner-button {
    width: 100%;
    background: linear-gradient(45deg, rgba(34, 197, 94, 0.8), rgba(16, 185, 129, 0.8));
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.scanner-button:hover {
    background: linear-gradient(45deg, rgba(34, 197, 94, 1), rgba(16, 185, 129, 1));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.scanner-button:active {
    transform: translateY(0);
}

.scanner-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
    text-align: center;
}

/* Music Playlist Styles */
.music-playlist {
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.playlist-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(220, 38, 38, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.playlist-tracks {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dc2626 rgba(255, 255, 255, 0.1);
}

.playlist-tracks::-webkit-scrollbar {
    width: 4px;
}

.playlist-tracks::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-tracks::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 2px;
}

.playlist-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.playlist-track:hover {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-track.current-track {
    background: rgba(220, 38, 38, 0.2);
    border-left: 3px solid #dc2626;
}

.playlist-track .track-info {
    flex: 1;
}

.playlist-track .track-title {
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 2px;
}

.playlist-track .track-duration {
    color: #888888;
    font-size: 10px;
}

.playlist-track.current-track .track-title {
    color: #ef4444;
    font-weight: 500;
}

.current-track-icon {
    color: #dc2626;
    font-size: 12px;
    margin-left: 8px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
    .floating-settings-panel {
        right: max(30px, calc((100vw - 1200px) / 2 + 30px)); /* Keep panel within reasonable distance from content */
    }
    
    .floating-assistant {
        right: max(30px, calc((100vw - 1200px) / 2 + 30px)); /* Align button with panel */
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .floating-assistant {
        bottom: 90px; /* Adjust for mobile back-to-top button */
        right: 20px;
        width: 56px;
        height: 56px;
    }    .floating-settings-panel {
        bottom: 146px !important; /* Adjust for mobile */
        right: 20px !important;
        left: auto !important; /* Force override any left positioning */
        width: 280px !important; /* Keep fixed width */
        max-width: calc(100vw - 40px) !important; /* Ensure it doesn't exceed screen */
        margin: 0 !important; /* Remove any auto margins */
        max-height: 60vh; /* Reduced from default for mobile */
        padding: 12px; /* Reduced padding for mobile */
        transform-origin: bottom right !important; /* Keep right alignment */
    }
    
    .floating-settings-panel::before {
        right: 25px; /* Position arrow relative to right edge */
        transform: none; /* Remove centering transform */
    }
    
    .settings-header {
        margin-bottom: 12px; /* Reduced */
        padding-bottom: 8px; /* Reduced */
    }
    
    .settings-header-title {
        font-size: 13px; /* Reduced from 14px */
    }
    
    .settings-group {
        margin-bottom: 12px; /* Reduced */
    }
    
    .settings-group-title {
        font-size: 12px; /* Reduced */
        margin-bottom: 8px; /* Reduced */
    }
    
    .setting-label {
        font-size: 12px; /* Reduced from 13px */
    }
    
    .setting-description {
        font-size: 10px; /* Reduced */
    }
    
    .theme-option {
        width: 26px; /* Reduced */
        height: 26px; /* Reduced */
    }
    
    /* Mobile music player adjustments */
    .music-player-controls {
        padding: 10px; /* Reduced */
        margin-top: 8px; /* Reduced */
    }
    
    .track-info {
        margin-bottom: 10px; /* Reduced */
    }
    
    .player-btn {
        width: 34px; /* Reduced from 40px */
        height: 34px; /* Reduced from 40px */
        font-size: 12px; /* Reduced from 14px */
    }
    
    .play-pause-btn {
        width: 42px; /* Reduced from 48px */
        height: 42px; /* Reduced from 48px */
        font-size: 16px; /* Reduced from 18px */
    }
    
    .player-buttons {
        gap: 10px; /* Reduced */
        margin: 10px 0; /* Reduced */
    }
    
    .track-name {
        font-size: 12px; /* Reduced from 13px */
        height: 16px; /* Reduced from 18px */
        padding: 1px 6px; /* Reduced */
    }
    
    .time-display {
        font-size: 9px; /* Reduced from 10px */
        padding: 2px 6px; /* Reduced */
    }
    
    .volume-control {
        margin-top: 8px; /* Reduced */
    }
}

@media (max-width: 480px) {
    .floating-assistant {
        width: 50px;
        height: 50px;
        bottom: 80px; /* Account for smaller mobile back-to-top button */
        right: 15px;
    }
    
    .floating-assistant-icon {
        font-size: 20px;
    }    .floating-settings-panel {
        bottom: 130px !important; /* Reduced further */
        right: 15px !important;
        left: auto !important; /* Force override any left positioning */
        width: 260px !important; /* Keep fixed width, slightly smaller for small screens */
        max-width: calc(100vw - 30px) !important; /* Ensure it doesn't exceed screen */
        margin: 0 !important; /* Remove any auto margins */
        padding: 10px; /* Reduced from 16px */
        max-height: 55vh; /* Even more compact */
        transform-origin: bottom right !important;
    }
    
    .settings-header {
        margin-bottom: 10px; /* Reduced */
        padding-bottom: 6px; /* Reduced */
    }
    
    .settings-header-title {
        font-size: 12px; /* Reduced from 13px */
    }
    
    .settings-group {
        margin-bottom: 10px; /* Reduced */
    }
    
    .settings-group-title {
        font-size: 11px; /* Reduced */
        margin-bottom: 6px; /* Reduced */
    }
    
    .theme-selector {
        gap: 4px; /* Reduced from 6px */
    }
    
    .theme-option {
        width: 24px; /* Reduced from 26px */
        height: 24px; /* Reduced from 26px */
    }
    
    /* Extra small mobile music player adjustments */
    .music-player-controls {
        padding: 8px; /* Reduced from 12px */
        margin-top: 6px; /* Reduced */
    }
    
    .track-info {
        margin-bottom: 8px; /* Reduced */
    }
    
    .player-btn {
        width: 32px; /* Reduced from 36px */
        height: 32px; /* Reduced from 36px */
        font-size: 11px; /* Reduced from 12px */
    }
    
    .play-pause-btn {
        width: 38px; /* Reduced from 44px */
        height: 38px; /* Reduced from 44px */
        font-size: 14px; /* Reduced from 16px */
    }
    
    .player-buttons {
        gap: 8px; /* Reduced from 12px */
        margin: 8px 0; /* Reduced */
    }
    
    .track-name {
        font-size: 11px; /* Reduced from 12px */
        height: 14px; /* Reduced */
        padding: 1px 4px; /* Reduced */
    }
    
    .time-display {
        font-size: 8px; /* Reduced */
        padding: 2px 4px; /* Reduced */
    }
    
    .volume-control {
        margin-top: 6px; /* Reduced */
    }
}

/* Optimized mode adjustments */
body.optimized-mode .floating-assistant {
    background: #1a1a1a !important;
    border-color: #666666 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.optimized-mode .floating-assistant:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

body.optimized-mode .floating-settings-panel {
    background: #111111 !important;
    border-color: #333333 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

body.optimized-mode .toggle-switch.active {
    background: #666666 !important;
    border-color: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .toggle-switch.active::before {
    transform: translateX(20px) !important;
    transition: none !important;
}

body.optimized-mode .toggle-switch::before {
    transform: translateX(0px) !important;
    transition: none !important;
}

/* Ensure active state background is maintained in optimized mode */
body.optimized-mode .toggle-switch.active {
    background: #666666 !important;
    border-color: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .toggle-switch {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    transition: none !important;
}

body.optimized-mode .volume-slider::-webkit-slider-thumb {
    background: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .volume-slider::-moz-range-thumb {
    background: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .music-status {
    background: rgba(102, 102, 102, 0.1) !important;
    border-color: rgba(102, 102, 102, 0.2) !important;
}

body.optimized-mode .music-status-icon {
    color: #666666 !important;
    animation: none !important;
}

/* Draggable functionality */
.floating-assistant.dragging {
    transition: none !important;
    z-index: 10000;
}

.floating-assistant.dragging .floating-settings-panel {
    display: none !important;
}

/* Accessibility improvements */
.floating-assistant:focus {
    outline: 2px solid rgba(220, 38, 38, 0.6);
    outline-offset: 2px;
}

.toggle-switch:focus {
    outline: 2px solid rgba(220, 38, 38, 0.6);
    outline-offset: 2px;
}

.theme-option:focus {
    outline: 2px solid rgba(220, 38, 38, 0.6);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .floating-assistant {
        border-width: 3px;
    }
    
    .floating-settings-panel {
        border-width: 2px;
    }
    
    .toggle-switch {
        border-width: 2px;
    }
    
    .theme-option {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-assistant,
    .floating-settings-panel,
    .toggle-switch,
    .toggle-switch::before,
    .theme-option,
    .volume-slider::-webkit-slider-thumb {
        transition: none !important;
        animation: none !important;
    }
    
    .music-status-icon {
        animation: none !important;
    }
}

/* Theme System - Dynamic Color Application */
:root {
    --theme-primary: #dc2626;
    --theme-primary-dark: #991b1b;
    --theme-primary-light: #ef4444;
    --theme-accent: rgba(220, 38, 38, 0.6);
    --theme-accent-hover: rgba(220, 38, 38, 0.8);
    --theme-glow: rgba(220, 38, 38, 0.2);
    --theme-glow-strong: rgba(220, 38, 38, 0.4);
}

/* Blue Theme */
[data-theme="blue"] {
    --theme-primary: #3b82f6;
    --theme-primary-dark: #1d4ed8;
    --theme-primary-light: #60a5fa;
    --theme-accent: rgba(59, 130, 246, 0.6);
    --theme-accent-hover: rgba(59, 130, 246, 0.8);
    --theme-glow: rgba(59, 130, 246, 0.2);
    --theme-glow-strong: rgba(59, 130, 246, 0.4);
}

/* Green Theme */
[data-theme="green"] {
    --theme-primary: #10b981;
    --theme-primary-dark: #047857;
    --theme-primary-light: #34d399;
    --theme-accent: rgba(16, 185, 129, 0.6);
    --theme-accent-hover: rgba(16, 185, 129, 0.8);
    --theme-glow: rgba(16, 185, 129, 0.2);
    --theme-glow-strong: rgba(16, 185, 129, 0.4);
}

/* Purple Theme */
[data-theme="purple"] {
    --theme-primary: #8b5cf6;
    --theme-primary-dark: #7c3aed;
    --theme-primary-light: #a78bfa;
    --theme-accent: rgba(139, 92, 246, 0.6);
    --theme-accent-hover: rgba(139, 92, 246, 0.8);
    --theme-glow: rgba(139, 92, 246, 0.2);
    --theme-glow-strong: rgba(139, 92, 246, 0.4);
}

/* Orange Theme */
[data-theme="orange"] {
    --theme-primary: #f97316;
    --theme-primary-dark: #ea580c;
    --theme-primary-light: #fb923c;
    --theme-accent: rgba(249, 115, 22, 0.6);
    --theme-accent-hover: rgba(249, 115, 22, 0.8);
    --theme-glow: rgba(249, 115, 22, 0.2);
    --theme-glow-strong: rgba(249, 115, 22, 0.4);
}

/* Pink Theme */
[data-theme="pink"] {
    --theme-primary: #ec4899;
    --theme-primary-dark: #db2777;
    --theme-primary-light: #f472b6;
    --theme-accent: rgba(236, 72, 153, 0.6);
    --theme-accent-hover: rgba(236, 72, 153, 0.8);
    --theme-glow: rgba(236, 72, 153, 0.2);
    --theme-glow-strong: rgba(236, 72, 153, 0.4);
}
/* =============================
   END floating-assistant.css
   ============================= */

/* =============================
   START glassmorphism.css
   ============================= */
/* Glassmorphism styling for portfolio elements */
/* Follows the 70/20/10 color rule with your existing color palette */

.glassmorphism-terminal {
  /* Base glassmorphism effect */
  background: linear-gradient(135deg, rgba(15, 15, 15, 0.7) 0%, rgba(30, 30, 30, 0.3) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* For Safari */
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 20px rgba(220, 38, 38, 0.2),
    -5px 0 15px -5px rgba(220, 38, 38, 0.3); /* Left side glow */
  
  /* Enhanced styling */
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.glassmorphism-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right, 
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.7s ease;
}

.glassmorphism-terminal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom,
    rgba(220, 38, 38, 0.7) 0%,
    rgba(239, 68, 68, 0.5) 50%,
    rgba(220, 38, 38, 0.3) 100%);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
  opacity: 0.8;
}

.glassmorphism-terminal:hover::before {
  left: 100%;
  transition: all 0.7s ease;
}

.glassmorphism-terminal:hover::after {
  opacity: 1;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
}

/* Add subtle hover effect */
.glassmorphism-terminal:hover {
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(220, 38, 38, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 30px rgba(220, 38, 38, 0.25),
    -8px 0 20px -5px rgba(220, 38, 38, 0.4); /* Enhanced left side glow on hover */
  transform: translateY(-3px);
}

/* Adjust text colors for better visibility on glassmorphism background */
.glassmorphism-terminal .text-white\/90 {
  color: rgba(255, 255, 255, 0.9);
}

.glassmorphism-terminal .text-amber-300 {
  color: rgba(252, 211, 77, 0.9);
  text-shadow: 0 0 10px rgba(252, 211, 77, 0.3);
}

.glassmorphism-terminal .text-emerald-400 {
  color: rgba(52, 211, 153, 0.9);
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

.glassmorphism-terminal .text-blue-400 {
  color: rgba(96, 165, 250, 0.9);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.glassmorphism-terminal .text-red-400 {
  color: rgba(248, 113, 113, 0.9);
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

/* Special highlight for interactive elements */
.glassmorphism-terminal .highlight {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0));
  border-radius: 2px;
  padding: 0 4px;
}

/* For optimized mode */
body.optimized-mode .glassmorphism-terminal {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--optimized-shadow);
}
/* =============================
   END glassmorphism.css
   ============================= */

/* =========================
   MOBILE-FIXES.CSS START
   (Merged for debugging)
   ========================= */
/* Additional mobile responsiveness styles */

/* Prevent content shift when scrollbar appears/disappears */
html {
  overflow-y: scroll;
}

/* Fix issues with position:fixed elements on mobile */
@supports (-webkit-touch-callout: none) {  .fixed {
    position: fixed;
    /* iOS specific position fix */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  .mobile-safe-padding {
    /* Safe bottom padding for iOS to prevent elements being hidden under the navigation bar */
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Better handling of overflow for all mobile devices */
@media (max-width: 767px) {
  body {
    width: 100vw;
    overflow-x: hidden;
    max-width: 100%;
  }
  
  /* Improved mobile menu styling */
  .mobile-nav-link {
    min-height: 44px; /* Apple's recommended minimum touch target size */
    min-width: 44px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 16px;
  }
  
  /* Better touch targets for mobile */
  .btn-primary, 
  .btn-secondary, 
  .project-link,
  .social-icon {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 16px;
  }
  
  /* Fix mobile section spacing to prevent overflow */
  section {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Fix for mobile navigation header spacing */
  nav .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Improved handling of images on mobile */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Make mobile menu button more tappable */
  #mobile-menu-button {
    padding: 10px;
    margin: -5px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Fix for double-tap issues on iOS */
  a {
    touch-action: manipulation;
  }
  
  /* Fix for the scrolling issue with mobile menu open */
  body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }
  
  /* Better transition for mobile menu */
  #mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  #mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }
  
  /* Fix for iOS fixed position */
  .ios-fixed {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .text-xl {
    font-size: 1rem !important;
  }
  
  .text-lg {
    font-size: 0.9rem !important;
  }
  
  h1, .h1 {
    font-size: 1.8rem !important;
  }
  
  h2, .h2 {
    font-size: 1.5rem !important;
  }
  
  /* Add more spacing for small buttons */
  .btn-sm {
    padding: 8px 12px;
    margin: 5px;
  }
}

/* Fix for really small devices */
@media (max-width: 320px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Reduce padding on very small screens */
  section {
    padding: 2rem 0.5rem;
  }
}

/* Use a proper height unit that works well on all mobile browsers */
.full-height {
  height: 100vh; /* Fallback */
  height: calc(var(--vh, 1vh) * 100);
}

/* Hide custom cursor on mobile devices */
@media (max-width: 767px) {
  .cursor-dot, 
  .cursor-ring, 
  .custom-cursor {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  
  /* Reset cursor for mobile */
  body, a, button {
    cursor: auto !important;
  }
}

/* Improved styles for mobile navigation buttons in private content */
.mobile-nav-btn {
  /* Base styles */
  padding: 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  
  /* Readable touch target */
  min-height: 44px;
  min-width: 44px;
  position: relative;
  overflow: hidden;
}

/* Active state */
.mobile-nav-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

a.mobile-nav-btn:hover {
  background: rgba(255,255,255,0.1);
}

button.mobile-nav-btn:hover {
  background: rgba(255,255,255,0.1);
}

.mobile-nav-btn {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.mobile-nav-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 100%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}

.mobile-nav-btn:active::after {
  width: 120px;
  height: 120px;
  opacity: 1;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background: rgba(255,255,255,0.7);
  pointer-events: none;
  z-index: 10;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@media (max-width: 767px) {
  .private-content-nav-title {
    font-size: 1.2rem;
    padding: 0.5rem 0;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .min-h-screen.py-32 {
    min-height: 60vh !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  .container.px-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  .glassmorphism-terminal {
    padding: 1rem !important;
  }
  .flex.space-x-2 > * {
    margin-right: 0.5rem !important;
  }
  .fixed.top-24.right-0 {
    top: 1rem !important;
    right: 0.5rem !important;
  }
}

/* =========================
   MOBILE-FIXES.CSS END
   ========================= */

/* =========================
   MODERN-CURSOR.CSS START
   (Merged for debugging)
   ========================= */





/* =========================
   MODERN-PROJECTS.CSS START
   (Merged for debugging)
   ========================= */
/* Modern Projects Section Styles */

/* Filter Bar Styles */
.projects-filter-container {
    max-width: 1200px;
    margin: 0 auto;
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    color: #fff;
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.filter-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: #dc2626;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.filter-btn i {
    font-size: 1rem;
}

.filter-btn .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
}

.search-filter {
    position: relative;
    min-width: 280px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(31, 41, 55, 0.8);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Empty state styling */
.projects-grid .col-span-full {
    grid-column: 1 / -1;
}

/* Modern Project Cards */
.project-card-modern {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(31, 41, 55, 0.7));
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    cursor: pointer;
    height: auto;
    user-select: none;
}

.project-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card-modern:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(220, 38, 38, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(220, 38, 38, 0.2);
}

.project-card-modern:hover::before {
    opacity: 1;
}

.project-preview {
    position: relative;
    height: 240px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card-modern:hover .project-preview img {
    transform: scale(1.1);
}

.project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
    border-radius: 20px 20px 0 0;
    background: rgba(17, 24, 39, 0.5);
}

.project-card-modern:hover .project-thumbnail {
    transform: scale(1.1);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.9));
    position: relative;
}

.placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.project-card-modern:hover .placeholder-image::before {
    transform: translateX(100%);
}

.project-quick-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.project-card-modern:hover .project-quick-actions {
    opacity: 1;
    transform: translateY(0);
}

.quick-action {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.quick-action:hover {
    background: rgba(220, 38, 38, 0.8);
    border-color: #dc2626;
    transform: scale(1.1);
}

.project-summary {
    padding: 1.5rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-type {
    font-size: 0.75rem;
    color: #dc2626;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-date {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.project-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.project-brief {
    font-size: 0.875rem;
    color: #d1d5db;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tech-stack-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #e5e7eb;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: #fff;
}

.project-status {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    left: 0.75rem;
    animation: pulse 2s infinite;
}

.status-badge.published {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.status-badge.published::before {
    background: #10b981;
}

.status-badge.unpublished {
    background: linear-gradient(135deg, #7c2d12, #991b1b);
    color: #fca5a5;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.3);
}

.status-badge.unpublished::before {
    background: #f87171;
}

.status-badge.ongoing {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.status-badge.ongoing::before {
    background: #fbbf24;
}

.status-badge.expired {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #d1d5db;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.status-badge.expired::before {
    background: #9ca3af;
}

/* Project Modal Styles */
.project-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overscroll-behavior: contain;
}

.project-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.project-modal-container {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(31, 41, 55, 0.9));
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 24px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    overscroll-behavior: contain;
}

.project-modal-overlay.active .project-modal-container {
    transform: scale(1) translateY(0);
}

.project-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

.modal-title-section {
    flex: 1;
}

.modal-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.modal-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.category-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-close-btn {
    width: 44px;
    height: 44px;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.modal-close-btn:hover {
    background: rgba(220, 38, 38, 0.8);
    border-color: #dc2626;
    color: #fff;
}

.project-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
    overscroll-behavior: contain;
    -ms-overflow-style: scrollbar;
    scrollbar-width: thin;
    scrollbar-color: rgba(220, 38, 38, 0.5) rgba(31, 41, 55, 0.5);
}

.project-modal-content::-webkit-scrollbar {
    width: 8px;
}

.project-modal-content::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}

.project-modal-content::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.5);
    border-radius: 4px;
}

.project-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.7);
}

.modal-left {
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}

.project-gallery {
    position: sticky;
    top: 0;
}

.main-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(31, 41, 55, 0.5);
    margin-bottom: 1rem;
}

.main-image {
    width: 100%;
    height: 350px;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    transition: opacity 0.3s ease;
    background: rgba(17, 24, 39, 0.3);
}

.image-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image-container:hover .image-navigation {
    opacity: 1;
}

.nav-btn {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    user-select: none;
    pointer-events: auto;
    z-index: 10;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.8);
    border-color: #dc2626;
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.thumbnail-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: rgba(17, 24, 39, 0.3);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #dc2626;
    transform: scale(1.05);
}

.modal-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overscroll-behavior: contain;
}

.project-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-meta-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #d1d5db;
}

.meta-item i {
    color: #dc2626;
    width: 16px;
    font-size: 0.875rem;
}

.meta-item span:first-of-type {
    font-weight: 600;
    color: #9ca3af;
}

.project-description h3,
.tech-stack-section h3,
.features-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Custom CSS with Animations and Styling */

:root {
  --code-font: 'Fira Code', monospace;
  --primary-color: #dc2626;
  --secondary-color: #991b1b;
  --accent-color: #ef4444;
  --light-color: #f9fafb;
  --dark-color: #0a0a0a;
  --darker-color: #000000;
  --gray-color: #374151;
  --red-glow: rgba(220, 38, 38, 0.3);
  --red-light: rgba(239, 68, 68, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 0.375rem;
  --box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --red-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
  --vh: 1vh; /* Variable for viewport height fixes on mobile */
}

/* Base styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  position: relative;
  background: linear-gradient(135deg, 
    #000000 0%, 
    #0a0a0a 15%, 
    #0d1117 30%, 
    #161b22 45%, 
    #0a0a0a 60%, 
    #0d0d0d 75%, 
    #000000 100%);
  background-attachment: fixed;
  background-size: 100% 100%;
}

/* Support for dark mode */
html.dark {
  color-scheme: dark;
}

/* Improved mobile menu styles */
#mobile-menu {
  width: 100%;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

/* Extra small screen adjustments */
@media (max-width: 360px) {
  .text-xl {
    font-size: 1.1rem !important;
  }
  
  .h-16 {
    height: 3.5rem !important;
  }
  
  #mobile-menu-button {
    padding: 0.25rem !important;
  }
}

@media (max-width: 767px) {
  .max-w-7xl {
    width: 100%;
    padding: 0 1rem;
  }
  
  /* Fix font size on mobile */
  .text-5xl {
    font-size: 2.5rem !important;
  }
  
  /* Fix layout on mobile */
  .container {
    width: 100%;
    padding: 0 1rem;
  }
}

/* Profile Image Hover Effects - 3D Card Flip */
.profile-card {
  width: 320px;
  height: 320px;
  position: relative;
  perspective: 1500px;
  cursor: pointer;
  margin: 0 auto;
  transition: transform 0.5s ease;
}

.profile-card:hover {
  transform: translateY(-10px);
}

@media (min-width: 768px) {
  .profile-card {
    width: 340px;
    height: 340px;
  }
}

/* Modern frame with smoother edges */
.profile-frame {
  position: absolute;
  width: 100%;
  height: 100%;
  background: none; /* Remove bloom background */
  border-radius: 50%;
  box-shadow: none; /* Remove heavy shadow */
  border: 3px solid var(--primary-color);
  animation: none; /* Remove frameGlow animation */
  z-index: 1;
}

.profile-frame::before {
  content: none; /* Remove bloom pseudo-element entirely */
}

/* Profile image with improved shape */
.profile-image-container {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  transition: transform 0.5s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.profile-card:hover .profile-image-container {
  transform: scale(1.05);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) brightness(1.05);
  transition: filter 0.3s ease, transform 0.5s ease;
}

.profile-card:hover .profile-image {
  transform: scale(1.1);
}

/* Glitch effect overlay - improved cleaner version */
.glitch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0.5;
}

.glitch-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-layer:nth-child(1) {
  background: var(--primary-color);
  mix-blend-mode: overlay;
  animation: glitch1 6s infinite;
  filter: blur(1px);
}

.glitch-layer:nth-child(2) {
  background: var(--accent-color);
  mix-blend-mode: color-dodge;
  animation: glitch2 4s infinite;
  filter: blur(0.5px);
}

/* Improved "Click Me" arrow */
.click-arrow {
  position: absolute;
  right: -40px;
  top: 15%;
  z-index: 10;
  pointer-events: none;
}

.arrow-bubble {
  background: var(--light-color);
  color: var(--darker-color);
  padding: 8px 15px;
  border-radius: 20px 20px 20px 5px;
  font-size: 14px;
  font-weight: bold;
  border: 3px solid var(--primary-color);
  position: relative;
  transform: rotate(-15deg);
  animation: bounce 2s infinite, wiggle 3s infinite;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Profile card flip functionality with improved animation - fixed for Firefox */
.profile-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-card:hover .profile-card-inner {
  transform: rotateY(180deg);
}

.profile-card-front, .profile-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 50%;
}

/* Front card stays visible by default */
.profile-card-front {
  z-index: 2; /* Higher z-index by default */
  transform: rotateY(0deg);
}

/* Fix for Firefox - front disappears when flipped */
.profile-card:hover .profile-card-front {
  z-index: 1; /* Lower z-index when card is flipped */
}

.profile-card-back {
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a); 
  color: var(--light-color);
  transform: rotateY(180deg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid var(--primary-color);
  box-shadow: var(--red-shadow);
  position: relative;
  overflow: hidden;
  z-index: 1; /* Lower z-index by default */
}

/* Fix for Firefox - back becomes visible when flipped */
.profile-card:hover .profile-card-back {
  z-index: 2; /* Higher z-index when card is flipped */
}

.profile-card-back::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, var(--primary-color), transparent, var(--primary-color));
  z-index: -1;
  opacity: 0.2;
  animation: rotateGradient 8s linear infinite;
  filter: blur(10px);
}

.profile-card-back h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--light-color);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.profile-card-back p {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: var(--accent-color);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin: 1.2rem 0;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0.5rem 0.75rem;
  background-color: rgba(220, 38, 38, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.profile-stat:hover {
  transform: translateY(-5px);
  background-color: rgba(220, 38, 38, 0.2);
}

.profile-stat::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 30%;
  height: 3px;
  background-color: var(--primary-color);
  transform: translateX(-50%);
  border-radius: 2px;
}

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--light-color);
  text-shadow: 0 0 5px rgba(220, 38, 38, 0.5);
}

.profile-stat-label {
  font-size: 0.8rem;
  color: #aaa;
}

.profile-social-icons {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.profile-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #101010, #1a1a1a);
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.profile-social-icon:hover {
  transform: translateY(-5px) rotate(5deg);
  background: var(--primary-color);
  color: var(--light-color);
  box-shadow: 0 5px 15px rgba(220, 38, 38, 0.5);
}

@keyframes frameGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
  }
}

@keyframes borderPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.03);
  }
}

@keyframes glitch1 {
  0%, 100% {
    opacity: 0;
  }
  10%, 15% {
    opacity: 0.3;
    transform: translate(-5px, 2px);
  }
  20%, 25% {
    opacity: 0;
  }
  30%, 35% {
    opacity: 0.3;
    transform: translate(5px, -2px);
  }
}

@keyframes glitch2 {
  0%, 100% {
    opacity: 0;
  }
  25%, 30% {
    opacity: 0.3;
    transform: translate(-5px, -2px);
  }
  45%, 50% {
    opacity: 0;
  }
  60%, 65% {
    opacity: 0.3;
    transform: translate(5px, 2px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) rotate(-15deg);
  }
  50% {
    transform: translateY(-10px) rotate(-15deg);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(-15deg);
  }
  25% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(-18deg);
  }
  75% {
    transform: rotate(-12deg);
  }
}

@keyframes pointPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateY(-50%) rotate(45deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) rotate(45deg) scale(1.2);
  }
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hover effects */
.profile-card:hover .profile-image-container {
  transform: rotate(-5deg) scale(1.25);
}

.profile-card:hover .profile-image {
  filter: contrast(1.2) brightness(1.1) hue-rotate(10deg);
}

.profile-card:hover .click-arrow {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.5s ease;
}

.profile-card:hover .glitch-layer:nth-child(1) {
  animation: glitchActive1 0.3s infinite;
}

.profile-card:hover .glitch-layer:nth-child(2) {
  animation: glitchActive2 0.3s infinite;
}

/* Keyframe animations */
@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navigation with unique styling */
.nav-link {
  position: relative;
  font-weight: 500;
  padding: 0.5rem;
  transition: var(--transition);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--red-light), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
  border-radius: 3px;
  box-shadow: 0 0 5px var(--red-glow);
}

.nav-link:hover::after {
  width: 100%;
}

/* Unique button styles */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  color: white;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(220, 38, 38, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.7s ease;
  z-index: -1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0), rgba(255,255,255,0.1), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(220, 38, 38, 0.5);
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Hexagonal design elements */
.hex-element {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Glitch text effect for headings */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-text::before {
  color: var(--primary-color);
  animation: glitchText1 3s infinite;
}

.glitch-text::after {
  color: var(--accent-color);
  animation: glitchText2 3s infinite;
}

@keyframes glitchText1 {
  0%, 100% { transform: translate(0); opacity: 0; }
  1% { transform: translate(-2px, 2px); opacity: 0.7; }
  2% { transform: translate(0); opacity: 0; }
  3% { transform: translate(2px, -2px); opacity: 0.5; }
  4% { transform: translate(0); opacity: 0; }
}

/* Custom CSS with Animations and Styling */

:root {
  --code-font: 'Fira Code', monospace;
  --primary-color: #dc2626;
  --secondary-color: #991b1b;
  --accent-color: #ef4444;
  --light-color: #f9fafb;
  --dark-color: #0a0a0a;
  --darker-color: #000000;
  --gray-color: #374151;
  --red-glow: rgba(220, 38, 38, 0.3);
  --red-light: rgba(239, 68, 68, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 0.375rem;
  --box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --red-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
  --vh: 1vh; /* Variable for viewport height fixes on mobile */
}

/* Base styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  position: relative;
  background: linear-gradient(135deg, 
    #000000 0%, 
    #0a0a0a 15%, 
    #0d1117 30%, 
    #161b22 45%, 
    #0a0a0a 60%, 
    #0d0d0d 75%, 
    #000000 100%);
  background-attachment: fixed;
  background-size: 100% 100%;
}

/* Support for dark mode */
html.dark {
  color-scheme: dark;
}

/* Improved mobile menu styles */
#mobile-menu {
  width: 100%;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

/* Extra small screen adjustments */
@media (max-width: 360px) {
  .text-xl {
    font-size: 1.1rem !important;
  }
  
  .h-16 {
    height: 3.5rem !important;
  }
  
  #mobile-menu-button {
    padding: 0.25rem !important;
  }
}

@media (max-width: 767px) {
  .max-w-7xl {
    width: 100%;
    padding: 0 1rem;
  }
  
  /* Fix font size on mobile */
  .text-5xl {
    font-size: 2.5rem !important;
  }
  
  /* Fix layout on mobile */
  .container {
    width: 100%;
    padding: 0 1rem;
  }
}

/* Profile Image Hover Effects - 3D Card Flip */
.profile-card {
  width: 320px;
  height: 320px;
  position: relative;
  perspective: 1500px;
  cursor: pointer;
  margin: 0 auto;
  transition: transform 0.5s ease;
}

.profile-card:hover {
  transform: translateY(-10px);
}

@media (min-width: 768px) {
  .profile-card {
    width: 340px;
    height: 340px;
  }
}

/* Modern frame with smoother edges */
.profile-frame {
  position: absolute;
  width: 100%;
  height: 100%;
  background: none; /* Remove bloom background */
  border-radius: 50%;
  box-shadow: none; /* Remove heavy shadow */
  border: 3px solid var(--primary-color);
  animation: none; /* Remove frameGlow animation */
  z-index: 1;
}

.profile-frame::before {
  content: none; /* Remove bloom pseudo-element entirely */
}

/* Profile image with improved shape */
.profile-image-container {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  transition: transform 0.5s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.profile-card:hover .profile-image-container {
  transform: scale(1.05);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) brightness(1.05);
  transition: filter 0.3s ease, transform 0.5s ease;
}

.profile-card:hover .profile-image {
  transform: scale(1.1);
}

/* Glitch effect overlay - improved cleaner version */
.glitch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0.5;
}

.glitch-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-layer:nth-child(1) {
  background: var(--primary-color);
  mix-blend-mode: overlay;
  animation: glitch1 6s infinite;
  filter: blur(1px);
}

.glitch-layer:nth-child(2) {
  background: var(--accent-color);
  mix-blend-mode: color-dodge;
  animation: glitch2 4s infinite;
  filter: blur(0.5px);
}

/* Improved "Click Me" arrow */
.click-arrow {
  position: absolute;
  right: -40px;
  top: 15%;
  z-index: 10;
  pointer-events: none;
}

.arrow-bubble {
  background: var(--light-color);
  color: var(--darker-color);
  padding: 8px 15px;
  border-radius: 20px 20px 20px 5px;
  font-size: 14px;
  font-weight: bold;
  border: 3px solid var(--primary-color);
  position: relative;
  transform: rotate(-15deg);
  animation: bounce 2s infinite, wiggle 3s infinite;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Profile card flip functionality with improved animation - fixed for Firefox */
.profile-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-card:hover .profile-card-inner {
  transform: rotateY(180deg);
}

.profile-card-front, .profile-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 50%;
}

/* Front card stays visible by default */
.profile-card-front {
  z-index: 2; /* Higher z-index by default */
  transform: rotateY(0deg);
}

/* Fix for Firefox - front disappears when flipped */
.profile-card:hover .profile-card-front {
  z-index: 1; /* Lower z-index when card is flipped */
}

.profile-card-back {
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a); 
  color: var(--light-color);
  transform: rotateY(180deg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid var(--primary-color);
  box-shadow: var(--red-shadow);
  position: relative;
  overflow: hidden;
  z-index: 1; /* Lower z-index by default */
}

/* Fix for Firefox - back becomes visible when flipped */
.profile-card:hover .profile-card-back {
  z-index: 2; /* Higher z-index when card is flipped */
}

.profile-card-back::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, var(--primary-color), transparent, var(--primary-color));
  z-index: -1;
  opacity: 0.2;
  animation: rotateGradient 8s linear infinite;
  filter: blur(10px);
}

.profile-card-back h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--light-color);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.profile-card-back p {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: var(--accent-color);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin: 1.2rem 0;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0.5rem 0.75rem;
  background-color: rgba(220, 38, 38, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.profile-stat:hover {
  transform: translateY(-5px);
  background-color: rgba(220, 38, 38, 0.2);
}

.profile-stat::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 30%;
  height: 3px;
  background-color: var(--primary-color);
  transform: translateX(-50%);
  border-radius: 2px;
}

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--light-color);
  text-shadow: 0 0 5px rgba(220, 38, 38, 0.5);
}

.profile-stat-label {
  font-size: 0.8rem;
  color: #aaa;
}

.profile-social-icons {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.profile-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #101010, #1a1a1a);
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.profile-social-icon:hover {
  transform: translateY(-5px) rotate(5deg);
  background: var(--primary-color);
  color: var(--light-color);
  box-shadow: 0 5px 15px rgba(220, 38, 38, 0.5);
}

@keyframes frameGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
  }
}

@keyframes borderPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.03);
  }
}

@keyframes glitch1 {
  0%, 100% {
    opacity: 0;
  }
  10%, 15% {
    opacity: 0.3;
    transform: translate(-5px, 2px);
  }
  20%, 25% {
    opacity: 0;
  }
  30%, 35% {
    opacity: 0.3;
    transform: translate(5px, -2px);
  }
}

@keyframes glitch2 {
  0%, 100% {
    opacity: 0;
  }
  25%, 30% {
    opacity: 0.3;
    transform: translate(-5px, -2px);
  }
  45%, 50% {
    opacity: 0;
  }
  60%, 65% {
    opacity: 0.3;
    transform: translate(5px, 2px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) rotate(-15deg);
  }
  50% {
    transform: translateY(-10px) rotate(-15deg);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(-15deg);
  }
  25% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(-18deg);
  }
  75% {
    transform: rotate(-12deg);
  }
}

@keyframes pointPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateY(-50%) rotate(45deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) rotate(45deg) scale(1.2);
  }
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hover effects */
.profile-card:hover .profile-image-container {
  transform: rotate(-5deg) scale(1.25);
}

.profile-card:hover .profile-image {
  filter: contrast(1.2) brightness(1.1) hue-rotate(10deg);
}

.profile-card:hover .click-arrow {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.5s ease;
}

.profile-card:hover .glitch-layer:nth-child(1) {
  animation: glitchActive1 0.3s infinite;
}

.profile-card:hover .glitch-layer:nth-child(2) {
  animation: glitchActive2 0.3s infinite;
}

/* Keyframe animations */
@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navigation with unique styling */
.nav-link {
  position: relative;
  font-weight: 500;
  padding: 0.5rem;
  transition: var(--transition);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--red-light), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
  border-radius: 3px;
  box-shadow: 0 0 5px var(--red-glow);
}

.nav-link:hover::after {
  width: 100%;
}

/* Unique button styles */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  color: white;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(220, 38, 38, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.7s ease;
  z-index: -1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0), rgba(255,255,255,0.1), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(220, 38, 38, 0.5);
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Hexagonal design elements */
.hex-element {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Glitch text effect for headings */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-text::before {
  color: var(--primary-color);
  animation: glitchText1 3s infinite;
}

.glitch-text::after {
  color: var(--accent-color);
  animation: glitchText2 3s infinite;
}

@keyframes glitchText1 {
  0%, 100% { transform: translate(0); opacity: 0; }
  1% { transform: translate(-2px, 2px); opacity: 0.7; }
  2% { transform: translate(0); opacity: 0; }
  3% { transform: translate(2px, -2px); opacity: 0.5; }
  4% { transform: translate(0); opacity: 0; }
}

@keyframes glitchText2 {
  0%, 100% { transform: translate(0); opacity: 0; }
  2% { transform: translate(1px, -1px); opacity: 0.6; }
  3% { transform: translate(0); opacity: 0; }
  4% { transform: translate(-1px, 1px); opacity: 0.8; }
  5% { transform: translate(0); opacity: 0; }
}

/* Additional cyberpunk text effects */
.cyberpunk-text {
  text-shadow: 0 0 2px rgba(220, 38, 38, 0.4);
  transition: text-shadow 0.3s ease;
}

.cyberpunk-text:hover {
  text-shadow: 0 0 4px rgba(220, 38, 38, 0.8);
}

/* Occasional glitch animation */
@keyframes text-glitch {
  0% {
    transform: translate(0);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
  2% {
    transform: translate(-2px, 1px);
    text-shadow: -1px 0 1px rgba(220, 38, 38, 0.5), 1px -1px 1px rgba(0, 255, 255, 0.5);
  }
  4% {
    transform: translate(0);
    text-shadow: -1px 0 1px rgba(220, 38, 38, 0.5), 3px -1px 1px rgba(0, 255, 255, 0.5);
  }
  6% {
    transform: translate(0);
    text-shadow: -1px -1px 0 rgba(220, 38, 38, 0.5), 0px 1px 0 rgba(0, 255, 255, 0.5);
  }
  8% {
    transform: translate(0);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
  100% {
    transform: translate(0);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
}

.glitch-active {
  animation: text-glitch 3s infinite;
}

/* Edgy Scrollbar */
::-webkit-scrollbar {
  width: 6px; /* Thinner width for more modern look */
}

::-webkit-scrollbar-track {
  background: var(--dark-color);
  border-left: 1px solid rgba(220, 38, 38, 0.1); /* Subtle red border */
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color); /* Solid color for cleaner look */
  border-radius: 0; /* Sharp edges for edgy look */
  box-shadow: inset 0 0 3px var(--red-glow); /* Inset shadow for depth */
  border-left: 1px solid rgba(239, 68, 68, 0.5); /* Highlight edge */
  border-right: 1px solid rgba(153, 27, 27, 0.5); /* Shadow edge */
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
  box-shadow: inset 0 0 5px var(--red-glow); /* Stronger glow on hover */
}

/* For Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--dark-color);
}

/* Hero Section */
.hero-blob {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.2), rgba(153, 27, 27, 0.05), rgba(220, 38, 38, 0.15));
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  filter: blur(25px);
  animation: blob-animation 15s infinite alternate, blob-pulse 5s infinite alternate, blob-rotate 20s infinite linear;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-blob-secondary {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.1), rgba(153, 27, 27, 0.2));
  border-radius: 60% 40% 30% 70% / 40% 50% 60% 50%;
  filter: blur(8px);
  animation: blob-animation-secondary 15s infinite alternate, blob-pulse-secondary 4s infinite alternate, blob-rotate-secondary 25s infinite linear;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.7;
}

@keyframes blob-animation {
  0% {
    border-radius: 30% 70% 60% 40% / 40% 50% 60% 50%;
    transform: translate(-50%, -50%) scale(1);
  }
  25% {
    border-radius: 35% 65% 65% 35% / 35% 65% 35% 65%;
  }
  50% {
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    transform: translate(-50%, -50%) scale(1.05);
  }
  75% {
    border-radius: 40% 60% 50% 50% / 40% 40% 60% 60%;
  }
  100% {
    border-radius: 30% 70% 60% 40% / 40% 50% 60% 50%;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes blob-pulse {
  0% {
    box-shadow: 0 0 30px 10px rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 0 50px 15px rgba(220, 38, 38, 0.3);
  }
  100% {
    box-shadow: 0 0 30px 10px rgba(220, 38, 38, 0.2);
  }
}

@keyframes blob-rotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes blob-animation-secondary {
  0% {
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
  50% {
    border-radius: 40% 60% 60% 40% / 40% 60% 40% 60%;
    transform: translate(-50%, -50%) rotate(25deg) scale(1.08);
  }
  100% {
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
}

@keyframes blob-pulse-secondary {
  0% {
    box-shadow: 0 0 30px 5px rgba(239, 68, 68, 0.15);
  }
  100% {
    box-shadow: 0 0 40px 10px rgba(239, 68, 68, 0.25);
  }
}

@keyframes blob-rotate-secondary {
  0% {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(405deg);
  }
}

.typing-text {
  display: inline-block;
  position: relative;
  font-weight: bold;
  padding: 0 5px;
}

/* Remove custom cursor - letting Typed.js handle the cursor */
/* 
.typing-text::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 5%;
  height: 90%;
  width: 2px;
  background-color: var(--primary-color);
  animation: cursor-blink 1.2s infinite;
}
*/

/* Typed.js cursor styling */
.typed-cursor {
  color: var(--primary-color);
  font-weight: normal;
  animation: cursor-blink 1.2s infinite;
  opacity: 1;
}

@keyframes cursor-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* About Section */
.about-image-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.about-image {
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 0.5s ease;
  border-radius: 10px;
}

.about-image-wrapper:hover .about-image {
  transform: scale(1.05);
}

.about-image-wrapper::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  opacity: 0.2;
  z-index: -1;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  border-radius: 50%;
  opacity: 0.2;
  z-index: -1;
}

.about-info-item {
  margin-bottom: 0.5rem;
}

.about-info-title {
  font-weight: 600;
  color: #d1d5db;
  margin-right: 0.5rem;
}

.dark .about-info-title {
  color: #d1d5db;
}

.about-info-value {
  color: var(--primary-color);
  font-weight: 500;
}

.about-social {
  margin-top: 1.5rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  color: #d1d5db;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(220, 38, 38, 0.4);
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dark .social-icon {
  background-color: rgba(0, 0, 0, 0.8);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(220, 38, 38, 0.5);
}

.social-icon:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(220, 38, 38, 0.4);
  border-color: transparent;
}

.social-icon:hover::before {
  opacity: 1;
}

.contact-social .social-icon {
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
}

/* Skills Section */
.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 9999px;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
  position: relative;
  overflow: hidden;
}

.skill-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0) 100%);
  width: 45px;
  height: 100%;
  animation: shimmer 2s infinite;
  transform: skewX(-20deg);
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) skewX(-20deg);
  }
  100% {
    transform: translateX(400%) skewX(-20deg);
  }
}

.skill-item {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  border: 1px solid rgba(220, 38, 38, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.skill-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(220, 38, 38, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.skill-item:hover::before {
  opacity: 1;
  animation: skill-shimmer 3s infinite alternate;
}

.featured-skill {
  border: 1px solid rgba(220, 38, 38, 0.3);
  background-color: rgba(220, 38, 38, 0.05);
}

.featured-skill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 25px;
  height: 25px;
  background: linear-gradient(135deg, transparent 50%, var(--primary-color) 50%);
  z-index: 1;
}

.skill-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skill-tag {
  font-size: 0.7rem;
  color: var(--primary-color);
  margin-top: 0.25rem;
  font-family: var(--code-font);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.skill-item:hover .skill-tag {
  opacity: 1;
  transform: translateY(2px);
}

@keyframes skill-shimmer {
  0% {
    opacity: 0.1;
    background-position: -100% 0;
  }
  100% {
    opacity: 0.3;
    background-position: 200% 0;
  }
}

.dark .skill-item {
  background-color: rgba(31, 41, 55, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--darker-color), #1a1a1a);
  color: var(--primary-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  position: relative;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.skill-icon.ionic-icon {
  color: #3880ff;
  animation: ionic-glow 3s infinite alternate;
}

.skill-icon.react-icon {
  color: #61dafb;
  animation: react-spin 8s linear infinite;
}

.skill-icon.nodejs-icon {
  color: #68a063;
}

.skill-icon.bootstrap-icon {
  color: #7952b3;
}

.skill-icon.mysql-icon {
  color: #4479a1;
}

.skill-icon.git-icon {
  color: #f05032;
}

.skill-icon.laravel-icon {
  color: #ff2d20;
}

.skill-icon.aws-icon {
  color: #ff9900;
}

.skill-icon.docker-icon {
  color: #2496ed;
}

@keyframes react-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.skill-item:hover .react-icon i {
  animation: react-spin 3s linear infinite;
}

/* Enhanced grid layout for framework items */
@media (min-width: 768px) {
  .skill-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  .skill-item:nth-child(odd):hover {
    transform: translateY(-10px) rotate(-1deg);
  }
  
  .skill-item:nth-child(even):hover {
    transform: translateY(-10px) rotate(1deg);
  }
}

/* Framework badge */
.framework-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 10px;
  transform: rotate(15deg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  font-family: var(--code-font);
  opacity: 0;
  transition: all 0.3s ease;
}

.skill-item:hover .framework-badge {
  opacity: 1;
  animation: badge-pulse 1s ease infinite alternate;
}

@keyframes badge-pulse {
  0% {
    transform: rotate(15deg) scale(1);
  }
  100% {
    transform: rotate(15deg) scale(1.1);
  }
}

/* Framework section header styling */
.framework-title {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.tech-badge {
  font-family: var(--code-font);
  font-size: 0.7rem;
  white-space: nowrap;
}

.code-keyword {
  color: #569CD6;
}

.code-var {
  color: #9CDCFE;
}

.code-string {
  color: #CE9178;
}

@media (max-width: 640px) {
  .tech-badge {
    display: none;
  }
}

/* Back to Top Button - Modern Design */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(100px) scale(0.8);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 999;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(220, 38, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.back-to-top.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.backtop-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 3;
  transition: all 0.4s ease;
}

.back-to-top i {
  font-size: 1.3rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.backtop-ring {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 12px;
  background: linear-gradient(45deg, 
    var(--primary-color), 
    rgba(220, 38, 38, 0.6), 
    transparent,
    rgba(220, 38, 38, 0.6),
    var(--primary-color)
  );
  opacity: 0;
  z-index: 1;
  animation: pulse-glow 2s ease-in-out infinite alternate;
  transition: opacity 0.3s ease;
}

.backtop-tooltip {
  position: absolute;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(180, 30, 30, 0.9));
  backdrop-filter: blur(10px);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  right: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) translateX(15px) scale(0.8);
  white-space: nowrap;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.backtop-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(220, 38, 38, 0.9);
}

.back-to-top:hover .backtop-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

.back-to-top:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.4);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 4px 20px rgba(220, 38, 38, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.back-to-top:hover .backtop-ring {
  opacity: 1;
  animation: pulse-glow 1s ease-in-out infinite alternate;
}

.back-to-top:hover i {
  color: #ffffff;
  transform: translateY(-4px) scale(1.1);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.back-to-top:active {
  transform: translateY(-6px) scale(1.02);
  transition: all 0.2s ease;
}

@keyframes pulse-glow {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 0.6;
    transform: scale(1.02);
  }
}

@media (max-width: 640px) {
  .back-to-top {
    width: 42px;
    height: 42px;
    bottom: 20px;
    right: 20px;
    border-radius: 10px;
  }
  
  .back-to-top i {
    font-size: 1.0rem;
  }
  
  .backtop-ring {
    border-radius: 10px;
  }
  
  .backtop-tooltip {
    display: none;
  }
  
  .back-to-top:hover {
    transform: translateY(-4px) scale(1.03);
  }
}

/* Footer styling with red accents */
footer {
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  opacity: 0.6;
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center top, rgba(220, 38, 38, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Enhanced Contact Form */
.terminal-form-wrapper {
  position: relative;
  overflow: hidden;
}

.terminal-form-wrapper::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(15px);
}

.terminal-form-wrapper::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(20px);
}

.terminal-input {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: white;
  padding: 0.75rem;
  border-radius: 0.25rem;
  width: 100%;
  font-family: var(--code-font);
  transition: all 0.3s ease;
  resize: none;
  position: relative;
  overflow: hidden;
}

.terminal-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.terminal-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  background-color: rgba(0, 0, 0, 0.6);
}

.terminal-input:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.terminal-button-submit {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.terminal-button-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent);
  transform: rotate(45deg);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 0;
}

.terminal-button-submit:hover::after {
  opacity: 1;
  left: 100%;
  top: 100%;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: translateX(-50%) translateY(-8px) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateX(-50%) translateY(-8px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-8px) scale(1);
    opacity: 0.5;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Cyberpunk Typing Animation Effect */
.cyberpunk-text {
  position: relative;
  display: inline-block;
  font-family: var(--code-font);
}

.cyberpunk-text::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--accent-color);
  animation: cyberpunk-cursor 0.8s infinite;
}

@keyframes cyberpunk-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cyberpunk-glitch {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent-color);
  z-index: 1;
  mix-blend-mode: difference;
  animation: cyberpunk-glitch 0.1s ease infinite;
  opacity: 0.5;
}

@keyframes cyberpunk-glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

/* Container for cyberpunk animation */
.cyberpunk-container {
  position: relative;
  overflow: hidden;
  display: block;
}

/* Animated paragraph text */
.animated-about-text {
  min-height: 5.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.cyberpunk-typing {
  position: relative;
  display: inline;
  color: var(--light-color);
}

.reveal-cursor {
  color: var(--accent-color);
  opacity: 0;
  animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .about-image-wrapper::before,
  .about-image-wrapper::after {
    display: none;
  }
  
  .hero-blob {
    width: 300px;
    height: 300px;
  }
}

/* Dark mode specific styles */
.dark .skill-progress {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.dark .loading {
  background: #111827;
}

.loading.hide {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(220, 38, 38, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Reveal animations */
.reveal {
  position: relative;
  opacity: 0;
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
}

.reveal.fade-bottom {
  transform: translateY(20px);
}

.reveal.fade-bottom.active {
  transform: translateY(0);
}

.reveal.fade-left {
  transform: translateX(-20px);
}

.reveal.fade-left.active {
  transform: translateX(0);
}

.reveal.fade-right {
  transform: translateX(20px);
}

.reveal.fade-right.active {
  transform: translateX(0);
}

/* Enhanced Project Cards */
.project-card {
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  border: 1px solid rgba(220, 38, 38, 0.2);
  position: relative;
  z-index: 1;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, transparent 20%, rgba(220, 38, 38, 0.1), transparent 80%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.5s ease;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.dark .project-card {
  background-color: rgba(17, 24, 39, 0.8);
  border-color: rgba(220, 38, 38, 0.2);
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
}

.project-card:hover::before {
  opacity: 1;
  animation: card-shimmer 2s infinite alternate;
}

.project-card:hover::after {
  transform: scaleX(1);
}

@keyframes card-shimmer {
  0% {
    opacity: 0.1;
  }
  100% {
    opacity: 0.3;
  }
}

.project-img {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
  filter: saturate(0.9) contrast(1.1);
}

.project-card:hover .project-img img {
  transform: scale(1.1) rotate(2deg);
  filter: saturate(1.1) contrast(1.2);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0.3), 
    rgba(220, 38, 38, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  backdrop-filter: blur(3px);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 15px;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  opacity: 0;
}

.project-card:hover .project-links {
  transform: translateY(0);
  opacity: 1;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
}

.project-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.project-info {
  padding: 1.5rem;
  position: relative;
  background: linear-gradient(to bottom, 
    rgba(17, 24, 39, 0.6),
    rgba(17, 24, 39, 0.8));
  transition: all 0.3s ease;
}

.project-card:hover .project-info {
  background: linear-gradient(to bottom, 
    rgba(17, 24, 39, 0.7),
    rgba(17, 24, 39, 0.9));
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
  position: relative;
  display: inline-block;
}

.project-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.project-card:hover .project-title::after {
  width: 100%;
}

.project-description {
  color: #d1d5db;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background-color: rgba(0, 0, 0, 0.4);
  color: #d1d5db;
  border-radius: 4px;
  font-family: var(--code-font);
  border: 1px solid rgba(220, 38, 38, 0.3);
  transition: all 0.3s ease;
}

.project-card:hover .project-tech span {
  background-color: rgba(220, 38, 38, 0.2);
  color: #f3f4f6;
  transform: translateY(-2px);
}

/* Project section heading */
#projects .section-title {
  position: relative;
  display: inline-block;
}

#projects .section-title::before,
#projects .section-title::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  border: 2px solid var(--primary-color);
  opacity: 0.3;
}

#projects .section-title::before {
  top: -10px;
  left: -15px;
  border-right: none;
  border-bottom: none;
}

#projects .section-title::after {
  bottom: -10px;
  right: -15px;
  border-left: none;
  border-top: none;
}

/* Enhanced grid for project cards */
@media (min-width: 1024px) {
  .project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .project-card:nth-child(3n+1) {
    transform: translateY(20px);
  }
  
  .project-card:nth-child(3n+3) {
    transform: translateY(-20px);
  }
  
  .project-card:nth-child(3n+1):hover {
    transform: translateY(10px) scale(1.02);
  }
  
  .project-card:nth-child(3n+3):hover {
    transform: translateY(-30px) scale(1.02);
  }
}

/* Quick Navigation Cards for Home Section */
.quick-nav-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.quick-nav-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.quick-nav-card:active {
  transform: translateY(-4px);
}

/* Mobile responsiveness for quick nav cards */
@media (max-width: 640px) {
  .quick-nav-card {
    padding: 1rem;
  }
  
  .quick-nav-card h3 {
    font-size: 1rem;
  }
  
  .quick-nav-card p {
    font-size: 0.8rem;
  }
  
  .quick-nav-card .text-3xl {
    font-size: 1.5rem;
  }
}

/* Enhanced typing animation styles */
.typing-text {
  position: relative;
  display: inline-block;
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from {
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
  }
  to {
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.6), 0 0 30px rgba(220, 38, 38, 0.4);
  }
}

/* Scroll indicator animation */
.animate-bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0,-30px,0);
  }
  70% {
    transform: translate3d(0,-15px,0);
  }
  90% {
    transform: translate3d(0,-4px,0);
  }
}

/* About section profile image enhancements */
.about-profile-container {
  position: relative;
  overflow: hidden;
}

.about-profile-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(220, 38, 38, 0.3), transparent 30%);
  animation: rotate 4s linear infinite;
  border-radius: 50%;
}

.about-profile-container::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: #000;
  border-radius: inherit;
  z-index: 1;
}

/* Cyberpunk text effect for about section */
.cyberpunk-text {
  position: relative;
  color: inherit;
  transition: all 0.3s ease;
}

.cyberpunk-text:hover {
  text-shadow: 0 0 5px currentColor;
}

/* Improved mobile layout for about section */
@media (max-width: 1023px) {
  .about-profile-container {
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
  }
  
  #about .lg\:w-1\/3 {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  #about .lg\:w-2\/3 {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .about-profile-container {
    width: 250px;
    height: 250px;
  }
  
  #about h3 {
    font-size: 1.5rem;
  }
  
  #about .text-lg {
    font-size: 1rem;
  }
  
  #about .grid {
    grid-template-columns: 1fr;
  }
  
  /* Stack action buttons on mobile */
  #about .flex-wrap {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  #about .inline-flex {
    justify-content: center;
    width: 100%;
  }
}

/* Enhanced button hover effects */
.btn-primary, .btn-secondary {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before, .btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
  left: 100%;
}

/* Grid layout improvements for mobile */
@media (max-width: 767px) {
  .grid {
    gap: 1rem;
  }
  
  .grid-cols-1 {
    grid-template-columns: 1fr;
  }
  
  .sm\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Container and spacing adjustments for mobile */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .mb-16 {
    margin-bottom: 2rem;
  }
  
  .mb-12 {
    margin-bottom: 2rem;
  }
  
  .gap-12 {
    gap: 2rem;
  }
}

/* Text size adjustments for very small screens */
@media (max-width: 360px) {
  .text-4xl {
    font-size: 1.875rem !important;
  }
  
  .text-5xl {
    font-size: 2.25rem !important;
  }
  
  .text-7xl {
    font-size: 3rem !important;
  }
  
  .text-xl {
    font-size: 1.125rem !important;
  }
  
  .text-2xl {
    font-size: 1.25rem !important;
  }
  
  .text-3xl {
    font-size: 1.5rem !important;
  }
}

/* Enhanced typing animation states */
.typing-text.typing-active {
  text-shadow: 0 0 15px rgba(220, 38, 38, 0.8), 0 0 25px rgba(220, 38, 38, 0.6);
  transform: scale(1.02);
  transition: all 0.2s ease;
}

/* Scroll indicator responsive adjustments */
@media (max-width: 640px) {
  .animate-bounce {
    bottom: 1rem;
  }
  
  .animate-bounce svg {
    height: 1.5rem;
    width: 1.5rem;
  }
}

/* Profile image container improvements */
.about-profile-container img {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-profile-container:hover img {
  transform: scale(1.05);
}

/* Skills highlight cards hover effects */
.bg-gradient-to-r:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Improved focus states for accessibility */
.quick-nav-card:focus,
.btn-primary:focus,
.btn-secondary:focus {
  outline: 2px solid rgba(220, 38, 38, 0.6);
  outline-offset: 2px;
}

/* Loading states for better UX */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Dark mode specific adjustments */
.dark .loading-shimmer {
  background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
  background-size: 200% 100%;
}

/* Password Modal Styles - Fix for broken modal */
.password-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
}

.password-modal.active {
  display: flex;
  opacity: 1;
}

.password-modal-content {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 20, 0.95));
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
              0 0 30px rgba(220, 38, 38, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-modal.active .password-modal-content {
  transform: scale(1) translateY(0);
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.pin-digit {
  width: 3rem;
  height: 3rem;
  border: 2px solid rgba(220, 38, 38, 0.3);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #dc2626;
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Fira Code', monospace;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.pin-digit:hover {
  border-color: rgba(220, 38, 38, 0.6);
  background: rgba(220, 38, 38, 0.05);
}

.pin-digit.filled {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.pin-digit.filled::after {
  content: '●';
  color: #dc2626;
  font-size: 1.5rem;
}

/* Add focus indicator for active PIN input */
.password-modal.active .pin-digit {
  animation: pinPulse 2s infinite;
}

@keyframes pinPulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
  }
}

.password-input {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 1px;
  opacity: 0;
  z-index: -1;
  border: none;
  background: transparent;
  color: transparent;
  outline: none;
  caret-color: transparent;
}

.password-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: 'Fira Code', monospace;
}

.password-error.show {
  opacity: 1;
}

.password-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}

.password-button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 600;
  font-size:     0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.password-cancel {
  background: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.password-cancel:hover {
  background: rgba(107, 114, 128, 0.3);
  transform: translateY(-1px);
}

.password-submit {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  border: 1px solid rgba(220, 38, 38, 0.5);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.password-submit:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.password-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Glitch effect for password modal header */
.password-modal h3 {
  position: relative;
  font-family: 'Fira Code', monospace;
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.password-modal h3::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #00ffff;
  z-index: -1;
  animation: glitch-1 0.5s infinite alternate-reverse;
}

.password-modal h3::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #ff0040;
  z-index: -2;
  animation: glitch-2 0.5s infinite alternate-reverse;
}

@keyframes glitch-1 {
  0% {
    clip-path: inset(40% 0 61% 0);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
  }
  40% {
    clip-path: inset(43% 0 1% 0);
  }
  60% {
    clip-path: inset(25% 0 58% 0);
  }
  80% {
    clip-path: inset(54% 0 7% 0);
  }
  100% {
    clip-path: inset(58% 0 43% 0);
  }
}

@keyframes glitch-2 {
  0% {
    clip-path: inset(25% 0 58% 0);
  }
  20% {
    clip-path: inset(54% 0 7% 0);
  }
  40% {
    clip-path: inset(58% 0 43% 0);
  }
  60% {
    clip-path: inset(40% 0 61% 0);
  }
  80% {
    clip-path: inset(92% 0 1% 0);
  }
  100% {
    clip-path: inset(43% 0 1% 0);
  }
}

/* Password Info Button Styles */
.password-info-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(220, 38, 38, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  z-index: 10;
}

.password-info-btn:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
  color: rgba(220, 38, 38, 1);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
  transform: scale(1.05);
}

.password-info-btn:active {
  transform: scale(0.95);
}

/* Password Hint Tooltip */
.password-hint {
  position: absolute;
  top: 3.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
              0 0 10px rgba(220, 38, 38, 0.2);
  opacity: 0;
  transform: translateY(-10px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 15;
}

.password-hint.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.password-hint::before {
  content: '';
  position: absolute;
  top: -4px;
  right: 1rem;
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.95);
  border-left: 1px solid rgba(220, 38, 38, 0.4);
  border-top: 1px solid rgba(220, 38, 38, 0.4);
  transform: rotate(45deg);
}

.password-hint .hint-text {
  color: rgba(220, 38, 38, 0.9);
  font-family: 'Fira Code', monospace;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

/* Mobile responsiveness for password modal */
@media (max-width: 640px) {
  .password-modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .pin-digit {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
  
  .pin-display {
    gap: 0.5rem;
  }
  
  .password-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .password-info-btn {
    top: 0.75rem;
    right: 0.75rem;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }
  
  .password-hint {
    top: 3rem;
    right: 0.25rem;
    font-size: 0.625rem;
    padding: 0.375rem 0.5rem;
  }
  
  .password-hint::before {
    right: 0.75rem;
  }
  
  .password-button {
    width: 100%;
    padding: 1rem;
  }
}

/* Additional fixes for password modal positioning and display */
body.modal-open {
  overflow: hidden;
}

.password-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  display: none;
  background: rgba(0, 0, 0, 0.95);
}

.password-modal.active,
.password-modal.show {
  display: flex !important;
}

/* Ensure modal content is properly centered */
.password-modal-content {
  margin: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Fix for potential navigation overlap */
.navbar-fixed-top {
  z-index: 1040 !important;
}

nav.fixed {
  z-index: 40 !important;
}

/* Ensure mobile menu doesn't interfere */
#mobile-menu {
  z-index: 39 !important;
}

/* Fix for any other potential modal conflicts */
.modal-backdrop {
  z-index: 1050 !important;
}

/* Quick fix for modal display issues */
.password-modal * {
  box-sizing: border-box;
}

/* Shake animation for incorrect password */
@keyframes shake {
  0%, 100% {
    transform: scale(1) translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: scale(1) translateX(-10px);
  }
  20%, 40%, 60%, 80% {
    transform: scale(1) translateX(10px);
  }
}

.password-modal-content.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Ensure proper modal initialization */
.password-modal {
  visibility: hidden;
}

.password-modal.active {
  visibility: visible !important;
}

/* Fix for modal not appearing */
.password-modal.show,
.password-modal.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Enhanced profile image styles for timeline design */
.timeline-profile-image {
  position: relative;
  overflow: visible;
}

.timeline-profile-image img {
  transition: transform 0.3s ease;
}

.timeline-profile-image:hover img {
  transform: scale(1.05);
}

.timeline-profile-image::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: conic-gradient(from 0deg, #dc2626, #3b82f6, #dc2626);
  border-radius: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.timeline-profile-image:hover::before {
  opacity: 0.3;
  animation: rotate 3s linear infinite;
}

/* Status indicator positioning */
.profile-status-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background: #10b981;
  border: 2px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.profile-status-indicator .pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: white;
  border-radius: 50%;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.9);
  }
}

/* Ensure proper containment */
.profile-image-container {
  position: relative;
  display: inline-block;
}

/* Mobile adjustments for square image */
@media (max-width: 640px) {
  .profile-status-indicator {
    width: 1.25rem;
    height: 1.25rem;
    top: 0.25rem;
    right: 0.25rem;
  }
  
  .profile-status-indicator .pulse-dot {
    width: 0.375rem;
    height: 0.375rem;
  }
}

/* Seamless Section Backgrounds */
section {
  position: relative;
  background: transparent !important;
}

/* Subtle section overlays for visual depth */
#home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center top, 
    rgba(220, 38, 38, 0.05) 0%, 
    rgba(220, 38, 38, 0.02) 30%, 
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}

#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(153, 27, 27, 0.03) 50%, 
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

#education::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, 
    rgba(239, 68, 68, 0.04) 0%, 
    rgba(153, 27, 27, 0.02) 40%, 
    transparent 70%);
  pointer-events: none;
  z-index: 1;
}

#skills::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    transparent 0%, 
    rgba(220, 38, 38, 0.03) 30%, 
    rgba(153, 27, 27, 0.02) 60%, 
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

#projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center bottom, 
    rgba(220, 38, 38, 0.04) 0%, 
    rgba(239, 68, 68, 0.02) 30%, 
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, 
    rgba(153, 27, 27, 0.05) 0%, 
    rgba(220, 38, 38, 0.02) 30%, 
    transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure content appears above overlays */
section > * {
  position: relative;
  z-index: 2;
}

/* Enhanced Matrix Background Effect */
#code-background {
  opacity: 0.15 !important;
  filter: hue-rotate(15deg) saturate(0.8);
  background: linear-gradient(to bottom, 
    rgba(0, 20, 0, 0.1) 0%, 
    rgba(0, 40, 20, 0.05) 50%, 
    rgba(0, 20, 0, 0.02) 100%);
}

/* Additional visual enhancements for seamless experience */
.container, .max-w-7xl, .max-w-6xl, .max-w-4xl {
  position: relative;
  z-index: 2;
}

/* Enhance glass morphism elements to work with new background */
.glassmorphism,
.skill-item,
.about-image-wrapper,
.project-card {
  backdrop-filter: blur(10px) saturate(1.2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(220, 38, 38, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(220, 38, 38, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Subtle ambient lighting effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, 
    rgba(220, 38, 38, 0.02) 0%, 
    transparent 50%),
  radial-gradient(ellipse at 80% 20%, 
    rgba(239, 68, 68, 0.015) 0%, 
    transparent 50%),
  radial-gradient(ellipse at 40% 80%, 
    rgba(153, 27, 27, 0.01) 0%, 
    transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure navigation stays above everything */
nav {
  z-index: 50 !important;
}

/* Ensure modals and overlays work properly */
.password-modal,
.project-modal,
.education-modal {
  z-index: 100 !important;
}

/* --- CONTACT FORM STYLES START --- */

/* Content from contact-form.css below. If you encounter contact form style bugs, check this section. */

/* Enhanced Contact Form Styles */

/* Contact Cards */
.contact-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #ef4444;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-card-icon {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(239, 68, 68, 0.2));
    transform: scale(1.05);
}

.contact-card-content {
    margin-top: 1rem;
}

.contact-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.contact-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 6px;
    color: #dc2626;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-action-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.5);
    color: #ef4444;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.4);
    color: #ef4444;
    transform: translateX(4px);
}

/* Enhanced Contact Form Container */
.contact-form-container {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Terminal Header */
.terminal-header {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9));
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.terminal-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px currentColor;
}

.terminal-title {
    display: flex;
    align-items: center;
    color: #d1d5db;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
}

.terminal-status {
    display: flex;
    align-items: center;
}

.status-text {
    color: #22c55e;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
}

/* Terminal Body */
.terminal-body {
    padding: 2rem;
    font-family: 'Fira Code', monospace;
}

.terminal-prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: #d1d5db;
}

.prompt-symbol {
    color: #ef4444;
    font-weight: bold;
}

.prompt-text {
    color: #22c55e;
}

/* Enhanced Form Styles */
.enhanced-contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-comment {
    color: #6b7280;
    font-size: 0.875rem;
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    color: #d1d5db;
    font-size: 0.875rem;
    font-weight: 500;
}

.label-required {
    color: #ef4444;
}

.label-optional {
    color: #6b7280;
    font-size: 0.75rem;
}

.input-wrapper {
    position: relative;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    padding: 1rem;
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    resize: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(220, 38, 38, 0.6);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(156, 163, 175, 0.6);
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    transition: width 0.3s ease;
}

.form-input:focus + .input-focus-line,
.form-select:focus + .input-focus-line,
.form-textarea:focus + .input-focus-line {
    width: 100%;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-select:focus + .select-arrow + .input-focus-line {
    width: 100%;
}

.textarea-counter {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.field-error {
    display: none;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 500;
}

.field-error.show {
    display: block;
}

/* Form Status Messages */
.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.5;
}

.form-status.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.form-status.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.form-status.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

/* Enhanced form validation styles */
.form-input.error,
.form-textarea.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

/* Anti-spam and security indicator animations */
@keyframes securityPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.security-feature i {
    animation: securityPulse 2s ease-in-out infinite;
}

.security-feature:nth-child(1) i { animation-delay: 0s; }
.security-feature:nth-child(2) i { animation-delay: 0.5s; }
.security-feature:nth-child(3) i { animation-delay: 1s; }

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(220, 38, 38, 0.2);
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

.form-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.response-time,
.security-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.button-group {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .button-group {
        width: 100%;
    }
}

.btn-primary,
.btn-secondary {
    position: relative;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: 2px solid #dc2626;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

.btn-secondary:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.5);
    color: #ef4444;
}

.btn-loading,
.btn-success {
    display: none;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .btn-loading {
    display: flex;
    align-items: center;
}

.btn-primary.success .btn-text,
.btn-primary.success .btn-loading {
    display: none;
}

.btn-primary.success .btn-success {
    display: flex;
    align-items: center;
}

/* Contact Form Status Messages */
.contact-form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-form-status.status-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    display: block;
}

.contact-form-status.status-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: block;
}

.contact-form-status.status-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    display: block;
}

/* Terminal Output */
.terminal-output {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(220, 38, 38, 0.2);
}

.output-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.output-prompt {
    color: #ef4444;
}

.output-text {
    color: #9ca3af;
}

/* reCAPTCHA Status Indicators */
.recaptcha-status {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.recaptcha-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    position: relative;
}

.recaptcha-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.5;
}

.recaptcha-info.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.recaptcha-info.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.recaptcha-info.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.recaptcha-info i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.status-text {
    flex: 1;
    line-height: 1.4;
}

.status-text strong {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.status-text small {
    opacity: 0.8;
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Enhanced terminal output for debugging */
.terminal-output .output-line {
    margin: 0.25rem 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.terminal-output .output-line:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 0.125rem 0.25rem;
    margin: 0.125rem -0.25rem;
}

.output-prompt {
    color: #6b7280;
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .recaptcha-info {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .recaptcha-info i {
        font-size: 1rem;
    }
    
    .status-text {
        font-size: 0.8rem;
    }
    
    .status-text small {
        font-size: 0.7rem;
    }
}

/* --- CONTACT FORM STYLES END --- */

/* --- CV MODAL STYLES START --- */

/* Content from cv-modal.css below. If you encounter CV modal style bugs, check this section. */

/* CV Modal Styles */
.cv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cv-modal.active {
    display: flex;
    opacity: 1;
}

.cv-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 90vh;
    max-height: 1000px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.cv-modal.active .cv-modal-content {
    transform: scale(1);
}

.cv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.cv-modal-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Fira Code', monospace;
}

.cv-modal-close {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-modal-close:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

/* Enhanced zoom controls info */
.cv-zoom-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-family: 'Fira Code', monospace;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: left;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 38, 38, 0.3);
    max-width: 200px;
    z-index: 12;
}

.cv-modal.active .cv-zoom-info {
    opacity: 1;
    animation: fadeInOut 6s ease-in-out;
}

.cv-zoom-info.hidden {
    opacity: 0;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.cv-image-container {
    position: relative;
    width: 100%;
    height: calc(100% - 80px);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
}

.cv-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease-out;
    transform-origin: center center;
    cursor: zoom-in;
    
    /* Disable right-click and selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    
    /* Disable context menu */
    pointer-events: auto;
}

/* Remove zoom-specific cursor classes since we handle it in JS */
.cv-image.zoomed {
    cursor: grab;
}

.cv-image.dragging {
    cursor: grabbing;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .cv-modal {
        padding: 10px;
    }
    
    .cv-modal-content {
        width: 95%;
        height: 95vh;
        border-radius: 10px;
    }
    
    .cv-modal-header {
        padding: 15px 20px;
    }
    
    .cv-modal-title {
        font-size: 1.2rem;
    }
    
    .cv-modal-close {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
    
    .cv-image-container {
        padding: 15px;
    }
}

/* Mobile responsive adjustments for CV button */
@media (max-width: 640px) {
    .cv-modal-content {
        width: 98%;
        height: 95vh;
        margin: 0;
    }
    
    .cv-modal-header {
        padding: 12px 15px;
    }
    
    .cv-modal-title {
        font-size: 1rem;
    }
      .cv-zoom-controls {
        top: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .cv-zoom-btn, .cv-download-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Prevent zoom on mobile devices for security */
@media (max-width: 768px) {
    .cv-image {
        touch-action: none;
        -ms-touch-action: none;
    }
}

/* Protection overlay */
.cv-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
    pointer-events: all;
}

/* Disable text selection on the entire modal */
.cv-modal * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Zoom controls */
.cv-zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 11;
}

.cv-zoom-btn {
    background: rgba(220, 38, 38, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cv-zoom-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

.cv-zoom-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(220, 38, 38, 0.4);
}

.cv-zoom-btn:disabled:hover {
    transform: none;
    background: rgba(220, 38, 38, 0.4);
}

/* Download button styling */
.cv-download-btn {
    background: rgba(34, 197, 94, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-left: 5px;
}

.cv-download-btn:hover {
    background: rgba(34, 197, 94, 1);
    transform: scale(1.1);
}

.cv-download-btn:active {
    transform: scale(0.95);
}

/* Loading spinner */
.cv-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(220, 38, 38, 0.3);
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Warning message */
.cv-warning {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Fira Code', monospace;
    text-align: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeInOut 4s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* --- CV MODAL STYLES END --- */

/* --- EDUCATION MODAL NEW STYLES START --- */

/* Content from education-modal-new.css below. If you encounter education modal style bugs, check this section. */

/* Education Modal Styles - Streamlined and Modern */
.education-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
    padding: 1rem;
}

.education-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.education-modal {
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.education-modal-overlay.active .education-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.education-modal-header {
    position: relative;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.education-modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding-right: 3rem;
}

.close-modal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 1.5rem;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    color: #dc2626;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.close-modal-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateY(-50%) scale(1.05);
}

.education-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Modal Quick Info Section */
.modal-quick-info {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tab Navigation */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.modal-tab {
    padding: 1rem 1.5rem;
    color: #a0aec0;
    font-size: 0.95rem;
    font-weight: 600;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.modal-tab:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.03);
}

.modal-tab.active {
    color: #dc2626;
    border-bottom: 2px solid #dc2626;
    background: rgba(220, 38, 38, 0.05);
}

/* Tab Content */
.tab-panel {
    display: none;
    padding: 1.5rem;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Highlight Cards */
.highlights-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.highlight-card {
    background: rgba(17, 24, 39, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.highlight-card:hover {
    border-color: rgba(220, 38, 38, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.highlight-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.highlight-header i {
    font-size: 1.25rem;
}

.highlight-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f9fafb;
}

.highlight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlight-list li {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: #d1d5db;
    transition: all 0.2s ease;
}

.highlight-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Accordion Styles */
.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.5);
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.accordion-header:hover {
    background: rgba(0, 0, 0, 0.3);
}

.accordion-header i:first-child {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.accordion-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f9fafb;
    flex: 1;
}

.accordion-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.modal-list {
    list-style: none;
    padding: 1rem;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-list li {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
    color: #d1d5db;
    line-height: 1.4;
}

.modal-list li i {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.modal-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modal-list li:last-child {
    margin-bottom: 0;
}

/* Gallery Styles */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 16/9;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-caption p {
    margin: 0;
    font-size: 0.8rem;
    color: #f9fafb;
    text-align: center;
}

/* Fullscreen image view */
.fullscreen-image {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.fullscreen-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fullscreen-image img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.close-fullscreen {
    position: absolute;
    top: -20px;
    right: -20px;
    background: rgba(220, 38, 38, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.close-fullscreen:hover {
    background: rgba(220, 38, 38, 0.7);
    transform: scale(1.1);
}

.fullscreen-caption {
    margin-top: 1rem;
    color: #f9fafb;
    font-size: 1rem;
    text-align: center;
}

.fullscreen-controls {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.prev-img, .next-img {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
}

.prev-img:hover, .next-img:hover {
    background: rgba(255, 255, 255, 0.2);
}

.prev-img[disabled], .next-img[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.img-counter {
    color: #d1d5db;
    font-size: 0.9rem;
}

/* Institution and period badges */
.institution-badge, .period-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.modal-description {
    color: #d1d5db;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0.75rem 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .education-modal-overlay {
        padding: 0.5rem;
    }
    
    .education-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .education-modal-header {
        padding: 1rem;
    }
    
    .education-modal-header h2 {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .close-modal-btn {
        width: 36px;
        height: 36px;
        right: 1rem;
    }
    
    .modal-quick-info {
        padding: 1rem;
    }
    
    .modal-tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .tab-panel {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .institution-badge, .period-badge {
        font-size: 0.8rem;
    }
    
    .gallery-item {
        aspect-ratio: 1/1;
    }
    
    .modal-description {
        font-size: 0.9rem;
    }
    
    .highlight-list li, .modal-list li {
        font-size: 0.85rem;
    }
}

/* --- EDUCATION MODAL NEW STYLES END --- */

/* =============================
   START floating-assistant.css
   ============================= */
/* Floating Assistant Button - iOS Assistive Touch Style */

/* Main floating button */
.floating-assistant {
    position: fixed;
    bottom: 100px; /* Position above back-to-top button */
    right: 20px; /* Consistent with JavaScript positioning */
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    border: 2px solid rgba(220, 38, 38, 0.6);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(220, 38, 38, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.floating-assistant:hover {
    transform: scale(1.1);
    border-color: rgba(220, 38, 38, 0.8);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(220, 38, 38, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.floating-assistant.active {
    transform: scale(0.95);
    background: rgba(220, 38, 38, 0.2);
}

.floating-assistant-icon {
    color: #dc2626;
    font-size: 24px;
    transition: all 0.3s ease;
}

.floating-assistant.active .floating-assistant-icon {
    transform: rotate(45deg);
}

/* Settings panel */
.floating-settings-panel {
    position: fixed !important;
    bottom: 170px; /* Position above floating assistant */
    right: 30px !important;
    left: auto !important; /* Override any left positioning */
    width: 280px !important;
    margin: 0 !important; /* Remove any margin that could center it */
    max-height: 70vh; /* Limit height to 70% of viewport */
    overflow-y: auto; /* Add scroll if needed */    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    padding: 16px; /* Reduced from 20px */
    z-index: 9998;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(220, 38, 38, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    transform: scale(0) translate(20px, 20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right !important;
}

/* Custom scrollbar for the panel */
.floating-settings-panel::-webkit-scrollbar {
    width: 4px;
}

.floating-settings-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.floating-settings-panel::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.6);
    border-radius: 2px;
}

.floating-settings-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.8);
}

.floating-settings-panel.show {
    transform: scale(1) translate(0, 0);
    opacity: 1;
    visibility: visible;
}

.floating-settings-panel::before {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 25px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(220, 38, 38, 0.3);
}

/* Panel header */
.settings-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px; /* Reduced from 20px */
    padding-bottom: 12px; /* Reduced from 15px */
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.settings-header-icon {
    color: #dc2626;
    font-size: 18px; /* Reduced from 20px */
    margin-right: 8px; /* Reduced from 10px */
}

.settings-header-title {
    color: #ffffff;
    font-size: 15px; /* Reduced from 16px */
    font-weight: 600;
    font-family: 'Fira Code', monospace;
}

/* Settings groups */
.settings-group {
    margin-bottom: 16px; /* Reduced from 20px */
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group-title {
    color: #cccccc;
    font-size: 13px; /* Reduced from 14px */
    font-weight: 500;
    margin-bottom: 10px; /* Reduced from 12px */
    font-family: 'Fira Code', monospace;
    display: flex;
    align-items: center;
}

.settings-group-title i {
    margin-right: 6px; /* Reduced from 8px */
    color: #dc2626;
    font-size: 14px; /* Reduced from 16px */
}

/* Toggle switches */
.setting-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0; /* Reduced from 10px */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-toggle:last-child {
    border-bottom: none;
}

.setting-label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    flex: 1;
    cursor: pointer;
}

.setting-description {
    color: #888888;
    font-size: 12px;
    margin-top: 2px;
}

/* Custom toggle switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-switch.active {
    background: linear-gradient(45deg, #dc2626, #ef4444);
    border-color: #dc2626;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-switch.active::before {
    transform: translateX(20px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Fix for toggle switches in optimized mode - ensure correct visual state without animations */
body.optimized-mode .toggle-switch.active::before {
    transform: translateX(20px) !important;
    transition: none !important;
}

body.optimized-mode .toggle-switch::before {
    transform: translateX(0px) !important;
    transition: none !important;
}

/* Ensure active state background is maintained in optimized mode */
body.optimized-mode .toggle-switch.active {
    background: #666666 !important;
    border-color: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .toggle-switch {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    transition: none !important;
}

/* Volume control */
.volume-control {
    margin-top: 12px;
}

.volume-slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    position: relative;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.volume-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
    color: #888888;
}

/* Music status indicator */
.music-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    font-size: 12px;
    color: #cccccc;
}

.music-status-icon {
    color: #dc2626;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Music Player Controls */
.music-player-controls {
    width: 100%;
    margin-top: 10px; /* Reduced from 12px */
    padding: 12px; /* Reduced from 16px */
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px; /* Reduced from 12px */
    border: 1px solid rgba(220, 38, 38, 0.2);
    transition: all 0.3s ease;
}

.music-player-controls.playing {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(220, 38, 38, 0.4);
    box-shadow: 
        0 0 20px rgba(220, 38, 38, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.track-info {
    width: 100%;
    margin-bottom: 12px; /* Reduced from 16px */
}

.track-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    height: 20px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(90deg, rgba(0,0,0,0.1) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
    border-radius: 4px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
}

.track-name-text {
    white-space: nowrap;
    display: block;
    width: 100%;
}

/* Only scroll for long text */
.track-name.long-text .track-name-text {
    animation: scroll-text 15s linear infinite;
}

/* Marquee effect for long track names */
@keyframes scroll-text {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Pause scrolling on hover */
.track-name:hover.long-text .track-name-text {
    animation-play-state: paused;
}

.track-progress {
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(220, 38, 38, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #ef4444, #dc2626);
    background-size: 200% 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    box-shadow: 
        0 0 12px rgba(220, 38, 38, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    animation: progress-glow 2s ease-in-out infinite alternate;
}

@keyframes progress-glow {
    0% { 
        background-position: 0% 50%;
        box-shadow: 0 0 12px rgba(220, 38, 38, 0.6);
    }
    100% { 
        background-position: 100% 50%;
        box-shadow: 0 0 16px rgba(220, 38, 38, 0.8);
    }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ffffff, #ffcccc);
    border-radius: 0 4px 4px 0;
    box-shadow: 
        0 0 6px rgba(255, 255, 255, 0.8),
        -1px 0 2px rgba(220, 38, 38, 0.5);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #cccccc;
    margin-top: 6px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.player-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px; /* Reduced from 16px */
    margin: 12px 0; /* Reduced from 16px */
}

.player-btn {
    width: 38px; /* Reduced from 44px */
    height: 38px; /* Reduced from 44px */
    border: none;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(220, 38, 38, 0.8), rgba(239, 68, 68, 0.8));
    color: #ffffff;
    cursor: pointer;
    font-size: 14px; /* Reduced from 16px */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 12px rgba(220, 38, 38, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.player-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #b91c1c, #dc2626);
}

.player-btn:active {
    transform: scale(0.95);
}

.play-pause-btn {
    width: 46px; /* Reduced from 52px */
    height: 46px; /* Reduced from 52px */
    font-size: 18px; /* Reduced from 20px */
    background: linear-gradient(45deg, #dc2626, #ef4444);
    box-shadow: 
        0 6px 16px rgba(220, 38, 38, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Refresh button specific styles */
.refresh-btn, .scan-btn {
    opacity: 0.8;
    background: linear-gradient(45deg, rgba(34, 197, 94, 0.8), rgba(59, 130, 246, 0.8)) !important;
    border-color: rgba(34, 197, 94, 0.5) !important;
}

.refresh-btn:hover, .scan-btn:hover {
    opacity: 1;
    background: linear-gradient(45deg, rgba(34, 197, 94, 1), rgba(59, 130, 246, 1)) !important;
    box-shadow: 
        0 6px 16px rgba(34, 197, 94, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

.refresh-btn.spinning i, .scan-btn:disabled i {
    animation: spin 1s linear infinite;
}

.scan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Music Scanner Button */
.scanner-button-container {
    margin: 12px 0;
}

.scanner-button {
    width: 100%;
    background: linear-gradient(45deg, rgba(34, 197, 94, 0.8), rgba(16, 185, 129, 0.8));
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.scanner-button:hover {
    background: linear-gradient(45deg, rgba(34, 197, 94, 1), rgba(16, 185, 129, 1));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.scanner-button:active {
    transform: translateY(0);
}

.scanner-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
    text-align: center;
}

/* Music Playlist Styles */
.music-playlist {
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.playlist-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(220, 38, 38, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.playlist-tracks {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dc2626 rgba(255, 255, 255, 0.1);
}

.playlist-tracks::-webkit-scrollbar {
    width: 4px;
}

.playlist-tracks::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-tracks::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 2px;
}

.playlist-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.playlist-track:hover {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-track.current-track {
    background: rgba(220, 38, 38, 0.2);
    border-left: 3px solid #dc2626;
}

.playlist-track .track-info {
    flex: 1;
}

.playlist-track .track-title {
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 2px;
}

.playlist-track .track-duration {
    color: #888888;
    font-size: 10px;
}

.playlist-track.current-track .track-title {
    color: #ef4444;
    font-weight: 500;
}

.current-track-icon {
    color: #dc2626;
    font-size: 12px;
    margin-left: 8px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
    .floating-settings-panel {
        right: max(30px, calc((100vw - 1200px) / 2 + 30px)); /* Keep panel within reasonable distance from content */
    }
    
    .floating-assistant {
        right: max(30px, calc((100vw - 1200px) / 2 + 30px)); /* Align button with panel */
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .floating-assistant {
        bottom: 90px; /* Adjust for mobile back-to-top button */
        right: 20px;
        width: 56px;
        height: 56px;
    }    .floating-settings-panel {
        bottom: 146px !important; /* Adjust for mobile */
        right: 20px !important;
        left: auto !important; /* Force override any left positioning */
        width: 280px !important; /* Keep fixed width */
        max-width: calc(100vw - 40px) !important; /* Ensure it doesn't exceed screen */
        margin: 0 !important; /* Remove any auto margins */
        max-height: 60vh; /* Reduced from default for mobile */
        padding: 12px; /* Reduced padding for mobile */
        transform-origin: bottom right !important; /* Keep right alignment */
    }
    
    .floating-settings-panel::before {
        right: 25px; /* Position arrow relative to right edge */
        transform: none; /* Remove centering transform */
    }
    
    .settings-header {
        margin-bottom: 12px; /* Reduced */
        padding-bottom: 8px; /* Reduced */
    }
    
    .settings-header-title {
        font-size: 13px; /* Reduced from 14px */
    }
    
    .settings-group {
        margin-bottom: 12px; /* Reduced */
    }
    
    .settings-group-title {
        font-size: 12px; /* Reduced */
        margin-bottom: 8px; /* Reduced */
    }
    
    .setting-label {
        font-size: 12px; /* Reduced from 13px */
    }
    
    .setting-description {
        font-size: 10px; /* Reduced */
    }
    
    .theme-option {
        width: 26px; /* Reduced */
        height: 26px; /* Reduced */
    }
    
    /* Mobile music player adjustments */
    .music-player-controls {
        padding: 10px; /* Reduced */
        margin-top: 8px; /* Reduced */
    }
    
    .track-info {
        margin-bottom: 10px; /* Reduced */
    }
    
    .player-btn {
        width: 34px; /* Reduced from 40px */
        height: 34px; /* Reduced from 40px */
        font-size: 12px; /* Reduced from 14px */
    }
    
    .play-pause-btn {
        width: 42px; /* Reduced from 48px */
        height: 42px; /* Reduced from 48px */
        font-size: 16px; /* Reduced from 18px */
    }
    
    .player-buttons {
        gap: 10px; /* Reduced */
        margin: 10px 0; /* Reduced */
    }
    
    .track-name {
        font-size: 12px; /* Reduced from 13px */
        height: 16px; /* Reduced from 18px */
        padding: 1px 6px; /* Reduced */
    }
    
    .time-display {
        font-size: 9px; /* Reduced from 10px */
        padding: 2px 6px; /* Reduced */
    }
    
    .volume-control {
        margin-top: 8px; /* Reduced */
    }
}

@media (max-width: 480px) {
    .floating-assistant {
        width: 50px;
        height: 50px;
        bottom: 80px; /* Account for smaller mobile back-to-top button */
        right: 15px;
    }
    
    .floating-assistant-icon {
        font-size: 20px;
    }    .floating-settings-panel {
        bottom: 130px !important; /* Reduced further */
        right: 15px !important;
        left: auto !important; /* Force override any left positioning */
        width: 260px !important; /* Keep fixed width, slightly smaller for small screens */
        max-width: calc(100vw - 30px) !important; /* Ensure it doesn't exceed screen */
        margin: 0 !important; /* Remove any auto margins */
        padding: 10px; /* Reduced from 16px */
        max-height: 55vh; /* Even more compact */
        transform-origin: bottom right !important;
    }
    
    .settings-header {
        margin-bottom: 10px; /* Reduced */
        padding-bottom: 6px; /* Reduced */
    }
    
    .settings-header-title {
        font-size: 12px; /* Reduced from 13px */
    }
    
    .settings-group {
        margin-bottom: 10px; /* Reduced */
    }
    
    .settings-group-title {
        font-size: 11px; /* Reduced */
        margin-bottom: 6px; /* Reduced */
    }
    
    .theme-selector {
        gap: 4px; /* Reduced from 6px */
    }
    
    .theme-option {
        width: 24px; /* Reduced from 26px */
        height: 24px; /* Reduced from 26px */
    }
    
    /* Extra small mobile music player adjustments */
    .music-player-controls {
        padding: 8px; /* Reduced from 12px */
        margin-top: 6px; /* Reduced */
    }
    
    .track-info {
        margin-bottom: 8px; /* Reduced */
    }
    
    .player-btn {
        width: 32px; /* Reduced from 36px */
        height: 32px; /* Reduced from 36px */
        font-size: 11px; /* Reduced from 12px */
    }
    
    .play-pause-btn {
        width: 38px; /* Reduced from 44px */
        height: 38px; /* Reduced from 44px */
        font-size: 14px; /* Reduced from 16px */
    }
    
    .player-buttons {
        gap: 8px; /* Reduced from 12px */
        margin: 8px 0; /* Reduced */
    }
    
    .track-name {
        font-size: 11px; /* Reduced from 12px */
        height: 14px; /* Reduced */
        padding: 1px 4px; /* Reduced */
    }
    
    .time-display {
        font-size: 8px; /* Reduced */
        padding: 2px 4px; /* Reduced */
    }
    
    .volume-control {
        margin-top: 6px; /* Reduced */
    }
}

/* Optimized mode adjustments */
body.optimized-mode .floating-assistant {
    background: #1a1a1a !important;
    border-color: #666666 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.optimized-mode .floating-assistant:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

body.optimized-mode .floating-settings-panel {
    background: #111111 !important;
    border-color: #333333 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

body.optimized-mode .toggle-switch.active {
    background: #666666 !important;
    border-color: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .toggle-switch.active::before {
    transform: translateX(20px) !important;
    transition: none !important;
}

body.optimized-mode .toggle-switch::before {
    transform: translateX(0px) !important;
    transition: none !important;
}

/* Ensure active state background is maintained in optimized mode */
body.optimized-mode .toggle-switch.active {
    background: #666666 !important;
    border-color: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .toggle-switch {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    transition: none !important;
}

body.optimized-mode .volume-slider::-webkit-slider-thumb {
    background: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .volume-slider::-moz-range-thumb {
    background: #666666 !important;
    box-shadow: none !important;
}

body.optimized-mode .music-status {
    background: rgba(102, 102, 102, 0.1) !important;
    border-color: rgba(102, 102, 102, 0.2) !important;
}

body.optimized-mode .music-status-icon {
    color: #666666 !important;
    animation: none !important;
}

/* Draggable functionality */
.floating-assistant.dragging {
    transition: none !important;
    z-index: 10000;
}

.floating-assistant.dragging .floating-settings-panel {
    display: none !important;
}

/* Accessibility improvements */
.floating-assistant:focus {
    outline: 2px solid rgba(220, 38, 38, 0.6);
    outline-offset: 2px;
}

.toggle-switch:focus {
    outline: 2px solid rgba(220, 38, 38, 0.6);
    outline-offset: 2px;
}

.theme-option:focus {
    outline: 2px solid rgba(220, 38, 38, 0.6);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .floating-assistant {
        border-width: 3px;
    }
    
    .floating-settings-panel {
        border-width: 2px;
    }
    
    .toggle-switch {
        border-width: 2px;
    }
    
    .theme-option {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-assistant,
    .floating-settings-panel,
    .toggle-switch,
    .toggle-switch::before,
    .theme-option,
    .volume-slider::-webkit-slider-thumb {
        transition: none !important;
        animation: none !important;
    }
    
    .music-status-icon {
        animation: none !important;
    }
}

/* Theme System - Dynamic Color Application */
:root {
    --theme-primary: #dc2626;
    --theme-primary-dark: #991b1b;
    --theme-primary-light: #ef4444;
    --theme-accent: rgba(220, 38, 38, 0.6);
    --theme-accent-hover: rgba(220, 38, 38, 0.8);
    --theme-glow: rgba(220, 38, 38, 0.2);
    --theme-glow-strong: rgba(220, 38, 38, 0.4);
}

/* Blue Theme */
[data-theme="blue"] {
    --theme-primary: #3b82f6;
    --theme-primary-dark: #1d4ed8;
    --theme-primary-light: #60a5fa;
    --theme-accent: rgba(59, 130, 246, 0.6);
    --theme-accent-hover: rgba(59, 130, 246, 0.8);
    --theme-glow: rgba(59, 130, 246, 0.2);
    --theme-glow-strong: rgba(59, 130, 246, 0.4);
}

/* Green Theme */
[data-theme="green"] {
    --theme-primary: #10b981;
    --theme-primary-dark: #047857;
    --theme-primary-light: #34d399;
    --theme-accent: rgba(16, 185, 129, 0.6);
    --theme-accent-hover: rgba(16, 185, 129, 0.8);
    --theme-glow: rgba(16, 185, 129, 0.2);
    --theme-glow-strong: rgba(16, 185, 129, 0.4);
}

/* Purple Theme */
[data-theme="purple"] {
    --theme-primary: #8b5cf6;
    --theme-primary-dark: #7c3aed;
    --theme-primary-light: #a78bfa;
    --theme-accent: rgba(139, 92, 246, 0.6);
    --theme-accent-hover: rgba(139, 92, 246, 0.8);
    --theme-glow: rgba(139, 92, 246, 0.2);
    --theme-glow-strong: rgba(139, 92, 246, 0.4);
}

/* Orange Theme */
[data-theme="orange"] {
    --theme-primary: #f97316;
    --theme-primary-dark: #ea580c;
    --theme-primary-light: #fb923c;
    --theme-accent: rgba(249, 115, 22, 0.6);
    --theme-accent-hover: rgba(249, 115, 22, 0.8);
    --theme-glow: rgba(249, 115, 22, 0.2);
    --theme-glow-strong: rgba(249, 115, 22, 0.4);
}

/* Pink Theme */
[data-theme="pink"] {
    --theme-primary: #ec4899;
    --theme-primary-dark: #db2777;
    --theme-primary-light: #f472b6;
    --theme-accent: rgba(236, 72, 153, 0.6);
    --theme-accent-hover: rgba(236, 72, 153, 0.8);
    --theme-glow: rgba(236, 72, 153, 0.2);
    --theme-glow-strong: rgba(236, 72, 153, 0.4);
}
/* =============================
   END floating-assistant.css
   ============================= */

/* =============================
   START glassmorphism.css
   ============================= */
/* Glassmorphism styling for portfolio elements */
/* Follows the 70/20/10 color rule with your existing color palette */

.glassmorphism-terminal {
  /* Base glassmorphism effect */
  background: linear-gradient(135deg, rgba(15, 15, 15, 0.7) 0%, rgba(30, 30, 30, 0.3) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* For Safari */
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 20px rgba(220, 38, 38, 0.2),
    -5px 0 15px -5px rgba(220, 38, 38, 0.3); /* Left side glow */
  
  /* Enhanced styling */
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.glassmorphism-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right, 
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.7s ease;
}

.glassmorphism-terminal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom,
    rgba(220, 38, 38, 0.7) 0%,
    rgba(239, 68, 68, 0.5) 50%,
    rgba(220, 38, 38, 0.3) 100%);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
  opacity: 0.8;
}

.glassmorphism-terminal:hover::before {
  left: 100%;
  transition: all 0.7s ease;
}

.glassmorphism-terminal:hover::after {
  opacity: 1;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
}

/* Add subtle hover effect */
.glassmorphism-terminal:hover {
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(220, 38, 38, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 30px rgba(220, 38, 38, 0.25),
    -8px 0 20px -5px rgba(220, 38, 38, 0.4); /* Enhanced left side glow on hover */
  transform: translateY(-3px);
}

/* Adjust text colors for better visibility on glassmorphism background */
.glassmorphism-terminal .text-white\/90 {
  color: rgba(255, 255, 255, 0.9);
}

.glassmorphism-terminal .text-amber-300 {
  color: rgba(252, 211, 77, 0.9);
  text-shadow: 0 0 10px rgba(252, 211, 77, 0.3);
}

.glassmorphism-terminal .text-emerald-400 {
  color: rgba(52, 211, 153, 0.9);
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

.glassmorphism-terminal .text-blue-400 {
  color: rgba(96, 165, 250, 0.9);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.glassmorphism-terminal .text-red-400 {
  color: rgba(248, 113, 113, 0.9);
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

/* Special highlight for interactive elements */
.glassmorphism-terminal .highlight {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0));
  border-radius: 2px;
  padding: 0 4px;
}

/* For optimized mode */
body.optimized-mode .glassmorphism-terminal {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--optimized-shadow);
}
/* =============================
   END glassmorphism.css
   ============================= */

/* =========================
   MOBILE-FIXES.CSS START
   (Merged for debugging)
   ========================= */
/* Additional mobile responsiveness styles */

/* Prevent content shift when scrollbar appears/disappears */
html {
  overflow-y: scroll;
}

/* Fix issues with position:fixed elements on mobile */
@supports (-webkit-touch-callout: none) {  .fixed {
    position: fixed;
    /* iOS specific position fix */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  .mobile-safe-padding {
    /* Safe bottom padding for iOS to prevent elements being hidden under the navigation bar */
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Better handling of overflow for all mobile devices */
@media (max-width: 767px) {
  body {
    width: 100vw;
    overflow-x: hidden;
    max-width: 100%;
  }
  
  /* Improved mobile menu styling */
  .mobile-nav-link {
    min-height: 44px; /* Apple's recommended minimum touch target size */
    min-width: 44px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 16px;
  }
  
  /* Better touch targets for mobile */
  .btn-primary, 
  .btn-secondary, 
  .project-link,
  .social-icon {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 16px;
  }
  
  /* Fix mobile section spacing to prevent overflow */
  section {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Fix for mobile navigation header spacing */
  nav .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Improved handling of images on mobile */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Make mobile menu button more tappable */
  #mobile-menu-button {
    padding: 10px;
    margin: -5px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Fix for double-tap issues on iOS */
  a {
    touch-action: manipulation;
  }
  
  /* Fix for the scrolling issue with mobile menu open */
  body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }
  
  /* Better transition for mobile menu */
  #mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  #mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }
  
  /* Fix for iOS fixed position */
  .ios-fixed {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .text-xl {
    font-size: 1rem !important;
  }
  
  .text-lg {
    font-size: 0.9rem !important;
  }
  
  h1, .h1 {
    font-size: 1.8rem !important;
  }
  
  h2, .h2 {
    font-size: 1.5rem !important;
  }
  
  /* Add more spacing for small buttons */
  .btn-sm {
    padding: 8px 12px;
    margin: 5px;
  }
}

/* Fix for really small devices */
@media (max-width: 320px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Reduce padding on very small screens */
  section {
    padding: 2rem 0.5rem;
  }
}

/* Use a proper height unit that works well on all mobile browsers */
.full-height {
  height: 100vh; /* Fallback */
  height: calc(var(--vh, 1vh) * 100);
}



/* Improved styles for mobile navigation buttons in private content */
.mobile-nav-btn {
  /* Base styles */
  padding: 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  
  /* Readable touch target */
  min-height: 44px;
  min-width: 44px;
  position: relative;
  overflow: hidden;
}

/* Active state */
.mobile-nav-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

a.mobile-nav-btn:hover {
  background: rgba(255,255,255,0.1);
}

button.mobile-nav-btn:hover {
  background: rgba(255,255,255,0.1);
}

.mobile-nav-btn {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.mobile-nav-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 100%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}

.mobile-nav-btn:active::after {
  width: 120px;
  height: 120px;
  opacity: 1;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background: rgba(255,255,255,0.7);
  pointer-events: none;
  z-index: 10;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@media (max-width: 767px) {
  .private-content-nav-title {
    font-size: 1.2rem;
    padding: 0.5rem 0;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .min-h-screen.py-32 {
    min-height: 60vh !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  .container.px-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  .glassmorphism-terminal {
    padding: 1rem !important;
  }
  .flex.space-x-2 > * {
    margin-right: 0.5rem !important;
  }
  .fixed.top-24.right-0 {
    top: 1rem !important;
    right: 0.5rem !important;
  }
}

/* =========================
   MOBILE-FIXES.CSS END
   ========================= */



/* =========================
   MODERN-PROJECTS.CSS START
   (Merged for debugging)
   ========================= */
/* Modern Projects Section Styles */

/* Filter Bar Styles */
.projects-filter-container {
    max-width: 1200px;
    margin: 0 auto;
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    color: #fff;
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.filter-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: #dc2626;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.filter-btn i {
    font-size: 1rem;
}

.filter-btn .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
}

.search-filter {
    position: relative;
    min-width: 280px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(31, 41, 55, 0.8);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Empty state styling */
.projects-grid .col-span-full {
    grid-column: 1 / -1;
}

/* Modern Project Cards */
.project-card-modern {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(31, 41, 55, 0.7));
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    cursor: pointer;
    height: auto;
    user-select: none;
}

.project-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card-modern:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(220, 38, 38, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(220, 38, 38, 0.2);
}

.project-card-modern:hover::before {
    opacity: 1;
}

.project-preview {
    position: relative;
    height: 240px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card-modern:hover .project-preview img {
    transform: scale(1.1);
}

.project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
    border-radius: 20px 20px 0 0;
    background: rgba(17, 24, 39, 0.5);
}

.project-card-modern:hover .project-thumbnail {
    transform: scale(1.1);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.9));
    position: relative;
}

.placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.project-card-modern:hover .placeholder-image::before {
    transform: translateX(100%);
}

.project-quick-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.project-card-modern:hover .project-quick-actions {
    opacity: 1;
    transform: translateY(0);
}

.quick-action {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.quick-action:hover {
    background: rgba(220, 38, 38, 0.8);
    border-color: #dc2626;
    transform: scale(1.1);
}

.project-summary {
    padding: 1.5rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-type {
    font-size: 0.75rem;
    color: #dc2626;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-date {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.project-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.project-brief {
    font-size: 0.875rem;
    color: #d1d5db;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tech-stack-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #e5e7eb;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: #fff;
}

.project-status {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    left: 0.75rem;
    animation: pulse 2s infinite;
}

.status-badge.published {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.status-badge.published::before {
    background: #10b981;
}

.status-badge.unpublished {
    background: linear-gradient(135deg, #7c2d12, #991b1b);
    color: #fca5a5;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.3);
}

.status-badge.unpublished::before {
    background: #f87171;
}

.status-badge.ongoing {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.status-badge.ongoing::before {
    background: #fbbf24;
}

.status-badge.expired {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #d1d5db;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.status-badge.expired::before {
    background: #9ca3af;
}

/* Project Modal Styles */
.project-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overscroll-behavior: contain;
}

.project-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.project-modal-container {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(31, 41, 55, 0.9));
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 24px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    overscroll-behavior: contain;
}

.project-modal-overlay.active .project-modal-container {
    transform: scale(1) translateY(0);
}

.project-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

.modal-title-section {
    flex: 1;
}

.modal-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.modal-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.category-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-close-btn {
    width: 44px;
    height: 44px;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.modal-close-btn:hover {
    background: rgba(220, 38, 38, 0.8);
    border-color: #dc2626;
    color: #fff;
}

.project-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
    overscroll-behavior: contain;
    -ms-overflow-style: scrollbar;
    scrollbar-width: thin;
    scrollbar-color: rgba(220, 38, 38, 0.5) rgba(31, 41, 55, 0.5);
}

.project-modal-content::-webkit-scrollbar {
    width: 8px;
}

.project-modal-content::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}

.project-modal-content::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.5);
    border-radius: 4px;
}

.project-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.7);
}

.modal-left {
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}

.project-gallery {
    position: sticky;
    top: 0;
}

.main-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(31, 41, 55, 0.5);
    margin-bottom: 1rem;
}

.main-image {
    width: 100%;
    height: 350px;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    transition: opacity 0.3s ease;
    background: rgba(17, 24, 39, 0.3);
}

.image-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image-container:hover .image-navigation {
    opacity: 1;
}

.nav-btn {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    user-select: none;
    pointer-events: auto;
    z-index: 10;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.8);
    border-color: #dc2626;
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.thumbnail-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: rgba(17, 24, 39, 0.3);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #dc2626;
    transform: scale(1.05);
}

.modal-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overscroll-behavior: contain;
}

.project-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-meta-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #d1d5db;
}

.meta-item i {
    color: #dc2626;
    width: 16px;
    font-size: 0.875rem;
}

.meta-item span:first-of-type {
    font-weight: 600;
    color: #9ca3af;
}

.project-description h3,
.tech-stack-section h3,
.features-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-description h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-radius: 2px;
}

.tech-stack-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 2px;
}

.features-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #059669, #047857);
    border-radius: 2px;
}

.project-description p {
    font-size: 0.875rem;
    color: #d1d5db;
    line-height: 1.6;
}

.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    transform: translateY(-2px);
}

.tech-item i {
    font-size: 1.5rem;
    color: #dc2626;
}

.tech-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #e5e7eb;
    text-align: center;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #d1d5db;
    padding: 0.5rem 0;
}

.features-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #dc2626;
    border-radius: 50%;
    flex-shrink: 0;
}

.project-links {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(75, 85, 99, 0.3);
}

.project-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.live-btn {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.live-btn:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4);
}

.github-btn {
    background: rgba(31, 41, 55, 0.8);
    color: #d1d5db;
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.github-btn:hover {
    background: rgba(75, 85, 99, 0.8);
    color: #fff;
    border-color: rgba(156, 163, 175, 0.5);
    transform: translateY(-2px);
}

/* Image Caption Styling */
.image-caption-container {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.image-caption {
    color: #e5e7eb;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.4;
    letter-spacing: 0.025em;
}

.image-caption::before {
    content: '\1F4F7 ';
    opacity: 0.7;
    margin-right: 0.25rem;
}

/* Image index indicator */
.image-index {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 0.5rem;
}

/* Hover effect for caption container */
.image-caption-container:hover {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

/* Pulse animation for status badges */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-wrapper {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .search-filter {
        min-width: 100%;
        order: -1; /* Move search to top on mobile */
    }

    .filter-tabs {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        padding: 0.875rem 0.75rem;
        font-size: 0.8125rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .project-modal-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .project-modal-header {
        padding: 1.5rem 1.5rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .modal-close-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        margin-left: 0;
    }

    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .main-image {
        height: 250px;
    }

    .tech-stack-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .project-links {
        flex-direction: column;
    }

    .project-meta-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .projects-filter-container {
        margin-bottom: 2rem;
    }

    .filter-wrapper {
        padding: 0.75rem;
    }

    .filter-btn {
        min-width: calc(50% - 0.25rem);
        padding: 0.75rem 0.5rem;
    }

    .filter-btn i {
        display: none; /* Hide icons on very small screens */
    }

    .search-input {
        padding: 0.625rem 1rem 0.625rem 2.25rem;
        font-size: 0.8125rem;
    }

    .project-card-modern {
        border-radius: 16px;
    }

    .project-preview {
        height: 200px;
    }

    .project-summary {
        padding: 1.25rem;
    }

    .project-name {
        font-size: 1.125rem;
    }

    .project-brief {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .filter-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        width: 100%;
    }

    .filter-btn {
        padding: 0.625rem 0.5rem;
        font-size: 0.75rem;
        min-width: auto;
        flex: none;
    }

    .filter-btn .count {
        font-size: 0.6875rem;
        padding: 0.0625rem 0.375rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .project-modal-overlay {
        padding: 0.75rem;
    }

    .project-modal-container {
        border-radius: 12px;
        max-height: 95vh;
    }

    .project-modal-content {
        padding: 1rem;
        gap: 1rem;
    }

    .project-modal-header {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .main-image {
        height: 220px;
    }

    .tech-stack-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .tech-item {
        padding: 0.5rem;
    }

    .tech-item i {
        font-size: 1.25rem;
    }

    .tech-item span {
        font-size: 0.6875rem;
    }

    .project-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
}

/* Additional mobile scroll containment for touch devices */
@supports (-webkit-overflow-scrolling: touch) {
    .project-modal-content,
    .education-modal-body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* Ensure modal overlays prevent touch scroll */
.project-modal-overlay,
.education-modal-overlay {
    touch-action: none;
    overscroll-behavior: contain;
}

.project-modal-container,
.education-modal {
    touch-action: auto;
}

.project-modal-content,
.education-modal-body {
    touch-action: pan-y;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
}
/* =========================
   MODERN-PROJECTS.CSS END
   ========================= */

/* =========================
   OPTIMIZED-MODE.CSS START
   (Merged for debugging)
   ========================= */
/* Optimized Mode CSS
 * Ultra-minimal design for maximum performance and reduced RAM usage
 * NO ANIMATIONS, NO GLOWS, NO GRADIENTS, NO EFFECTS
 * -------------------------------------------------------------- */

/* Optimized Mode CSS
 * Ultra-minimal design for maximum performance and reduced RAM usage
 * NO ANIMATIONS, NO GLOWS, NO GRADIENTS, NO EFFECTS
 * -------------------------------------------------------------- */

/* Variables for optimized mode - minimal resource usage */
:root {
  --optimized-bg: #000000;
  --optimized-bg-alt: #1a1a1a;
  --optimized-text: #ffffff;
  --optimized-muted: #cccccc;
  --optimized-accent: #666666;
  --optimized-accent-hover: #777777;
  --optimized-border: #333333;
  --optimized-card-bg: #111111;
  --optimized-shadow: none;
  --optimized-glow: none;
  --optimized-gradient: none;
}

/* Base styles for optimized mode - ZERO animations */
body.optimized-mode {
  background: var(--optimized-bg) !important;
  color: var(--optimized-text) !important;
  transition: none !important;
  animation: none !important;
  cursor: default !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  letter-spacing: normal;
}

/* Restore normal cursor behavior in optimized mode */
body.optimized-mode,
body.optimized-mode * {
  cursor: auto !important;
}

body.optimized-mode a,
body.optimized-mode button,
body.optimized-mode input[type="submit"],
body.optimized-mode input[type="button"],
body.optimized-mode .btn,
body.optimized-mode .nav-link,
body.optimized-mode .project-card,
body.optimized-mode .modal-close,
body.optimized-mode .toggle-button,
body.optimized-mode [role="button"],
body.optimized-mode .clickable {
  cursor: pointer !important;
}

body.optimized-mode input[type="text"],
body.optimized-mode input[type="email"],
body.optimized-mode input[type="password"],
body.optimized-mode textarea,
body.optimized-mode [contenteditable] {
  cursor: text !important;
}

/* Remove ALL decorative elements and animations - but preserve essential content */
body.optimized-mode * {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Force plain background everywhere - but preserve content backgrounds */
body.optimized-mode,
body.optimized-mode section,
body.optimized-mode .container {
  background: var(--optimized-bg) !important;
  background-image: none !important;
}

/* Override any gradient backgrounds */
body.optimized-mode .bg-gradient-to-br,
body.optimized-mode .bg-gradient-to-r,
body.optimized-mode .bg-gradient-to-l,
body.optimized-mode .bg-gradient-to-t,
body.optimized-mode .bg-gradient-to-b,
body.optimized-mode [class*="bg-gradient"] {
  background: var(--optimized-bg) !important;
  background-image: none !important;
}

/* Hide ALL custom cursor elements */
body.optimized-mode .cursor-dot,
body.optimized-mode .cursor-ring,
body.optimized-mode .cursor-element,
body.optimized-mode .cursor-trail {
  display: none !important;
  visibility: hidden !important;
}

/* Override cursor.css global cursor: none rule for optimized mode */
body.optimized-mode,
body.optimized-mode html,
body.optimized-mode body,
body.optimized-mode * {
  cursor: auto !important;
}

body.optimized-mode a,
body.optimized-mode button,
body.optimized-mode input[type="submit"],
body.optimized-mode input[type="button"],
body.optimized-mode input[type="reset"],
body.optimized-mode select,
body.optimized-mode .btn,
body.optimized-mode .nav-link,
body.optimized-mode .project-card,
body.optimized-mode .modal-close,
body.optimized-mode .toggle-button,
body.optimized-mode [role="button"],
body.optimized-mode .clickable,
body.optimized-mode .filter-tab {
  cursor: pointer !important;
}

body.optimized-mode input[type="text"],
body.optimized-mode input[type="email"],
body.optimized-mode input[type="password"],
body.optimized-mode input[type="search"],
body.optimized-mode input[type="tel"],
body.optimized-mode input[type="url"],
body.optimized-mode input[type="number"],
body.optimized-mode textarea,
body.optimized-mode [contenteditable] {
  cursor: text !important;
}

/* Hide ALL background animations and effects */
body.optimized-mode #home .absolute.inset-0.opacity-30 > div,
body.optimized-mode .hero-blob,
body.optimized-mode .hero-blob-secondary,
body.optimized-mode .glitch-overlay,
body.optimized-mode .glitch-layer,
body.optimized-mode .profile-frame,
body.optimized-mode .ambient-bg,
body.optimized-mode .grid-overlay,
body.optimized-mode .scanlines,
body.optimized-mode [class*="animate-"],
body.optimized-mode [class*="pulse"],
body.optimized-mode [class*="spin"],
body.optimized-mode [class*="bounce"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Remove ALL profile image effects and animations */
body.optimized-mode .profile-image-container,
body.optimized-mode .profile-image {
  box-shadow: none !important;
  animation: none !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 8px !important;
  transform: none !important;
  filter: none !important;
}

body.optimized-mode .profile-card {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 8px !important;
  transform: none !important;
  box-shadow: none !important;
  transition: none !important;
}

body.optimized-mode .profile-card:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Navigation styles - minimal and clean with proper button styling */
body.optimized-mode nav {
  background: var(--optimized-bg) !important;
  border-bottom: 1px solid var(--optimized-border) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.optimized-mode .nav-link {
  color: var(--optimized-muted) !important;
  font-weight: 400 !important;
  transition: none !important;
  padding: 0.5rem 1rem !important;
  border-radius: 4px !important;
  border: 1px solid transparent !important;
  display: inline-block !important;
}

body.optimized-mode .nav-link:hover {
  color: var(--optimized-text) !important;
  background: var(--optimized-card-bg) !important;
  border-color: var(--optimized-border) !important;
}

/* Fix mobile menu button styling */
body.optimized-mode .mobile-menu-button {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  padding: 0.5rem !important;
  color: var(--optimized-text) !important;
}

/* Text colors - simple and readable */
body.optimized-mode .text-blue-400,
body.optimized-mode .text-indigo-400,
body.optimized-mode .text-purple-400,
body.optimized-mode .text-violet-400,
body.optimized-mode .text-red-400,
body.optimized-mode .text-emerald-400,
body.optimized-mode .text-amber-300 {
  color: var(--optimized-muted) !important;
}

body.optimized-mode a.text-xl, 
body.optimized-mode a.text-2xl {
  color: var(--optimized-text) !important;
  text-shadow: none !important;
}

body.optimized-mode h1, 
body.optimized-mode h2, 
body.optimized-mode h3,
body.optimized-mode h4,
body.optimized-mode h5,
body.optimized-mode h6 {
  color: var(--optimized-text) !important;
  font-weight: 500 !important;
  margin-bottom: 1rem !important;
  text-shadow: none !important;
}

/* Sections - plain and simple */
body.optimized-mode section {
  background: var(--optimized-bg) !important;
  border-bottom: 1px solid var(--optimized-border) !important;
  padding: 4rem 0 !important;
}

body.optimized-mode #home {
  background: var(--optimized-bg) !important;
}

/* Cards and project elements - ultra minimal */
body.optimized-mode .card, 
body.optimized-mode .project-card {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  padding: 1.25rem !important;
  transition: none !important;
  transform: none !important;
}

body.optimized-mode .card:hover, 
body.optimized-mode .project-card:hover {
  transform: none !important;
  box-shadow: none !important;
  background: var(--optimized-card-bg) !important;
}

body.optimized-mode .project-card img {
  border-radius: 4px !important;
  border: 1px solid var(--optimized-border) !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Terminal elements - clean and simple */
body.optimized-mode .terminal-output,
body.optimized-mode .glassmorphism-terminal {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  padding: 1rem !important;
  font-family: monospace !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.optimized-mode .glassmorphism-terminal::before,
body.optimized-mode .glassmorphism-terminal::after {
  display: none !important;
}

body.optimized-mode .glassmorphism-terminal:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Buttons - simple and functional with proper styling */
body.optimized-mode .btn,
body.optimized-mode button:not(.toggle-button) {
  background: var(--optimized-card-bg) !important;
  color: var(--optimized-text) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  padding: 0.6rem 1.2rem !important;
  font-weight: normal !important;
  transition: none !important;
  box-shadow: none !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}

body.optimized-mode .btn:hover,
body.optimized-mode button:not(.toggle-button):hover {
  background: var(--optimized-bg-alt) !important;
  color: var(--optimized-text) !important;
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--optimized-accent) !important;
}

/* Skills and tech icons - no animations */
body.optimized-mode .skill-icon,
body.optimized-mode .tech-icon {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 8px !important;
  padding: 1rem !important;
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
}

body.optimized-mode .skill-icon:hover,
body.optimized-mode .tech-icon:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--optimized-border) !important;
}

/* Typography - clean and readable */
body.optimized-mode p,
body.optimized-mode li {
  line-height: 1.6 !important;
  font-weight: 400 !important;
  color: var(--optimized-muted) !important;
}

body.optimized-mode strong {
  color: var(--optimized-text) !important;
  font-weight: 600 !important;
}

body.optimized-mode pre, 
body.optimized-mode code {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  padding: 0.2em 0.4em !important;
  font-family: monospace !important;
  color: var(--optimized-text) !important;
}

/* Typing text - static display only */
body.optimized-mode .typing-text {
  color: var(--optimized-text) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--optimized-text) !important;
  text-shadow: none !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  animation: none !important;
}

body.optimized-mode .typed-cursor {
  display: none !important;
  visibility: hidden !important;
}

/* Form elements - functional only */
body.optimized-mode input[type="text"],
body.optimized-mode input[type="email"],
body.optimized-mode input[type="password"],
body.optimized-mode input[type="search"],
body.optimized-mode input[type="tel"],
body.optimized-mode input[type="url"],
body.optimized-mode input[type="number"],
body.optimized-mode textarea,
body.optimized-mode [contenteditable="true"] {
  background: var(--optimized-card-bg) !important;
  color: var(--optimized-text) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  padding: 8px !important;
  cursor: text !important;
  transition: none !important;
  box-shadow: none !important;
}

body.optimized-mode input:focus,
body.optimized-mode textarea:focus,
body.optimized-mode select:focus {
  outline: 1px solid var(--optimized-accent) !important;
  outline-offset: 1px !important;
  border-color: var(--optimized-accent) !important;
  box-shadow: none !important;
}

/* Remove ALL animations and keyframes */
body.optimized-mode *,
body.optimized-mode *::before,
body.optimized-mode *::after {
  animation-name: none !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  animation-fill-mode: none !important;
  animation-play-state: paused !important;
}

/* Performance optimization: Override slow transitions globally for faster response */

/* Speed up common interactive elements for better UX */
body:not(.optimized-mode) .project-card,
body:not(.optimized-mode) .education-card,
body:not(.optimized-mode) .skill-card,
body:not(.optimized-mode) .nav-link,
body:not(.optimized-mode) button,
body:not(.optimized-mode) a {
  transition: all 0.2s ease !important;
}

body:not(.optimized-mode) .project-card:hover,
body:not(.optimized-mode) .education-card:hover {
  transition: all 0.2s ease !important;
}

/* Fast animation class for elements that need snappy responses */
.fast-animation,
.fast-animation * {
  transition: all 0.15s ease !important;
  animation-duration: 0.3s !important;
}

/* Ultra-fast animation for interactive elements */
.interactive-fast {
  transition: transform 0.1s ease, box-shadow 0.15s ease, background-color 0.1s ease !important;
}

/* Container and layout */
body.optimized-mode .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 1.5rem !important;
}

/* Preserve Projects Grid Layout in Optimized Mode */
body.optimized-mode .projects-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
}

/* Ensure proper responsive behavior for projects grid in optimized mode */
@media (min-width: 769px) {
    body.optimized-mode .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
        gap: 2rem !important;
    }
}

@media (min-width: 1024px) {
    body.optimized-mode .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(370px, 1fr)) !important;
    }
}

@media (min-width: 1200px) {
    body.optimized-mode .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
    }
}

/* Debug: Force grid to show 3 columns on larger screens in optimized mode */
@media (min-width: 1400px) {
    body.optimized-mode .projects-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        max-width: 1200px !important;
        margin: 2rem auto !important;
    }
}

@media (min-width: 1100px) and (max-width: 1399px) {
    body.optimized-mode .projects-grid {
        grid-template-columns: repeat(3, minmax(300px, 1fr)) !important;
    }
}

@media (min-width: 800px) and (max-width: 1099px) {
    body.optimized-mode .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Preserve project cards layout in optimized mode */
body.optimized-mode .project-card-modern {
    background: var(--optimized-card-bg) !important;
    border: 1px solid var(--optimized-border) !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-bottom: 0 !important;
    display: block !important;
    width: 100% !important;
}

/* Preserve seminars grid layout in optimized mode */
body.optimized-mode #seminarsGrid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 1.5rem !important;
}

@media (min-width: 768px) {
    body.optimized-mode #seminarsGrid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Force proper section widths in optimized mode */
body.optimized-mode #projects {
    width: 100% !important;
    max-width: none !important;
}

body.optimized-mode #projects .container {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Ensure the projects filter container maintains proper width */
body.optimized-mode .projects-filter-container {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* Remove any remaining visual effects */
body.optimized-mode [class*="shadow"],
body.optimized-mode [class*="glow"],
body.optimized-mode [class*="blur"],
body.optimized-mode [class*="effect"] {
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
}

/* Toggle button - simple design with no animations */
.toggle-container {
  display: flex;
  align-items: center;
  margin-left: 16px;
  position: relative;
}

.toggle-button {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #1a1a1a;
  cursor: pointer !important;
  transition: none !important;
  border: 1px solid #666;
  overflow: hidden;
}

/* Simple knob - no animations */
.toggle-button::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #dc2626;
  transition: none !important;
}

/* Optimized mode version */
body.optimized-mode .toggle-button {
  background: #1a1a1a;
  border-color: #444;
  transition: none !important;
}

body.optimized-mode .toggle-button::before {
  left: calc(100% - 17px);
  background: #ccc;
  transition: none !important;
}

/* Simple label text */
.toggle-label {
  font-size: 0.7rem;
  margin: 0 4px;
  opacity: 0.8;
  color: #fff;
}

.toggle-optimized-label {
  display: inline-block;
}

.toggle-regular-label {
  display: none;
}

body.optimized-mode .toggle-regular-label {
  display: inline-block;
}

body.optimized-mode .toggle-optimized-label {
  display: none;
}

/* Simplified transition overlay - minimal animations */
.cyberpunk-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: monospace;
}

.cyberpunk-transition-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Simple container for transition message */
.cyberpunk-message-container {
  position: relative;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #444;
  max-width: 80%;
  text-align: center;
  border-radius: 4px;
}

.cyberpunk-transition-overlay .glitch-text {
  font-size: 1.8rem;
  color: #dc2626;
  margin: 0;
  line-height: 1.2;
}

body.optimized-mode .cyberpunk-transition-overlay .glitch-text {
  color: #ffffff;
}

.cyberpunk-transition-overlay .status-text {
  font-size: 0.9rem;
  color: #ccc;
  margin-top: 1rem;
}

.cyberpunk-transition-overlay .progress-bar {
  width: 75%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1.5rem auto 0;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.cyberpunk-transition-overlay .progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #dc2626;
  animation: progressAnimation 0.8s ease forwards;
}

body.optimized-mode .cyberpunk-transition-overlay .progress-fill {
  background: #ccc;
}

/* Only keep essential keyframe for progress bar */
@keyframes progressAnimation {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* In optimized mode, disable even this animation */
body.optimized-mode .cyberpunk-transition-overlay .progress-fill {
  animation: none !important;
  width: 100% !important;
}

/* Preserve Font Awesome icons and similar icon fonts */
body.optimized-mode i[class*="fa"],
body.optimized-mode i[class*="fab"],
body.optimized-mode i[class*="fas"],
body.optimized-mode i[class*="far"],
body.optimized-mode i[class*="fal"],
body.optimized-mode .icon,
body.optimized-mode [class*="icon-"] {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--optimized-muted) !important;
  background: none !important;
}

/* Preserve SVG icons and content */
body.optimized-mode svg {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  animation: none !important;
}

/* Preserve tech stack items and ensure proper display */
body.optimized-mode .tech-stack-item {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.optimized-mode .tech-stack-item > div {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  padding: 1rem !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 80px !important;
}

/* Fix project filter tabs */
body.optimized-mode .project-filter-tabs {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 25px !important;
  padding: 4px !important;
  display: flex !important;
  gap: 4px !important;
}

body.optimized-mode .filter-tab {
  background: transparent !important;
  color: var(--optimized-muted) !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 8px 16px !important;
  font-size: 0.875rem !important;
  cursor: pointer !important;
  transition: none !important;
}

body.optimized-mode .filter-tab.active,
body.optimized-mode .filter-tab:hover {
  background: var(--optimized-bg-alt) !important;
  color: var(--optimized-text) !important;
}

/* Ensure cursors work properly */
body.optimized-mode button,
body.optimized-mode a,
body.optimized-mode [role="button"],
body.optimized-mode input[type="submit"],
body.optimized-mode input[type="button"],
body.optimized-mode input[type="reset"],
body.optimized-mode select {
  cursor: pointer !important;
}

body.optimized-mode input[type="text"],
body.optimized-mode input[type="email"],
body.optimized-mode input[type="password"],
body.optimized-mode input[type="search"],
body.optimized-mode input[type="tel"],
body.optimized-mode input[type="url"],
body.optimized-mode input[type="number"],
body.optimized-mode textarea,
body.optimized-mode [contenteditable="true"] {
  cursor: text !important;
}

/* Remove any CSS Grid or Flexbox animations */
body.optimized-mode .grid,
body.optimized-mode .flex,
body.optimized-mode [class*="grid-"],
body.optimized-mode [class*="flex-"] {
  transition: none !important;
  transform: none !important;
  animation: none !important;
}

/* Preserve icons and essential pseudo-elements, but remove decorative ones */
body.optimized-mode *::before,
body.optimized-mode *::after {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Hide only decorative pseudo-elements, not functional ones like icons */
body.optimized-mode .hero-blob::before,
body.optimized-mode .hero-blob::after,
body.optimized-mode .glitch-overlay::before,
body.optimized-mode .glitch-overlay::after,
body.optimized-mode .profile-frame::before,
body.optimized-mode .profile-frame::after,
body.optimized-mode .glassmorphism-terminal::before,
body.optimized-mode .glassmorphism-terminal::after {
  display: none !important;
  content: none !important;
}

/* Hide resource-intensive background elements completely */
body.optimized-mode #code-background,
body.optimized-mode canvas,
body.optimized-mode [class*="particle"],
body.optimized-mode [class*="matrix"],
body.optimized-mode [class*="animation"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Ensure body has plain black background in optimized mode */
body.optimized-mode {
  background: #000000 !important;
  background-color: #000000 !important;
  background-image: none !important;
  background-attachment: scroll !important;
}

/* Final override to ensure no effects leak through */
body.optimized-mode,
body.optimized-mode *,
body.optimized-mode *::before,
body.optimized-mode *::after {
  will-change: auto !important;
  transform: none !important;
  transform-style: flat !important;
  perspective: none !important;
  backface-visibility: visible !important;
}

/* Modal optimizations for better performance and visibility */
body.optimized-mode .modal,
body.optimized-mode #projectModal,
body.optimized-mode #educationModal,
body.optimized-mode #cvModal,
body.optimized-mode .password-modal {
  background: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.optimized-mode .modal-content,
body.optimized-mode .project-modal-content,
body.optimized-mode .education-modal-content,
body.optimized-mode .cv-modal-content,
body.optimized-mode .password-modal-content {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  animation: none !important;
}

/* CV Modal specific optimizations */
body.optimized-mode .cv-modal {
  background: rgba(0, 0, 0, 0.95) !important;
}

body.optimized-mode .cv-modal-content {
  background: var(--optimized-bg) !important;
  border: 2px solid var(--optimized-border) !important;
  border-radius: 8px !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
  overflow: auto !important;
}

body.optimized-mode .cv-modal-header {
  background: var(--optimized-card-bg) !important;
  border-bottom: 1px solid var(--optimized-border) !important;
  padding: 1rem !important;
}

body.optimized-mode .cv-modal-body {
  background: var(--optimized-bg) !important;
  padding: 1rem !important;
}

/* Education Modal optimizations */
body.optimized-mode .education-modal {
  background: rgba(0, 0, 0, 0.9) !important;
}

body.optimized-mode .education-modal-content {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 8px !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
}

/* Project Modal optimizations */
body.optimized-mode .project-modal {
  background: rgba(0, 0, 0, 0.9) !important;
}

body.optimized-mode .project-modal-content {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 8px !important;
}

/* Modal buttons */
body.optimized-mode .modal button,
body.optimized-mode .modal .btn {
  background: var(--optimized-card-bg) !important;
  color: var(--optimized-text) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  padding: 0.5rem 1rem !important;
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
}

body.optimized-mode .modal button:hover,
body.optimized-mode .modal .btn:hover {
  background: var(--optimized-bg-alt) !important;
  border-color: var(--optimized-accent) !important;
}

/* Modal close buttons */
body.optimized-mode .modal .close,
body.optimized-mode .modal [data-dismiss="modal"],
body.optimized-mode .modal .modal-close {
  background: var(--optimized-card-bg) !important;
  color: var(--optimized-text) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

body.optimized-mode .modal .close:hover {
  background: var(--optimized-bg-alt) !important;
  border-color: var(--optimized-accent) !important;
}

/* Remove modal animations and effects */
body.optimized-mode .modal.fade {
  transition: none !important;
  animation: none !important;
  opacity: 1 !important;
}

body.optimized-mode .modal.show {
  animation: none !important;
  transform: none !important;
}

/* Mobile Navigation optimizations */
body.optimized-mode #mobile-menu {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

body.optimized-mode .mobile-nav-link {
  background: transparent !important;
  color: var(--optimized-text) !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  padding: 12px 16px !important;
  margin: 4px 0 !important;
  display: flex !important;
  align-items: center !important;
  transition: none !important;
  transform: none !important;
  animation: none !important;
}

body.optimized-mode .mobile-nav-link:hover,
body.optimized-mode .mobile-nav-link:focus {
  background: var(--optimized-bg-alt) !important;
  border-color: var(--optimized-border) !important;
  color: var(--optimized-text) !important;
}

body.optimized-mode .mobile-nav-link i {
  margin-right: 8px !important;
  color: var(--optimized-muted) !important;
}

/* Mobile menu button optimizations */
body.optimized-mode #mobile-menu-button {
  background: var(--optimized-card-bg) !important;
  border: 1px solid var(--optimized-border) !important;
  border-radius: 4px !important;
  color: var(--optimized-text) !important;
  padding: 8px !important;
  transition: none !important;
  transform: none !important;
}

body.optimized-mode #mobile-menu-button:hover {
  background: var(--optimized-bg-alt) !important;
  border-color: var(--optimized-accent) !important;
}

/* Ensure mobile menu is always properly styled */
body.optimized-mode #mobile-menu.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  position: fixed !important;
  top: 70px !important;
  left: 16px !important;
  right: 16px !important;
  z-index: 1000 !important;
  max-height: calc(100vh - 90px) !important;
  overflow-y: auto !important;
}

body.optimized-mode #mobile-menu.hidden {
  display: none !important;
}

/* Remove all mobile menu animations in optimized mode */
body.optimized-mode .mobile-nav-link,
body.optimized-mode #mobile-menu {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}


/* =========================
   OPTIMIZED-MODE.CSS END (CHUNK 2/2)
   ========================= */


/* =========================
   PDF-MODAL.CSS START
   (Paste content of pdf-modal.css here)
   ========================= */
/* PDF Modal Styles */
.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pdf-modal.active {
    display: flex;
    opacity: 1;
}

.pdf-modal-content {
    position: relative;
    width: 95%;
    max-width: 800px;
    height: 80vh;
    max-height: 650px;
    min-height: 450px;
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.pdf-modal.active .pdf-modal-content {
    transform: scale(1);
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
}

.pdf-modal-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Fira Code', monospace;
}

.pdf-modal-close {
    background: none;
    border: none;
    color: #22c55e;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-modal-close:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #34d399;
    transform: scale(1.1);
}

.pdf-container {
    position: relative;
    width: 100%;
    height: calc(100% - 80px);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background: #fff;
    /* Mobile-friendly iframe settings */
    -webkit-overflow-scrolling: touch;
    overflow: auto;
}

.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #22c55e;
    font-size: 1.2rem;
    font-family: 'Fira Code', monospace;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-top-color: #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pdf-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ef4444;
    font-size: 1.1rem;
    font-family: 'Fira Code', monospace;
    text-align: center;
    padding: 30px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 15px;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.pdf-fallback-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pdf-fallback-link:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #34d399;
    transform: translateY(-2px);
}

.pdf-fallback-link:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #34d399;
    transform: translateY(-2px);
}

/* Mobile PDF Message - available on all screen sizes */
.mobile-pdf-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 30px 20px;
    color: #22c55e;
    font-family: 'Fira Code', monospace;
    max-width: 500px;
    width: 90%;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 15px;
    border: 2px solid rgba(34, 197, 94, 0.4);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-pdf-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.mobile-pdf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    color: #22c55e;
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Fira Code', monospace;
}

.mobile-pdf-button:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.2));
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.2);
    color: #34d399;
}

.mobile-pdf-button.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-color: #22c55e;
}

.mobile-pdf-button.primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
    color: white;
}

.mobile-pdf-info {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 15px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
}

.mobile-pdf-info i {
    margin-top: 2px;
    color: #6b7280;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .pdf-modal {
        padding: 8px;
    }
    
    .pdf-modal-content {
        width: 95%;
        height: 80vh;
        max-height: 550px;
        min-height: 350px;
        border-radius: 10px;
        max-width: none;
        /* Remove aspect-ratio on mobile for better flexibility */
        aspect-ratio: unset;
    }
    
    .pdf-modal-header {
        padding: 10px 15px;
        border-radius: 10px 10px 0 0;
    }
    
    .pdf-modal-title {
        font-size: 0.9rem;
    }
    
    .pdf-modal-close {
        font-size: 1.4rem;
        width: 32px;
        height: 32px;
    }
    
    .pdf-container {
        padding: 8px;
        height: calc(100% - 50px);
    }
    
    .pdf-loading,
    .pdf-error {
        font-size: 0.85rem;
        padding: 12px;
        max-width: 250px;
    }
    
    .pdf-viewer {
        border-radius: 5px;
        min-height: 100%;
        width: 100%;
        /* Better mobile PDF display */
        background: #fff;
    }
      /* Mobile PDF message - keep for potential fallback */
    .mobile-pdf-message {
        max-width: 90%;
        padding: 20px 15px;
        font-size: 0.9rem;
        width: 85%;
    }
    
    .mobile-pdf-button {
        padding: 12px 20px;
        font-size: 0.9rem;
        margin: 5px 0;
    }
    
    .mobile-pdf-options {
        gap: 12px;
        margin-top: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pdf-modal {
        background: rgba(0, 0, 0, 0.97);
    }
    
    .pdf-modal-content {
        background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pdf-modal-content {
        border: 3px solid #22c55e;
    }
    
    .pdf-modal-close {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pdf-modal,
    .pdf-modal-content,
    .pdf-modal-close {
        transition: none;
    }
    
    .pdf-loading::after {
        animation: none;
    }
}

/* Optimized Mode Support for PDF Modal */
body.optimized-mode .pdf-modal {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.optimized-mode .pdf-modal-content {
    background: #111111 !important;
    border: 2px solid #333333 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

body.optimized-mode .pdf-modal-header {
    background: #1a1a1a !important;
    border-bottom: 1px solid #333333 !important;
    padding: 15px 20px !important;
}

body.optimized-mode .pdf-modal-title {
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 600 !important;
}

body.optimized-mode .pdf-modal-close {
    background: #1a1a1a !important;
    color: #cccccc !important;
    border: 1px solid #333333 !important;
    border-radius: 4px !important;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}

body.optimized-mode .pdf-modal-close:hover {
    background: #333333 !important;
    color: #ffffff !important;
    transform: none !important;
}

body.optimized-mode .pdf-container {
    background: #111111 !important;
}

body.optimized-mode .pdf-viewer {
    background: #ffffff !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

/* Optimized mode mobile PDF message - ensure visibility */
body.optimized-mode .mobile-pdf-message {
    background: #111111 !important;
    border: 2px solid #333333 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-align: center !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

body.optimized-mode .mobile-pdf-message h4 {
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin: 0 0 15px 0 !important;
}

body.optimized-mode .mobile-pdf-message p {
    color: #cccccc !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    line-height: 1.5 !important;
    text-align: center !important;
    margin: 0 0 20px 0 !important;
}

body.optimized-mode .mobile-pdf-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 15px !important;
    align-items: center !important;
}

body.optimized-mode .mobile-pdf-button {
    background: #333333 !important;
    color: #ffffff !important;
    border: 1px solid #666666 !important;
    border-radius: 4px !important;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 250px !important;
}

body.optimized-mode .mobile-pdf-button:hover {
    background: #666666 !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

body.optimized-mode .mobile-pdf-button.primary {
    background: #666666 !important;
    color: #ffffff !important;
    border-color: #777777 !important;
}

body.optimized-mode .mobile-pdf-button.primary:hover {
    background: #777777 !important;
    color: #ffffff !important;
}

body.optimized-mode .mobile-pdf-info {
    color: #cccccc !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-align: center !important;
    margin-top: 15px !important;
    display: block !important;
    line-height: 1.5 !important;
}

body.optimized-mode .mobile-pdf-info i {
    color: #999999 !important;
}

/* Optimized mode PDF loading and error states */
body.optimized-mode .pdf-loading {
    color: #cccccc !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

body.optimized-mode .pdf-loading::after {
    border: 2px solid #333333 !important;
    border-top-color: #cccccc !important;
    animation: none !important;
}

body.optimized-mode .pdf-error {
    background: #1a1a1a !important;
    border: 1px solid #666666 !important;
    color: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

body.optimized-mode .pdf-fallback-link {
    background: #333333 !important;
    color: #ffffff !important;
    border: 1px solid #666666 !important;
    border-radius: 4px !important;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}

body.optimized-mode .pdf-fallback-link:hover {
    background: #666666 !important;
    color: #ffffff !important;
    transform: none !important;
}

/* =========================
   PDF-MODAL.CSS END
   ========================= */


   /* =========================
   SECTION-TITLE.CSS START
   ========================= */
/* Section Title Styling with Corner Decorations - June 14, 2025 */

.section-title {
  position: relative;
  display: inline-block;
  font-size: 2.25rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
}

.section-title::before,
.section-title::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  border: 2px solid var(--primary-color);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.section-title::before {
  top: -5px;
  left: -5px;
  border-right: none;
  border-bottom: none;
}

.section-title::after {
  bottom: -5px;
  right: -5px;
  border-left: none;
  border-top: none;
}

/* Hover effects */
.section-title:hover::before,
.section-title:hover::after {
  opacity: 1;
  width: 30px;
  height: 30px;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

/* Remove the specific styling for projects section since it's now applied to all */
#projects .section-title::before,
#projects .section-title::after {
  /* Reset any specific styling for the projects section */
  opacity: 0.8;
}

   /* =========================
   SECTION-TITLE.CSS END
   ========================= */


   /* =========================
   SOUND-STYLES.CSS START
   ========================= */
/* Sound Controls Styles */
#sound-toggle {
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sound-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
}

#sound-toggle i {
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

#sound-toggle:hover i {
  transform: scale(1.1);
}

@keyframes pulse-sound {
  0% {
      box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  70% {
      box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
  }
  100% {
      box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

.pulse-animation {
  animation: pulse-sound 1.5s infinite;
}

     /* =========================
   SOUND-STYLES.CSS END
   ========================= */


       /* =========================
   STEALTH-NAV.CSS START
   ========================= */
/* ===================================================================
   STEALTH NAVIGATION - HIGH-TECH RED & BLACK THEME
   Sleek, tactical, and futuristic design with military-inspired UI
   ================================================================== */

/* Core Variables */
:root {
  --stealth-black: #000000;
  --stealth-dark: #0a0a0a;
  --stealth-gray: #1a1a1a;
  --stealth-border: #222222;
  --stealth-red: #ff0000;
  --stealth-red-dark: #cc0000;
  --stealth-red-glow: rgba(255, 0, 0, 0.3);
  --stealth-red-dim: rgba(255, 0, 0, 0.1);
  --stealth-white: #ffffff;
  --stealth-gray-text: #cccccc;
  --stealth-gray-dim: #666666;
  
  /* Animation timings */
  --stealth-fast: 0.2s;
  --stealth-normal: 0.3s;
  --stealth-slow: 0.5s;
}

/* Main Navigation Container */
#stealthNav {
  background: linear-gradient(180deg, 
    rgba(0, 0, 0, 0.95) 0%, 
    rgba(10, 10, 10, 0.9) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--stealth-red);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(255, 0, 0, 0.1);
  z-index: 1000;
}

/* Cyberpunk Grid Overlay */
.nav-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(90deg, rgba(255, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(255, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.3;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Main Navigation Content */
.nav-main-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  min-height: 2.5rem;
}

/* Identity Module */
.nav-identity {
  flex-shrink: 0;
}

.identity-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.identity-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-core {
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 2;
}

.icon-core::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid var(--stealth-red);
  filter: drop-shadow(0 0 8px var(--stealth-red-glow));
  animation: modernTriangleSpin 3s ease-in-out infinite;
}

.icon-core::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--stealth-white);
  border-radius: 50%;
  z-index: 3;
  animation: centerPulse 2s ease-in-out infinite;
}

.icon-ring {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 2px solid transparent;
  border-top-color: var(--stealth-red);
  border-right-color: rgba(255, 0, 0, 0.3);
  border-radius: 50%;
  filter: drop-shadow(0 0 6px var(--stealth-red-dim));
  animation: ringSpin 4s linear infinite;
}

@keyframes modernTriangleSpin {
  0% { 
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    filter: drop-shadow(0 0 8px var(--stealth-red-glow));
  }
  25% { 
    transform: translate(-50%, -50%) rotate(90deg) scale(1.1);
    filter: drop-shadow(0 0 12px var(--stealth-red-glow));
  }
  50% { 
    transform: translate(-50%, -50%) rotate(180deg) scale(1);
    filter: drop-shadow(0 0 8px var(--stealth-red-glow));
  }
  75% { 
    transform: translate(-50%, -50%) rotate(270deg) scale(1.1);
    filter: drop-shadow(0 0 12px var(--stealth-red-glow));
  }
  100% { 
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
    filter: drop-shadow(0 0 8px var(--stealth-red-glow));
  }
}

@keyframes centerPulse {
  0%, 100% { 
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.identity-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.identity-name {
  text-decoration: none;
  color: var(--stealth-white);
  font-family: 'Fira Code', monospace;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--stealth-normal) ease;
  position: relative;
}

.identity-name:hover {
  color: var(--stealth-red);
  text-shadow: 0 0 10px var(--stealth-red-glow);
  transform: translateY(-1px);
}

.name-primary {
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.name-secondary {
  font-size: 1rem;
  opacity: 0.8;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--stealth-red);
  border-radius: 4px;
  padding: 0.125rem 0.375rem;
  font-size: 0.7rem;
  color: var(--stealth-red);
  font-weight: 600;
  transition: all var(--stealth-fast) ease;
}

.identity-name:hover .security-badge {
  background: var(--stealth-red);
  color: var(--stealth-black);
  box-shadow: 0 0 10px var(--stealth-red-glow);
}

.identity-tag {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--stealth-gray-dim);
  letter-spacing: 1px;
  font-weight: 500;
}

/* Desktop Navigation Links */
.nav-links-desktop {
  display: none;
  flex: 1;
  justify-content: center;
  padding: 0 2rem;
}

@media (min-width: 768px) {
  .nav-links-desktop {
    display: flex;
  }
}

.nav-grid {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link-tech {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--stealth-gray-text);
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 1px;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: all var(--stealth-normal) ease;
  overflow: hidden;
}

.nav-link-tech::before {
  content: attr(data-section);
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.6rem;
  color: var(--stealth-gray-dim);
  font-weight: 400;
  transition: all var(--stealth-fast) ease;
}

.nav-link-tech:hover {
  color: var(--stealth-red);
  border-color: var(--stealth-red);
  background: rgba(255, 0, 0, 0.05);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 15px rgba(255, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 0, 0, 0.1);
}

.nav-link-tech:hover::before {
  color: var(--stealth-red);
}

.link-hex {
  width: 8px;
  height: 8px;
  background: var(--stealth-gray-dim);
  clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
  transition: all var(--stealth-fast) ease;
}

.nav-link-tech:hover .link-hex {
  background: var(--stealth-red);
  box-shadow: 0 0 8px var(--stealth-red-glow);
  animation: hexPulse 1.5s infinite;
}

@keyframes hexPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.link-scanner {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--stealth-red), transparent);
  transition: width var(--stealth-normal) ease;
}

.nav-link-tech:hover .link-scanner {
  width: 100%;
  animation: scannerSweep 1s ease-in-out;
}

@keyframes scannerSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Mobile Controls */
.nav-mobile-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .nav-mobile-controls {
    display: none;
  }
}

.tactical-menu-btn {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.btn-frame {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--stealth-red);
  border-radius: 8px;
  background: rgba(255, 0, 0, 0.05);
  transition: all var(--stealth-normal) ease;
  overflow: hidden;
}

.tactical-menu-btn:hover .btn-frame {
  background: rgba(255, 0, 0, 0.1);
  border-color: var(--stealth-red);
  box-shadow: 
    0 0 20px var(--stealth-red-glow),
    inset 0 1px 0 rgba(255, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-core {
  position: relative;
  z-index: 2;
}

.btn-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--stealth-red-glow) 0%, transparent 70%);
  border-radius: 50%;
  transition: all var(--stealth-normal) ease;
  transform: translate(-50%, -50%);
}

.tactical-menu-btn:hover .btn-glow {
  width: 60px;
  height: 60px;
}

.hamburger-tactical {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.tactical-line {
  width: 20px;
  height: 2px;
  background: var(--stealth-red);
  border-radius: 1px;
  transition: all var(--stealth-normal) cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

.tactical-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--stealth-red);
  border-radius: inherit;
  opacity: 0;
  animation: lineScan 2s infinite;
}

@keyframes lineScan {
  0%, 90%, 100% { opacity: 0; }
  45% { opacity: 0.8; }
}

/* Mobile menu open state */
.mobile-menu-open .tactical-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-open .tactical-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-open .tactical-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.btn-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.7rem;
  color: var(--stealth-red);
  font-weight: 600;
  letter-spacing: 1px;
  transition: all var(--stealth-fast) ease;
}

.tactical-menu-btn:hover .btn-label {
  color: var(--stealth-white);
  text-shadow: 0 0 5px var(--stealth-red-glow);
}

/* Mobile Tactical Interface */
.mobile-tactical-interface {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.98);
  z-index: 9999;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all var(--stealth-slow) cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
  display: none;
  height: 100vh;
  width: 100vw;
}

.mobile-tactical-interface.active {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  height: 100vh;
}

.tactical-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, 
    rgba(255, 0, 0, 0.05) 0%, 
    rgba(0, 0, 0, 0.9) 70%);
  pointer-events: none;
}

.tactical-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(90deg, rgba(255, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(255, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}

.tactical-header {
  position: relative;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--stealth-red);
  text-align: center;
  flex-shrink: 0;
  height: auto;
  min-height: 80px;
}

.mobile-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--stealth-red);
  border-radius: 6px;
  color: var(--stealth-red);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--stealth-fast) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.mobile-close-btn:hover {
  background: var(--stealth-red);
  color: var(--stealth-black);
  box-shadow: 0 0 15px var(--stealth-red-glow);
}

.header-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--stealth-red) 50%, 
    transparent 100%);
  animation: headerScan 3s ease-in-out infinite;
}

@keyframes headerScan {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.tactical-title {
  font-family: 'Fira Code', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--stealth-red);
  letter-spacing: 2px;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 0 10px var(--stealth-red-glow);
}

.header-status {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--stealth-gray-dim);
  letter-spacing: 1px;
}

.tactical-menu-content {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.menu-sectors {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  justify-content: space-evenly;
  padding: 2rem 1rem;
  height: 100%;
}

.tactical-link {
  position: relative;
  display: flex;
  text-decoration: none;
  background: rgba(255, 0, 0, 0.02);
  border: 1px solid rgba(255, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
  transition: all var(--stealth-normal) ease;
  overflow: hidden;
  transform: translateY(50px);
  opacity: 0;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 70px;
  align-items: center;
  width: 100%;
  flex: 1;
  max-height: 90px;
}

.mobile-tactical-interface.active .tactical-link {
  animation: linkSlideUp var(--stealth-slow) ease forwards;
}

.mobile-tactical-interface.active .tactical-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-tactical-interface.active .tactical-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-tactical-interface.active .tactical-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-tactical-interface.active .tactical-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-tactical-interface.active .tactical-link:nth-child(5) { animation-delay: 0.3s; }
.mobile-tactical-interface.active .tactical-link:nth-child(6) { animation-delay: 0.35s; }
.mobile-tactical-interface.active .tactical-link:nth-child(7) { animation-delay: 0.4s; }

@keyframes linkSlideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.tactical-link:hover,
.tactical-link:focus {
  background: rgba(255, 0, 0, 0.1);
  border-color: var(--stealth-red);
  transform: translateY(-3px);
  box-shadow: 
    0 8px 25px rgba(255, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 0, 0, 0.1);
}

.tactical-link.classified {
  border-color: var(--stealth-red);
  background: rgba(255, 0, 0, 0.05);
}

.link-frame {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.link-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stealth-red);
  border-radius: 6px;
  background: rgba(255, 0, 0, 0.1);
  color: var(--stealth-red);
  font-size: 1rem;
  transition: all var(--stealth-fast) ease;
}

.tactical-link:hover .link-icon {
  background: var(--stealth-red);
  color: var(--stealth-black);
  box-shadow: 0 0 15px var(--stealth-red-glow);
  transform: scale(1.1);
}

.link-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.link-name {
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--stealth-white);
  letter-spacing: 1px;
  transition: all var(--stealth-fast) ease;
}

.tactical-link:hover .link-name {
  color: var(--stealth-red);
  text-shadow: 0 0 5px var(--stealth-red-glow);
}

.link-code {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--stealth-gray-dim);
  letter-spacing: 1px;
  font-weight: 400;
}

.link-status {
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stealth-red);
  animation: statusBlink 2s infinite;
}

.status-dot.classified-dot {
  background: var(--stealth-red);
  box-shadow: 0 0 10px var(--stealth-red-glow);
  animation: classifiedPulse 1s infinite;
}

@keyframes statusBlink {
  0%, 90%, 100% { opacity: 1; }
  45% { opacity: 0.3; }
}

@keyframes classifiedPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.link-scanner-mobile {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--stealth-red), 
    transparent);
  transition: width var(--stealth-normal) ease;
}

.tactical-link:hover .link-scanner-mobile {
  width: 100%;
  animation: mobileScan 1.2s ease-in-out;
}

.link-scanner-mobile.classified-scanner {
  background: linear-gradient(90deg, 
    transparent, 
    var(--stealth-red), 
    var(--stealth-white),
    var(--stealth-red), 
    transparent);
}

@keyframes mobileScan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Active Section Highlighting */
.nav-link-tech.active {
  color: var(--stealth-red) !important;
  border-color: var(--stealth-red) !important;
  background: rgba(255, 0, 0, 0.15) !important;
  box-shadow: 0 0 15px var(--stealth-red-glow) !important;
}

.nav-link-tech.active .link-hex {
  background: var(--stealth-red) !important;
  box-shadow: 0 0 10px var(--stealth-red-glow) !important;
  animation: hexPulse 1.5s infinite !important;
}

.tactical-link.active {
  background: rgba(255, 0, 0, 0.15) !important;
  border-color: var(--stealth-red) !important;
  transform: translateY(0) scale(1.02) !important;
}

.tactical-link.active .link-name {
  color: var(--stealth-red) !important;
  text-shadow: 0 0 8px var(--stealth-red-glow) !important;
}

.tactical-link.active .link-icon {
  background: var(--stealth-red) !important;
  color: var(--stealth-black) !important;
  box-shadow: 0 0 15px var(--stealth-red-glow) !important;
}

.tactical-link.active .status-dot {
  background: var(--stealth-white) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
  animation: classifiedPulse 1s infinite !important;
}

/* Optimized mode active states */
body.optimized-mode .nav-link-tech.active {
  background: var(--optimized-accent) !important;
  border-color: var(--optimized-text) !important;
  color: var(--optimized-text) !important;
  box-shadow: none !important;
}

body.optimized-mode .tactical-link.active {
  background: var(--optimized-accent) !important;
  border-color: var(--optimized-text) !important;
  transform: none !important;
}

body.optimized-mode .tactical-link.active .link-name {
  color: var(--optimized-text) !important;
  text-shadow: none !important;
}

body.optimized-mode .tactical-link.active .link-icon {
  background: var(--optimized-text) !important;
  color: var(--optimized-bg) !important;
  box-shadow: none !important;
}

/* Optimized Mode Overrides */
body.optimized-mode #stealthNav {
  background: var(--stealth-black) !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid var(--stealth-border) !important;
  box-shadow: none !important;
}

body.optimized-mode .nav-grid-overlay,
body.optimized-mode .tactical-overlay,
body.optimized-mode .tactical-grid-bg {
  display: none !important;
}

body.optimized-mode .status-indicator,
body.optimized-mode .icon-core,
body.optimized-mode .icon-ring,
body.optimized-mode .link-hex,
body.optimized-mode .link-scanner,
body.optimized-mode .link-scanner-mobile,
body.optimized-mode .btn-glow,
body.optimized-mode .header-scan-line,
body.optimized-mode .status-dot {
  animation: none !important;
  transition: none !important;
}

body.optimized-mode .tactical-line::after {
  display: none !important;
}

body.optimized-mode .nav-link-tech:hover,
body.optimized-mode .tactical-link:hover,
body.optimized-mode .tactical-menu-btn:hover .btn-frame {
  transform: none !important;
  box-shadow: none !important;
}

body.optimized-mode .security-badge,
body.optimized-mode .link-icon,
body.optimized-mode .status-text,
body.optimized-mode .link-name,
body.optimized-mode .tactical-title {
  text-shadow: none !important;
  box-shadow: none !important;
}

/* Optimized Mode Navigation Fixes */
body.optimized-mode .mobile-tactical-interface {
  background: var(--optimized-bg) !important;
}

body.optimized-mode .mobile-tactical-interface.optimized-nav .tactical-link {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
  background: var(--optimized-bg-alt) !important;
  border-color: var(--optimized-border) !important;
}

body.optimized-mode .tactical-header {
  background: var(--optimized-bg) !important;
  border-bottom-color: var(--optimized-border) !important;
}

body.optimized-mode .tactical-title {
  color: var(--optimized-text) !important;
  text-shadow: none !important;
}

body.optimized-mode .mobile-close-btn {
  background: var(--optimized-bg-alt) !important;
  border-color: var(--optimized-border) !important;
  color: var(--optimized-text) !important;
  box-shadow: none !important;
}

body.optimized-mode .link-name {
  color: var(--optimized-text) !important;
  text-shadow: none !important;
}

body.optimized-mode .link-code {
  color: var(--optimized-muted) !important;
}

body.optimized-mode .link-icon {
  background: var(--optimized-bg-alt) !important;
  border-color: var(--optimized-border) !important;
  color: var(--optimized-text) !important;
  box-shadow: none !important;
}

body.optimized-mode .tactical-overlay,
body.optimized-mode .tactical-grid-bg,
body.optimized-mode .header-scan-line,
body.optimized-mode .link-scanner-mobile {
  display: none !important;
}

/* Force visibility in optimized mode */
body.optimized-mode .mobile-tactical-interface.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.optimized-mode .menu-sectors {
  display: flex !important;
}

body.optimized-mode .tactical-link {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Toggle Button Styles for Optimized Mode */
.toggle-container.stealth-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 6px;
  background: rgba(255, 0, 0, 0.05);
  transition: all var(--stealth-normal) ease;
}

.toggle-container.stealth-toggle:hover {
  border-color: var(--stealth-red);
  background: rgba(255, 0, 0, 0.1);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

.toggle-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--stealth-gray-dim);
  transition: all var(--stealth-fast) ease;
}

.toggle-label.toggle-optimized-label.active,
.toggle-label.toggle-regular-label.active {
  color: var(--stealth-red);
  text-shadow: 0 0 5px var(--stealth-red-glow);
}

.toggle-button.stealth-toggle-btn {
  position: relative;
  width: 40px;
  height: 20px;
  background: var(--stealth-border);
  border: 1px solid var(--stealth-red);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--stealth-normal) ease;
  outline: none;
}

.toggle-button.stealth-toggle-btn::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  background: var(--stealth-red);
  border-radius: 50%;
  transition: all var(--stealth-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 0 8px var(--stealth-red-glow);
}

.toggle-button.stealth-toggle-btn.active {
  background: rgba(255, 0, 0, 0.2);
  border-color: var(--stealth-red);
}

.toggle-button.stealth-toggle-btn.active::before {
  transform: translateX(20px);
  background: var(--stealth-white);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.toggle-button.stealth-toggle-btn:hover {
  box-shadow: 0 0 15px var(--stealth-red-glow);
}

.toggle-button.stealth-toggle-btn:focus {
  outline: 2px solid var(--stealth-red);
  outline-offset: 2px;
}

/* Mobile Toggle Styles */
.tactical-link.toggle-link {
  background: rgba(255, 0, 0, 0.08) !important;
  border-color: var(--stealth-red) !important;
}

.toggle-button.mobile-toggle-btn {
  width: 35px;
  height: 18px;
  background: var(--stealth-border);
  border: 1px solid var(--stealth-red);
  border-radius: 9px;
  cursor: pointer;
  transition: all var(--stealth-normal) ease;
  outline: none;
  position: relative;
}

.toggle-button.mobile-toggle-btn::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  background: var(--stealth-red);
  border-radius: 50%;
  transition: all var(--stealth-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 0 6px var(--stealth-red-glow);
}

.toggle-button.mobile-toggle-btn.active {
  background: rgba(255, 0, 0, 0.2);
}

.toggle-button.mobile-toggle-btn.active::before {
  transform: translateX(17px);
  background: var(--stealth-white);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Optimized Mode Toggle Overrides */
body.optimized-mode .toggle-container.stealth-toggle,
body.optimized-mode .tactical-link.toggle-link {
  background: var(--optimized-bg-alt) !important;
  border-color: var(--optimized-border) !important;
  box-shadow: none !important;
}

body.optimized-mode .toggle-button.stealth-toggle-btn,
body.optimized-mode .toggle-button.mobile-toggle-btn {
  background: var(--optimized-accent) !important;
  border-color: var(--optimized-border) !important;
  box-shadow: none !important;
}

body.optimized-mode .toggle-button.stealth-toggle-btn::before,
body.optimized-mode .toggle-button.mobile-toggle-btn::before {
  background: var(--optimized-text) !important;
  box-shadow: none !important;
  transition: none !important;
}

body.optimized-mode .toggle-label {
  color: var(--optimized-muted) !important;
  text-shadow: none !important;
}

body.optimized-mode .toggle-label.active {
  color: var(--optimized-text) !important;
}

/* Responsive Design */
@media (max-width: 480px) {  .nav-container {
    padding: 0 0.5rem;
  }
  
  .nav-main-content {
    padding: 0.125rem 0;
    min-height: 1.5rem;
  }
  
  .identity-wrapper {
    gap: 0.75rem;
  }
  
  .identity-icon {
    width: 35px;
    height: 35px;
  }
  
  .name-primary {
    font-size: 1rem;
  }
  
  .name-secondary {
    font-size: 0.9rem;
  }
  
  .tactical-header {
    padding: 0.75rem 1rem;
    min-height: 60px;
  }
  
  .tactical-title {
    font-size: 1.25rem;
    margin: 0.25rem 0;
  }
  
  .mobile-close-btn {
    top: 0.5rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .tactical-menu-content {
    height: calc(100vh - 60px);
  }
  
  .menu-sectors {
    padding: 1rem 0.75rem;
    gap: 0.25rem;
  }
  
  .tactical-link {
    padding: 0.75rem;
    min-height: 60px;
    max-height: 75px;
  }
  
  .link-icon {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
  
  .link-name {
    font-size: 0.9rem;
  }
  
  .link-code {
    font-size: 0.7rem;
  }
}

@media (max-width: 360px) {
  .identity-wrapper {
    gap: 0.5rem;
  }
  
  .name-primary {
    font-size: 0.9rem;
  }
  
  .name-secondary {
    font-size: 0.8rem;
  }
  
  .btn-frame {
    width: 45px;
    height: 45px;
  }
  
  .nav-main-content {
    min-height: 3rem;
  }
  
  .tactical-header {
    padding: 0.5rem 0.75rem;
    min-height: 50px;
  }
  
  .tactical-title {
    font-size: 1.1rem;
    margin: 0.125rem 0;
  }
  
  .mobile-close-btn {
    top: 0.25rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  .tactical-menu-content {
    height: calc(100vh - 50px);
  }
  
  .menu-sectors {
    padding: 0.75rem 0.5rem;
    gap: 0.125rem;
  }
  
  .tactical-link {
    padding: 0.5rem;
    min-height: 55px;
    max-height: 65px;
  }
  
  .link-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  .link-name {
    font-size: 0.85rem;
  }
  
  .link-code {
    font-size: 0.65rem;
  }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
  :root {
    --stealth-red: #ff3333;
    --stealth-red-glow: rgba(255, 51, 51, 0.5);
  }
  
  .nav-link-tech,
  .tactical-link {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .icon-core,
  .icon-ring,
  .status-indicator,
  .tactical-grid-bg,
  .header-scan-line {
    animation: none !important;
  }
}

/* Print styles */
@media print {
  #stealthNav {
    position: static !important;
    background: white !important;
    color: black !important;
    border: 1px solid black !important;
    box-shadow: none !important;
  }
  
  .nav-grid-overlay,
  .tactical-overlay,
  .tactical-grid-bg,
  .mobile-tactical-interface {
    display: none !important;
  }
  
  .nav-link-tech,
  .identity-name {
    color: black !important;
  }
}

/* Mobile Menu Debug and Safety Styles */
body.mobile-menu-open {
  position: fixed;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.mobile-tactical-interface * {
  pointer-events: auto;
}

.mobile-tactical-interface.active {
  pointer-events: auto;
}

/* Ensure mobile links are properly interactive */
.tactical-link {
  -webkit-tap-highlight-color: rgba(255, 0, 0, 0.2);
  user-select: none;
}

.tactical-link:active {
  background: rgba(255, 0, 0, 0.15) !important;
  transform: scale(0.98);
}

     /* =========================
   STEALTH-NAV.CSS END
   ========================= */

   /* =========================
   name-popup-reminder.js START
   ========================= */

/* Name Popup Reminder Styles - SLEEK STEALTHY DESIGN */
.name-popup-reminder {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 20px 40px rgba(220, 38, 38, 0.2));
}

.name-popup-reminder.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.popup-content {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(20, 20, 20, 0.95) 50%, 
        rgba(0, 0, 0, 0.95) 100%);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    padding: 18px 22px;
    min-width: 200px;
    max-width: 280px;
    position: relative;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(220, 38, 38, 0.1),
        0 0 20px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(220, 38, 38, 0.05) 25%, 
        rgba(239, 68, 68, 0.05) 50%, 
        rgba(220, 38, 38, 0.05) 75%, 
        transparent 100%);
    border-radius: 11px;
    pointer-events: none;
    animation: stealthShimmer 3s ease-in-out infinite;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.popup-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    animation: stealthPulse 2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.popup-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 6px;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.popup-close:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.popup-message {
    color: #f3f4f6;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.popup-footer {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.popup-timer {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    padding: 4px 12px;
    color: #dc2626;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Fira Code', monospace;
    min-width: 45px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.popup-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Animations */
@keyframes stealthShimmer {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-100%);
    }
    50% {
        opacity: 0.6;
        transform: translateX(100%);
    }
}

@keyframes stealthPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(220, 38, 38, 0.6);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .name-popup-reminder {
        left: 50% !important;
        transform: translateX(-50%) translateY(20px) scale(0.8);
    }
    
    .name-popup-reminder.active {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    .popup-content {
        min-width: 180px;
        max-width: 260px;
        padding: 16px 20px;
    }
    
    .popup-message {
        font-size: 13px;
    }
    
    .popup-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .popup-close {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        min-width: 160px;
        max-width: 240px;
        padding: 14px 18px;
    }
    
    .popup-message {
        font-size: 12px;
    }
    
    .popup-timer {
        font-size: 10px;
        padding: 3px 10px;
    }
}

/* Optimized mode styles */
body.optimized-mode .name-popup-reminder {
    transition: opacity 0.2s ease;
}

body.optimized-mode .popup-content::before {
    animation: none;
}

body.optimized-mode .popup-icon {
    animation: none;
}

body.optimized-mode .popup-close:hover {
    transform: none;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .popup-content {
        border: 2px solid #dc2626;
        background: rgba(0, 0, 0, 0.98);
    }
    
    .popup-message {
        color: #ffffff;
    }
    
    .popup-timer {
        background: #dc2626;
        color: #ffffff;
        border-color: #dc2626;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .name-popup-reminder {
        transition: opacity 0.2s ease;
    }
    
    .popup-content::before {
        animation: none;
    }
    
    .popup-icon {
        animation: none;
    }
    
    .popup-close:hover {
        transform: none;
    }
}

    /* =========================
    name-popup-reminder.js END
    ========================= */


    /* === PRIVATE CONTENT TERMINAL REDESIGN START === */
/* Place new styles for the overhauled private-content.html below this line */


/* === PRIVATE CONTENT TERMINAL REDESIGN END === */