/* ============================================================
   Portfolio Uriel Crampton — visual system v2
   Dirección: Ink + Teal (editorial tech, sin look SaaS púrpura)
   ============================================================ */

:root {
  --bg: #f2f5f7;
  --bg-elev: #ffffff;
  --ink: #0c1222;
  --text: #0c1222;
  --text-soft: #4a5568;
  --text-faint: #7a8699;
  --border: #d8e0e8;
  --accent: #0d9488;
  --accent-2: #0f766e;
  --accent-hot: #f59e0b;
  --accent-soft: rgba(13, 148, 136, 0.12);
  --grad: linear-gradient(135deg, #0d9488 0%, #0e7490 55%, #155e75 100%);
  --shadow: 0 2px 8px rgba(12, 18, 34, 0.04), 0 18px 40px rgba(12, 18, 34, 0.07);
  --shadow-lg: 0 24px 60px rgba(12, 18, 34, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1040px;
  --font: "Figtree", system-ui, sans-serif;
  --font-display: "Outfit", var(--font);
}

[data-theme="dark"] {
  --bg: #070b12;
  --bg-elev: #101826;
  --ink: #f4f7fb;
  --text: #eef2f7;
  --text-soft: #a8b3c4;
  --text-faint: #6f7c90;
  --border: #1e2a3c;
  --accent: #2dd4bf;
  --accent-2: #14b8a6;
  --accent-hot: #fbbf24;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --grad: linear-gradient(135deg, #2dd4bf 0%, #22d3ee 55%, #38bdf8 100%);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
  position: relative;
  min-height: 100vh;
}

/* Atmósfera de página: malla + glow */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(13, 148, 136, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 5%, rgba(14, 116, 144, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 70% 90%, rgba(245, 158, 11, 0.06), transparent 55%),
    var(--bg);
}
.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 20%, transparent 75%);
}
[data-theme="dark"] .page-bg {
  background:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 10%, rgba(56, 189, 248, 0.08), transparent 50%),
    var(--bg);
}

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

