/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Dark Theme (Default) */
:root {
  /* Dark Portfolio Theme */
  --background: hsl(222, 84%, 4.9%);
  --foreground: hsl(210, 40%, 98%);
  
  /* Surface Colors */
  --card: hsl(224, 71%, 8.9%);
  --card-foreground: hsl(210, 40%, 98%);
  --surface-elevated: hsl(226, 64%, 12%);
  
  /* Brand Colors */
  --primary: hsl(181, 100%, 50%);
  --primary-glow: hsl(181, 100%, 65%);
  --primary-dark: hsl(181, 100%, 35%);
  --primary-foreground: hsl(222, 84%, 4.9%);
  
  /* Accent Colors */
  --accent: hsl(263, 85%, 65%);
  --accent-foreground: hsl(210, 40%, 98%);
  
  /* Neutral Colors */
  --muted: hsl(217, 32%, 17%);
  --muted-foreground: hsl(215, 20%, 65%);
  --border: hsl(217, 32%, 17%);
  --input: hsl(217, 32%, 17%);
  --ring: hsl(181, 100%, 50%);
  
  /* Semantic Colors */
  --secondary: hsl(217, 32%, 17%);
  --secondary-foreground: hsl(210, 40%, 98%);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(181, 100%, 50%), hsl(263, 85%, 65%));
  --gradient-surface: linear-gradient(180deg, hsl(224, 71%, 8.9%), hsl(222, 84%, 4.9%));
  --gradient-glow: radial-gradient(circle at center, hsl(181, 100%, 50%, 0.15), transparent 70%);
  
  /* Shadows */
  --shadow-soft: 0 4px 20px hsl(181, 100%, 50%, 0.1);
  --shadow-glow: 0 0 40px hsl(181, 100%, 50%, 0.3);
  --shadow-elevated: 0 10px 30px hsl(222, 84%, 4.9%, 0.5);
  
  /* Spacing & Effects */
  --radius: 0.75rem;
  
  /* Focus indicator */
  --focus-ring: 0 0 0 3px hsla(181, 100%, 50%, 0.5);
}

/* Light Theme */
body.light {
  --background: hsl(210, 25%, 97%);
  --foreground: hsl(215, 28%, 17%);
  
  /* Surface Colors */
  --card: hsl(210, 40%, 99%);
  --card-foreground: hsl(215, 28%, 17%);
  --surface-elevated: hsl(210, 30%, 98%);
  
  /* Brand Colors */
  --primary: hsl(210, 100%, 45%);
  --primary-glow: hsl(210, 100%, 55%);
  --primary-dark: hsl(210, 100%, 35%);
  --primary-foreground: hsl(0, 0%, 100%);
  
  /* Accent Colors */
  --accent: hsl(270, 100%, 60%);
  --accent-foreground: hsl(0, 0%, 100%);
  
  /* Neutral Colors */
  --muted: hsl(210, 20%, 94%);
  --muted-foreground: hsl(215, 16%, 46%);
  --border: hsl(210, 18%, 87%);
  --input: hsl(210, 25%, 92%);
  --ring: hsl(210, 100%, 45%);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(210, 100%, 45%), hsl(270, 100%, 60%));
  --gradient-surface: linear-gradient(180deg, hsl(210, 40%, 99%), hsl(210, 25%, 97%));
  --gradient-glow: radial-gradient(circle at center, hsl(210, 100%, 45%, 0.08), hsl(270, 100%, 60%, 0.04), transparent 70%);
  
  /* Shadows */
  --shadow-soft: 0 4px 20px hsl(210, 50%, 40%, 0.08);
  --shadow-glow: 0 0 40px hsl(210, 100%, 45%, 0.2);
  --shadow-elevated: 0 10px 35px hsl(210, 50%, 40%, 0.12);
  
  /* Focus indicator */
  --focus-ring: 0 0 0 3px hsla(210, 100%, 45%, 0.5);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 600;
  z-index: 100;
  border-radius: 0 0 0.5rem 0;
}

.skip-link:focus {
  top: 0;
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Focus Indicators for Accessibility */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

/* Container */
.portfolio-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section Heading */
.section-heading {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
}

@media (min-width: 768px) {
  .section-heading {
    font-size: 3rem;
  }
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Card Glass Effect */
.card-glass {
  background-color: rgba(var(--card), 0.8);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(var(--border), 0.7);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
}

.card-glass:hover {
  box-shadow: var(--shadow-elevated);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  min-height: 44px; /* Minimum touch target size */
  min-width: 44px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.3s ease;
}

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

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(var(--primary), 0.3);
  color: var(--foreground);
}

.btn-outline:hover {
  border-color: var(--primary);
  background-color: rgba(var(--primary), 0.1);
  transform: translateY(-2px);
}

.btn-outline:active {
  transform: translateY(0);
}

/* Input Styles */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(var(--surface-elevated), 0.5);
  border: 1px solid rgba(var(--border), 0.5);
  border-radius: 0.5rem;
  color: var(--foreground);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

.textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(var(--surface-elevated), 0.5);
  border: 1px solid rgba(var(--border), 0.5);
  border-radius: 0.5rem;
  color: var(--foreground);
  font-size: 1rem;
  resize: none;
  transition: all 0.3s ease;
}

.textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(var(--primary), 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(var(--primary), 0.6);
  }
}

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

.animate-float {
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out forwards;
}

.animate-fade-up {
  animation: fade-up 0.8s ease-out forwards;
}

.animate-glow-pulse {
  animation: glow-pulse 2s ease-in-out infinite;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background-color: rgba(var(--background), 0.8);
  border-bottom: 1px solid rgba(var(--border), 0.5);
}

