:root {
  --primary-color: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --secondary-color: #475569;
  --accent-color: #059669;
  --success-color: #059669;
  --error-color: #dc2626;
  --warning-color: #d97706;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-accent: #f0f9ff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  --gradient-accent: linear-gradient(135deg, var(--bg-accent) 0%, var(--bg-secondary) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
}

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

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

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: 0.3s;
}

/* Main Content */
.main-content {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
  background: url('/public/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 5rem 0;
  min-height: 75vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.5) 100%);
  z-index: 0;
}

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

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

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

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.125rem;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
  max-width: 90%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.buttons-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 400px;
}

.hero-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.hero-buttons-row .btn {
  text-align: center;
  justify-content: center;
}

.audio-button-row {
  display: flex;
  width: 100%;
}

.btn-full-width {
  width: 100%;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.btn-full-width .audio-time {
  font-size: 0.75rem;
  opacity: 0.7;
  font-weight: 500;
  letter-spacing: 0.5px;
  font-family: 'Courier New', monospace;
}

.btn-accent.playing .audio-time {
  opacity: 0.9;
  color: white;
}

.profile-pic {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  margin: 0 auto;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid white;
  position: relative;
}

.profile-pic::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  background: var(--gradient-primary);
  z-index: -1;
  opacity: 0.1;
}

.profile-pic img,
.profile-pic video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: 0.875rem;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

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

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

.btn-secondary {
  background: white;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

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

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

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: white;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

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

.btn-accent.playing {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary-color);
  animation: pulse 2s infinite;
}

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


/* Welcome Overlay */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.95) 0%, rgba(30, 58, 138, 0.98) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(10px);
  transition: all 0.5s ease;
}

.welcome-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.1);
}

.welcome-content {
  text-align: center;
  color: white;
  max-width: 500px;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-2xl);
  animation: fadeInUp 0.8s ease-out;
}

.welcome-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.welcome-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Skills Section */
.skills {
  padding: 4rem 0;
  background: var(--bg-primary);
}

.section-title {
  font-size: 2.75rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4rem;
  color: var(--text-primary);
  position: relative;
  letter-spacing: -0.025em;
}

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

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-xl);
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl);
}

.skill-category h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

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

