/* ============================================
   PORTFOLIO - FRANCISCO DANIEL LÓPEZ HUERTA
   Clean, Minimal & Professional Design
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Colors - Minimal palette */
  --primary: #0066ff;
  --primary-hover: #0052cc;
  --dark: #1a1a2e;
  --dark-light: #16213e;
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Typography */
  --font-sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-fast: 0.15s ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #00c6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: 40px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 30px 0;
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.75rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: var(--shadow-sm);
}

.navbar-brand img {
  height: 45px;
}

.nav-link {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
  background: var(--bg-subtle);
}

/* Mobile Navbar Styles */
@media (max-width: 991px) {
  .navbar {
    padding: 0.5rem 0;
  }

  .navbar .container-fluid {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    padding: 0 var(--space-sm);
  }

  .navbar-brand {
    grid-column: 2;
    justify-self: center;
  }

  .navbar-brand img {
    height: 60px !important;
  }

  .navbar-toggler {
    grid-column: 3;
    justify-self: end;
    padding: 4px 8px;
  }

  .navbar-collapse {
    grid-column: 1 / -1;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: var(--space-sm);
    z-index: 1000;
  }

  .navbar-nav {
    gap: 0;
  }

  .navbar-nav .nav-link {
    padding: 12px 16px !important;
    border-radius: var(--radius-sm);
  }

  .navbar-nav .nav-link:hover {
    background: var(--bg-subtle);
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at top right, rgba(0, 102, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero h1 {
  margin-bottom: var(--space-md);
  font-weight: 800;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 90%;
  animation: float 6s ease-in-out infinite;
}

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

/* Hero Greeting */
.hero-greeting {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.05em;
}

/* Hero Mobile Styles */
@media (max-width: 991px) {
  .hero .row {
    flex-direction: column-reverse !important;
  }

  .hero-content {
    text-align: center;
    max-width: 100%;
  }

  .hero-greeting {
    font-size: 1.5rem;
  }

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

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

  .social-links {
    justify-content: center;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-image {
    margin-bottom: var(--space-xl);
  }

  .hero-image img {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* Social Links */
.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 1.125rem;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.35);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
#experience {
  background: var(--bg-white);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

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

.experience-card {
  background: var(--bg-white);
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.experience-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--primary) 0%, #0052cc 100%);
  color: white;
}

.experience-info h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
  color: white;
}

.experience-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.experience-date {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.experience-company {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
}

.experience-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.experience-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.experience-body {
  padding: var(--space-lg);
}

.experience-body h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.experience-list {
  margin-bottom: var(--space-md);
}

.experience-list li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-xs);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.experience-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.experience-highlight {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--primary);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
#about {
  background: var(--bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

.about-content h2 {
  margin-bottom: var(--space-md);
}

.about-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.about-stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

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

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-top: var(--space-xs);
}

.about-image {
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   PORTFOLIO SECTION - Tabs & Carousel Design
   ============================================ */
#portfolio {
  background: var(--bg-light);
}

/* Portfolio Card Container */
.portfolio-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Tabs Navigation */
.portfolio-tabs {
  display: flex;
  background: linear-gradient(135deg, var(--primary) 0%, #0052cc 100%);
  padding: var(--space-xs);
  gap: var(--space-xs);
}

.portfolio-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.portfolio-tab:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.portfolio-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.portfolio-tab i {
  font-size: 1.125rem;
}

@media (max-width: 768px) {
  .portfolio-tabs {
    flex-direction: column;
    padding: var(--space-sm);
  }

  .portfolio-tab {
    padding: var(--space-sm) var(--space-md);
  }
}

/* Tab Panels */
.portfolio-content {
  padding: var(--space-xl);
}

@media (max-width: 768px) {
  .portfolio-content {
    padding: var(--space-md);
  }
}

@media (max-width: 576px) {
  .portfolio-content {
    padding: var(--space-sm);
  }

  .project-slide-v2 {
    padding: var(--space-xs);
  }

  .project-details {
    padding: var(--space-sm);
  }
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Carousel Container */
.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* New Project Slide V2 - Image Priority Layout */
.project-slide-v2 {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-lg);
  align-items: start;
  padding: var(--space-sm);
}

@media (max-width: 900px) {
  .project-slide-v2 {
    grid-template-columns: 1fr;
  }
}

/* Project Gallery */
.project-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.gallery-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-subtle);
  aspect-ratio: 16 / 10;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-slide-v2:hover .gallery-main-img {
  transform: scale(1.03);
}

.gallery-thumbs {
  display: flex;
  gap: var(--space-xs);
}

.gallery-thumb {
  flex: 1;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
  border-color: var(--primary);
}

@media (max-width: 576px) {
  .gallery-thumb {
    height: 50px;
  }
}

/* Hackathon Featured Overlay */
.hackathon-featured {
  position: relative;
}

.hackathon-overlay {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  border-radius: var(--radius-full);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 183, 0, 0.4);
}

.hackathon-overlay i {
  font-size: 1rem;
}

.hackathon-overlay.silver {
  background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
  box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
}

.hackathon-overlay.bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
  box-shadow: 0 4px 15px rgba(205, 127, 50, 0.4);
}

/* Project Details */
.project-details {
  padding: var(--space-sm) 0;
}

.project-details .project-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 102, 255, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.project-details h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.project-details p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.project-details .project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.project-details .project-tech span {
  padding: 4px 10px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.project-details .project-tech span:hover {
  background: var(--primary);
  color: white;
}

@media (max-width: 900px) {
  .project-details {
    text-align: center;
  }

  .project-details .project-tech {
    justify-content: center;
  }

  .project-details .project-link {
    margin: 0 auto;
  }
}

/* Legacy styles kept for compatibility */
.project-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-md);
}

