/* =====================================================
   MANUEL SAQUILAN · PORTFOLIO
   style.css
   ===================================================== */

/* ── Variables ── */
:root {
  --bg:           #090d13;
  --bg-alt:       #0d1420;
  --surface:      rgba(255,255,255,.04);
  --surface-hover:rgba(255,255,255,.07);
  --border:       rgba(255,255,255,.08);
  --border-hover: rgba(108,99,255,.45);

  --primary:      #6c63ff;
  --primary-dark: #4e46e5;
  --primary-glow: rgba(108,99,255,.35);
  --accent:       #00d4ff;
  --accent-glow:  rgba(0,212,255,.25);

  --text:         #e8eaf0;
  --text-muted:   #8892a4;
  --text-dim:     #4a5568;

  --green:        #22c55e;
  --tag-bg:       rgba(108,99,255,.15);
  --tag-border:   rgba(108,99,255,.3);

  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    22px;

  --shadow:       0 8px 32px rgba(0,0,0,.45);
  --shadow-card:  0 4px 24px rgba(0,0,0,.35);

  --transition:   .3s cubic-bezier(.4,0,.2,1);
  --font:         'Inter', sans-serif;
  --font-code:    'Fira Code', monospace;
}

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

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

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Utilidades ── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 28px var(--primary-glow);
}

.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  font-family: var(--font-code);
  font-size: .85rem;
  color: var(--primary);
  letter-spacing: .08em;
  display: block;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 40%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-muted);
  margin-top: 14px;
  font-size: 1.05rem;
  max-width: 520px;
  margin-inline: auto;
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--primary-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--tag-bg);
}

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


/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.navbar.scrolled {
  background: rgba(9,13,19,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
  padding: 10px 0;
}

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

.nav-logo {
  font-family: var(--font-code);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}
.logo-bracket { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: #fff;
  background: var(--surface);
}

.nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff !important;
  padding: 8px 20px;
  box-shadow: 0 3px 12px var(--primary-glow);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--primary-glow); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* =====================================================
   HERO
   ===================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 24px 60px;
  gap: 48px;
  max-width: 1160px;
  margin: 0 auto;
}

/* Fondo animado */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108,99,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 {
  width: 480px; height: 480px;
  background: rgba(108,99,255,.18);
  top: -120px; left: -80px;
  animation-delay: 0s;
}
.orb-2 {
  width: 360px; height: 360px;
  background: rgba(0,212,255,.12);
  bottom: -60px; right: -60px;
  animation-delay: 3s;
}
.orb-3 {
  width: 280px; height: 280px;
  background: rgba(108,99,255,.1);
  top: 50%; right: 30%;
  animation-delay: 5s;
}

@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(20px,-20px) scale(1.05); }
}

/* Contenido hero */
.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 580px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.25);
  color: var(--green);
  font-size: .82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 50%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 22px;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.typed-wrapper {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 600;
}

.cursor {
  animation: blink .75s step-end infinite;
  color: var(--primary);
  font-weight: 300;
  margin-left: 2px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-description {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.75;
}
.hero-description strong { color: var(--text); }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Imagen hero */
.hero-image-wrapper {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: ringRotate 12s linear infinite;
}
.ring-1 {
  width: 320px; height: 320px;
  border-color: rgba(108,99,255,.25);
}
.ring-2 {
  width: 280px; height: 280px;
  border-color: rgba(0,212,255,.15);
  animation-direction: reverse;
  animation-duration: 18s;
}
.ring-3 {
  width: 240px; height: 240px;
  border-color: rgba(108,99,255,.1);
  animation-duration: 10s;
}
@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-photo-container {
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 0 40px var(--primary-glow);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-photo-placeholder {
  display: none;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255,255,255,.7);
}

/* Badges flotantes */
.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(13,20,32,.85);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  z-index: 3;
  white-space: nowrap;
  animation: floatBadge 4s ease-in-out infinite;
}
.badge-django  { top: 20px;   left: -20px;  animation-delay: 0s;   color: #44b78b; border-color: rgba(68,183,139,.3); }
.badge-docker  { bottom: 30px; left: -10px; animation-delay: 1.5s; color: #2496ed; border-color: rgba(36,150,237,.3); }
.badge-db      { top: 50%;    right: -30px; animation-delay: .8s;  color: #336791; border-color: rgba(51,103,145,.3); }

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

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  z-index: 1;
  animation: scrollBounce 2.5s ease-in-out infinite;
}
.scroll-mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--text-dim);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 4px; height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollWheel 2.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,100% { opacity: .6; transform: translateX(-50%) translateY(0); }
  50%      { opacity: 1;  transform: translateX(-50%) translateY(6px); }
}
@keyframes scrollWheel {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}


