/* ===================================
   RIAZ PORTFOLIO - Complete Standalone CSS
   No external dependencies required
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ===================================
   CSS VARIABLES & DESIGN TOKENS
   =================================== */

:root {
  /* Light Mode Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  
  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent-glow: rgba(99, 102, 241, 0.3);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
  
  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-base: 300ms ease;
  --transition-fast: 150ms ease;
  --transition-slow: 500ms ease;
  
  /* Typography */
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Space Grotesk', sans-serif;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #0f0f1e;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* ===================================
   GLOBAL STYLES
   =================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-base);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input, textarea {
  font-family: var(--font-primary);
}

/* ===================================
   GRADIENT & UTILITY CLASSES
   =================================== */

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===================================
   CUSTOM CURSOR
   =================================== */

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity var(--transition-fast);
  display: none; /* Hide by default */
}

.cursor-outline {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity var(--transition-fast);
  display: none; /* Hide by default */
}

/* Show custom cursor only on desktop */
@media (min-width: 769px) {
  .cursor-dot,
  .cursor-outline {
    display: block;
  }
}

body.cursor-active .cursor-dot,
body.cursor-active .cursor-outline {
  opacity: 1;
}

.cursor-dot.hover {
  background: var(--accent-secondary);
  transform: scale(1.5);
}

.cursor-outline.hover {
  border-color: var(--accent-secondary);
  width: 40px;
  height: 40px;
}

/* Pointer cursor for interactive elements */
a, button, .btn, .nav-link, input, textarea, select {
  cursor: pointer;
}

/* ===================================
   PARTICLES BACKGROUND
   =================================== */

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent-primary);
  opacity: 0.5;
  border-radius: 50%;
}

/* ===================================
   NAVBAR STYLES
   =================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 15, 30, 0.95);
}

.navbar.hide {
  transform: translateY(-100%);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-secondary);
  white-space: nowrap;
  transition: all var(--transition-base);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  position: relative;
  color: var(--text-primary);
  font-weight: 500;
  transition: color var(--transition-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-base);
}

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

.nav-link:hover {
  color: var(--accent-primary);
}

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text-primary);
  transition: all var(--transition-base);
}

.theme-toggle:hover {
  color: var(--accent-primary);
  transform: rotate(20deg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================
   HERO SECTION STYLES
   =================================== */

.portfolio-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
}

.sphere-1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  top: -50px;
  right: 10%;
  animation: float 8s ease-in-out infinite;
}

.sphere-2 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  bottom: 100px;
  left: 5%;
  animation: float 10s ease-in-out infinite 2s;
}

.sphere-3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  top: 50%;
  right: 2%;
  animation: float 9s ease-in-out infinite 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-30px) translateX(20px); }
  50% { transform: translateY(-60px) translateX(-20px); }
  75% { transform: translateY(-30px) translateX(30px); }
}

.portfolio-hero-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out;
}

.badge-icon {
  font-size: 1.2rem;
  animation: wave 2s ease-in-out infinite;
}

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

/* Hero Title */
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* Typing Text */
.typing-text {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-top: var(--space-md);
  min-height: 2rem;
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.3rem;
  background: var(--accent-primary);
  margin-left: 5px;
  animation: blink 1s infinite;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  font-family: var(--font-primary);
  font-size: 1rem;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-3px);
}

.btn-large {
  padding: 1.2rem 3rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* 3D Developer Image */
.hero-visual-3d {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  perspective: 1000px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-visual-3d img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(99, 102, 241, 0.3));
  animation: float3d 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

@keyframes float3d {
  0%, 100% { transform: translateY(0) rotateY(-10deg) rotateX(5deg); }
  50% { transform: translateY(-20px) rotateY(10deg) rotateX(-5deg); }
}

.hero-visual-glow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 100px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.4), transparent);
  filter: blur(40px);
  z-index: -1;
}

/* Social Links */
.social-links-portfolio {
  display: flex;
  justify-content: flex-start;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.social-links-portfolio a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: 50%;
  color: white;
  font-size: 1.3rem;
  transition: all var(--transition-base);
}

.social-links-portfolio a:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px var(--accent-glow);
}

/* ===================================
   ANIMATIONS FOR DATA-ANIMATE
   =================================== */

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

[data-animate] {
  animation: fadeInUp 0.6s ease-out both;
}

/* ===================================
   SECTION HEADER STYLES
   =================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-label {
  display: inline-block;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===================================
   ABOUT SECTION
   =================================== */

.about-content-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-2xl);
  align-items: center;
}

