/**
 * ============================================
 * DSCamargo Portfolio - Main Stylesheet
 * Design System v1.0
 * ============================================
 */

/* ============================================
   DESIGN SYSTEM VARIABLES
   ============================================ */
/* Typography - Helvetica Neue System Stack (no external import needed) */

:root {
  /* Colors - Primary Blue */
  --primary-900: #1a3a52;
  --primary-800: #283E51;
  --primary-700: #3a5a73;
  --primary-600: #4B79A1;
  --primary-500: #5d8bb3;
  --primary-400: #7fa3c4;
  --primary-300: #a1bbd5;
  --primary-200: #c3d3e6;
  --primary-100: #e5ebf2;
  --primary-50: #f0f4f8;

  /* Colors - Innovation Cyan */
  --cyan-700: #0e7490;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;
  --cyan-100: #cffafe;

  /* Colors - Human Violet */
  --violet-700: #6d28d9;
  --violet-600: #7c3aed;
  --violet-500: #8b5cf6;
  --violet-400: #a78bfa;
  --violet-300: #c4b5fd;
  --violet-100: #ede9fe;

  /* Colors - Neutrals */
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #4B79A1 0%, #283E51 100%);
  --gradient-innovation: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-subtle: linear-gradient(180deg, #f0f4f8 0%, #ffffff 100%);

  /* Typography - System Font Stack */
  --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-family-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(75, 121, 161, 0.3);
  --shadow-glow-violet: 0 0 30px rgba(139, 92, 246, 0.3);

  /* Transitions */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

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

html.loading {
  overflow: hidden;
}

body {
  font-family: var(--font-family-primary);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  margin: 0;
  padding: 0;
}

/* Homepage with cosmic background needs transparent body 
   to allow the fixed #universe-bg (z-index: -1) to show through */
body.homepage-cosmic-bg {
  background-color: transparent;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-primary);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

h1.color-white {
  color: var(--gray-300 );
}

p {
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

a {
  color: var(--primary-600);
    text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--primary-700);
}

a:focus {
    outline: none;
  box-shadow: 0 0 0 3px rgba(75, 121, 161, 0.25);
  border-radius: var(--radius-sm);
}

code, pre {
  font-family: var(--font-family-mono);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary {
  color: var(--primary-600) !important;
}

.bg-primary {
  background-color: var(--primary-600) !important;
}

/* ============================================
   BUTTONS - All buttons use --radius-full
   ============================================ */
.btn {
  font-family: var(--font-family-primary);
  font-weight: 500;
  border-radius: var(--radius-full); /* SEMPRE redondo */
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-primary {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  color: var(--white);
  border-radius: var(--radius-full); /* SEMPRE redondo */
}

.btn-primary:hover {
  background-color: var(--primary-700);
  border-color: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(75, 121, 161, 0.35);
}

.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--primary-800);
  border-color: var(--primary-800);
}

.btn-outline-light {
  border-width: 2px;
  font-weight: 600;
  border-radius: var(--radius-full); /* SEMPRE redondo */
}

.btn-outline-light:hover {
  transform: translateY(-2px);
}

.btn-outline-primary {
  border-radius: var(--radius-full); /* SEMPRE redondo */
  border-width: 2px;
}

.btn-outline-primary:hover {
  transform: translateY(-2px);
}

.btn-outline-dark {
  border-radius: var(--radius-full); /* SEMPRE redondo */
}

/* Innovation Button (Gradient) */
.btn-capellaris {
  background: var(--gradient-innovation);
  border: none;
  color: var(--white);
  font-weight: 600;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-capellaris:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
  color: var(--white);
  background: linear-gradient(135deg, var(--violet-600), var(--cyan-600));
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
#header {
  background-color: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease-out);
  padding: var(--space-4) 0;
    z-index: 1000;
}

#header.scrolled {
  padding: var(--space-2) 0;
  box-shadow: var(--shadow-lg);
}

.navbar-dark .navbar-nav .nav-link {
  font-family: var(--font-family-primary);
  color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Capellaris Nav Highlight */
.nav-capellaris-highlight {
  position: relative;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2)) !important;
  border-radius: var(--radius-2xl) !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
}

.nav-capellaris-highlight:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(6, 182, 212, 0.35)) !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
}

.nav-badge-new {
  position: absolute;
  top: -8px;
  right: -5px;
  background: var(--gradient-innovation);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-badge 2s ease-in-out infinite;
  box-shadow: var(--shadow-glow-violet);
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.social-icons a {
    font-size: 1.2rem;
  transition: transform var(--duration-normal) var(--ease-out);
}

.social-icons a:hover {
    transform: scale(1.2);
}

/* ============================================
   FIXED COSMIC BACKGROUND - GitHub-inspired
   ============================================ */
#universe-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
    overflow: hidden;
}

