/* Variables */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent-color: #ec4899;
  --accent-light: #f472b6;
  --secondary-color: #6b7280;
  --text-color: #1f2937;
  --light-text: #6b7280;
  --bg-color: #ffffff;
  --bg-alt: #f8fafc;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --shadow-lg: rgba(99, 102, 241, 0.15);
  --highlight-color: rgba(99, 102, 241, 0.1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 16px;
  --border-radius-sm: 12px;
  --container-width: 1200px;
  --header-height: 80px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --header-text-color: #1f2937;
  --footer-text-color: white;
}

/* Dark Mode Variables */
.dark-mode {
  --primary-color: #818cf8;
  --primary-dark: #6366f1;
  --primary-light: #a5b4fc;
  --accent-color: #f472b6;
  --accent-light: #f9a8d4;
  --secondary-color: #9ca3af;
  --text-color: #f3f4f6;
  --light-text: #d1d5db;
  --bg-color: #0f172a;
  --bg-alt: #1e293b;
  --border-color: #334155;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-lg: rgba(129, 140, 248, 0.2);
  --highlight-color: rgba(129, 140, 248, 0.15);
  --gradient-primary: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  --gradient-secondary: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
  --gradient-hero: linear-gradient(135deg, rgba(129, 140, 248, 0.08) 0%, rgba(244, 114, 182, 0.08) 100%);
  --header-text-color: #f3f4f6;
  --footer-text-color: #f3f4f6;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
}

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

ul {
  list-style: none;
}

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

/* Reading Progress Indicator */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 10000;
  background: transparent;
}

.reading-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 90px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-color);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 20px var(--shadow-color);
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: translateY(-3px) rotate(15deg);
  box-shadow: 0 6px 25px var(--shadow-lg);
  border-color: var(--primary-color);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--text-color);
  stroke-width: 2;
  transition: var(--transition);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.dark-mode .header {
  background-color: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.dark-mode .footer {
  background-color: rgba(18, 18, 18, 0.95);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

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

.menu {
  display: flex;
  gap: var(--spacing-md);
}

.menu li a {
  padding: 0.5rem;
  position: relative;
}

.menu li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.menu li a:hover::after,
.menu li a.active::after {
  width: 100%;
}

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

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--header-height);
  overflow: hidden;
}

.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 25%, #f09370.15 50%, #667eea15 75%, #764ba215 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: 0;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  top: -200px;
  right: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  bottom: -100px;
  left: -100px;
  animation-delay: 7s;
  animation-direction: reverse;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #667eea, #f5576c);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(50px, 50px) scale(1.1);
  }
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: var(--spacing-xl) 0;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  margin-bottom: var(--spacing-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-size: 4rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
  line-height: 1.2;
}

.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s ease infinite;
}

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

.hero h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: var(--spacing-lg);
  color: var(--secondary-color);
}

.highlight-name {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.hero-description {
  font-size: 1.15rem;
  margin-bottom: var(--spacing-lg);
  color: var(--light-text);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--light-text);
  margin-top: 4px;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.btn-large {
  padding: 16px 40px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 50px;
}

.btn-large svg {
  transition: transform 0.3s ease;
}

.btn-large:hover svg {
  transform: translateX(5px);
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 10;
}

.scroll-down a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: bounceDown 2s infinite;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--primary-color);
  border-radius: 13px;
  position: relative;
  display: block;
}

.mouse::after {
  content: '';
  width: 2px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 1px;
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.scroll-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
}

@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Section Styles */
.section {
  padding: var(--spacing-xl) 0;
}

.bg-alt {
  background-color: var(--bg-alt);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  padding-bottom: var(--spacing-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* About Section */
.about-content {
  display: flex;
  gap: var(--spacing-xl);
  align-items: center;
}

.about-image {
  flex: 1;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.image-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--gradient-primary);
  border-radius: 50%;
  box-shadow: 0 15px 40px var(--shadow-lg);
  overflow: hidden;
  border: 4px solid var(--bg-color);
  transition: var(--transition);
}

.image-container:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 50px var(--shadow-lg);
}

.perfil-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none; /* sin borde */
  box-shadow: none; /* sin sombra */
}

.about-text {
  flex: 2;
  max-width: 600px;
}

.about-text p {
  margin-bottom: var(--spacing-md);
  color: var(--light-text);
}

.about-details {
  margin: var(--spacing-lg) 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

.detail-item {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-sm);
}

.detail-title {
  font-weight: 600;
  color: var(--text-color);
}

.detail-info {
  color: var(--light-text);
}

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

/* Projects Section */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

.filter-btn {
  padding: 10px 24px;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  outline: none;
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.project-card.hidden {
  display: none;
}

.project-card {
  background: var(--bg-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow-color);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f5576c);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.project-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.2);
}

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

.project-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-header {
  height: 120px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-header::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent);
  animation: floatIcon 6s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

.project-icon {
  font-size: 3rem;
  z-index: 2;
  animation: bounceIcon 3s ease-in-out infinite;
}

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

.project-info {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.project-info h3 {
  margin-bottom: var(--spacing-sm);
  font-size: 1.15rem;
  color: var(--text-color);
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-info p {
  color: var(--light-text);
  margin-bottom: var(--spacing-md);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-description {
  margin-bottom: var(--spacing-md);
}

.description-short {
  margin-bottom: 0;
}

.description-full {
  margin-top: var(--spacing-xs);
  margin-bottom: 0;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 0;
  margin-top: var(--spacing-xs);
  transition: var(--transition);
  position: relative;
  outline: none;
}

.read-more-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.read-more-btn:hover::after {
  width: 100%;
}

.read-more-btn:hover {
  color: var(--primary-dark);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--spacing-md);
  margin-top: auto;
}

.project-tags span {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.1));
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: var(--transition);
  cursor: default;
}

