/* ========================= */
/* MODERN PORTFOLIO STYLES */
/* ========================= */

/* CSS Variables for Easy Theming */
:root {
  --primary-color: #00d9ff;
  --secondary-color: #a855f7;
  --accent-color: #f59e0b;
  --bg-dark: #0a0a0f;
  --bg-card: #1a1a2e;
  --bg-card-hover: #252540;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 217, 255, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 217, 255, 0.2);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Global reset/rules */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  padding: 0;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-card) 100%);
  color: var(--text-primary);
}

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

/* Selection Styling */
::selection {
  background: var(--primary-color);
  color: var(--bg-dark);
}

::-moz-selection {
  background: var(--primary-color);
  color: var(--bg-dark);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
}

/* Services Section (unchanged) */
#services {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  padding: 80px 20px;
  text-align: center;
  color: var(--text-primary);
  border-radius: 30px;
  margin: 40px 20px;
}

#services h2 {
  font-size: 2.5em;
  margin-bottom: 1.5em;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

#services li {
  display: inline-block;
  vertical-align: top;
  width: 33.33%;
  padding: 20px;
  transition: transform var(--transition-normal);
}

#services li:hover {
  transform: translateY(-10px);
}

#services li i {
  font-size: 3em;
  color: var(--primary-color);
  margin-bottom: 0.5em;
  display: block;
  transition: transform var(--transition-normal);
}

#services li:hover i {
  transform: scale(1.2) rotate(10deg);
}

#services li h3 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

#services li p {
  margin-top: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.service-container {
  margin-bottom: 20px;
  overflow: hidden;
}

.service-bar {
  position: relative;
  padding: 25px;
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.service-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

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

.service-bar:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
  background: rgba(0, 217, 255, 0.05);
}

.service-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(168, 85, 247, 0.1));
  z-index: 1;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.proficiency-note {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.6;
}

.service-icon {
  padding: 10px;
  color: var(--primary-color);
  font-size: 2.5rem;
  transition: transform var(--transition-normal);
}

.service-bar:hover .service-icon {
  transform: scale(1.2) rotate(10deg);
}

.service-text {
  padding: 10px;
  color: var(--text-primary);
  z-index: 2;
  position: relative;
}

.service-text h3 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.service-text p {
  color: var(--text-secondary);
}

header {
  position: relative;
  padding: 20px 0;
}

header h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(2rem, 4vw, 3em);
  text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
  height: auto;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

#banner h1 {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  display: inline-block;
  padding: 20px 30px;
  color: var(--bg-dark);
  word-wrap: break-word;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#banner p {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  display: inline-block;
  padding: 15px 25px;
  color: #4a5568;
  border-radius: 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Search form */
#search-form {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 10px;
}

#search-input {
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  font-family: 'Inter', Arial, sans-serif;
  width: 300px;
  color: var(--text-primary);
  transition: all var(--transition-normal);
}

#search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

#search-input::placeholder {
  color: var(--text-secondary);
}

#search-form button {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 600;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

#search-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 217, 255, 0.4);
}

#search-form button:active {
  transform: translateY(0);
}

#search-results {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 10px;
  margin-top: 10px;
  box-shadow: var(--shadow-lg);
}

/* Game section styles */
#games {
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px 20px;
  text-align: center;
}

#games h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--primary-color);
  font-weight: 800;
}

.game-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  transition: all var(--transition-normal);
}

.game-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
  background: rgba(0, 217, 255, 0.05);
}

.game-image img {
  max-width: 180px;
  border-radius: 15px;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
  margin-right: 30px;
  transition: transform var(--transition-normal);
}

.game-box:hover .game-image img {
  transform: scale(1.05) rotate(2deg);
}

.game-details {
  flex: 1;
  text-align: left;
}

.game-details h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-primary);
  font-weight: 700;
}

.game-details p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.6;
}

.game-details a {
  color: var(--primary-color);
  text-decoration: none;
  border: 2px solid var(--primary-color);
  padding: 10px 20px;
  border-radius: 25px;
  transition: all var(--transition-normal);
  display: inline-block;
  font-weight: 600;
}