/* Gradient base - from deep space to lighter sky */
#universe-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    /* Deep space - top */
    #0a0f1a 0%,
    #0d1525 10%,
    #101c30 20%,
    #14233d 35%,
    #182a4a 50%,
    /* Mid universe - transition */
    #1c3157 65%,
    #203a65 80%,
    /* Rising towards light */
    #2a4575 90%,
    #3a5a8a 100%
  );
  z-index: 1;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2; /* Particles above gradient */
}

/* Scroll fade overlay - lightens as user scrolls */
#scroll-fade-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(122, 156, 197, 0.3) 50%,
    rgba(188, 208, 232, 0.6) 100%
  );
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.1s ease-out;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
  background: transparent;
    overflow: hidden;
  z-index: 1;
}

/* ============================================
   FLOATING MODALS - Glassmorphism Style
   ============================================ */
.floating-modals-wrapper {
  position: relative;
  z-index: 1;
}

.floating-modal {
  position: relative;
  padding: var(--space-16) 0;
  margin: 0 auto;
  max-width: 1400px;
}

.modal-glass-card {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-2xl);
  margin: var(--space-8) var(--space-4);
  padding: var(--space-12) var(--space-8);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

/* Light glow on edges */
.modal-glass-card::before {
  content: '';
    position: absolute;
    top: 0;
    left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.4) 80%,
    transparent 100%
  );
}

/* Subtle inner glow */
.modal-glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-2xl);
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.z-index-1 {
    position: relative;
    z-index: 1;
}

/* Typewriter Effect */
.typewrite {
    position: relative;
    display: inline-block;
}

.typewrite-mono {
  font-family: var(--font-family-mono) !important;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.typewrite-mono .wrap {
  color: var(--cyan-400);
}

.typewrite .wrap {
  border-right: 0.08em solid var(--white);
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--white); }
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

/* ============================================
   CAPELLARIS MODAL - Special Purple Tint
   ============================================ */
.capellaris-modal {
  margin-top: var(--space-8);
}

.capellaris-modal .modal-glass-card {
  background: linear-gradient(
    135deg,
    rgba(57, 52, 143, 0.25) 0%,
    rgba(6, 182, 212, 0.15) 50%,
    rgba(139, 92, 246, 0.2) 100%
  );
  border-color: rgba(139, 92, 246, 0.3);
  padding: var(--space-16) var(--space-8);
}

.capellaris-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(236, 72, 153, 0.1) 0%, transparent 40%);
  animation: float-bg 20s ease-in-out infinite;
  pointer-events: none; /* Prevent blocking clicks on buttons */
}

@keyframes float-bg {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.02); }
}

.capellaris-logo-wrapper {
  position: relative;
  display: inline-block;
}

.capellaris-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
  /* Multi-layer glow effect for better visibility */
  filter: 
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.6))
    drop-shadow(0 0 20px rgba(6, 182, 212, 0.8))
    drop-shadow(0 0 40px rgba(139, 92, 246, 0.6))
    drop-shadow(0 0 60px rgba(6, 182, 212, 0.4));
  animation: float-logo 6s ease-in-out infinite, glow-pulse-logo 3s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes float-logo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes glow-pulse-logo {
  0%, 100% { 
    filter: 
      drop-shadow(0 0 8px rgba(255, 255, 255, 0.6))
      drop-shadow(0 0 20px rgba(6, 182, 212, 0.8))
      drop-shadow(0 0 40px rgba(139, 92, 246, 0.6))
      drop-shadow(0 0 60px rgba(6, 182, 212, 0.4));
  }
  50% { 
    filter: 
      drop-shadow(0 0 12px rgba(255, 255, 255, 0.8))
      drop-shadow(0 0 30px rgba(6, 182, 212, 1))
      drop-shadow(0 0 50px rgba(139, 92, 246, 0.8))
      drop-shadow(0 0 80px rgba(6, 182, 212, 0.6));
  }
}

.capellaris-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(6, 182, 212, 0.4) 20%,
    rgba(139, 92, 246, 0.3) 40%,
    rgba(6, 182, 212, 0.2) 60%,
    transparent 80%
  );
  border-radius: 50%;
  animation: pulse-glow 4s ease-in-out infinite;
  z-index: 1;
  pointer-events: none; /* Prevent blocking clicks */
}

@keyframes pulse-glow {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1); 
    opacity: 0.7;
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.15); 
    opacity: 1;
  }
}