.about-image {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.about-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

/* ===================================
   SERVICE CARDS
   =================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  background: var(--bg-card);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-card h3 {
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===================================
   SKILLS SECTION
   =================================== */

.skill-bar-container {
  margin-bottom: var(--space-lg);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.skill-bar-bg {
  width: 100%;
  height: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  width: 0;
  transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===================================
   CONTACT FORM STYLES
   =================================== */

.contact-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* ===================================
   FOOTER STYLES
   =================================== */

.footer {
  background: var(--bg-secondary);
  padding: var(--space-2xl) 0 var(--space-lg);
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  margin-top: var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-col h4 {
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: var(--space-sm);
}

.footer-col ul li a {
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.footer-col ul li a:hover {
  color: var(--accent-primary);
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  color: var(--accent-primary);
  transition: all var(--transition-base);
}

.social-links a:hover {
  background: var(--accent-gradient);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

/* ===================================
   PROFILE CARD
   =================================== */

.profile-card {
  background: var(--bg-card);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  transform-style: preserve-3d;
  transition: all var(--transition-base);
}

.profile-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.2);
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid transparent;
  background: var(--accent-gradient);
  padding: 5px;
  margin: 0 auto var(--space-lg);
  display: block;
  transition: all var(--transition-base);
}

.profile-card:hover .profile-image {
  transform: scale(1.05);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 992px) {
  .portfolio-hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-visual-3d {
    order: 2;
    margin-top: var(--space-2xl);
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .about-content-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-image {
    margin: 0 auto;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .social-links-portfolio {
    justify-content: center;
  }

  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 992px) {
  .portfolio-hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .hero-visual-3d {
    max-width: 100%;
    height: auto;
  }

  .skills-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-xl) !important;
  }

  .about-content-grid {
    grid-template-columns: 1fr !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  /* Hide custom cursor on mobile */
  .cursor-dot,
  .cursor-outline {
    display: none;
  }

  .portfolio-hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
  }

  .typing-text {
    font-size: 1.1rem;
  }

  .typing-cursor {
    height: 1.1rem;
  }

  .profile-card {
    padding: var(--space-lg);
  }

  .profile-image {
    width: 150px;
    height: 150px;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    z-index: 1000;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-visual-3d {
    max-width: 100%;
    display: block;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .social-links-portfolio a {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .container {
    padding: 0 1.5rem;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .skills-grid {
    grid-template-columns: 1fr !important;
  }

  .skills-bars {
    width: 100% !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
  }



  .contact-form-card {
    padding: var(--space-lg) !important;
  }

  .form-input {
    width: 100%;
  }

  .btn-full {
    width: 100%;
  }

  #about,
  #services,
  #skills,
  #projects,
  #certificates,
  #contact {
    padding: var(--space-xl) 0 !important;
  }
}

@media (max-width: 480px) {
  /* Hide custom cursor on very small screens */
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }

  .typing-text {
    font-size: 1rem;
  }

  .typing-cursor {
    height: 1rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .hero-buttons {
    gap: 0.5rem;
  }

  .social-links-portfolio {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .social-links-portfolio a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .btn-large {
    padding: 1rem 2rem;
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  .hero-visual-3d {
    max-width: 280px;
  }

  .form-group.two-column {
    grid-template-columns: 1fr;
  }

  .footer-col {
    text-align: center;
  }

  .section-header {
    margin-bottom: var(--space-lg);
  }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
  .navbar,
  .footer,
  .social-links-portfolio,
  .nav-toggle,
  .theme-toggle {
    display: none !important;
  }

  .profile-card,
  .feature-card,
  .about-content-grid {
    break-inside: avoid;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.btn:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ===================================
   SKILLS SECTION GRID
   =================================== */

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.skills-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ===================================
   CONTACT FORM STYLES
   =================================== */

.contact-form-container {
  max-width: 800px;
  margin: 0 auto;
}

.contact-form-card {
  background: var(--bg-card);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-input {
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.form-input-full {
  width: 100%;
  margin-bottom: var(--space-md);
}

.btn-full {
  width: 100%;
  margin-top: var(--space-md);
}

/* ===================================
   PROJECTS SECTION
   =================================== */

#projects {
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  z-index: 1;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(99, 102, 241, 0.1);
  position: relative;
  --glow-x: 50%;
  --glow-y: 50%;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: var(--radius-lg);
  z-index: 1;
}

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

.project-image {
  position: relative;
  overflow: hidden;
  height: 250px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1) rotate(2deg);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-lg);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link {
  color: white;
  padding: 0.8rem 2rem;
  border: 2px solid white;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  background: rgba(99, 102, 241, 0.2);
}

.project-link:hover {
  background: var(--accent-primary);
  transform: scale(1.05);
}

.project-content {
  padding: var(--space-lg);
  position: relative;
  z-index: 2;
}

.project-content h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 1.3rem;
  margin-top: 0;
}

.project-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tag:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ===================================
   CERTIFICATES SECTION
   =================================== */

#certificates {
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  z-index: 1;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.certificate-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(168, 85, 247, 0.1);
  position: relative;
  --glow-x: 50%;
  --glow-y: 50%;
}

.certificate-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-secondary);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.certificate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(168, 85, 247, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: var(--radius-lg);
  z-index: 1;
}

.certificate-card:hover::before {
  opacity: 1;
}

.certificate-image {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.certificate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.certificate-card:hover .certificate-image img {
  transform: scale(1.1);
}

.certificate-content {
  padding: var(--space-lg);
  position: relative;
  z-index: 2;
}

.certificate-content h3 {
  color: var(--text-primary);
  margin: 0 0 var(--space-sm) 0;
  font-size: 1.2rem;
}

.certificate-issuer {
  color: var(--accent-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: var(--space-xs);
}

.certificate-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: var(--space-md);
}

.certificate-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* ===================================
   GLOW EFFECTS ENHANCEMENT
   =================================== */

.feature-card,
.project-card,
.certificate-card {
  --glow-x: 50%;
  --glow-y: 50%;
}

.feature-card::before,
.project-card::before,
.certificate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at var(--glow-x) var(--glow-y),
    rgba(99, 102, 241, 0.1) 0%,
    rgba(168, 85, 247, 0.05) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: var(--radius-lg);
  z-index: 0;
}

.feature-card:hover::before {
  opacity: 1;
}

/* ===================================
   ENLARGED BACKGROUND SPHERES
   =================================== */

.sphere-1 {
  width: 400px !important;
  height: 400px !important;
  top: -100px !important;
  left: -100px !important;
}

.sphere-2 {
  width: 350px !important;
  height: 350px !important;
  bottom: -50px !important;
  right: -50px !important;
}

.sphere-3 {
  width: 300px !important;
  height: 300px !important;
  top: 50% !important;
  right: -75px !important;
}

/* ===================================
   ENHANCED ANIMATIONS
   =================================== */

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

/* ===================================
   AOS ANIMATION CLASSES (from JavaScript)
   =================================== */

[data-aos="fade-up"] {
  animation: fadeUp 0.6s ease-out forwards;
  opacity: 0;
}

[data-aos="fade-down"] {
  animation: fadeDown 0.6s ease-out forwards;
  opacity: 0;
}

[data-aos="fade-left"] {
  animation: fadeLeft 0.6s ease-out forwards;
  opacity: 0;
}

[data-aos="fade-right"] {
  animation: fadeRight 0.6s ease-out forwards;
  opacity: 0;
}

[data-aos="flip-left"] {
  animation: flipLeft 0.6s ease-out forwards;
  opacity: 0;
}

[data-aos="flip-right"] {
  animation: flipRight 0.6s ease-out forwards;
  opacity: 0;
}

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

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes flipLeft {
  from {
    opacity: 0;
    transform: perspective(400px) rotateY(90deg);
  }
  to {
    opacity: 1;
    transform: perspective(400px) rotateY(0deg);
  }
}

@keyframes flipRight {
  from {
    opacity: 0;
    transform: perspective(400px) rotateY(-90deg);
  }
  to {
    opacity: 1;
    transform: perspective(400px) rotateY(0deg);
  }
}

/* ===================================
   RESPONSIVE DESIGN - NEW SECTIONS
   =================================== */

@media (max-width: 992px) {
  .projects-grid,
  .certificates-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
  }

  .project-image,
  .certificate-image {
    height: 200px;
  }
}

@media (max-width: 768px) {
  #projects,
  #certificates {
    padding: var(--space-xl) var(--space-md);
  }

  .projects-grid,
  .certificates-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .project-image,
  .certificate-image {
    height: 180px;
  }

  .project-card,
  .certificate-card {
    border-radius: var(--radius-md);
  }

  .sphere-1 {
    width: 300px !important;
    height: 300px !important;
    top: -50px !important;
    left: -50px !important;
  }

  .sphere-2 {
    width: 250px !important;
    height: 250px !important;
    bottom: -25px !important;
    right: -25px !important;
  }

  .sphere-3 {
    width: 200px !important;
    height: 200px !important;
    right: -50px !important;
  }
}

@media (max-width: 480px) {
  .projects-grid,
  .certificates-grid {
    gap: var(--space-sm);
  }

  .project-image,
  .certificate-image {
    height: 150px;
  }

  .project-content,
  .certificate-content {
    padding: var(--space-md);
  }

  .project-content h3,
  .certificate-content h3 {
    font-size: 1.1rem;
  }

  .tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
  }

  .project-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