.game-details a:hover {
  background: var(--primary-color);
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

/* Typing text cursor */
#typing-text::after {
  content: '|';
  margin-left: 2px;
  opacity: 1;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

#typing-text {
  display: inline-block;
  word-wrap: break-word;
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease-out, transform 1s ease-out;
  transform: translateY(20px);
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation Enhancement - Responsive & Modern */
nav {
  position: relative;
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 20px;
  transition: all var(--transition-normal);
}

nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 15px 30px;
  box-shadow: var(--shadow-md);
  width: 100%;
  position: relative;
}

nav li {
  margin: 0;
}

nav a {
  display: inline-block;
  text-decoration: none;
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 18px;
  border-radius: 30px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.2), transparent);
  transition: left 0.5s;
}

nav a:hover::before {
  left: 100%;
}

nav a:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
  color: white;
}

nav a.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

nav li.ai-nick-nav {
  position: absolute;
  left: 12px;
  top: -12px;
  margin-left: 0;
  z-index: 2;
}

nav a.ai-nick-link {
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(0, 217, 255, 0.35);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.2);
}

nav a.ai-nick-link:hover {
  background: rgba(0, 217, 255, 0.12);
  transform: translateY(-1px);
}

@media screen and (min-width: 1024px) {
  nav ul {
    flex-wrap: nowrap;
  }
}

nav a.ai-nick-link .ai-nick-ai {
  background: linear-gradient(90deg, #00d9ff, #a855f7, #f59e0b, #22c55e, #06b6d4, #00d9ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.6);
  animation: aiNickGlow 3s ease-in-out infinite;
}

@keyframes aiNickGlow {
  0% {
    background-position: 0% 50%;
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.6);
  }
  50% {
    background-position: 100% 50%;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
  }
  100% {
    background-position: 0% 50%;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  }
}

/* Responsive Navigation */
@media screen and (max-width: 768px) {
  nav ul {
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 20px;
  }

  nav a {
    font-size: 14px;
    padding: 10px 18px;
  }
}

/* Back to Top Button - Circular with Gradient */
#backToTop {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 25px rgba(0, 217, 255, 0.3);
  backdrop-filter: blur(10px);
}

#backToTop.visible,
#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

#backToTop:hover {
  transform: scale(1.15) translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 217, 255, 0.6);
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color), var(--secondary-color));
}

#backToTop:active {
  transform: scale(0.95);
}

#backToTop::before {
  content: '↑';
  font-size: 28px;
  font-weight: bold;
  animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Page Transitions - Base */
body {
  animation: pageEnter 0.5s ease-in-out;
}

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

