/* ═══════════════════════════════════════════════════════
   SIMÓN JURI — PORTFOLIO CSS
   Theme: Cybersecurity / IT Infrastructure Dark
   ═══════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  --bg-primary: #060b18;
  --bg-secondary: #0c1225;
  --bg-card: rgba(12, 18, 37, 0.85);
  --bg-card-hover: rgba(20, 30, 60, 0.9);

  --accent-primary: #00d4ff;
  --accent-secondary: #6366f1;
  --accent-tertiary: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #6366f1 100%);
  --accent-gradient-hover: linear-gradient(135deg, #6366f1 0%, #00d4ff 100%);
  --accent-glow: 0 0 20px rgba(0, 212, 255, 0.3);

  --text-primary: #e8edf5;
  --text-secondary: #8892b0;
  --text-muted: #6d78a0;

  --border-subtle: rgba(0, 212, 255, 0.08);
  --border-accent: rgba(0, 212, 255, 0.2);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 70px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

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

/* ═══════════════════ PRELOADER ═══════════════════ */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.preloader-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-ring {
  width: 80px;
  height: 80px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.preloader-text {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-primary);
  animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; text-shadow: 0 0 10px rgba(0, 212, 255, 0.3); }
  50% { opacity: 1; text-shadow: 0 0 20px rgba(0, 212, 255, 0.6); }
}

/* ═══════════════════ NAVIGATION ═══════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: var(--transition);
  background: transparent;
}

#navbar.scrolled {
  background: rgba(6, 11, 24, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
}

.logo-bracket {
  color: var(--accent-primary);
}

.nav-logo:hover {
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-link i {
  margin-right: 0.3rem;
  font-size: 0.75rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.06);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition-fast);
}

.nav-link:hover::before {
  width: 20px;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--border-accent);
  color: var(--accent-primary);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
}

.lang-toggle:hover {
  background: rgba(0, 212, 255, 0.15);
  box-shadow: var(--accent-glow);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

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

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ═══════════════════ HERO SECTION ═══════════════════ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Grid lines background */
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* Textura tipo circuito/hex, diagonal, casi imperceptible */
.hex-grid {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    repeating-linear-gradient(60deg, rgba(0, 212, 255, 0.04) 0px, rgba(0, 212, 255, 0.04) 1px, transparent 1px, transparent 56px),
    repeating-linear-gradient(-60deg, rgba(99, 102, 241, 0.04) 0px, rgba(99, 102, 241, 0.04) 1px, transparent 1px, transparent 56px);
  animation: hexDrift 70s linear infinite;
}

@keyframes hexDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 260px 0, -260px 0; }
}

/* Glow que sigue al cursor dentro del hero */
.cursor-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 320px at var(--x, 50%) var(--y, 20%), rgba(0, 212, 255, 0.07), transparent 70%);
}

/* Floating geometric shapes */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.045;
  filter: blur(80px);
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: var(--accent-primary);
  top: -15%;
  right: -10%;
  animation: float1 34s ease-in-out infinite;
}

.shape-2 {
  width: 480px;
  height: 480px;
  background: var(--accent-secondary);
  bottom: -10%;
  left: -15%;
  animation: float2 40s ease-in-out infinite;
}

.shape-3 {
  width: 260px;
  height: 260px;
  background: var(--accent-tertiary);
  top: 40%;
  left: 30%;
  animation: float3 28s ease-in-out infinite;
}

/* Menos elementos = look más sobrio; estos dos quedan apagados */
.shape-4,
.shape-5 {
  display: none;
}

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

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 25px) scale(0.97); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(35px, -20px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

/* Avatar */
.hero-avatar {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 2rem;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent-gradient);
  animation: ring-rotate 4s linear infinite;
  padding: 3px;
}

.avatar-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg-primary);
}