/* ---------- Navegación ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 5vw, 48px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--bg);
  border-radius: 11px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  transition: transform 0.25s cubic-bezier(.22,1,.36,1), box-shadow 0.25s ease;
}
.nav__brand:hover {
  transform: rotate(-8deg) scale(1.05);
  box-shadow: 0 8px 20px rgba(12, 18, 34, 0.2);
}
[data-theme="dark"] .nav__brand { background: var(--accent); color: #041016; }

.nav__links {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.nav__links a {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-soft);
  padding: 7px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav__links a:hover,
.nav__links a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav__actions { display: flex; gap: 8px; }
.btn-icon {
  cursor: pointer;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 11px;
  min-width: 40px;
  height: 40px;
  padding: 0 11px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font);
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, transform 0.1s ease, background 0.2s ease;
}
.btn-icon:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-icon:active { transform: scale(0.94); }

/* ---------- Layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 40px);
}

.section {
  padding: clamp(56px, 9vw, 100px) 0 12px;
  scroll-margin-top: 80px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.section__title::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad);
  margin-top: 14px;
}
.section__hint {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-bottom: 24px;
  max-width: 640px;
}
.subsection__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 44px 0 16px;
  letter-spacing: -0.02em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 10vw, 120px) 0 clamp(36px, 5vw, 64px);
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero__orbs { position: absolute; inset: -15% -8% auto; z-index: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}
.orb--1 { width: 380px; height: 380px; top: -60px; left: -60px; background: radial-gradient(circle, rgba(13,148,136,.55), transparent 70%); }
.orb--2 { width: 320px; height: 320px; top: 20px; right: -20px; background: radial-gradient(circle, rgba(14,116,144,.4), transparent 70%); animation-delay: -6s; }
.orb--3 { width: 240px; height: 240px; top: 220px; left: 45%; background: radial-gradient(circle, rgba(245,158,11,.25), transparent 70%); animation-delay: -11s; }
[data-theme="dark"] .orb { opacity: 0.28; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(28px, -22px) scale(1.06); }
  66% { transform: translate(-18px, 18px) scale(0.96); }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
  animation: fadeUp 0.7s ease both;
}
.hero__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
  animation: pulse 2.2s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.08); }
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  animation: fadeUp 0.75s ease 0.05s both;
  max-width: 14ch;
}
.hero__role {
  color: var(--accent);
  font-weight: 700;
  margin-top: 16px;
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  letter-spacing: -0.01em;
  animation: fadeUp 0.75s ease 0.12s both;
}
.hero__tagline {
  color: var(--text-soft);
  margin-top: 16px;
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  max-width: 36ch;
  line-height: 1.5;
  animation: fadeUp 0.75s ease 0.18s both;
}
.hero__cta {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
  animation: fadeUp 0.75s ease 0.24s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.28);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(13, 148, 136, 0.38);
}
.btn--ghost {
  border: 1.5px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 85%, transparent);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.hero__meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 32px;
  color: var(--text-faint);
  font-size: 0.88rem;
  font-weight: 500;
  animation: fadeUp 0.75s ease 0.3s both;
}
.hero__meta li { display: flex; align-items: center; gap: 7px; }
.hero__meta .icon { color: var(--accent); }

.hero__photo {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin-left: auto;
  border-radius: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  background-size: cover;
  background-position: center top;
  overflow: hidden;
  animation: fadeUp 0.9s ease 0.15s both, photoFloat 7s ease-in-out 1s infinite;
}
.hero__photo::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 34px;
  padding: 2px;
  background: var(--grad);
  opacity: 0.55;
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}
.hero__photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(12, 18, 34, 0.35));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.hero__photo.has-image::after { opacity: 1; }

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

/* ---------- Sobre mí ---------- */
.about__body p {
  color: var(--text-soft);
  margin-bottom: 16px;
  max-width: 68ch;
  font-size: 1.02rem;
}
.about__body p:first-child {
  font-size: 1.12rem;
  color: var(--text);
  font-weight: 500;
}
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.skill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-soft);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.skill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 2px; }
#education-list { gap: 14px; }
.tl-item {
  position: relative;
  padding: 24px 0 24px 32px;
  border-left: 2px solid var(--border);
  transition: border-color 0.2s ease;
}
.tl-item:hover { border-left-color: var(--accent); }
.tl-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 30px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--accent);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.tl-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.tl-period {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tl-role {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.tl-company { color: var(--text-soft); font-size: 0.92rem; margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-company b { color: var(--text); font-weight: 700; }
.tl-summary { color: var(--text-soft); font-size: 0.94rem; margin-top: 12px; max-width: 68ch; }
.tl-bullets { margin: 14px 0 0; padding-left: 18px; }
.tl-bullets li { color: var(--text-soft); font-size: 0.9rem; margin-bottom: 7px; }

/* Educación: bandera de país */
.tl-item--edu {
  padding: 0;
  border-left-color: transparent;
}
.tl-item--edu::before { display: none; }

.edu-card {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}
.edu-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.edu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.edu-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.edu-flag img {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(12, 18, 34, 0.12);
}
.edu-flag__label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.edu-text { min-width: 0; }
.edu-text .tl-role {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.3;
  margin-top: 2px;
}
.edu-text .tl-company {
  margin-top: 8px;
  font-size: 0.9rem;
}
.edu-text .tl-summary {
  margin-top: 12px;
  line-height: 1.55;
  max-width: 58ch;
}

@media (max-width: 560px) {
  .edu-card { padding: 18px; }
}

/* ---------- Proyectos (carrusel) ---------- */
.section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.section__head .section__title { margin-bottom: 0; }
.carousel-controls { display: flex; gap: 8px; flex-shrink: 0; margin-top: 4px; }
.carousel-btn {
  cursor: pointer;
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, transform 0.12s ease, background 0.2s ease, color 0.2s ease;
}
.carousel-btn:hover {
  border-color: transparent;
  color: #fff;
  background: var(--grad);
  transform: translateY(-2px);
}
.carousel-btn:active { transform: scale(0.94); }

.carousel {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  margin-top: 20px;
  touch-action: pan-y;
  box-shadow: var(--shadow);
}
.carousel__track { display: flex; will-change: transform; }
.carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}
.carousel__slide.is-active { opacity: 1; }

.project__media {
  position: relative;
  min-height: 320px;
  background:
    radial-gradient(120% 120% at 20% 0%, var(--accent-soft), transparent 55%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 18%, var(--bg-elev)), color-mix(in srgb, #0e7490 12%, var(--bg-elev)));
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.project__media--fallback { display: grid; place-items: center; }
.project__gallery { position: absolute; inset: 0; }
.project__shot {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.5s ease;
  transform: scale(1.04);
}
.project__shot.is-active { opacity: 1; transform: scale(1); }
.project__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project__thumbs {
  position: absolute;
  left: 12px; right: 12px; bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.project__thumb {
  cursor: pointer;
  width: 52px; height: 38px;
  border-radius: 9px;
  border: 2px solid rgba(255,255,255,0.5);
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elev);
  opacity: 0.65;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.project__thumb.is-active,
.project__thumb:hover { opacity: 1; border-color: #fff; transform: translateY(-3px); }

.project__cover-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 84px; height: 84px;
  border-radius: 24px;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 14px 32px rgba(13, 148, 136, 0.4);
}

.project__body {
  padding: clamp(24px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project__highlight {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.project__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.project__name .icon { color: var(--accent); flex-shrink: 0; }
.project__desc { color: var(--text-soft); font-size: 0.96rem; margin-top: 14px; line-height: 1.6; }
.project__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.tag {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 700;
}
[data-theme="dark"] .tag { color: var(--accent); }
.project__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  width: fit-content;
  transition: gap 0.2s ease;
}
.project__link:hover { gap: 10px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.carousel-dot {
  cursor: pointer;
  width: 8px; height: 8px;
  border-radius: 999px;
  border: none;
  background: var(--border);
  padding: 0;
  transition: width 0.25s ease, background 0.2s ease;
}
.carousel-dot.is-active { width: 28px; background: var(--accent); }

.projects-clutch {
  margin-top: 32px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.clutch-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 7px 13px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.clutch-quote {
  position: relative;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}
.clutch-quote .icon { color: var(--accent); margin-bottom: 6px; }
.clutch-quote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-faint);
}
.clutch-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}
.clutch-link:hover { gap: 8px; }

/* ---------- Medios ---------- */
.media-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-btn {
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-soft);
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
}

.media { display: flex; flex-direction: column; gap: 12px; }
.media-item {
  position: relative;
  display: grid;
  grid-template-columns: 148px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}
.media-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--grad);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.28s ease;
}
.media-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}
.media-item:hover::before { transform: scaleY(1); }

.media-cover {
  position: relative;
  width: 148px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
}
.media-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.media-item:hover .media-cover img { transform: scale(1.06); }
.media-cover--fallback {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--grad);
  border: none;
}
.media-cover__badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #fff;
  background: rgba(12, 18, 34, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
}

.media-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
}
.media-body { flex: 1; min-width: 0; }
.media-title { font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; line-height: 1.35; }
.media-meta { color: var(--text-faint); font-size: 0.82rem; margin-top: 5px; }
.media-link {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: center;
}
.media-link:hover { gap: 8px; }