/* Page-Specific Animations */
/* Home Page - Fade and Scale */
body[data-page="home"] {
  animation: homeEnter 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes homeEnter {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* About Page - Slide from Left */
body[data-page="about"] {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Projects/Showcase - Slide Up with Bounce */
body[data-page="projects"],
body[data-page="showcase"] {
  animation: bounceInUp 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceInUp {
  from {
    opacity: 0;
    transform: translateY(100px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* AI/ML Pages - Glitch Effect */
body[data-page="ai"],
body[data-page="ml"],
body[data-page="interactive"] {
  animation: glitchEnter 0.6s ease-out;
}

@keyframes glitchEnter {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  25% {
    transform: translateX(10px);
  }
  50% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Contact Page - Fade with Rotation */
body[data-page="contact"] {
  animation: rotateIn 0.7s ease-out;
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-5deg) scale(0.95);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

/* Blog Page - Slide from Right */
body[data-page="blog"] {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Certificates Page - Zoom In */
body[data-page="certificates"] {
  animation: zoomIn 0.6s ease-out;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Performance/Analytics Pages - Data Slide */
body[data-page="performance"],
body[data-page="analytics"] {
  animation: dataSlide 0.7s ease-out;
}

@keyframes dataSlide {
  from {
    opacity: 0;
    transform: translateY(-30px) skewY(-2deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) skewY(0);
  }
}

#backToTop:active {
  transform: translateY(-2px);
}

@media screen and (max-width: 768px) {
  #backToTop {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

/* Page Fade In Animation */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  animation: pageEnter 0.6s ease-out;
}

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

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page Loader (Full Screen) */
#pageLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-card) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#pageLoader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Disable page load animations & preloaders */
body,
body[data-page] {
  animation: none !important;
}

#preloader,
#pageLoader {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.loader-content {
  text-align: center;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  border-right-color: var(--secondary-color);
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loader-text {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: rgba(26, 26, 46, 0.95);
  color: var(--text-primary);
  text-align: center;
  border-radius: 8px;
  padding: 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.9rem;
  border: 1px solid var(--primary-color);
  box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--primary-color) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Accessibility: Focus States */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip to main content link (for screen readers) */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-color);
  color: var(--bg-dark);
  padding: 10px 20px;
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-to-main:focus {
  top: 0;
}

/* Print Styles */
@media print {
  #canvas-container,
  #backToTop,
  nav,
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  a {
    text-decoration: underline;
  }
}

/* Lazy Loading Images */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Improved Mobile Responsiveness */
@media screen and (max-width: 480px) {
  :root {
    font-size: 14px;
  }
  
  h1 {
    font-size: 2rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  .container {
    padding: 0 15px;
  }
  
  nav ul {
    padding: 10px 15px;
  }
  
  nav a {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
}

/* Performance: GPU Acceleration for Animations */
.demo-card,
nav a,
button,
#backToTop {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  #canvas-container {
    display: none;
  }
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 80px;
  right: 30px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(10, 10, 15, 0.95));
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 15px 25px;
  border-radius: 12px;
  border: 1px solid var(--primary-color);
  box-shadow: 0 5px 25px rgba(0, 217, 255, 0.3);
  z-index: 9998;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
  max-width: 300px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast.success {
  border-color: var(--success-color);
  box-shadow: 0 5px 25px rgba(16, 185, 129, 0.3);
}

.toast.error {
  border-color: #ef4444;
  box-shadow: 0 5px 25px rgba(239, 68, 68, 0.3);
}

.toast.info {
  border-color: var(--accent-color);
  box-shadow: 0 5px 25px rgba(245, 158, 11, 0.3);
}

@media screen and (max-width: 768px) {
  .toast {
    right: 20px;
    left: 20px;
    max-width: none;
  }
  
  #backToTop {
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}

/* Professional Contact Card */
#contact-info {
  padding: 60px 20px;
}

.contact-info-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.professional-card {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(10, 10, 15, 0.8));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.professional-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 217, 255, 0.2);
  border-color: rgba(0, 217, 255, 0.4);
}

.card-header {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: center;
}

.avatar-section {
  position: relative;
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: white;
  box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
}

.status-indicator {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 16px;
  height: 16px;
  background: var(--success-color);
  border: 3px solid var(--bg-dark);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
}

.card-title h3 {
  margin: 0;
  font-size: 28px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-title p {
  margin: 5px 0;
  color: var(--text-secondary);
  font-size: 16px;
}

.location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-tertiary);
  font-size: 14px;
  margin-top: 5px;
}

.location i {
  color: var(--accent-color);
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-btn::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;
}

.contact-btn:hover::before {
  left: 100%;
}

.contact-btn i {
  font-size: 20px;
}

.linkedin-btn:hover {
  background: rgba(0, 119, 181, 0.2);
  border-color: #0077b5;
  transform: translateY(-2px);
}

.github-btn:hover {
  background: rgba(51, 51, 51, 0.2);
  border-color: #333;
  transform: translateY(-2px);
}

.email-btn:hover {
  background: rgba(234, 67, 53, 0.2);
  border-color: #ea4335;
  transform: translateY(-2px);
}

.resume-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  grid-column: span 2;
}

.resume-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 217, 255, 0.4);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.qr-section {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(10, 10, 15, 0.8));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 24px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.qr-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 217, 255, 0.2);
  border-color: rgba(0, 217, 255, 0.4);
}

.qr-code {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 15px;
}

.qr-section p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

@media screen and (max-width: 768px) {
  .contact-info-container {
    grid-template-columns: 1fr;
  }
  
  .contact-links {
    grid-template-columns: 1fr;
  }
  
  .resume-btn {
    grid-column: span 1;
  }
  
  .quick-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .stat-number {
    font-size: 28px;
  }
}

/* Tech Stack Visualization */
#tech-stack {
  padding: 80px 20px;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.5), rgba(26, 26, 46, 0.5));
}

#tech-stack h2 {
  text-align: center;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 50px;
  font-size: 18px;
}

