/* === CUSTOM PROPERTIES === */
:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --blue: #007acc;
  --blue-light: #38bdf8;
  --purple: #818cf8;
  --green: #34d399;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --transition: 0.3s ease;
}
body.light-mode {
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --blue: #0369a1;
  --blue-light: #0284c7;
  --purple: #6366f1;
  --green: #059669;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Outfit', sans-serif; line-height: 1.6; }
img { display: block; max-width: 100%; }
a { text-decoration: none; }
ul { list-style: none; }

/* === LAYOUT === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
@media (min-width: 768px)  { .section { padding: 120px 0; } }
@media (min-width: 1024px) { .section { padding: 140px 0; } }

/* === SECTION HEADER === */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 60px;
}
.section-num {
  font-family: 'Space Mono', monospace;
  color: var(--blue-light);
  font-size: 0.9em;
  opacity: 0.7;
}
.section-title {
  font-family: 'Syne', sans-serif;
  /* el mínimo baja a 1.45rem para que "Emprendimiento" entre en pantallas de 320px */
  font-size: clamp(1.45rem, 6vw, 2.8em);
  font-weight: 700;
  color: var(--text);
  min-width: 0;
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* === ANIMATIONS === */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes typing {
  from { max-width: 0; }
  to   { max-width: 100%; }
}
@keyframes blink {
  from, to { border-color: transparent; }
  50%      { border-color: var(--blue-light); }
}
@keyframes slideDown {
  from { opacity: 0; transform: scaleY(0.9) translateY(-10px); }
  to   { opacity: 1; transform: scaleY(1) translateY(0); }
}
@keyframes scrollBounce {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%      { transform: scaleY(0.4); opacity: 0.4; }
}

/* === REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }
.reveal--active  { opacity: 1; transform: translateY(0); }

/* === NAV === */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-logo {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--text);
}
.nav-logo .accent { color: var(--blue-light); }
.nav-links {
  display: none;
  padding: 0;
  margin: 0;
}
.nav-links.active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid var(--border);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  padding: 1.5rem 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.3s ease forwards;
}
/* 992px, no 768: con 6 items el nav horizontal necesita ~930px y se desbordaba */
@media (min-width: 992px) {
  .nav-links { display: flex; align-items: center; }
}
.nav-links li { margin: 5px 8px; }
/* Entre 992 y 1200 el nav va justo: achicamos separación y padding */
@media (min-width: 992px) and (max-width: 1199px) {
  .nav-links li { margin: 5px 3px; }
  .nav-link { padding: 8px 9px; font-size: 0.94em; }
  .nav-num { margin-right: 4px; }
}
.nav-link {
  font-size: 1em;
  color: var(--text);
  font-weight: 500;
  padding: 8px 14px;
  display: block;
  border-radius: 8px;
  transition: all 0.25s ease;
}
.nav-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.75em;
  color: var(--blue-light);
  margin-right: 6px;
  opacity: 0.7;
}
.nav-link:hover { background: rgba(56, 189, 248, 0.08); color: var(--blue-light); }
.nav-link--cta {
  background: rgba(0, 122, 204, 0.1);
  border: 1px solid rgba(0, 122, 204, 0.4);
  color: var(--blue-light);
}
.nav-link--cta:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--blue-light); color: var(--blue-light); }
.icon-sun { display: none; }
.icon-moon { display: block; }
body.light-mode .icon-sun { display: block; }
body.light-mode .icon-moon { display: none; }
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
  gap: 5px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  display: block;
  border-radius: 2px;
  transition: var(--transition);
}
@media (min-width: 992px) { .nav-toggle { display: none; } }

