/* ========================================
   Premium Glassmorphism Portfolio
   Calming Color Theory - Light & Dark Themes
   ======================================== */

/* CSS Custom Properties for Theme */
:root {
  /* Dark Theme (Default) - Calming Deep Blue-Purple */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  --glass-blur: blur(20px);

  /* Calming Gradient - Deep Ocean Blue to Soft Purple */
  --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #A78BFA 100%);
  --gradient-accent: linear-gradient(135deg, #60A5FA 0%, #818CF8 100%);
  --gradient-mesh: radial-gradient(at 40% 20%, rgba(79, 70, 229, 0.15) 0px, transparent 50%),
                   radial-gradient(at 80% 0%, rgba(124, 58, 237, 0.12) 0px, transparent 50%),
                   radial-gradient(at 0% 50%, rgba(96, 165, 250, 0.1) 0px, transparent 50%),
                   radial-gradient(at 80% 50%, rgba(129, 140, 248, 0.1) 0px, transparent 50%),
                   radial-gradient(at 0% 100%, rgba(167, 139, 250, 0.12) 0px, transparent 50%),
                   radial-gradient(at 80% 100%, rgba(79, 70, 229, 0.08) 0px, transparent 50%);

  /* Text Colors - High Contrast for Readability */
  --text-primary: #F8FAFC;
  --text-secondary: rgba(248, 250, 252, 0.75);
  --text-muted: rgba(248, 250, 252, 0.55);

  /* Solid White for Important Text */
  --text-highlight: #FFFFFF;

  /* Backgrounds */
  --bg-base: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #1E293B 100%);
  --bg-card: rgba(30, 41, 59, 0.5);

  /* Border Glow */
  --border-glow: 0 0 40px rgba(79, 70, 229, 0.2);
}

/* Light Theme Override */
@media (prefers-color-scheme: light) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(79, 70, 229, 0.15);
    --glass-shadow: 0 8px 32px rgba(79, 70, 229, 0.08);

    /* Light Theme Gradient - Soft Sky Blues */
    --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #6366F1 100%);
    --gradient-accent: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
    --gradient-mesh: radial-gradient(at 40% 20%, rgba(79, 70, 229, 0.08) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
                     radial-gradient(at 0% 50%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
                     radial-gradient(at 80% 50%, rgba(129, 140, 248, 0.05) 0px, transparent 50%);

    /* Text Colors - High Contrast */
    --text-primary: #1E293B;
    --text-secondary: rgba(30, 41, 59, 0.8);
    --text-muted: rgba(30, 41, 59, 0.6);
    --text-highlight: #1E293B;

    /* Backgrounds */
    --bg-base: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 50%, #E0E7FF 100%);
    --bg-card: rgba(255, 255, 255, 0.7);
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-base);
  min-height: 100vh;
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Animated Background Mesh */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-mesh);
  z-index: -1;
  animation: meshMove 25s ease-in-out infinite;
}

@keyframes meshMove {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.05) rotate(2deg); }
}

/* Floating Orbs - Calming Blues */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  top: -150px;
  right: -150px;
  animation-delay: 0s;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
  bottom: -80px;
  left: -80px;
  animation-delay: -7s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(25px, -25px) scale(1.05); }
  50% { transform: translate(-15px, 15px) scale(0.95); }
  75% { transform: translate(15px, 10px) scale(1.02); }
}

/* Selection */
::selection {
  background: rgba(79, 70, 229, 0.3);
  color: inherit;
}

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

::-webkit-scrollbar-track {
  background: rgba(79, 70, 229, 0.05);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  border-radius: 10px;
}

/* ========================================
   Glass Components
   ======================================== */

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.glass-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(79, 70, 229, 0.25);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(79, 70, 229, 0.12);
}

/* ========================================
   Layout
   ======================================== */

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

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  position: relative;
}

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

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

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

/* ========================================
   Hero Section
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1.5fr 1fr;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #34D399;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

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

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-subtitle em {
  font-style: normal;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.45);
}

.btn-glass {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
}

/* Hero Visual */
.hero-visual {
  position: relative;
}

.hero-card {
  padding: 32px;
}

.hero-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat {
  text-align: center;
  padding: 20px;
  background: rgba(79, 70, 229, 0.08);
  border-radius: 16px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ========================================
   Section Headers
   ======================================== */

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

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

/* ========================================
   Experience Timeline
   ======================================== */

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(79, 70, 229, 0.4), rgba(124, 58, 237, 0.4));
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -44px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--gradient-primary);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}

.timeline-date {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.timeline-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  /* Solid White/Primary Color for Position Titles */
  color: var(--text-highlight);
}

.timeline-company {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.timeline-list {
  list-style: none;
  padding: 0;
}

.timeline-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  /* Solid White/Primary for Bullet Points */
  color: var(--text-highlight);
  line-height: 1.6;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 2px;
  background: var(--gradient-primary);
}

/* ========================================
   Project Gallery
   ======================================== */

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 12px 24px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-tab:hover {
  border-color: rgba(79, 70, 229, 0.3);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.project-card {
  padding: 32px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Project Index - Solid White Like Title */
.project-index {
  font-size: 4rem;
  font-weight: 900;
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 16px;
  /* Solid white color matching project title */
  color: var(--text-highlight);
}

.project-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  transition: color 0.3s ease;
  /* Solid readable color */
  color: var(--text-highlight);
}

.project-company {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.project-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 24px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.project-tag {
  padding: 6px 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 6px;
  color: var(--text-primary);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  transition: all 0.3s ease;
  overflow: hidden;
}

.project-link span {
  transition: transform 0.3s ease;
}

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

.project-card:hover .project-link span {
  transform: translateX(4px);
}

/* ========================================
   Contact Section
   ======================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info {
  padding: 40px;
}

.contact-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-highlight);
}

.contact-text {
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 16px;
  background: rgba(79, 70, 229, 0.05);
  border-radius: 12px;
}

.contact-link:hover {
  color: var(--text-primary);
  background: rgba(79, 70, 229, 0.1);
}

.contact-link-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 10px;
  font-size: 1.25rem;
}

.contact-form {
  padding: 40px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1rem;
  color: var(--text-primary);
  background: rgba(79, 70, 229, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  outline: none;
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========================================
   Animations
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Loading Animation */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--glass-border);
  border-top-color: #4F46E5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

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

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

  .timeline {
    padding-left: 24px;
  }

  .timeline-item::before {
    left: -28px;
  }
}