.capellaris-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--violet-300);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.capellaris-title {
  color: var(--white);
  background: linear-gradient(135deg, #ffffff, var(--violet-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.capellaris-subtitle {
  color: var(--cyan-500);
  font-weight: 500;
}

.capellaris-description {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
}

.capellaris-features {
  margin-top: var(--space-8);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
}

.feature-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateX(5px);
}

.feature-item i {
  font-size: 1.3rem;
  color: var(--cyan-500);
  width: 24px;
  text-align: center;
}

.feature-item span {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.capellaris-cta {
  margin-top: var(--space-8);
}

.btn-capellaris-primary {
  background: var(--gradient-innovation);
  border: none;
  color: var(--white);
  font-weight: 600;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-capellaris-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(139, 92, 246, 0.5);
  color: var(--white);
  background: linear-gradient(135deg, var(--violet-600), var(--cyan-600));
}

.btn-capellaris-outline {
  background: transparent;
  border: 2px solid rgba(139, 92, 246, 0.5);
  color: var(--violet-300);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-capellaris-outline:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--violet-500);
  color: var(--white);
  transform: translateY(-2px);
}

/* ============================================
   PROJECT HEADER (Generic)
   ============================================ */
.project-header {
  background: var(--gradient-primary);
  overflow: hidden;
  color: var(--white);
  padding-top: 6rem !important;
  padding-bottom: 3rem !important;
}

.project-header h1,
.project-header .display-4,
.project-header p,
.project-header .lead {
  color: var(--white) !important;
}

.project-logo {
  max-height: 200px;
  background: var(--white);
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-full) !important;
  box-shadow: var(--shadow-xl) !important;
}

/* ============================================
   MODAL VARIANTS
   ============================================ */

/* Portfolio Modal - Light frosted glass */
.portfolio-modal .modal-glass-card {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.portfolio-modal .modal-glass-card h2,
.portfolio-modal .modal-glass-card .display-5 {
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.portfolio-modal .modal-glass-card p,
.portfolio-modal .modal-glass-card .lead {
  color: rgba(255, 255, 255, 0.9);
}

/* Papers Modal - Slightly warmer tone */
.papers-modal .modal-glass-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.papers-modal .modal-glass-card h2,
.papers-modal .modal-glass-card h4,
.papers-modal .modal-glass-card .display-5 {
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.papers-modal .modal-glass-card a:not(.btn) {
  color: var(--cyan-400);
}

.papers-modal .modal-glass-card a:not(.btn):hover {
  color: var(--cyan-300);
}

/* Contact Modal - Warm inviting tone */
.contact-modal .modal-glass-card {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.contact-modal .modal-glass-card h2,
.contact-modal .modal-glass-card .display-5 {
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.contact-modal .modal-glass-card p,
.contact-modal .modal-glass-card .lead {
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio-swiper {
  padding: var(--space-5) 0 var(--space-16);
  overflow: hidden;
}

.portfolio-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform var(--duration-normal) var(--ease-out), 
              box-shadow var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out);
  min-height: 300px;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.portfolio-card h2 {
  color: var(--white);
}

.portfolio-card p {
  color: rgba(255, 255, 255, 0.85);
}

.portfolio-img {
  max-height: 200px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform var(--duration-normal) var(--ease-out);
}

.portfolio-card:hover .portfolio-img {
  transform: scale(1.05);
}

/* Swiper Navigation - Glass Style */
.swiper-button-prev,
.swiper-button-next {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all var(--duration-normal) var(--ease-out);
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: rgba(6, 182, 212, 0.3);
  border-color: var(--cyan-500);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 18px;
  font-weight: bold;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0.5;
  transition: all var(--duration-normal) var(--ease-out);
}

.swiper-pagination-bullet-active {
  background: var(--cyan-500);
  opacity: 1;
  transform: scale(1.2);
}

.carousel-item img {
    max-height: 200px;
    object-fit: contain;
}

.carousel-control-prev-icon, 
.carousel-control-next-icon {
    padding: 15px;
}

/* ============================================
   PAPERS SECTION (Accordion) - Glass Style
   ============================================ */
.accordion {
  background: transparent;
}

.accordion-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg) !important;
  margin-bottom: var(--space-3);
  overflow: hidden;
}

.accordion-button {
  font-family: var(--font-family-primary);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: var(--radius-md);
}

.accordion-button:not(.collapsed) {
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-300);
  box-shadow: none;
}

.accordion-button::after {
  filter: invert(1);
}

.accordion-button:focus {
    box-shadow: none;
  border-color: rgba(255, 255, 255, 0.2);
}

.accordion-body {
  background: rgba(0, 0, 0, 0.2);
}

/* List group items - dark background version (home page modals) */
.floating-modal .list-group-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-4);
  transition: background var(--duration-fast) var(--ease-out);
}