/* === HERO === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 20px 80px;
  overflow: hidden;
  color: var(--text);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 120%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  filter: grayscale(80%) brightness(0.3);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.7), var(--bg));
  z-index: 1;
}
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.hero-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 992px) {
  .hero-container { flex-direction: row; justify-content: space-between; text-align: left; }
}
.hero-content { flex: 1; text-align: center; }
@media (min-width: 992px) { .hero-content { text-align: left; } }

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-light);
  background: rgba(56, 189, 248, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin-bottom: 20px;
}
.label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: float 2s ease-in-out infinite;
}
.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5em, 5vw, 4.5em);
  font-weight: 700;
  margin: 20px 0;
}
.hero-name--accent {
  color: var(--blue-light);
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--blue-light);
  vertical-align: bottom;
  max-width: 0;
  animation: typing 1.5s steps(15, end) 0.5s forwards, blink 0.75s step-end infinite;
}
.hero-tagline {
  font-size: 1.2em;
  max-width: 600px;
  margin: 0 auto 30px;
  color: var(--text-muted);
}
@media (min-width: 992px) { .hero-tagline { margin: 0 0 30px 0; } }
.tagline-accent { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
@media (min-width: 992px) { .hero-actions { justify-content: flex-start; } }

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-light); color: var(--bg); }
.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255,255,255,0.2); }

.hero-socials { display: flex; gap: 15px; justify-content: center; }
@media (min-width: 992px) { .hero-socials { justify-content: flex-start; } }
.social-link { color: var(--text-muted); transition: color var(--transition), transform var(--transition); }
.social-link:hover { color: var(--blue-light); transform: translateY(-3px); }

.hero-visual { flex: 1; display: flex; justify-content: center; align-items: center; }
.hero-photo-wrap { position: relative; }
.hero-photo-frame {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 4px solid var(--blue);
  box-shadow: 0 0 40px rgba(0, 122, 204, 0.3);
  overflow: hidden;
  position: relative;
  z-index: 2;
}
@media (min-width: 992px) { .hero-photo-frame { width: 380px; height: 380px; } }
.hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: 60% 25%; }

.hero-badge {
  position: absolute;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  z-index: 3;
  animation: float 4s ease-in-out infinite;
}
.badge-num { color: var(--blue-light); font-weight: 700; font-size: 1.2em; }
.badge-label { color: var(--text-muted); font-size: 0.85em; }
.hero-badge--1 { top: 5%; left: -20px; animation-delay: 0s; }
.hero-badge--2 { bottom: 15%; left: -40px; animation-delay: 1.5s; }
.hero-badge--3 { bottom: 20%; right: -20px; animation-delay: 0.7s; }

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7em;
  font-family: 'Space Mono', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
}
.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollBounce 1.8s ease-in-out infinite;
}

/* === ABOUT === */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
@media (min-width: 992px) { .about-grid { flex-direction: row; align-items: flex-start; } }
.about-bio { flex: 1; }
.terminal-card { background: #0d1117; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 28px; font-family: 'Space Mono', monospace; font-size: 0.82em; }
.terminal-header { background: #161b22; padding: 10px 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #30363d; }
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.terminal-dot--red { background: #ff5f57; }
.terminal-dot--yellow { background: #febc2e; }
.terminal-dot--green { background: #28c840; }
.terminal-title { color: #6e7681; font-size: 0.85em; margin-left: 8px; }
.terminal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; min-height: 140px; }
.terminal-line { margin: 0; color: #c9d1d9; line-height: 1.7; }
.t-prompt { color: #28c840; margin-right: 8px; }
.t-cmd { color: #79c0ff; }
.t-out { color: #8b949e; padding-left: 16px; }
.t-key { color: #ff7b72; }
.t-str { color: #7ee787; }
.t-cursor { color: #28c840; animation: blink 1s step-end infinite; }
.about-text { color: var(--text-muted); font-size: 1.1em; line-height: 1.8; margin-bottom: 20px; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-highlights { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.highlight-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--bg-card);
  padding: 14px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  transition: transform var(--transition), border-color var(--transition);
}
.highlight-item:hover { transform: translateX(8px); border-color: var(--blue); }
.highlight-icon { font-size: 1.4em; }

.about-tech {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.tech-label {
  color: var(--blue-light);
  font-size: 1.1em;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.tech-divider { height: 1px; background: var(--border); margin: 24px 0; }
.tech-item--text { justify-content: center; }
.tech-ai-label { font-size: 0.8em; font-weight: 600; color: var(--text-muted); text-align: center; }
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
}
.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: default;
}
.tech-item img { width: 36px; height: 36px; object-fit: contain; transition: transform var(--transition); }
.tech-item span { font-size: 0.8em; color: var(--text-muted); font-weight: 500; text-align: center; transition: color var(--transition); }
.tech-item:hover { transform: translateY(-4px); border-color: var(--blue-light); background: rgba(56, 189, 248, 0.08); box-shadow: 0 5px 15px rgba(56, 189, 248, 0.12); }
.tech-item:hover img { transform: scale(1.1); }
.tech-item:hover span { color: var(--blue-light); }

/* === PROJECTS === */
.projects-grid { display: flex; flex-direction: column; gap: 40px; }
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 122, 204, 0.2);
  border-color: var(--blue);
}
.project-card-inner { display: flex; flex-direction: column; }
/* Pantallas medias (tablets/netbooks): imagen al costado + descripción al lado */
@media (min-width: 992px) and (max-width: 1399px) {
  .project-card-inner { flex-direction: row; }
}

/* Slider */
.project-media {
  flex: 1;
  min-height: 320px;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
/* Pantallas medias: borde a la derecha en vez de abajo */
@media (min-width: 992px) and (max-width: 1399px) {
  .project-media { border-bottom: none; border-right: 1px solid var(--border); }
}
/* Pantallas grandes: imagen apaisada a todo el ancho, más alta */
@media (min-width: 1400px) {
  .project-media { min-height: 560px; }
}
.slider { position: relative; width: 100%; height: 100%; min-height: 320px; overflow: hidden; }
@media (min-width: 1400px) { .slider { min-height: 560px; } }
.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}
.slider-track img {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  cursor: zoom-in;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  transition: background var(--transition);
  padding: 0;
}
.slider-btn:hover { background: var(--blue); }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.project-placeholder {
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4em;
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 992px) and (max-width: 1399px) {
  .project-placeholder { border-bottom: none; border-right: 1px solid var(--border); }
}

.project-info { flex: 1.2; padding: 30px; }
.project-num {
  display: block;
  color: var(--blue);
  font-family: 'Space Mono', monospace;
  font-size: 0.85em;
  margin-bottom: 8px;
  opacity: 0.8;
}
.project-name { font-family: 'Syne', sans-serif; color: var(--text); font-size: 1.7em; margin-bottom: 12px; }
.project-desc { color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }

.project-case-study {
  background: linear-gradient(135deg, rgba(0,122,204,0.05), rgba(129,140,248,0.05));
  border-left: 3px solid var(--blue);
  padding: 1.2rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.project-case-study p { margin: 0.6rem 0; color: var(--text); }
.project-case-study p:first-child { margin-top: 0; }
.project-case-study p:last-child { margin-bottom: 0; }
.project-case-study strong { color: var(--blue); font-weight: 600; }

.project-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tech-badge {
  background: rgba(56, 189, 248, 0.1);
  color: var(--blue-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8em;
  font-family: 'Space Mono', monospace;
  border: 1px solid rgba(56, 189, 248, 0.15);
}
.project-links { display: flex; gap: 0.8rem; margin-top: 1.2rem; flex-wrap: wrap; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.project-link svg { transition: transform var(--transition); }
.project-link:hover svg { transform: translateX(2px); }
.project-link--github { background: var(--blue); color: #fff; border-color: var(--blue); }
.project-link--github:hover { background: #005a9e; border-color: #005a9e; box-shadow: 0 4px 12px rgba(0,122,204,0.3); }
.project-link--live { background: transparent; color: var(--purple); border-color: var(--purple); }
.project-link--live:hover { background: var(--purple); color: #fff; box-shadow: 0 4px 12px rgba(147,51,234,0.3); }
.project-link--private { background: rgba(203,213,225,0.06); color: var(--text-muted); border-color: rgba(203,213,225,0.2); cursor: default; }
.project-link--private:hover svg { transform: none; }

@media (max-width: 640px) {
  .project-case-study { padding: 1rem; font-size: 0.85rem; }
  .project-link { padding: 0.6rem 1rem; font-size: 0.8rem; }
}

/* === EXPERIENCE === */
.timeline {
  position: relative;
  padding-left: 30px;
  max-width: 800px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -36px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue-light);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
}
.timeline-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.timeline-date { color: var(--blue); font-family: 'Space Mono', monospace; font-size: 0.85em; }
.timeline-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.8em; }
.timeline-badge--tech { background: rgba(56,189,248,0.1); color: var(--blue-light); }
.timeline-badge--industry { background: rgba(129,140,248,0.1); color: var(--purple); }
.timeline-company { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.company-logo { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; }
.company-logo-placeholder { width: 50px; height: 50px; border-radius: 8px; background: linear-gradient(135deg, var(--blue), var(--purple)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.3em; color: #fff; flex-shrink: 0; }
.company-name { color: var(--text); font-size: 1.3em; margin: 0 0 4px; }
.company-role { color: var(--blue); margin: 0; font-size: 0.95em; }
.timeline-desc { color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.timeline-projects, .timeline-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.timeline-projects span, .timeline-tags span {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85em;
}

/* === EDUCATION === */
.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 768px) { .education-grid { grid-template-columns: repeat(2, 1fr); } }
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition);
}
.edu-card:hover { transform: translateY(-5px); border-color: var(--blue); }
.edu-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.edu-logo { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; background: #fff; padding: 5px; flex-shrink: 0; }
.edu-logo--contain { object-fit: contain; padding: 8px; }
.edu-logo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.75em;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}
.edu-logo-placeholder--ai { background: linear-gradient(135deg, var(--purple), var(--blue)); }
.edu-title { color: var(--text); font-size: 1.2em; margin: 0 0 5px; line-height: 1.3; }
.edu-title-link { color: inherit; text-decoration: none; }
.edu-title-link:hover { color: var(--blue-light); text-decoration: underline; }
.edu-institution { color: var(--blue-light); margin: 0; font-size: 0.9em; font-weight: 500; }
.edu-body { flex: 1; display: flex; flex-direction: column; }
.edu-tag {
  display: inline-block;
  align-self: flex-start;
  background: rgba(129,140,248,0.1);
  color: var(--purple);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  margin-bottom: 15px;
}
.edu-tag--pending { background: rgba(251,191,36,0.1); color: #fbbf24; }
.edu-tag--active  { background: rgba(52,211,153,0.1); color: var(--green); }
.edu-tag--done    { background: rgba(96,165,250,0.12); color: #60a5fa; }
.edu-date { font-size: 0.78rem; color: var(--text-muted); margin: 4px 0 12px; opacity: 0.8; }
.edu-desc { color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.edu-curriculum { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.edu-cuatri { background: rgba(56,189,248,0.05); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.edu-cuatri-label { display: block; font-size: 0.75em; font-weight: 700; color: var(--blue-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.edu-courses { display: flex; flex-direction: column; gap: 4px; }
.edu-course {
  color: var(--text-muted);
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-left: -10px;
  transition: all var(--transition);
}
.course-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--blue);
  border-radius: 50%;
  transition: all var(--transition);
}
.edu-course svg { width: 13px; height: 13px; margin-left: auto; opacity: 0; transform: translateX(-6px); transition: all var(--transition); flex-shrink: 0; }
.edu-course--link:hover { background: rgba(56,189,248,0.06); color: var(--blue-light); }
.edu-course--link:hover .course-dot { transform: scale(1.5); background: var(--blue-light); box-shadow: 0 0 8px rgba(56,189,248,0.5); }
.edu-course--link:hover svg { opacity: 1; transform: translateX(0); color: var(--blue-light); }
.edu-download {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-light);
  font-weight: 500;
  padding-top: 20px;
  transition: color var(--transition);
}
.edu-download:hover { color: var(--blue); }

/* === CONTACT === */
.contact-content {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 900px;
  margin: 0 auto;
}
.contact-headline { text-align: center; }
.contact-sub { color: var(--blue-light); font-size: 1.2em; font-weight: 600; margin-bottom: 15px; }
.contact-description { color: var(--text-muted); font-size: 1.05em; line-height: 1.7; max-width: 580px; margin: 0 auto 20px; }
.contact-email {
  display: inline-block;
  font-size: clamp(1.2em, 3.5vw, 2em);
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 5px;
  transition: color var(--transition), border-color var(--transition);
}
.contact-email:hover { color: var(--blue-light); border-color: var(--blue-light); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: repeat(4, 1fr); } }
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transition: all var(--transition);
}
.contact-card svg { color: var(--blue); margin-bottom: 8px; transition: transform var(--transition), color var(--transition); }
.contact-card-label { color: var(--text); font-weight: 600; font-size: 0.95em; }
.contact-card-value { color: var(--text-muted); font-size: 0.85em; }
.contact-card:hover { transform: translateY(-5px); border-color: var(--blue-light); background: rgba(56,189,248,0.05); }
.contact-card:hover svg { transform: scale(1.1); color: var(--blue-light); }

.contact-downloads { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all var(--transition);
  background: var(--blue);
  color: #fff;
  border: 1px solid transparent;
}
.download-btn:hover { background: var(--blue-light); color: var(--bg); box-shadow: 0 5px 15px rgba(56,189,248,0.35); }
.download-btn--outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.download-btn--outline:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); }

/* === FOOTER === */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  margin-top: 50px;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
@media (min-width: 768px) { .footer-content { flex-direction: row; justify-content: space-between; } }
.footer-logo { font-size: 1.8em; font-weight: 700; color: var(--text); }
.footer-logo .accent { color: var(--blue-light); }
.footer-copy { color: var(--text-muted); font-size: 0.9em; margin: 0; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--blue-light); }

/* === LIGHT MODE FIXES === */

/* Nav */
body.light-mode .main-nav {
  background: rgba(241, 245, 249, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
body.light-mode .nav-links.active {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Hero — siempre oscuro (tiene foto de fondo), forzar texto blanco */
body.light-mode .hero-overlay {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.78) 100%);
}
body.light-mode .hero { color: #f8fafc; }
body.light-mode .hero-tagline { color: rgba(248, 250, 252, 0.72); }
body.light-mode .tagline-accent { color: #f8fafc; }
body.light-mode .hero-scroll { color: rgba(248, 250, 252, 0.5); }
body.light-mode .hero-badge {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
}
body.light-mode .hero .badge-label { color: #94a3b8; }

/* Botones */
body.light-mode .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.18);
  color: var(--text);
}
body.light-mode .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.09);
  border-color: rgba(0, 0, 0, 0.28);
}
body.light-mode .download-btn--outline {
  border-color: rgba(0, 0, 0, 0.2);
  color: var(--text);
}
body.light-mode .download-btn--outline:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.3);
}

/* Tech stack — items e íconos blancos (CDN) */
body.light-mode .tech-item { background: rgba(0, 0, 0, 0.04); }
body.light-mode .tech-item img[alt="Claude AI"],
body.light-mode .tech-item img[alt="Gemini"] { filter: invert(1); }
body.light-mode .tech-item img[alt="ChatGPT"] { filter: none !important; }

/* Tags de timeline */
body.light-mode .timeline-projects span,
body.light-mode .timeline-tags span {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Botones del slider */
body.light-mode .slider-btn {
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
}
body.light-mode .slider-btn:hover {
  background: var(--blue);
  color: #fff;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(4px);
  padding: 4vh 5vw;
}
.lightbox.active { display: flex; }
.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox-btn:hover { background: var(--blue); }
.lightbox-prev { left: 3vw; }
.lightbox-next { right: 3vw; }
.lightbox-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 1px;
}
@media (max-width: 600px) {
  .lightbox-btn { width: 38px; height: 38px; font-size: 1.1rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* === EMPRENDIMIENTO (peycode) === */
.venture-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.venture-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--green));
}
@media (min-width: 992px) {
  .venture-card { flex-direction: row; }
}
.venture-main { flex: 1.7; padding: 34px 28px; }
.venture-brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.venture-logo {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.7em, 4vw, 2.2em);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.venture-logo .accent {
  background: linear-gradient(90deg, var(--blue-light), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.venture-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--green);
  font-family: 'Space Mono', monospace;
  font-size: 0.75em;
  letter-spacing: 0.5px;
}
.venture-status .label-dot { background: var(--green); }
.venture-tagline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.1em, 2.4vw, 1.4em);
  font-weight: 600;
  color: var(--blue-light);
  margin-bottom: 18px;
  line-height: 1.4;
}
.venture-text { color: var(--text-muted); margin-bottom: 14px; }
.venture-text strong { color: var(--text); }

.venture-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.venture-stat { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.venture-stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.6em;
  font-weight: 800;
  color: var(--text);
}
.venture-stat-label { font-size: 0.78em; color: var(--text-muted); line-height: 1.3; }

.venture-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.venture-side {
  flex: 1;
  padding: 34px 28px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
}
body.light-mode .venture-side { background: rgba(0, 0, 0, 0.02); }
@media (min-width: 992px) {
  .venture-side { border-top: none; border-left: 1px solid var(--border); }
}
.venture-side-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--blue-light);
  margin-bottom: 18px;
}
.venture-services { display: flex; flex-direction: column; gap: 2px; }
.venture-service {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.95em;
  transition: all var(--transition);
}
.venture-service:hover { background: rgba(56, 189, 248, 0.07); color: var(--text); transform: translateX(4px); }
.venture-service-icon { font-size: 1.05em; width: 22px; text-align: center; flex-shrink: 0; }

.venture-work { margin-top: 32px; text-align: center; }
.venture-work-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.venture-work-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 22px; }
.venture-work-item {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85em;
  transition: all var(--transition);
}
.venture-work-item:hover { border-color: var(--blue); color: var(--text); transform: translateY(-2px); }
.venture-work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-light);
  font-weight: 600;
  font-size: 0.95em;
  transition: gap var(--transition), color var(--transition);
}
.venture-work-link:hover { gap: 12px; color: var(--purple); }

.timeline-badge--venture { background: rgba(52, 211, 153, 0.1); color: var(--green); }
.company-name-link { color: inherit; transition: color var(--transition); }
.company-name-link:hover { color: var(--blue-light); }
.about-link { color: var(--blue-light); font-weight: 600; border-bottom: 1px solid rgba(56, 189, 248, 0.35); transition: color var(--transition), border-color var(--transition); }
.about-link:hover { color: var(--purple); border-color: var(--purple); }

/* Intro de la sección Proyectos */
.projects-intro {
  color: var(--text-muted);
  max-width: 760px;
  margin: -35px 0 45px;
  font-size: 1.02em;
}
.projects-intro a { color: var(--blue-light); font-weight: 600; border-bottom: 1px solid rgba(56, 189, 248, 0.35); transition: color var(--transition), border-color var(--transition); }
.projects-intro a:hover { color: var(--purple); border-color: var(--purple); }
.contact-description a { color: var(--blue-light); font-weight: 600; }
.contact-description a:hover { color: var(--purple); }

@media (max-width: 480px) {
  .venture-main, .venture-side { padding: 26px 20px; }
  .venture-stats { grid-template-columns: 1fr; gap: 16px; }
  .venture-actions .btn-primary,
  .venture-actions .btn-secondary { width: 100%; justify-content: center; }
}

/* === SKIP LINK (accesibilidad: primer tab de la página) === */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 2000;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 0 0 10px 10px;
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translate(-50%, 0); outline: 2px solid var(--blue-light); outline-offset: 2px; }

/* Foco visible y consistente para navegación por teclado */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