/* =====================================================
   SOBRE MÍ
   ===================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.8;
}
.about-text p strong { color: var(--text); }

.about-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.about-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--tag-bg);
}

.info-card { padding: 28px; }
.info-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.info-card-title i { color: var(--primary); }

.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.info-list li:last-child { border-bottom: none; padding-bottom: 0; }

.info-label {
  font-size: .82rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.info-value {
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: right;
}
.info-value.available {
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}
.info-value.available i { font-size: .5rem; animation: pulse 2s infinite; }


/* =====================================================
   HABILIDADES
   ===================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-category {
  padding: 28px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.skill-category:hover { transform: translateY(-4px); }

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.skill-category-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.skill-icon-wrapper {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.skill-icon-wrapper.backend  { background: rgba(108,99,255,.18); color: var(--primary); }
.skill-icon-wrapper.frontend { background: rgba(0,212,255,.15);  color: var(--accent); }
.skill-icon-wrapper.database { background: rgba(51,103,145,.2);  color: #4da8d8; }
.skill-icon-wrapper.devops   { background: rgba(36,150,237,.15); color: #2496ed; }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}
.skill-tag:hover, .skill-tag.primary {
  background: var(--tag-bg);
  border-color: var(--tag-border);
  color: var(--primary);
}


/* =====================================================
   PROYECTOS
   ===================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.project-card:hover { transform: translateY(-6px); }

.project-card.featured {
  border-color: rgba(108,99,255,.35);
  box-shadow: 0 0 28px rgba(108,99,255,.12);
}

.featured-badge {
  position: absolute;
  top: -1px; right: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 0 0 8px 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-icon-wrapper {
  width: 48px; height: 48px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
}

.project-link-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .85rem;
  transition: var(--transition);
}
.project-link-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--tag-bg);
}

.project-body { flex: 1; }

.project-category {
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-code);
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.project-desc {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.project-desc strong { color: var(--text); }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tags span {
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  color: var(--primary);
  font-weight: 500;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.project-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
}
.status-live { color: var(--green); }
.status-live i { font-size: .45rem; animation: pulse 2s infinite; }

.project-visit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition), gap var(--transition);
}
.project-visit:hover { color: var(--primary); gap: 10px; }


/* =====================================================
   EXPERIENCIA / TIMELINE
   ===================================================== */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

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