.tech-stack-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.radar-chart-container {
  position: relative;
  padding: 40px;
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 24px;
  backdrop-filter: blur(10px);
}

.radar-chart-container canvas {
  max-width: 100%;
  height: auto;
}

.tech-details {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.tech-details h3 {
  font-size: 28px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tech-category {
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
}

.tech-category:hover {
  transform: translateX(10px);
  border-color: var(--primary-color);
  box-shadow: 0 5px 20px rgba(0, 217, 255, 0.2);
}

.tech-category h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-category i {
  color: var(--primary-color);
  font-size: 20px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 20px;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: var(--primary-color);
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 217, 255, 0.4);
}

/* Career Timeline */
#career-timeline {
  padding: 80px 20px;
}

#career-timeline h2 {
  text-align: center;
  margin-bottom: 10px;
}

.timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: 50%;
  position: relative;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateX(-50px);
  animation: slideInFromLeft 0.8s forwards;
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: 50%;
  transform: translateX(50px);
  animation: slideInFromRight 0.8s forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }

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

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

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: 4px solid var(--bg-dark);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.8);
  }
}

.timeline-content {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(10, 10, 15, 0.8));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 16px;
  padding: 30px;
  width: calc(100% - 60px);
  transition: all 0.3s ease;
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 30px;
  width: 0;
  height: 0;
  border-style: solid;
}

.timeline-item .timeline-content::before {
  right: -20px;
  border-width: 10px 0 10px 20px;
  border-color: transparent transparent transparent rgba(0, 217, 255, 0.2);
}

.timeline-item:nth-child(even) .timeline-content::before {
  left: -20px;
  right: auto;
  border-width: 10px 20px 10px 0;
  border-color: transparent rgba(0, 217, 255, 0.2) transparent transparent;
}

.timeline-content:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
  box-shadow: 0 10px 40px rgba(0, 217, 255, 0.3);
}

.timeline-date {
  display: inline-block;
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-content h3 {
  font-size: 24px;
  margin: 10px 0;
  color: var(--text-primary);
}

.timeline-content h4 {
  font-size: 18px;
  color: var(--primary-color);
  margin: 5px 0 15px 0;
  font-weight: 600;
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 15px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.timeline-tags span {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 12px;
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
}

@media screen and (max-width: 768px) {
  .tech-stack-container {
    grid-template-columns: 1fr;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item,
  .timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-left: 60px;
    padding-right: 0;
  }
  
  .timeline-dot {
    left: 20px;
  }
  
  .timeline-content::before,
  .timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    right: auto;
    border-width: 10px 20px 10px 0;
    border-color: transparent rgba(0, 217, 255, 0.2) transparent transparent;
  }
}

/* Enhanced Footer */
footer {
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.95), rgba(5, 5, 10, 1));
  border-top: 1px solid rgba(0, 217, 255, 0.2);
  padding: 80px 20px 30px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), var(--secondary-color), var(--accent-color), transparent);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 50px;
  margin-bottom: 50px;
}

.footer-column h3.footer-heading {
  font-size: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.footer-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Footer Social Icons */
.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 18px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
  z-index: -1;
}

.social-icon:hover::before {
  opacity: 1;
}

.social-icon:hover {
  transform: translateY(-5px) rotate(360deg);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.4);
  color: white;
}

.social-icon.linkedin:hover {
  border-color: #0077b5;
}

.social-icon.github:hover {
  border-color: #333;
}

.social-icon.email:hover {
  border-color: #ea4335;
}

.social-icon.phone:hover {
  border-color: var(--success-color);
}

/* Ensure split buttons have same base styles */
.social-icon.split-btn.email:hover {
  border-color: #ea4335;
}

.social-icon.split-btn.phone:hover {
  border-color: var(--success-color);
}

/* Footer Split Button Functionality */
.footer-social-split {
  position: relative;
  display: inline-block;
}

.social-icon.split-btn {
  cursor: pointer;
  transition: all 0.3s ease;
}

.social-icon.split-btn .main-icon {
  opacity: 1;
  transform: scale(1);
  transition: all 0.3s ease;
}

.social-icon.split-btn.split-active .main-icon {
  opacity: 0;
  transform: scale(0);
}