@media (max-width: 768px) {
  .project-slide {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Project Image/Icon */
.project-image {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--bg-subtle) 0%, #e8f0ff 100%);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.project-image i {
  font-size: 4rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.project-slide:hover .project-image i {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .project-image {
    width: 150px;
    height: 150px;
    margin: 0 auto var(--space-md);
  }

  .project-image i {
    font-size: 3rem;
  }
}

/* Project Info */
.project-info {
  padding: var(--space-sm) 0;
}

.project-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 102, 255, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.project-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.project-info p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

/* Project Tech Tags */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
  .project-tech {
    justify-content: center;
  }
}

.project-tech span {
  padding: 6px 14px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.project-tech span:hover {
  background: var(--primary);
  color: white;
}

/* Project Link */
.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--primary);
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
}

.project-link:hover {
  background: #0052cc;
  transform: translateX(5px);
  color: white;
}

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

.project-link:hover i {
  transform: translateX(3px);
}

/* Carousel Controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

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

.carousel-btn.prev {
  left: 0;
}

.carousel-btn.next {
  right: 0;
}

@media (max-width: 768px) {
  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-btn.prev {
    left: -5px;
  }

  .carousel-btn.next {
    right: -5px;
  }
}

/* Carousel Indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator:hover {
  background: var(--primary);
  opacity: 0.5;
}

.indicator.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* ============================================
   TECHNOLOGIES SECTION - Orbital Design
   ============================================ */
#tech {
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
  overflow: hidden;
}

.tech-universe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

@media (max-width: 992px) {
  .tech-universe {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

/* Orbit System */
.orbit-system {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto;
}

@media (max-width: 576px) {
  .orbit-system {
    width: 300px;
    height: 300px;
  }
}

/* Center */
.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--primary) 0%, #0052cc 100%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 0 40px rgba(0, 102, 255, 0.4);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 40px rgba(0, 102, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 60px rgba(0, 102, 255, 0.6);
  }
}

.center-icon {
  font-size: 2rem;
  color: white;
}

.center-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  margin-top: 4px;
}

@media (max-width: 576px) {
  .orbit-center {
    width: 80px;
    height: 80px;
  }
  .center-icon {
    font-size: 1.5rem;
  }
  .center-text {
    font-size: 0.625rem;
  }
}