.timeline-item {
  position: relative;
  padding-left: 58px;
  margin-bottom: 32px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 10px;
  top: 20px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--bg);
  z-index: 1;
  transition: var(--transition);
}
.timeline-dot.active {
  background: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.timeline-content {
  padding: 24px;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.timeline-date {
  font-family: var(--font-code);
  font-size: .82rem;
  color: var(--primary);
  font-weight: 500;
}

.timeline-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.timeline-badge.work      { background: rgba(108,99,255,.2);  color: var(--primary); }
.timeline-badge.education { background: rgba(0,212,255,.15);  color: var(--accent); }
.timeline-badge.course    { background: rgba(34,197,94,.15);  color: var(--green); }

.timeline-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.timeline-company {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-content p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.timeline-tags span {
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  color: var(--primary);
  font-weight: 500;
}


/* =====================================================
   CONTACTO
   ===================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: start;
}

.contact-card {
  padding: 32px;
  height: 100%;
}
.contact-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--text);
}

.contact-services {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}
.contact-services li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .9rem;
  color: var(--text-muted);
}
.contact-services i { color: var(--primary); margin-top: 3px; flex-shrink: 0; }

.contact-socials {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.social-btn.linkedin:hover  { border-color: #0077b5; color: #0077b5; background: rgba(0,119,181,.1); }
.social-btn.whatsapp:hover  { border-color: #25d366; color: #25d366; background: rgba(37,211,102,.1); }
.social-btn.email:hover     { border-color: var(--primary); color: var(--primary); background: var(--tag-bg); }

/* Form */
.contact-form {
  padding: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: .95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

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

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238892a4'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  cursor: pointer;
}
.form-group select option { background: #1a2035; color: var(--text); }

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

.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.25);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: .9rem;
  font-weight: 500;
}
.form-success.show { display: flex; }

/* Aviso de error del formulario (espejo de .form-success) */
.form-error {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.28);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-size: .9rem;
  font-weight: 500;
}
.form-error.show { display: flex; }

/* Error por campo */
.field-error {
  display: none;
  color: #f87171;
  font-size: .8rem;
  font-weight: 500;
}
.field-error.show { display: block; }

.form-group input.has-error,
.form-group textarea.has-error,
.form-group select.has-error {
  border-color: rgba(239,68,68,.55);
}

/* Honeypot anti-bot: fuera de pantalla, nunca visible ni enfocable */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Widget de Cloudflare Turnstile */
.cf-turnstile {
  margin-bottom: 20px;
  min-height: 65px;
}


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

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

.footer-logo {
  font-family: var(--font-code);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.footer-text {
  font-size: .85rem;
  color: var(--text-dim);
}
.footer-text strong { color: var(--text-muted); }

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: .85rem;
  color: var(--text-dim);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }

/* ── Back to top ── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .9rem;
  box-shadow: 0 4px 16px var(--primary-glow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px var(--primary-glow); }


/* =====================================================
   RESPONSIVE
   ===================================================== */

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-info {
    max-width: 480px;
  }
}

/* ── Tablet chica / landscape mobile (≤ 768px) ── */
@media (max-width: 768px) {
  .section { padding: 72px 0; }

  /* Navbar */
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    background: rgba(9,13,19,.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 1.2rem; padding: 12px 32px; }
  .nav-cta  { padding: 12px 32px; }

  /* Hero */
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 120px 24px 80px;
    min-height: auto;
  }
  .hero-content { max-width: 100%; }

  .hero-badge { margin-inline: auto; }

  .hero-description { margin-inline: auto; }

  .hero-actions { justify-content: center; }

  .hero-stats { justify-content: center; }

  .hero-subtitle {
    justify-content: center;
  }

  .hero-image-wrapper {
    width: 240px;
    height: 240px;
  }
  .ring-1 { width: 240px; height: 240px; }
  .ring-2 { width: 200px; height: 200px; }
  .ring-3 { width: 170px; height: 170px; }
  .hero-photo-container { width: 150px; height: 150px; }

  .badge-django { left: -10px; }
  .badge-docker { left: -5px; }
  .badge-db     { right: -15px; }

  .scroll-indicator { display: none; }

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

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

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }

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

/* ── Mobile pequeño (≤ 480px) ── */
@media (max-width: 480px) {
  .hero-stats {
    gap: 16px;
  }
  .stat-number { font-size: 1.5rem; }

  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .timeline::before { display: none; }
  .timeline-item { padding-left: 0; }
  .timeline-dot { display: none; }

  .about-links { flex-direction: column; }
  .about-link { justify-content: center; }
}