.footer-split-options {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
  z-index: 100;
}

.social-icon.split-btn.split-active + .footer-split-options {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.footer-split-option {
  width: 70px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 46, 0.95);
  border: 2px solid;
  border-radius: 50%;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  cursor: pointer;
  gap: 5px;
}

.footer-split-option i {
  font-size: 20px;
}

.footer-split-option span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.footer-split-option.send-btn {
  border-color: var(--primary-color);
  animation: splitLeft 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.footer-split-option.copy-btn {
  border-color: var(--accent-color);
  animation: splitRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.footer-split-option.call-btn {
  border-color: var(--success-color);
  animation: splitLeft 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.footer-split-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, currentColor, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.footer-split-option:hover::before {
  opacity: 0.2;
}

.footer-split-option:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.4);
}

.footer-split-option.send-btn:hover,
.footer-split-option.call-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.footer-split-option.copy-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Copy Notification for Footer */
.footer-copy-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--success-color), var(--primary-color));
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  font-weight: bold;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
  animation: slideInRight 0.5s ease;
}

.footer-copy-notification i {
  font-size: 20px;
}

@keyframes splitLeft {
  from {
    transform: translateX(0) scale(0);
    opacity: 0;
  }
  to {
    transform: translateX(-80px) scale(1);
    opacity: 1;
  }
}

@keyframes splitRight {
  from {
    transform: translateX(0) scale(0);
    opacity: 0;
  }
  to {
    transform: translateX(80px) scale(1);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  padding: 5px 0;
}

.footer-links a i {
  color: var(--primary-color);
  font-size: 12px;
  transition: transform 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-links a:hover i {
  transform: scale(1.2);
}

/* Newsletter Form */
.newsletter-form {
  margin-top: 20px;
}

.newsletter-input-group {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 5px;
  transition: all 0.3s ease;
}

.newsletter-input-group:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.newsletter-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 14px;
}

.newsletter-input-group input::placeholder {
  color: var(--text-tertiary);
}

.newsletter-input-group button {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s ease;
}

.newsletter-input-group button:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 5px 20px rgba(0, 217, 255, 0.4);
}

.newsletter-note {
  color: var(--text-tertiary);
  font-size: 12px;
  margin-top: 10px;
}

/* Newsletter Notification */
.newsletter-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--success-color), #34d399);
  color: white;
  padding: 15px 25px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
  z-index: 10000;
  animation: slideInRight 0.3s ease, slideOutRight 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

/* Footer Bottom */
.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.footer-tech {
  color: var(--text-tertiary);
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-tech i {
  color: var(--accent-color);
}

@media screen and (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media screen and (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  footer {
    padding: 60px 20px 30px;
  }
}

/* 3D Project Cards with Flip Animation */
.project-card-3d {
  width: 100%;
  height: 400px;
  perspective: 1000px;
  position: relative;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.project-card-3d:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-front {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(10, 10, 15, 0.9));
  border: 1px solid rgba(0, 217, 255, 0.2);
  display: flex;
  flex-direction: column;
  padding: 30px;
  position: relative;
}

.card-front::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0.1;
  z-index: 0;
}

.card-back {
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(168, 85, 247, 0.1));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 217, 255, 0.3);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  text-align: center;
}

.card-front h3 {
  font-size: 28px;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.card-front p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.card-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.card-tech-tag {
  padding: 6px 14px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 20px;
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
}

.card-back h4 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.card-back-content {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 30px;
}

.card-back-links {
  display: flex;
  gap: 15px;
}

.card-link {
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 50px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.5);
}

/* 3D Depth Shadow Effect */
.project-card-depth {
  position: relative;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
}

.project-card-depth:hover {
  transform: translateY(-15px) rotateX(5deg) rotateY(5deg);
}

.project-card-depth::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(168, 85, 247, 0.2));
  border-radius: 20px;
  z-index: -1;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card-depth:hover::before {
  opacity: 1;
}

/* Gradient Overlay on Hover */
.project-card-overlay {
  position: relative;
  overflow: hidden;
}

.project-card-overlay::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(0, 217, 255, 0.3) 50%, 
    transparent 70%
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.8s ease;
}

.project-card-overlay:hover::after {
  transform: translateX(0) translateY(0) rotate(45deg);
}