.navbar .portfolio-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
}

.nav-item {
  position: relative;
  padding: 0.5rem 0.75rem;
  min-height: 44px; /* Touch target size */
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 9999px;
}

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 44px; /* Touch target */
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(var(--surface-elevated), 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(var(--border), 0.5);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--surface-elevated);
  box-shadow: var(--shadow-soft);
  transform: scale(1.1);
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.menu-icon {
  padding: 0.5rem;
  min-height: 44px; /* Touch target */
  min-width: 44px;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-icon:hover {
  color: var(--primary);
}

.mobile-nav {
  display: none;
  padding-bottom: 1rem;
  animation: fade-up 0.3s ease-out;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}

.mobile-nav-item {
  padding: 0.875rem 1rem;
  min-height: 48px; /* Larger touch target for mobile */
  border-radius: 0.5rem;
  font-size: 1rem; /* Slightly larger for mobile */
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--primary);
  background-color: var(--surface-elevated);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

.hero-bg-gradient-1 {
  position: absolute;
  inset: 0;
  background: var(--gradient-surface);
}

.hero-bg-gradient-2 {
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0.6;
}

.hero-bg-blob-1 {
  position: absolute;
  top: 25%;
  left: 25%;
  width: 24rem;
  height: 24rem;
  background-color: rgba(var(--primary), 0.08);
  border-radius: 9999px;
  filter: blur(96px);
  animation: float 6s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
}

.hero-bg-blob-2 {
  position: absolute;
  bottom: 25%;
  right: 25%;
  width: 24rem;
  height: 24rem;
  background-color: rgba(var(--accent), 0.08);
  border-radius: 9999px;
  filter: blur(96px);
  animation: float 6s ease-in-out infinite;
  animation-delay: 2s;
  will-change: transform;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 64rem;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fade-in 0.8s ease-out;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 1rem;
  animation: fade-in 0.8s ease-out;
  animation-delay: 0.1s;
  animation-fill-mode: backwards;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

.hero-description {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  margin-top: 0.5rem;
  animation: fade-in 0.8s ease-out;
  animation-delay: 0.15s;
  animation-fill-mode: backwards;
}

.hero-mission {
  max-width: 42rem;
  margin: 2rem auto 0;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  line-height: 1.75;
  animation: fade-in 0.8s ease-out;
  animation-delay: 0.2s;
  animation-fill-mode: backwards;
}

.hero-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 42rem;
  margin: 2rem auto 0;
  animation: fade-in 0.8s ease-out;
  animation-delay: 0.3s;
  animation-fill-mode: backwards;
}

.skill-badge {
  padding: 0.5rem 1rem;
  background-color: rgba(var(--surface-elevated), 0.8);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(var(--border), 0.5);
  transition: all 0.3s ease;
}

.skill-badge:hover {
  border-color: rgba(var(--primary), 0.5);
  transform: scale(1.05);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  animation: fade-in 0.8s ease-out;
  animation-delay: 0.4s;
  animation-fill-mode: backwards;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
  }
}

.hero-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  animation: fade-in 0.8s ease-out;
  animation-delay: 0.5s;
  animation-fill-mode: backwards;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  min-width: 48px; /* Larger touch target for social icons */
  min-height: 48px;
  border-radius: 9999px;
  background-color: rgba(var(--surface-elevated), 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(var(--border), 0.5);
  transition: all 0.3s ease;
  color: var(--foreground);
  text-decoration: none;
  will-change: transform;
}

.social-link:hover {
  background-color: rgba(var(--primary), 0.2);
  box-shadow: var(--shadow-soft);
  transform: scale(1.1) translateY(-4px);
  color: var(--primary);
  border-color: var(--primary);
}

/* Section Styles */
section {
  padding: 5rem 0;
  position: relative;
}

.bg-gradient-glow {
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0.2;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 3rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 1024px) {
  .grid-lg-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .grid-md-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-md-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Icon Styles */
.icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-lg {
  width: 2rem;
  height: 2rem;
}

/* Badge Styles */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background-color: rgba(var(--primary), 0.2);
  color: var(--primary);
}

/* Footer */
.footer {
  position: relative;
  padding: 3rem 0;
  border-top: 1px solid rgba(var(--border), 0.5);
}

.footer-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-surface);
  opacity: 0.5;
}

.footer-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  margin: 1.5rem 0;
}

.footer-link {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-divider {
  width: 8rem;
  height: 1px;
  background: var(--gradient-primary);
  margin: 1.5rem auto;
}

/* Utility Classes */
.relative {
  position: relative;
}

.z-10 {
  z-index: 10;
}

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

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.space-y-8 > * + * {
  margin-top: 2rem;
}

.hidden {
  display: none;
}

@media (min-width: 768px) {
  .md-hidden {
    display: none;
  }
}

/* Smooth Scroll */
html {
  scroll-padding-top: 5rem;
}

/* Icon Container */
.icon-container {
  width: 3rem;
  height: 3rem;
  background: var(--gradient-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.icon-container-round {
  border-radius: 9999px;
}

.card-glass:hover .icon-container {
  transform: scale(1.1);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Responsive Text */
@media (max-width: 640px) {
  .hero-title {
    font-size: 2.25rem; /* Improved mobile size */
    line-height: 1.2;
  }
  
  .section-heading {
    font-size: 1.875rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-mission {
    font-size: 1rem;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .hero-title {
    font-size: 3.5rem;
  }
  
  .section-heading {
    font-size: 2.25rem;
  }
}