@keyframes ring-rotate {
  0% { background: linear-gradient(0deg, #00d4ff, #6366f1); }
  25% { background: linear-gradient(90deg, #00d4ff, #6366f1); }
  50% { background: linear-gradient(180deg, #00d4ff, #6366f1); }
  75% { background: linear-gradient(270deg, #00d4ff, #6366f1); }
  100% { background: linear-gradient(360deg, #00d4ff, #6366f1); }
}

.avatar-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.05);
  border-radius: 50%;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.avatar-status {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: #22c55e;
  border: 3px solid var(--bg-primary);
  border-radius: 50%;
  animation: status-pulse 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* Hero Text */
.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 0.3s;
}

.terminal-prompt {
  color: var(--accent-secondary);
  margin-right: 0.3rem;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #c8d6e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 0.5s;
}

.hero-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 1rem;
  min-height: 2rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 0.7s;
}

.hero-title-label {
  font-family: var(--font-mono);
  color: var(--accent-secondary);
  font-size: 1.1rem;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  font-weight: 400;
  color: var(--accent-primary);
}

.cursor-blink {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  animation: blink 1s step-end infinite;
}

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

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 0.9s;
}

/* Hero CTA */
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 1.1s;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

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

.btn i {
  transition: transform var(--transition-fast);
}

.btn:hover i {
  transform: translateX(3px);
}

.btn:hover i.fa-arrow-down {
  transform: translateY(3px);
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

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

.btn-outline:hover {
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: var(--accent-glow);
}

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

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 1.3s;
}

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

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-shadow: 0 0 24px rgba(0, 212, 255, 0.35);
  display: inline;
}

.stat-plus {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--accent-secondary);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-accent);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 1.5s;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--border-accent);
  border-radius: 14px;
  margin: 0 auto 0.5rem;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.scroll-indicator span {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

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

/* ═══════════════════ SECTIONS (General) ═══════════════════ */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-alt {
  background: rgba(12, 18, 37, 0.92);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid var(--border-accent);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.section-tag i {
  margin-right: 0.3rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.section-line {
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  margin: 0 auto;
  border-radius: 3px;
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.35);
  transform: scaleX(0.15);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-line.revealed {
  transform: scaleX(1);
}

.section-desc {
  margin-top: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════ ABOUT SECTION ═══════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.highlight-card:hover {
  background: rgba(0, 212, 255, 0.05);
  border-color: var(--border-accent);
  transform: translateX(5px);
}

.highlight-icon {
  flex-shrink: 0;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 10px;
  color: var(--accent-primary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.highlight-card:hover .highlight-icon {
  background: var(--accent-gradient);
  color: var(--bg-primary);
  transform: scale(1.08) rotate(-4deg);
}

.highlight-info h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.highlight-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═══════════════════ EXPERIENCE SECTION ═══════════════════ */
.timeline {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  padding-left: 2rem;
}

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

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

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 0.85rem;
  z-index: 1;
  transition: var(--transition);
}

.timeline-item:hover .timeline-marker {
  background: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow: var(--accent-glow);
}

.timeline-item[data-featured="true"] .timeline-marker {
  border-color: #22c55e;
  color: #22c55e;
  animation: markerPulse 2.5s ease-in-out infinite;
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.timeline-content {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.timeline-item:hover .timeline-content {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.timeline-item[data-featured="true"] .timeline-content {
  border-color: var(--border-accent);
  background: rgba(0, 212, 255, 0.03);
}

.timeline-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-role {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.timeline-company i {
  margin-right: 0.3rem;
  font-size: 0.8rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.timeline-date i {
  margin-right: 0.3rem;
}

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

.timeline-tasks li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
}

.timeline-tasks li i {
  color: var(--accent-primary);
  margin-right: 0.5rem;
  font-size: 0.75rem;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid var(--border-accent);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* Previous Roles */
.previous-roles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prev-role {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border-left: 2px solid var(--border-accent);
  transition: var(--transition);
}

.prev-role:hover {
  background: rgba(0, 212, 255, 0.04);
}

.prev-title {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
}

.prev-company {
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.prev-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ═══════════════════ EDUCATION SECTION ═══════════════════ */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.edu-card {
  position: relative;
  padding: 1.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  overflow: hidden;
}

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

.edu-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

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

.edu-card-featured {
  border-color: var(--border-accent);
  background: rgba(0, 212, 255, 0.03);
}

.edu-card-featured::before {
  opacity: 1;
}

.edu-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 10px;
  color: var(--accent-primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.edu-card:hover .edu-icon {
  transform: scale(1.08) rotate(-4deg);
}

.edu-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.edu-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  padding-right: 4rem;
}

.edu-card-featured h3 {
  padding-right: 5rem;
}

.edu-institution {
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.edu-institution i {
  margin-right: 0.3rem;
  font-size: 0.75rem;
}

.edu-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.edu-date i {
  margin-right: 0.3rem;
}

/* ═══════════════════ CERTIFICATIONS SECTION ═══════════════════ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  position: relative;
  padding: 2rem 1.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
  overflow: hidden;
}

.cert-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.cert-card:hover .cert-glow {
  opacity: 1;
}

.cert-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 212, 255, 0.1);
}

.cert-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  color: var(--accent-primary);
  font-size: 1.4rem;
  transition: var(--transition);
}

.cert-card:hover .cert-icon {
  background: var(--accent-gradient);
  color: var(--bg-primary);
  box-shadow: var(--accent-glow);
}

.cert-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.cert-acronym {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.cert-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cert-year i {
  margin-right: 0.3rem;
}

.cert-badge-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: rgba(0, 212, 255, 0.15);
  font-size: 1.5rem;
  transition: var(--transition);
}

.cert-card:hover .cert-badge-icon {
  color: var(--accent-primary);
}

/* ═══════════════════ SKILLS SECTION ═══════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.skills-subtitle {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skills-subtitle i {
  color: var(--accent-primary);
}

/* Skill Bars */
.skill-bar-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skill-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.skill-bar-header span:first-child {
  color: var(--text-secondary);
}

.skill-bar-header i {
  color: var(--accent-primary);
  margin-right: 0.4rem;
  font-size: 0.8rem;
}

.skill-percent {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  font-size: 0.8rem;
}

.skill-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.skill-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Soft Skills */
.soft-skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.soft-skill-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.soft-skill-card:hover {
  border-color: var(--border-accent);
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.05);
  transform: translateY(-2px);
}

.soft-skill-card i {
  color: var(--accent-primary);
  font-size: 0.9rem;
  transition: transform var(--transition-fast);
}

.soft-skill-card:hover i {
  transform: scale(1.15);
}

/* Language Skills */
.lang-skills {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.lang-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 60px;
}

.lang-dots {
  display: flex;
  gap: 0.35rem;
  flex: 1;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid var(--border-accent);
}

.dot.filled {
  background: var(--accent-primary);
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.4);
}

.lang-level {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tech Tags */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: var(--transition);
}

.tech-tag:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.06);
}

.tech-tag i {
  font-size: 0.7rem;
}

/* ═══════════════════ CONTACT SECTION ═══════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: default;
}

a.contact-card {
  cursor: pointer;
}

a.contact-card:hover {
  border-color: var(--border-accent);
  background: rgba(0, 212, 255, 0.05);
  transform: translateX(5px);
}

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

.contact-card-info h3 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}

.contact-card-info p {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.contact-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition);
}

a.contact-card:hover .contact-arrow {
  color: var(--accent-primary);
  transform: translateX(5px);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-group label i {
  margin-right: 0.3rem;
  color: var(--accent-primary);
  font-size: 0.75rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 212, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

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

/* Honeypot anti-spam: oculto visualmente pero presente para bots */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Estado del envío del formulario */
.form-status {
  margin-top: 1rem;
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
}

.form-status.sending {
  color: var(--text-secondary);
}

.form-status.success {
  color: #22c55e;
}

.form-status.error {
  color: #ef4444;
}

.btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ═══════════════════ FOOTER ═══════════════════ */
#footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

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

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 45px;
  height: 45px;
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 99;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

/* ═══════════════════ REVEAL ANIMATIONS ═══════════════════ */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* Cascada: las tarjetas de una misma grilla no aparecen todas a la vez */
.cert-grid .cert-card:nth-child(1) { transition-delay: 0s; }
.cert-grid .cert-card:nth-child(2) { transition-delay: 0.08s; }
.cert-grid .cert-card:nth-child(3) { transition-delay: 0.16s; }
.cert-grid .cert-card:nth-child(4) { transition-delay: 0.24s; }

.education-grid .edu-card:nth-child(1) { transition-delay: 0s; }
.education-grid .edu-card:nth-child(2) { transition-delay: 0.06s; }
.education-grid .edu-card:nth-child(3) { transition-delay: 0.12s; }
.education-grid .edu-card:nth-child(4) { transition-delay: 0.18s; }
.education-grid .edu-card:nth-child(5) { transition-delay: 0.24s; }
.education-grid .edu-card:nth-child(6) { transition-delay: 0.3s; }

.timeline-item:nth-child(1) { transition-delay: 0s; }
.timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline-item:nth-child(3) { transition-delay: 0.2s; }

/* ═══════════════════ FOCUS VISIBLE (ACCESIBILIDAD) ═══════════════════ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Quien prefiera menos movimiento, que lo tenga: cortamos animaciones y transiciones */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(6, 11, 24, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0.25rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border-subtle);
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }

  .hamburger {
    display: flex;
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

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

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

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

  .section {
    padding: 4rem 0;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-marker {
    left: -1.5rem;
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

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

  .prev-role {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .hero-avatar {
    width: 100px;
    height: 100px;
  }

  .avatar-initials {
    font-size: 2.2rem;
  }

  .scroll-indicator {
    display: none;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero-name {
    font-size: 1.8rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }
}

/* Overlay for mobile menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 998;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ═══════════════════ FONDO GLOBAL: RED DE PARTÍCULAS ═══════════════════ */
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Viñeta: un foco de luz suave desde arriba y oscurece los bordes, le da
   profundidad al conjunto en vez de quedar todo plano */
.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, rgba(0, 212, 255, 0.05), transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(3, 6, 14, 0.5), transparent 60%);
}

/* Grano fino sobre todo el sitio: el detalle que hace que el fondo se sienta
   diseñado y no un degradado plano. Opacidad mínima a propósito. */
.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.035;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