.floating-modal .list-group-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.floating-modal .list-group-item a {
  color: var(--cyan-400);
}

/* List group items - light background version (project pages) */
.list-group-item {
  background: var(--white);
  border-color: var(--gray-200);
  color: var(--gray-900);
  padding: var(--space-4);
}

.list-group-item:hover {
  background: var(--gray-50);
}

.list-group-item strong {
  color: var(--gray-900);
}

.list-group-item p {
  color: var(--gray-600);
}

/* Cards on light background pages (project pages) */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-900);
}

.card-title {
  color: var(--gray-900) !important;
}

.card-text {
  color: var(--gray-600);
}

.card-body {
  color: var(--gray-900);
}

.card-body h5,
.card-body h6,
.card-body strong {
  color: var(--gray-900);
}

.card-body p {
  color: var(--gray-600);
}

.card-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-900);
}

.card-header h5 {
  color: var(--gray-900);
}

/* Override for cards inside floating modals (dark background) */
.floating-modal .card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.floating-modal .card-title,
.floating-modal .card-body h5,
.floating-modal .card-body h6,
.floating-modal .card-body strong {
  color: var(--white) !important;
}

.floating-modal .card-text,
.floating-modal .card-body p {
  color: rgba(255, 255, 255, 0.85);
}

.floating-modal .card-header {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.floating-modal .card-header h5 {
  color: var(--white);
}

/* ============================================
   CONTACT SECTION - Glass Form
   ============================================ */
#contact form {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#contact .form-control {
  font-family: var(--font-family-primary);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
}

#contact .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#contact .form-control:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
  border-color: var(--cyan-500);
  color: var(--white);
}

/* Contact form on light background pages (project pages) */
body:not(.universe-bg-active) #contact form,
.contact-light-bg form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-900);
}

body:not(.universe-bg-active) #contact .form-control,
.contact-light-bg .form-control {
  background: var(--white);
  border: 1px solid var(--gray-300);
  color: var(--gray-900);
}

body:not(.universe-bg-active) #contact .form-control::placeholder,
.contact-light-bg .form-control::placeholder {
  color: var(--gray-500);
}

body:not(.universe-bg-active) #contact .form-control:focus,
.contact-light-bg .form-control:focus {
  background: var(--white);
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(75, 121, 161, 0.25);
  color: var(--gray-900);
}

body:not(.universe-bg-active) #contact .form-floating label,
.contact-light-bg .form-floating label {
  color: var(--gray-600);
}

body:not(.universe-bg-active) #contact header h2,
body:not(.universe-bg-active) #contact header p,
.contact-light-bg header h2,
.contact-light-bg header p {
  color: var(--gray-900);
}

.form-floating label {
  font-family: var(--font-family-primary);
  color: rgba(255, 255, 255, 0.7);
  top: -7px;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--cyan-400);
}

.form-floating label::after {
  background-color: transparent !important;
}

/* ============================================
   FOOTER - Glass Style
   ============================================ */
footer {
  position: relative;
  z-index: 1;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(15px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-8);
}

footer h5 {
  color: var(--white);
  font-weight: 600;
}

footer a {
  color: var(--gray-400);
  transition: color var(--duration-normal) var(--ease-out);
}

footer a:hover {
  color: var(--white);
}

footer .fab {
  transition: color var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

footer .fab:hover {
  color: var(--primary-400) !important;
  transform: scale(1.15);
}

/* ============================================
   CURRICULUM PAGE - CV Modals
   ============================================ */
.cv-modal .modal-glass-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.cv-modal-large .modal-glass-card {
  padding: var(--space-12) var(--space-8);
}

.cv-section-title {
  color: var(--white);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cv-section-title i {
  color: var(--cyan-400);
}

.cv-text {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

/* Profile Section */
.cv-profile-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cv-info-grid {
  display: grid;
  gap: var(--space-3);
}

.cv-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.9);
  transition: background var(--duration-fast) var(--ease-out);
}

.cv-info-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cv-info-item i {
  color: var(--cyan-400);
  width: 20px;
  text-align: center;
}

.cv-info-item a {
  color: var(--cyan-400);
}

.cv-info-item a:hover {
  color: var(--cyan-300);
}

/* Timeline / Experience */
.cv-timeline {
  position: relative;
}

.cv-timeline-item {
  position: relative;
  padding-left: var(--space-8);
  padding-bottom: var(--space-8);
  border-left: 2px solid rgba(6, 182, 212, 0.3);
}

.cv-timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.cv-timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--cyan-500);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.cv-job-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.cv-job-header h4 {
  color: var(--white);
  font-size: 1.25rem;
  margin: 0;
}