.skill-tag {
  background: var(--gradient-primary);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: 0.75rem;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Summary Section */
.summary {
  padding: 4rem 0;
  background: var(--bg-secondary);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.summary-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.summary-icon {
  background: var(--primary-color);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

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

.summary-text p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Page Header */
.page-header {
  background: var(--gradient-primary);
  color: white;
  padding: 5rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: float 15s ease-in-out infinite;
}

.page-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  letter-spacing: -0.025em;
}

.page-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

/* Timeline */
.experience {
  padding: 4rem 0;
  background: var(--bg-primary);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 4rem;
}

.timeline-marker {
  position: absolute;
  left: 22px;
  top: 1rem;
  width: 16px;
  height: 16px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  z-index: 1;
}

.timeline-content {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.timeline-header {
  margin-bottom: 1rem;
}

.timeline-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.company {
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 500;
}

.period {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.timeline-body p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.achievements {
  list-style: none;
  margin-bottom: 1.5rem;
}

.achievements li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
}

.achievements li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

/* Education */
.education {
  padding: 4rem 0;
  background: var(--bg-primary);
}

.education-grid {
  display: grid;
  gap: 3rem;
}

.education-section {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.education-section .section-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.education-item {
  background: var(--bg-primary);
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.education-content {
  padding: 1.5rem;
}

.education-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.institution {
  color: var(--primary-color);
  font-weight: 500;
}

.education-body p {
  color: var(--text-secondary);
  margin: 1rem 0;
}

.education-details {
  list-style: none;
  margin-top: 1rem;
}

.education-details li {
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.education-details li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

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

.certification-item {
  background: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.cert-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.cert-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.cert-issuer {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.cert-date {
  color: var(--text-light);
  font-size: 0.8rem;
}

/* Languages */
.languages-list {
  display: grid;
  gap: 1rem;
}

.language-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.language-name {
  font-weight: 500;
  color: var(--text-primary);
}

.language-level {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  margin-left: 2rem;
}

.level-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  min-width: 100px;
}

.level-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.level-progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Projects */
.projects {
  padding: 4rem 0;
  background: var(--bg-primary);
}

.projects-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}

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

.project-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  position: relative;
  height: 200px;
  background: var(--bg-tertiary);
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-item:hover .project-image img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(37, 99, 235, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-item:hover .project-overlay {
  opacity: 1;
}

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

.action-btn {
  width: 50px;
  height: 50px;
  background: white;
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.action-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.project-content {
  padding: 2rem;
}

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

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

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

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

.project-features ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.project-features li {
  padding-left: 1rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.project-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* Contact */
.contact {
  padding: 4rem 0;
  background: var(--bg-primary);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-methods {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.contact-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

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

.social-links-contact h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.social-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.social-btn.linkedin {
  background: #0077b5;
  color: white;
}

.social-btn.github {
  background: #333;
  color: white;
}

.social-btn.twitter {
  background: #1da1f2;
  color: white;
}

.social-btn.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
}

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

/* Form */
.contact-form-container h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: var(--bg-primary);
}

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

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

.checkbox-group {
  flex-direction: row;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.checkbox-label input {
  width: auto;
  margin: 0;
}

.submit-btn {
  justify-self: start;
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Professional Contact Section */
.professional-contact {
  max-width: 900px;
  margin: 0 auto;
}

.contact-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.intro-text {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  font-weight: 400;
}

.contact-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.primary-contact {
  border-left: 4px solid var(--primary-color);
  position: relative;
}

.primary-contact::before {
  content: "PRINCIPAL";
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.secondary-contact {
  border-left: 4px solid var(--accent-color);
}

.contact-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.primary-contact .contact-card-icon {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.secondary-contact .contact-card-icon {
  background: linear-gradient(135deg, #0077b5, #004182);
}

.contact-card-icon i {
  font-size: 1.5rem;
  color: white;
}

.contact-card-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.contact-card-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.professional-email-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.professional-email-link:hover {
  border-bottom-color: var(--primary-color);
  transform: translateY(-1px);
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #0077b5;
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: 2px solid #0077b5;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.linkedin-link:hover {
  background: #0077b5;
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.response-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.availability-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: 500;
}

.availability-status i {
  font-size: 0.5rem;
  animation: pulse 2s infinite;
}

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

.response-time-info {
  color: var(--text-light);
  font-size: 0.85rem;
}

.contact-note {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border-left: 4px solid var(--primary-color);
}

.note-content h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.note-content h4 i {
  color: var(--primary-color);
}

.professional-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.info-item:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.info-item i {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-top: 0.25rem;
  min-width: 1.2rem;
}

.info-item div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-item strong {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.info-item span {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .contact-methods-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .professional-info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .contact-card {
    padding: 2rem;
  }
  
  .info-item {
    padding: 0.75rem;
  }
  
  .intro-text {
    font-size: 1.1rem;
  }
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-buttons .btn-outline {
  border-color: white;
  color: white;
}

.cta-buttons .btn-outline:hover {
  background: white;
  color: var(--primary-color);
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section p {
  color: #94a3b8;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--bg-primary);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-lg);
    padding: 2rem 0;
    gap: 1rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .hero {
    min-height: 75vh;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

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

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .profile-pic {
    width: 200px;
    height: 200px;
  }

  .page-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .skills-grid,
  .summary-grid,
  .certifications-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-content h2 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .project-features ul {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-item {
    padding-left: 3rem;
  }

  .timeline-marker {
    left: 7px;
  }

  .buttons-container {
    max-width: 100%;
  }
  
  .hero-buttons-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .projects-filter {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 1rem;
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .container,
  .hero-container,
  .footer-container {
    padding: 0 1rem;
  }

  .hero {
    padding: 2rem 0;
  }

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

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

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

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .profile-pic {
    width: 150px;
    height: 150px;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .timeline-content {
    padding: 1rem;
  }

  .project-content {
    padding: 1rem;
  }

  .cta-content h2 {
    font-size: 1.75rem;
  }

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

  .project-item {
    margin: 0 1rem;
  }

  .courses-list {
    gap: 1rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

.section-title {
  animation: fadeInUp 0.6s ease-out;
}

.timeline-item:nth-child(odd) {
  animation: slideInLeft 0.6s ease-out;
}

.timeline-item:nth-child(even) {
  animation: slideInRight 0.6s ease-out;
}

.skill-category {
  animation: scaleIn 0.5s ease-out;
  animation-fill-mode: both;
}

.skill-category:nth-child(1) { animation-delay: 0.1s; }
.skill-category:nth-child(2) { animation-delay: 0.2s; }
.skill-category:nth-child(3) { animation-delay: 0.3s; }

/* Hidden class for filtering */
.hidden {
  display: none !important;
}

/* Utilities */
.text-center {
  text-align: center;
}

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

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

.course-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.course-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.course-content {
  flex: 1;
  margin-right: 1rem;
}

.course-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.course-provider {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.course-year {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-tertiary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  align-self: flex-start;
}

.course-description {
  margin-top: 0.75rem;
}

.course-description p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.ai-categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-category {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

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

.ai-course {
  border-left: 4px solid var(--primary-color);
}

/* =================================
   CHAT WIDGET STYLES
   ================================= */

.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.chat-widget * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Botón flotante */
.chat-toggle {
    position: relative;
    width: 64px;
    height: 64px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    color: white;
}

.chat-toggle:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.chat-toggle svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-toggle .close-icon {
    position: absolute;
    opacity: 0;
    transform: rotate(90deg);
}

.chat-toggle.active .chat-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.chat-toggle.active .close-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Notificación */
.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

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

/* Ventana de chat */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 140px);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

.chat-window.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Ajuste del transform para móviles cuando está visible */
@media (max-width: 768px) {
    .chat-window {
        transform: translateY(20px) scale(0.95) !important;
    }
    
    .chat-window.visible {
        transform: translateY(0) scale(1) !important;
    }
}

/* Header del chat */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.status-indicator.online {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.chat-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.status-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.minimize-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.minimize-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.minimize-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Área de mensajes */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-secondary);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Mensajes */
.message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: messageSlideIn 0.3s ease-out;
}

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

.message-content {
    max-width: 80%;
    background: var(--bg-primary);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    border: 1px solid var(--border-color);
}

.message-content p {
    margin: 0;
    color: var(--text-primary);
    word-wrap: break-word;
}

.message-time {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Mensajes del usuario */
.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 6px;
    border: none;
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* Mensajes del bot */
.bot-message .message-content {
    background: var(--bg-primary);
    border-bottom-left-radius: 6px;
}

/* Indicador de escritura */
.typing-indicator {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typingDots 1.5s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDots {
    0%, 60%, 100% { transform: scale(0.8); opacity: 0.5; }
    30% { transform: scale(1.2); opacity: 1; }
}

.typing-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Input de chat */
.chat-input-container {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    padding: 16px;
    gap: 12px;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    min-height: 20px;
    max-height: 100px;
    overflow-y: auto;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.chat-input::placeholder {
    color: var(--text-secondary);
}

.send-button {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.send-button:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.send-button svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.input-footer {
    padding: 8px 16px 12px;
    text-align: center;
}

.powered-by {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Estados de error */
.error-message {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #ef4444 !important;
}

.retry-button {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background: #dc2626;
}

/* MOBILE RESPONSIVE - Reescrito desde cero */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 20px;
        right: 20px;
        left: auto;
        width: auto;
    }
    
    .chat-toggle {
        width: 60px;
        height: 60px;
        position: relative;
    }
    
    .chat-window {
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 80px !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 12px;
        margin: 0;
    }
    
    .chat-header {
        padding: 16px;
        flex-shrink: 0;
    }
    
    .chat-messages {
        padding: 16px;
        flex: 1;
        overflow-y: auto;
    }
    
    .chat-input-container {
        flex-shrink: 0;
    }
    
    .chat-input-wrapper {
        padding: 16px;
    }
    
    .chat-input {
        font-size: 16px;
        padding: 12px 16px;
    }
    
    .send-button {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .chat-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .chat-toggle {
        width: 56px;
        height: 56px;
    }
    
    .chat-window {
        top: 8px !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 75px !important;
    }
    
    .chat-header {
        padding: 12px;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .chat-input-wrapper {
        padding: 12px;
    }
    
    .chat-input {
        font-size: 16px !important;
        padding: 10px 14px;
    }
    
    .send-button {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
}

/* Móviles muy pequeños */
@media (max-width: 375px) {
    .chat-window {
        top: 6px !important;
        left: 6px !important;
        right: 6px !important;
        bottom: 72px !important;
    }
    
    .chat-header {
        padding: 10px;
    }
    
    .chat-messages {
        padding: 10px;
    }
    
    .chat-input-wrapper {
        padding: 10px;
    }
}

/* Mejoras para dispositivos táctiles */
@media (pointer: coarse) {
    .chat-toggle {
        width: 64px;
        height: 64px;
        /* Área táctil más grande */
    }
    
    .send-button {
        min-width: 44px;
        min-height: 44px;
        /* Tamaño mínimo recomendado para toque */
    }
    
    .minimize-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
}

/* Evitar zoom en inputs en iOS */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .chat-input {
        font-size: 16px !important;
        transform-origin: left top;
    }
}

/* Mejor contraste en pantallas pequeñas */
@media (max-width: 480px) {
    .message-content {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .user-message .message-content {
        background: var(--primary-color);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .chat-input {
        border: 2px solid var(--border-color);
    }
    
    .chat-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 1px var(--primary-light);
    }
}

/* Scroll suave en móviles */
.chat-messages {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Prevenir zoom accidental */
@media (max-width: 768px) {
    .chat-window {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}

/* Accesibilidad */
.chat-widget *:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Soporte para modo oscuro en móviles */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .chat-window {
        border: 1px solid #374151;
    }
    
    .message-content {
        border: 1px solid #374151;
    }
}