/* Orbits */
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(0, 102, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-1 {
  width: 180px;
  height: 180px;
  animation: orbit-rotate 20s linear infinite;
}

.orbit-2 {
  width: 280px;
  height: 280px;
  animation: orbit-rotate 30s linear infinite reverse;
}

.orbit-3 {
  width: 380px;
  height: 380px;
  animation: orbit-rotate 40s linear infinite;
}

@media (max-width: 576px) {
  .orbit-1 { width: 140px; height: 140px; }
  .orbit-2 { width: 210px; height: 210px; }
  .orbit-3 { width: 280px; height: 280px; }
}

@keyframes orbit-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Orbit Icons */
.orbit-icon {
  position: absolute;
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  top: 50%;
  left: 50%;
  transform: rotate(var(--angle)) translateX(calc(50% + 46px)) rotate(calc(-1 * var(--angle)));
}

.orbit-1 .orbit-icon {
  transform: rotate(var(--angle)) translateX(90px) rotate(calc(-1 * var(--angle)));
  animation: counter-rotate 20s linear infinite;
}

.orbit-2 .orbit-icon {
  transform: rotate(var(--angle)) translateX(140px) rotate(calc(-1 * var(--angle)));
  animation: counter-rotate-reverse 30s linear infinite;
}

.orbit-3 .orbit-icon {
  transform: rotate(var(--angle)) translateX(190px) rotate(calc(-1 * var(--angle)));
  animation: counter-rotate 40s linear infinite;
}

@media (max-width: 576px) {
  .orbit-icon {
    width: 36px;
    height: 36px;
  }
  .orbit-1 .orbit-icon { transform: rotate(var(--angle)) translateX(70px) rotate(calc(-1 * var(--angle))); }
  .orbit-2 .orbit-icon { transform: rotate(var(--angle)) translateX(105px) rotate(calc(-1 * var(--angle))); }
  .orbit-3 .orbit-icon { transform: rotate(var(--angle)) translateX(140px) rotate(calc(-1 * var(--angle))); }
}

@keyframes counter-rotate {
  from { transform: rotate(var(--angle)) translateX(90px) rotate(calc(-1 * var(--angle) - 0deg)); }
  to { transform: rotate(var(--angle)) translateX(90px) rotate(calc(-1 * var(--angle) - 360deg)); }
}

@keyframes counter-rotate-reverse {
  from { transform: rotate(var(--angle)) translateX(140px) rotate(calc(-1 * var(--angle) + 0deg)); }
  to { transform: rotate(var(--angle)) translateX(140px) rotate(calc(-1 * var(--angle) + 360deg)); }
}

.orbit-icon i {
  font-size: 1.25rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

@media (max-width: 576px) {
  .orbit-icon i {
    font-size: 1rem;
  }
}

.orbit-icon:hover {
  transform: scale(1.2);
  box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
  z-index: 100;
}

.orbit-icon:hover i {
  color: #0052cc;
}

.orbit-icon::after {
  content: attr(data-tech);
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.orbit-icon:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Skills Categories */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 576px) {
  .skills-categories {
    grid-template-columns: 1fr;
  }
}

.skill-category {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-category:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.1);
}

.category-header {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.category-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, #0052cc 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.skill-category:hover .category-icon {
  transform: rotate(-10deg) scale(1.1);
}

.category-icon i {
  font-size: 0.875rem;
  color: white;
}

.category-header h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Category Skills Tags */
.category-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--space-xs);
}

.skill-tag {
  padding: 2px 8px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.skill-category:hover .skill-tag {
  background: rgba(0, 102, 255, 0.1);
  color: var(--primary);
}

.skill-tag:hover {
  background: var(--primary) !important;
  color: white !important;
  transform: scale(1.05);
}

/* Progress Bar */
.category-bar {
  height: 3px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-xs);
}

.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary) 0%, #00c6ff 100%);
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
}

.skill-category:hover .bar-fill {
  width: var(--fill);
}

/* Pause orbit animation on hover */
.orbit-system:hover .orbit {
  animation-play-state: paused;
}

.orbit-system:hover .orbit-icon {
  animation-play-state: paused;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contact {
  background: var(--bg-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

.contact-form {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.form-control {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-control::placeholder {
  color: var(--text-light);
}

textarea.form-control {
  resize: none;
  min-height: 140px;
}

.contact-info h3 {
  margin-bottom: var(--space-sm);
}

.contact-info > p {
  margin-bottom: var(--space-lg);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-text {
  flex: 1;
}

.contact-text span {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.contact-text a,
.contact-text strong {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-text a:hover {
  color: var(--primary);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--dark);
  color: white;
  padding: var(--space-3xl) 0 var(--space-lg);
}

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

.footer-content h4 {
  font-size: 1.5rem;
  color: white;
  margin-bottom: var(--space-xs);
}

.footer-content > p {
  color: var(--text-light);
  margin-bottom: var(--space-lg);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: white;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

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

/* ============================================
   SCROLL TO TOP
   ============================================ */
#scrolltop {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: var(--transition);
}

#scrolltop.visible {
  visibility: visible;
  opacity: 1;
}

#scrolltop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

#scrolltop a:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Hide Bootstrap defaults we don't need */
.navbar-light .navbar-toggler {
  border: none;
}

.navbar-light .navbar-toggler:focus {
  box-shadow: none;
}

/* Responsive visibility */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}