@media (max-width: 640px) {
  .media-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }
  .media-cover {
    width: 100%;
    height: 160px;
  }
  .media-link { justify-self: start; }
}

/* ---------- Logros ---------- */
.achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.achievement {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elev);
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.achievement:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.achievement__title { font-weight: 700; font-size: 0.96rem; letter-spacing: -0.01em; }
.achievement__desc { color: var(--text-soft); font-size: 0.86rem; margin-top: 6px; line-height: 1.5; }

/* ---------- Diplomas ---------- */
.diplomas {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}
.diplomas li {
  color: var(--text-soft);
  font-size: 0.9rem;
  padding: 12px 14px 12px 36px;
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.diplomas li::before {
  content: "▹";
  position: absolute;
  left: 14px;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Contacto ---------- */
.section--contact { padding-bottom: clamp(48px, 8vw, 88px); }
.contact__lead { color: var(--text-soft); max-width: 52ch; margin-bottom: 26px; font-size: 1.05rem; }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elev);
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-link:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.contact-link small {
  display: block;
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.75rem;
  margin-top: 2px;
}
.contact-link__icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  flex-shrink: 0;
  transition: color 0.2s ease, background 0.2s ease;
}
.contact-link:hover .contact-link__icon {
  color: #fff;
  background: var(--grad);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 32px 16px;
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-top: 48px;
}

/* ---------- Íconos / títulos ---------- */
.icon { display: inline-block; vertical-align: -0.18em; flex-shrink: 0; }
.title-icon {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  margin-right: 12px;
  color: #fff;
  background: var(--grad);
  vertical-align: middle;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.3);
}
.title-icon .icon { vertical-align: middle; }

.mini-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 36px 0 14px;
}

.about__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.about__aside {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.about__aside .mini-title { margin-top: 0; }
.lang { margin-bottom: 16px; }
.lang:last-child { margin-bottom: 0; }
.lang__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}
.lang__head span { display: inline-flex; align-items: center; gap: 7px; }
.lang__head .icon { color: var(--accent); }
.lang__head small { color: var(--text-faint); font-weight: 500; }
.lang__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  margin-top: 9px;
  overflow: hidden;
}
.lang__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--grad);
}

.focus {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.focus-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
  transition: border-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}
.focus-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.focus-card__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
}
.focus-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.focus-card__desc {
  color: var(--text-soft);
  font-size: 0.82rem;
  margin-top: 4px;
  line-height: 1.45;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__eyebrow, .hero__name, .hero__role, .hero__tagline, .hero__cta, .hero__meta, .hero__photo {
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Promo popup (RadarIA) ---------- */
.promo {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.promo.is-open {
  opacity: 1;
  pointer-events: auto;
}
.promo__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 22, 0.55);
  backdrop-filter: blur(6px);
}
.promo__dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.promo.is-open .promo__dialog {
  transform: none;
}
.promo__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-faint);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.promo__close:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text);
}
.promo__thumb {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 18px;
  background: #0b1a22;
}
.promo__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.promo__thumb:hover img {
  transform: scale(1.04);
}
.promo__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 92%, #000);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.promo__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent #fff;
}
.promo__eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.promo__title {
  margin: 0 0 8px;
  font-family: "Outfit", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  padding-right: 28px;
}
.promo__desc {
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-soft);
}
.promo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.promo__actions .btn {
  flex: 1 1 auto;
  text-align: center;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .promo,
  .promo__dialog,
  .promo__thumb img {
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__photo {
    order: -1;
    width: 160px;
    margin: 0;
    border-radius: 24px;
    font-size: 2.4rem;
    animation: fadeUp 0.8s ease both;
  }
  .carousel__slide { grid-template-columns: 1fr; }
  .project__media {
    min-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}
@media (max-width: 760px) {
  .about__grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .nav__links { display: none; }
  .title-icon { width: 34px; height: 34px; margin-right: 10px; }
  .hero__name { font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.18; }
}
