/* =========================================
   JKDTech GitHub.io — Portfolio CSS
   Premium Tech Dark Theme
   ========================================= */

/* ---- Variables ---- */
:root {
  --bg:        #0a0a0f;
  --bg-alt:    #0f0f1a;
  --surface:   #111118;
  --border:    rgba(255,255,255,0.08);
  --indigo:    #6366f1;
  --indigo-lt: #818cf8;
  --cyan:      #06b6d4;
  --purple:    #8b5cf6;
  --green:     #10b981;
  --orange:    #f59e0b;
  --pink:      #ec4899;
  --text:      #f8fafc;
  --text-muted:#94a3b8;
  --radius:    14px;
  --radius-sm: 8px;
  --transition:0.3s ease;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---- Utilities ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.glass {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

/* ---- Reveal animation ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.nav-logo-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; color: white;
}
.nav-logo-text { font-size: 15px; color: var(--text); }
.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-cta {
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  color: white !important;
  font-weight: 600;
}
.nav-cta:hover { opacity: 0.9; background: linear-gradient(135deg, var(--indigo), var(--purple)); }
.nav-link.active { color: var(--text); background: rgba(99,102,241,0.1); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* =========================================
   HERO
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 80px 24px 60px;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

/* Avatar */
.avatar-wrapper {
  position: relative;
  width: 220px; height: 220px;
  flex-shrink: 0;
}
.avatar-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
  animation: spin-slow linear infinite;
}
.avatar-ring--outer {
  inset: -24px;
  border-color: rgba(99,102,241,0.3);
  animation-duration: 14s;
  border-style: dashed;
}
.avatar-ring--inner {
  inset: -8px;
  border-color: rgba(6,182,212,0.4);
  animation-duration: 8s;
  animation-direction: reverse;
}
.avatar-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--purple), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(99,102,241,0.5), 0 0 120px rgba(99,102,241,0.2);
  animation: pulse-glow 3s ease-in-out infinite;
}
.avatar-initials {
  font-size: 4.5rem;
  font-weight: 900;
  color: white;
  letter-spacing: -2px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.avatar-orbit {
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  animation: spin-slow 20s linear infinite;
}
.orbit-icon {
  position: absolute;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--indigo-lt);
  top: 50%; left: 50%;
  transform-origin: 0 0;
}
.orbit-icon:nth-child(1) { transform: rotate(calc(var(--i) * 90deg)) translateY(-150px) rotate(calc(var(--i) * -90deg)); }
.orbit-icon:nth-child(2) { transform: rotate(calc(90deg + var(--i) * 90deg)) translateY(-150px) rotate(calc(-90deg - var(--i) * 90deg)); }
.orbit-icon:nth-child(3) { transform: rotate(calc(180deg + var(--i) * 90deg)) translateY(-150px) rotate(calc(-180deg - var(--i) * 90deg)); }
.orbit-icon:nth-child(4) { transform: rotate(calc(270deg + var(--i) * 90deg)) translateY(-150px) rotate(calc(-270deg - var(--i) * 90deg)); }

/* Hero text */
.hero-text { max-width: 520px; }
.hero-greeting { font-size: 15px; color: var(--text-muted); margin-bottom: 8px; }
.hero-name { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 900; line-height: 1.1; margin-bottom: 12px; }
.hero-title { font-size: clamp(1rem, 2.5vw, 1.25rem); font-weight: 500; color: var(--indigo-lt); min-height: 32px; margin-bottom: 16px; }
.typing-cursor { animation: blink 1s step-end infinite; }
.hero-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.7; }
.hero-desc strong { color: var(--text); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--indigo-lt);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.btn {
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  color: white;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,0.45); }
.btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.hero-social { display: flex; gap: 16px; }
.hero-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: var(--transition);
}
.hero-social a:hover { color: var(--indigo-lt); border-color: var(--indigo); background: rgba(99,102,241,0.12); }
.scroll-indicator {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
}
.scroll-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--indigo);
  animation: bounce 2s ease-in-out infinite;
}

/* =========================================
   SECTIONS
   ========================================= */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--indigo-lt);
  margin-bottom: 10px;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.section-desc { font-size: 16px; color: var(--text-muted); margin-top: 12px; max-width: 520px; margin-left: auto; margin-right: auto; }

/* =========================================
   SOBRE MÍ
   ========================================= */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.about-card {
  padding: 28px;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.about-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
  margin-bottom: 16px;
}
.about-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.about-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.about-card p strong { color: var(--text); }