.project-tags span:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.project-links {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.project-link {
  flex: 1;
  color: white;
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.project-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, #764ba2, #667eea);
}

.project-date {
  font-size: 0.8rem;
  color: var(--light-text);
  margin-top: var(--spacing-sm);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.skills-category {
  background: var(--bg-color);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px var(--shadow-color);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skills-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.2);
}

.skills-category h3 {
  margin-bottom: var(--spacing-lg);
  font-size: 1.3rem;
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--border-color);
  color: var(--text-color);
  position: relative;
}

.skills-category h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

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

.skill-item {
  margin-bottom: 0;
}

.skill-name {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}

.skill-bar {
  width: 100%;
  height: 12px;
  background-color: var(--border-color);
  border-radius: 10px;
  overflow: visible;
  position: relative;
}

.skill-level {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f5576c 100%);
  border-radius: 10px;
  position: relative;
  animation: skill-bar-fill 1.5s ease-out forwards;
  transform-origin: left;
  transform: scaleX(0);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.skill-level::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  border-radius: 10px;
  animation: shimmer 2s infinite;
}

@keyframes skill-bar-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  border-radius: var(--border-radius);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.contact-item {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  padding: var(--spacing-md);
  background: var(--bg-color);
  border-radius: 12px;
  transition: var(--transition);
}

.contact-item:hover {
  background: rgba(99, 102, 241, 0.05);
  transform: translateX(5px);
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: var(--transition);
}

.contact-item:hover .contact-icon {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.contact-text h3 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.1rem;
  color: var(--text-color);
}

.contact-text p {
  color: var(--light-text);
}

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

.social-link {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.1));
  color: var(--primary-color);
  transition: var(--transition);
  border: 2px solid rgba(99, 102, 241, 0.2);
}

.social-link:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: translateY(-5px) rotate(10deg) scale(1.1);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
  border-color: transparent;
}

.contact-form {
  background-color: var(--bg-color);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px var(--shadow-color);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.contact-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f5576c);
}

.contact-form::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(102, 126, 234, 0.05), transparent);
  pointer-events: none;
}

.form-group {
  margin-bottom: var(--spacing-md);
  position: relative;
  z-index: 2;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
  background-color: var(--bg-color);
  color: var(--text-color);
}

.form-group textarea {
  height: 150px;
  resize: vertical;
  min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.02), rgba(118, 75, 162, 0.02));
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.success,
.form-group textarea.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-error {
  display: block;
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 6px;
  min-height: 20px;
  font-weight: 500;
}

.form-success {
  margin-top: var(--spacing-md);
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 2px solid #10b981;
  border-radius: var(--border-radius-sm);
  color: #059669;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.4s ease-out;
  position: relative;
  z-index: 2;
}

.form-success svg {
  flex-shrink: 0;
  stroke: #10b981;
}

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

.spinner {
  animation: rotate 1s linear infinite;
}

.spinner-circle {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dashoffset: 60;
  }
  50% {
    stroke-dashoffset: 15;
  }
  100% {
    stroke-dashoffset: 60;
  }
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
  gap: 10px;
}

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

.btn > * {
  position: relative;
  z-index: 1;
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 0 rgba(99, 102, 241, 0);
}

.btn-outline:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-full {
  width: 100%;
}

/* Footer */
.footer {
  background-color: var(--text-color);
  color: white;
  padding: var(--spacing-lg) 0;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Animations */
.animate-fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in 0.8s forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

.delay-4 {
  animation-delay: 0.8s;
}

.delay-5 {
  animation-delay: 1s;
}

@keyframes fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */

/* Tablets (768px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .about-content {
    gap: var(--spacing-lg);
  }

  .about-image {
    flex: 0.8;
  }

  .about-text {
    flex: 1.5;
  }

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

  .skills-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .filter-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}

/* Mobile Devices (max-width: 768px) */
@media screen and (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero h2 {
    font-size: 1.3rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .btn-large {
    width: 100%;
  }

  .project-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .reading-progress {
    height: 3px;
  }

  .theme-toggle {
    top: 85px;
    right: 15px;
    width: 50px;
    height: 50px;
  }
  
  .menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    flex-direction: column;
    gap: 0;
    height: 0;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 10px var(--shadow-color);
    z-index: 999;
  }
  
  .menu.open {
    height: auto;
    padding: var(--spacing-md) 0;
  }
  
  .menu li {
    width: 100%;
    text-align: center;
  }
  
  .menu li a {
    display: block;
    padding: var(--spacing-sm) 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  
  .about-image {
    max-width: 250px;
    margin: 0 auto var(--spacing-lg);
  }
  
  .about-text {
    max-width: 100%;
  }

  .about-text p {
    font-size: 0.95rem;
  }
  
  .about-details {
    grid-template-columns: 1fr;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }

  .project-card {
    height: auto;
  }

  .project-header {
    height: 100px;
  }

  .project-icon {
    font-size: 2.5rem;
  }

  .project-links {
    flex-direction: column;
    gap: 8px;
  }

  .project-link {
    width: 100%;
  }
}

@media screen and (max-width: 480px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-lg: 1.5rem;
    --spacing-md: 1rem;
    --spacing-sm: 0.8rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero h2 {
    font-size: 1.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }
}
