/* ==================================================================================
   PARAS LEHANA - PERSONAL WEBSITE STYLES
   ================================================================================== */

/* ==================================================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ================================================================================== */
:root {
  /* Color Palette */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #f59e0b;
  --accent-color: #ec4899;
  
  /* Neutral Colors */
  --background-dark: #0f0f23;
  --background-darker: #080813;
  --surface-dark: #1a1a2e;
  --surface-light: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  --gradient-background: linear-gradient(135deg, var(--background-dark), var(--surface-dark));
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  
  /* Animations */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* ==================================================================================
   GLOBAL RESET & BASE STYLES
   ================================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* ==================================================================================
   LOADING SCREEN
   ================================================================================== */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-darker);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-container {
  text-align: center;
}

/* 3D Loading Cube Animation */
.loading-cube {
  width: 60px;
  height: 60px;
  margin: 0 auto 2rem;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 2s infinite linear;
}

.cube-face {
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border: 2px solid var(--primary-light);
  opacity: 0.8;
}

.cube-front { transform: rotateY(0deg) translateZ(30px); }
.cube-back { transform: rotateY(180deg) translateZ(30px); }
.cube-right { transform: rotateY(90deg) translateZ(30px); }
.cube-left { transform: rotateY(-90deg) translateZ(30px); }
.cube-top { transform: rotateX(90deg) translateZ(30px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(30px); }

@keyframes rotateCube {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ==================================================================================
   NAVIGATION
   ================================================================================== */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-normal);
}

.nav-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

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

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

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

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

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

/* ==================================================================================
   HERO SECTION
   ================================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-background);
  z-index: -1;
}

/* Floating Particles Background */
.floating-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.floating-particles::before,
.floating-particles::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent);
  border-radius: 50%;
  animation: float 20s infinite linear;
}

.floating-particles::before {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-particles::after {
  top: 60%;
  right: 10%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-text {
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.title-name {
  display: block;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease-in-out infinite;
}

.title-profession {
  display: block;
  color: var(--text-primary);
  font-size: 0.8em;
  margin-top: 0.5rem;
}

@keyframes gradientShift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(30deg); }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.highlight {
  color: var(--primary-light);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Button Styles */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

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

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

/* Hero Visual - Floating Tech Cards */
.hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  animation: floatCard 6s infinite ease-in-out;
  transition: transform var(--transition-normal);
}

.floating-card:hover {
  transform: scale(1.1) translateY(-5px);
}

.floating-card i {
  font-size: 1.5rem;
}

.card-tech {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.card-ai {
  top: 15%;
  right: 15%;
  animation-delay: -1.5s;
}

.card-cloud {
  bottom: 20%;
  left: 15%;
  animation-delay: -3s;
}

.card-mobile {
  bottom: 15%;
  right: 20%;
  animation-delay: -4.5s;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(1deg); }
  50% { transform: translateY(-5px) rotate(0deg); }
  75% { transform: translateY(-15px) rotate(-1deg); }
}

/* ==================================================================================
   SECTION COMMON STYLES
   ================================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: var(--spacing-xxl) 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ==================================================================================
   ABOUT SECTION
   ================================================================================== */
.about-section {
  background: var(--surface-dark);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.text-block {
  margin-bottom: 2rem;
}

.text-block h3 {
  color: var(--primary-light);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.text-block p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1.05rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--transition-normal);
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  position: sticky;
  top: 100px;
}

.profile-image {
  margin-bottom: 1.5rem;
}

.profile-placeholder {
  width: 120px;
  height: 120px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 3rem;
  color: white;
}

.profile-info h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.profile-info p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ==================================================================================
   SKILLS SECTION
   ================================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  transition: transform var(--transition-normal);
}

.skill-category:hover {
  transform: translateY(-5px);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.category-header i {
  font-size: 1.5rem;
  color: var(--primary-light);
}

.category-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-name {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.skill-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  width: 0;
  transition: width 1s ease;
}

/* ==================================================================================
   PROJECTS SECTION
   ================================================================================== */
.projects-section {
  background: var(--surface-dark);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  transition: transform var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-header i {
  font-size: 1.5rem;
  color: var(--primary-light);
}

.project-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-light);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.projects-cta {
  text-align: center;
}

/* ==================================================================================
   CONNECT SECTION
   ================================================================================== */
.connect-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.connect-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.connect-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.connect-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
}

.connect-card:hover::before {
  transform: translateX(0);
}

.connect-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.connect-icon {
  font-size: 1.5rem;
  color: var(--primary-light);
  z-index: 2;
  position: relative;
}

.connect-info {
  flex: 1;
  z-index: 2;
  position: relative;
}

.connect-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.connect-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.connect-card > .fas {
  font-size: 0.8rem;
  color: var(--text-muted);
  z-index: 2;
  position: relative;
}

/* Platform-specific hover colors */
.connect-card.github:hover { border-color: #333; }
.connect-card.linkedin:hover { border-color: #0077b5; }
.connect-card.instagram:hover { border-color: #e4405f; }
.connect-card.email:hover { border-color: var(--secondary-color); }

.message-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  position: sticky;
  top: 100px;
}

.message-card h3 {
  color: var(--primary-light);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.message-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.message-highlight {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
}

.message-highlight i {
  color: var(--secondary-color);
  font-size: 1.2rem;
}

.message-highlight span {
  color: var(--text-primary);
  font-weight: 500;
}

/* ==================================================================================
   RESPONSIVE DESIGN
   ================================================================================== */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-visual {
    height: 300px;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .connect-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .connect-links {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .nav-container {
    padding: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .floating-card {
    padding: 0.75rem;
    font-size: 0.8rem;
  }
  
  .skill-category,
  .project-card,
  .connect-card,
  .message-card {
    padding: 1.5rem;
  }
}

/* ==================================================================================
   UTILITY CLASSES
   ================================================================================== */
.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}