/* =========================================
   TIMELINE
   ========================================= */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 40px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 12px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--indigo), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 36px;
}
.timeline-marker {
  position: absolute;
  left: -35px; top: 28px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--indigo);
  transition: var(--transition);
}
.timeline-marker.current {
  background: var(--indigo);
  box-shadow: 0 0 16px rgba(99,102,241,0.6);
}
.timeline-content {
  padding: 24px;
  border-radius: var(--radius);
  transition: transform var(--transition);
}
.timeline-content:hover { transform: translateX(4px); }
.timeline-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.timeline-year { font-size: 12px; font-weight: 700; color: var(--indigo-lt); letter-spacing: 0.05em; }
.timeline-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--indigo-lt);
}
.timeline-content h3 { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.timeline-content h4 { font-size: 13px; color: var(--cyan); font-weight: 600; margin-bottom: 10px; }
.timeline-content p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.6; }
.tech-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-pills span {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* =========================================
   PROYECTOS
   ========================================= */
.projects-group-label {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.projects-grid--sm { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.5); }
.project-visual {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,0.9);
}
.project-visual--sm { height: 100px; font-size: 2.2rem; }
.project-visual--indigo { background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(139,92,246,0.3)); }
.project-visual--cyan    { background: linear-gradient(135deg, rgba(6,182,212,0.3), rgba(59,130,246,0.3)); }
.project-visual--purple  { background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(236,72,153,0.3)); }
.project-visual--green   { background: linear-gradient(135deg, rgba(16,185,129,0.3), rgba(6,182,212,0.3)); }
.project-visual--orange  { background: linear-gradient(135deg, rgba(245,158,11,0.3), rgba(239,68,68,0.3)); }
.project-visual--pink    { background: linear-gradient(135deg, rgba(236,72,153,0.3), rgba(139,92,246,0.3)); }
.project-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tag--live {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.3);
  color: #34d399;
}
.tag--dev {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.25);
  color: #fbbf24;
}
.project-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.project-info p { font-size: 13px; color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 14px; }
.project-link {
  font-size: 13px; font-weight: 600;
  color: var(--indigo-lt);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color var(--transition);
}
.project-link:hover { color: var(--cyan); }

/* =========================================
   HABILIDADES
   ========================================= */
.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.skill-bar { margin-bottom: 22px; }
.skill-bar-header {
  display: flex; justify-content: space-between;
  font-size: 13px; font-weight: 600;
  margin-bottom: 8px;
}
.skill-pct { color: var(--indigo-lt); }
.skill-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--indigo), var(--cyan));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.tech-cloud { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.tech-pill {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
  cursor: default;
}
.tech-pill:hover { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.3); color: var(--indigo-lt); }
.tech-pill--lg {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.2);
  color: var(--indigo-lt);
}

/* =========================================
   CERTIFICACIONES
   ========================================= */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.cert-card {
  padding: 24px;
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 16px;
  transition: transform var(--transition);
}
.cert-card:hover { transform: translateY(-4px); }
.cert-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.cert-icon--gcp    { background: linear-gradient(135deg, #4285f4, #34a853); color: white; }
.cert-icon--java   { background: linear-gradient(135deg, #f89820, #e76f00); color: white; }
.cert-icon--flutter{ background: linear-gradient(135deg, #54c5f8, #01579b); color: white; }
.cert-icon--ai     { background: linear-gradient(135deg, var(--indigo), var(--purple)); color: white; }
.cert-info h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.cert-info p  { font-size: 12px; color: var(--text-muted); }

/* =========================================
   CONTACTO
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.contact-card {
  padding: 20px 24px;
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-card--highlight {
  border-color: rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.08);
}
.contact-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.contact-icon--linkedin { background: rgba(10,102,194,0.2); color: #0a66c2; border: 1px solid rgba(10,102,194,0.3); }
.contact-icon--github   { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--border); }
.contact-icon--web      { background: rgba(99,102,241,0.15); color: var(--indigo-lt); border: 1px solid rgba(99,102,241,0.3); }
.contact-icon--whatsapp { background: rgba(37,211,102,0.15); color: #25d366; border: 1px solid rgba(37,211,102,0.3); }
.contact-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.contact-card p  { font-size: 12px; color: var(--text-muted); }
.contact-arrow { margin-left: auto; color: var(--text-muted); font-size: 14px; transition: transform var(--transition); }
.contact-card:hover .contact-arrow { transform: translateX(4px); color: var(--indigo-lt); }

/* =========================================
   FOOTER
   ========================================= */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
  margin-bottom: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: white;
}
.footer-name { font-size: 15px; font-weight: 700; }
.footer-sub  { font-size: 12px; color: var(--text-muted); }
.footer-links { display: flex; gap: 12px; }
.footer-links a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-muted);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--indigo-lt); border-color: var(--indigo); }
.footer-copy {
  font-size: 12px; color: var(--text-muted); text-align: center;
}
.footer-copy a { color: var(--indigo-lt); }

/* =========================================
   KEYFRAMES
   ========================================= */
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 60px rgba(99,102,241,0.5), 0 0 120px rgba(99,102,241,0.2); }
  50%       { box-shadow: 0 0 80px rgba(99,102,241,0.7), 0 0 160px rgba(99,102,241,0.3); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(10,10,15,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }
  .nav-menu.open { display: flex; }
  .nav-link { padding: 10px 14px; width: 100%; }
  .nav-toggle { display: flex; }

  .hero-container { flex-direction: column; text-align: center; gap: 40px; }
  .hero-social { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-badges { justify-content: center; }
  .avatar-wrapper { width: 180px; height: 180px; }
  .avatar-initials { font-size: 3.6rem; }

  .skills-layout { grid-template-columns: 1fr; }
  .timeline { padding-left: 24px; }
  .timeline-marker { left: -20px; }
}

@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
