/* ==============================================
   STYLES.CSS — Elías Lezcano Portfolio
   Dark mode · Mobile-first · Sin dependencias
   ============================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Paleta de colores — Dark Mode */
  --bg-primary:    #08080d;
  --bg-secondary:  #0d0d14;
  --bg-card:       #111119;
  --bg-card-hover: #16161f;
  --border:        #1e1e2a;
  --border-light:  #2a2a3a;

  /* Acento principal (teal-cyan) */
  --accent:        #00e8c6;
  --accent-dim:    #00b89e;
  --accent-bg:     rgba(0, 232, 198, 0.08);
  --accent-border: rgba(0, 232, 198, 0.15);

  /* Texto */
  --text-primary:   #e4e4ef;
  --text-secondary: #8888a0;
  --text-muted:     #55556a;

  /* Highlight para keywords */
  --keyword:  #c89dff;
  --keyword2: #6dd8ff;

  /* Fuentes */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Tamaños base */
  --max-width:    1100px;
  --gap:          clamp(1rem, 3vw, 2rem);
  --section-py:   clamp(4rem, 8vw, 7rem);

  /* Transiciones */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
a:hover {
  color: var(--accent-dim);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

strong {
  color: #fff;
  font-weight: 600;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.section {
  padding: var(--section-py) 0;
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 999;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.35rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.btn-accent {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
}
.btn-accent:hover {
  background: var(--accent-dim);
  color: var(--bg-primary);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-primary);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
}

/* ======================================================
   HEADER / NAV
   ====================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 8, 13, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}
.brand:hover {
  color: var(--text-primary);
}
.brand-mark {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
}
.brand-name span {
  color: var(--accent);
}

.nav-links {
  display: none;
}
@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 1.75rem;
  }
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-cta {
  font-family: var(--font-body);
}
@media (max-width: 767px) {
  .nav-cta {
    display: none;
  }
}

/* ======================================================
   HERO
   ====================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 56px; /* offset for fixed nav */
  padding-bottom: var(--section-py);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero-role {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.75rem;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.hero-meta li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-meta a {
  color: var(--text-secondary);
}
.hero-meta a:hover {
  color: var(--accent);
}
.meta-label {
  color: var(--text-muted);
  min-width: 90px;
}

/* Subtle background glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,232,198,0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* ======================================================
   SECTION TITLE (reusable)
   ====================================================== */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

/* ======================================================
   ABOUT
   ====================================================== */
.about-content {
  max-width: 720px;
}
.about-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}
.about-content p strong {
  color: var(--text-primary);
}
.about-content .btn {
  margin-top: 1.25rem;
}

/* ======================================================
   EXPERIENCE — Timeline
   ====================================================== */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
/* Punto en la línea */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
  transform: translateX(-50%) translateX(-0.5px);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.timeline-head h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
}

.timeline-company {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.25rem;
}

.timeline-list {
  padding-left: 0;
}
.timeline-list li {
  position: relative;
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
  padding-left: 1.25rem;
  line-height: 1.65;
}
.timeline-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}
.timeline-list li strong {
  color: var(--text-primary);
}

/* ======================================================
   SKILLS
   ====================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.skill-card:hover {
  border-color: var(--accent-border);
  background: var(--bg-card-hover);
}

.skill-cat {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.skill-tags li {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.skill-tags li:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ======================================================
   EDUCATION
   ====================================================== */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edu-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  transition: border-color 0.3s var(--ease);
}
.edu-item:hover {
  border-color: var(--accent-border);
}

.edu-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.edu-head h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
}

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

.edu-school {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.edu-note {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* Sub-section title */
.sub-section-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
}

/* Languages */
.languages {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.languages li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.lang-name {
  color: var(--text-primary);
  font-weight: 600;
  min-width: 90px;
}
.lang-level {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ======================================================
   CONTACT
   ====================================================== */
.contact-inner {
  max-width: 700px;
  margin: 0 auto;
}

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.75;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.contact-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding: 0.8rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ======================================================
   SCROLL REVEAL ANIMATION
   ====================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children if needed */
.reveal:nth-child(2) { transition-delay: 0.05s; }
.reveal:nth-child(3) { transition-delay: 0.1s; }
.reveal:nth-child(4) { transition-delay: 0.15s; }
.reveal:nth-child(5) { transition-delay: 0.2s; }
.reveal:nth-child(6) { transition-delay: 0.25s; }

/* ======================================================
   SCROLLBAR
   ====================================================== */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ======================================================
   REDUCED MOTION
   ====================================================== */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}