.cv-badge-current {
  background: var(--gradient-innovation);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cv-company {
  color: var(--cyan-400);
  font-size: 1rem;
  margin-bottom: var(--space-2);
}

.cv-company a {
  color: var(--cyan-400);
}

.cv-company a:hover {
  color: var(--cyan-300);
}

.cv-date {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: var(--space-3);
}

.cv-list {
  color: rgba(255, 255, 255, 0.85);
  padding-left: var(--space-5);
  margin: 0;
}

.cv-list li {
  margin-bottom: var(--space-2);
}

/* Education */
.cv-education-grid {
  display: grid;
  gap: var(--space-6);
}

.cv-education-item h4 {
  color: var(--white);
  margin-bottom: var(--space-2);
}

.cv-education-item h6 {
  color: var(--cyan-400);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

/* Skills */
.cv-skill-title {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: var(--space-3);
}

.cv-skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.cv-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  transition: all var(--duration-fast) var(--ease-out);
}

.cv-badge:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.cv-badge-highlight {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--cyan-300);
}

.cv-badge-highlight:hover {
  background: rgba(6, 182, 212, 0.3);
  border-color: rgba(6, 182, 212, 0.5);
}

/* Languages */
.cv-language-grid {
  display: grid;
  gap: var(--space-4);
}

.cv-language-item {
  display: grid;
  grid-template-columns: 100px 1fr 80px;
  align-items: center;
  gap: var(--space-3);
}

.cv-lang-name {
  color: var(--white);
  font-weight: 500;
}

.cv-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-500), var(--violet-500));
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cv-progress-basic {
  background: rgba(255, 255, 255, 0.4);
}

.cv-lang-level {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  text-align: right;
}

/* Certifications */
.cv-cert-grid {
  display: grid;
  gap: var(--space-4);
}

.cv-cert-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: background var(--duration-fast) var(--ease-out);
}

.cv-cert-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cv-cert-icon {
  font-size: 2rem;
  color: #fbbf24; /* amber/gold */
}

.cv-cert-item h5 {
  color: var(--white);
  margin: 0 0 var(--space-1) 0;
  font-size: 1rem;
}

.cv-cert-item p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-size: 0.9rem;
}

/* Publications */
.cv-publications {
  display: grid;
  gap: var(--space-5);
}

.cv-pub-item {
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-out);
}

.cv-pub-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.cv-pub-item h5 {
  color: var(--white);
  margin-bottom: var(--space-2);
  font-size: 1.1rem;
}

.cv-pub-item p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-3);
}

/* ============================================
   GSAP ANIMATIONS
   ============================================ */
.gsap-fade-up {
  opacity: 1; /* Fallback */
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 991.98px) {
    .navbar-collapse {
    padding: var(--space-4) 0;
    }
    
    .social-icons {
    margin-top: var(--space-4);
  }
  
  .floating-modal {
    padding: var(--space-8) 0;
  }
  
  .modal-glass-card {
    margin: var(--space-4) var(--space-3);
    padding: var(--space-8) var(--space-4);
    border-radius: var(--radius-xl);
  }
  
  .capellaris-modal .modal-glass-card {
    padding: var(--space-10) var(--space-4);
  }
  
  .capellaris-logo {
    max-width: 200px;
  }
  
  .capellaris-glow {
    width: 220px;
    height: 220px;
    }
    
    #about img {
    margin-bottom: var(--space-5);
    }
}

@media (max-width: 767.98px) {
    .hero {
        height: 100vh;
        min-height: 500px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
  
  .typewrite-mono {
    font-size: 1.5rem;
  }
  
  .portfolio-card {
    padding: var(--space-6);
  }
  
  .portfolio-img {
    max-height: 150px;
    margin-bottom: var(--space-5);
  }
  
  .swiper-button-prev,
  .swiper-button-next {
    width: 40px;
    height: 40px;
  }
  
  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 14px;
  }
  
  .capellaris-modal {
    text-align: center;
  }
  
  .capellaris-title {
    font-size: 2.5rem !important;
  }
  
  .capellaris-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .btn-capellaris-primary,
  .btn-capellaris-outline {
    width: 100%;
    max-width: 280px;
  }
  
  .feature-item {
    justify-content: center;
  }
  
  #contact form {
    padding: var(--space-6);
    }
}

@media (max-width: 575.98px) {
    .display-4 {
        font-size: 2rem;
    }
  
  .typewrite-mono {
    font-size: 1.2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
#about img {
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-xl);
}
