/* ===== Variables ===== */
:root {
  --bg: #0a0b0d;
  --bg-elevated: #111214;
  --surface: #181a1d;
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --accent: #22d3a8;
  --accent-dim: rgba(34, 211, 168, 0.15);
  --accent-hover: #2eeeb8;
  --border: #2a2d32;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header & Nav ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  background: rgba(10, 11, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
}

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

.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-logo:hover {
  color: var(--accent);
}

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

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 6rem 1.5rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 168, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 168, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vmin;
  height: 80vmin;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
  border-radius: 50%;
}

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

.hero-greeting {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-title .accent {
  color: var(--accent);
  display: block;
  font-size: 0.85em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  border-color: var(--text-muted);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 1px;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ===== Sections ===== */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent);
  font-weight: 500;
}

/* ===== About ===== */
.about {
  background: var(--bg-elevated);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.about-lead {
  color: var(--text) !important;
  font-size: 1.1rem;
}

.about-meta {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  text-align: center;
  min-width: 200px;
}

.about-stat {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.about-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Experience Timeline ===== */
.experience {
  padding: 5rem 0;
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
  margin-left: 0.5rem;
}

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

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

.timeline-marker {
  position: absolute;
  left: -1.5rem;
  top: 0.35rem;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

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

.timeline-content:hover {
  border-color: rgba(34, 211, 168, 0.3);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.timeline-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.timeline-header a,
.timeline-header span {
  font-size: 0.9rem;
  color: var(--accent);
}

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

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

.timeline-list {
  list-style: none;
  margin: 0.75rem 0 1rem;
  padding-left: 0;
}

.timeline-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.4rem;
  padding-left: 1.25rem;
  position: relative;
}

.timeline-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.timeline-tech {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
}

/* ===== Logros destacados ===== */
.achievements {
  background: var(--bg-elevated);
}

.achievements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.achievements-list li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding-left: 1.25rem;
  position: relative;
}

.achievements-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: var(--radius) 0 0 var(--radius);
}

/* ===== Skills ===== */
.skills {
  background: var(--bg-elevated);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-group h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.skill-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
}

.skill-tags li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Contact ===== */
.contact-content {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-info li {
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: var(--text-muted);
}

.contact-info a:hover {
  color: var(--accent);
}

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

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

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

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
    color: var(--text);
  }

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

  .about-visual {
    order: -1;
  }

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

  .contact-links {
    flex-direction: column;
  }

  .timeline {
    padding-left: 1.25rem;
    margin-left: 0.25rem;
  }

  .timeline-marker {
    left: -1.25rem;
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
