/* ==========================================
   JORGE MONTERO - PORTFOLIO
   Modern Dark Theme with Cyan Accents
   ========================================== */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f0f1a;
  --bg-card: #141422;
  --bg-card-hover: #1a1a2e;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --accent-dark: #0891b2;
  --accent-glow: rgba(6, 182, 212, 0.15);
  --accent-gradient: linear-gradient(135deg, #06b6d4, #8b5cf6);
  --purple: #8b5cf6;
  --green: #10b981;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a:hover { color: var(--accent-light); }

img { max-width: 100%; }

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

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent) !important;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.nav-link {
  color: var(--text-secondary) !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn {
  background: var(--accent) !important;
  color: var(--bg-primary) !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.nav-btn:hover {
  background: var(--accent-light) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-particles .particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  20% { opacity: 0.6; }
  80% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-100px) scale(1.5); }
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  animation: heroBg 10s ease-in-out infinite alternate;
}

@keyframes heroBg {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-5%, -5%); }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-typewriter {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--accent);
  margin-bottom: 24px;
  min-height: 2em;
}

.typewriter-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

.hero-socials {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.hero-socials a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary) !important;
  font-size: 1.2rem;
  transition: var(--transition);
}

.hero-socials a:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-scroll a span {
  display: block;
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  animation: scrollDown 2s infinite;
  opacity: 0.5;
}

@keyframes scrollDown {
  0% { transform: rotate(45deg) translate(0, 0); opacity: 0; }
  50% { opacity: 0.5; }
  100% { transform: rotate(45deg) translate(10px, 10px); opacity: 0; }
}

/* ==========================================
   SECTIONS
   ========================================== */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 60px;
}

/* ==========================================
   ABOUT
   ========================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 60px;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.about-text strong {
  color: var(--text-primary);
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.info-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.info-card-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.info-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================
   TIMELINE
   ========================================== */
.timeline {
  max-width: 800px;
  margin: 60px auto 0;
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--purple), transparent);
}

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

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid var(--accent);
  z-index: 2;
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: rgba(6, 182, 212, 0.2);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.timeline-header h4 {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(6, 182, 212, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.timeline-content ul {
  list-style: none;
  margin-bottom: 16px;
}

.timeline-content ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.timeline-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-content ul li strong {
  color: var(--text-primary);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-tags span {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent);
  font-weight: 500;
}

/* ==========================================
   AI SECTION
   ========================================== */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.ai-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition);
}

.ai-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--accent-glow);
}

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

.ai-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.ai-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.ai-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.ai-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-card-tags span {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple);
  font-weight: 500;
}

/* ==========================================
   SKILLS
   ========================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: rgba(6, 182, 212, 0.2);
}

.skill-category h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-item:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.skill-item i {
  font-size: 1.1rem;
  color: var(--accent);
}

.skill-item img {
  width: 18px;
  height: 18px;
}

/* ==========================================
   PROJECTS
   ========================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--accent-glow);
}

.project-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(139, 92, 246, 0.08));
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

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

.project-link {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-primary) !important;
  font-size: 1.2rem;
  transform: scale(0.8);
  transition: var(--transition);
}

.project-card:hover .project-link { transform: scale(1); }

.project-info {
  padding: 24px;
}

.project-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  font-weight: 500;
}

/* ==========================================
   CERTIFICATIONS
   ========================================== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 60px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
  color: var(--text-primary) !important;
}

.cert-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.cert-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.cert-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cert-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================
   CONTACT
   ========================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 60px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-item a, .contact-item p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-group textarea { resize: vertical; }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent) !important;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  color: var(--text-muted) !important;
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer-socials a:hover {
  color: var(--accent) !important;
  transform: translateY(-2px);
}

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

/* ==========================================
   WHATSAPP FLOAT
   ========================================== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: #fff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
  animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: #fff !important;
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6); }
}

/* ==========================================
   ANIMATIONS (AOS-like)
   ========================================== */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 968px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

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

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

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 80px 24px 24px;
    border-left: 1px solid var(--border);
    transition: var(--transition);
    gap: 4px;
  }

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

  .nav-link {
    padding: 12px 16px;
    width: 100%;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }

  .hero { padding: 100px 24px 60px; }

  .about-cards {
    grid-template-columns: 1fr 1fr;
  }

  .timeline { padding-left: 30px; }
  .timeline-dot { left: -30px; }
  .timeline::before { left: 4px; }

  .timeline-header {
    flex-direction: column;
  }

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

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .about-cards {
    grid-template-columns: 1fr;
  }

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

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

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

  .btn { width: 100%; justify-content: center; }
}
