/* =====================================================
   Hamza El Haddad Sabri — Portfolio v2
   Dark · Apple glass minimal · verde #518F29
   ===================================================== */

:root {
  --green: #518F29;
  --green-dark: #3E701F;
  --green-deep: #2C5215;
  --green-light: #6CB23A;
  --green-bright: #8ed159;
  --green-tint: rgba(108, 178, 58, 0.10);
  --green-glow: rgba(108, 178, 58, 0.30);

  /* nombres heredados (404.html los usa): valores dark */
  --ink: #e9f2e4;
  --ink-soft: #a8b8a0;
  --ink-mute: #6e7e66;

  --bg: #070a06;
  --glass: rgba(126, 158, 110, 0.055);
  --glass-strong: rgba(20, 28, 16, 0.78);
  --glass-border: rgba(126, 178, 90, 0.14);
  --glass-border-hover: rgba(140, 200, 100, 0.32);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 24px rgba(108, 178, 58, 0.10);
  --radius: 22px;
  --radius-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Code", Consolas, "Courier New", monospace;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(108, 178, 58, 0.35); color: #f2f9ec; }

.container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.section { padding-block: clamp(76px, 9vw, 130px); position: relative; }

/* ---------- Fondo animado ---------- */
#netCanvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  display: block;
}
.bg-orbs { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.5; }
.orb-1 {
  width: 600px; height: 600px;
  top: -220px; right: -140px;
  background: radial-gradient(circle, rgba(81, 143, 41, 0.22), transparent 70%);
  animation: drift1 26s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  top: 42%; left: -220px;
  background: radial-gradient(circle, rgba(62, 112, 31, 0.18), transparent 70%);
  animation: drift2 32s ease-in-out infinite;
}
.orb-3 {
  width: 640px; height: 640px;
  bottom: -260px; right: 6%;
  background: radial-gradient(circle, rgba(108, 178, 58, 0.13), transparent 70%);
  animation: drift1 38s ease-in-out infinite reverse;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 50px) scale(1.08); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, -40px) scale(1.05); }
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(126, 178, 90, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
}

/* ---------- Glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.glass-strong {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}

/* ---------- Tipografía ---------- */
h1 {
  font-size: clamp(2.5rem, 5.8vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.07;
}
h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.14;
  margin-bottom: 14px;
}
.grad {
  background: linear-gradient(120deg, var(--green-bright), var(--green-light) 45%, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--green-light);
  opacity: 0.6;
}
.section-lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 600px;
  margin-bottom: 44px;
}

/* Animación de títulos palabra a palabra */
.t-anim .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(22px);
  filter: blur(8px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.65, 0.25, 1),
              transform 0.6s cubic-bezier(0.2, 0.65, 0.25, 1),
              filter 0.6s cubic-bezier(0.2, 0.65, 0.25, 1);
}
.t-anim.in .w { opacity: 1; transform: none; filter: blur(0); }

/* ---------- Iconos SVG ---------- */
.ic {
  width: 22px; height: 22px;
  stroke: var(--green-light);
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--green-light), var(--green) 60%, var(--green-dark));
  color: #f4faee;
  box-shadow: 0 6px 22px rgba(81, 143, 41, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(108, 178, 58, 0.55);
}
.btn-ghost {
  background: rgba(126, 158, 110, 0.07);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover {
  border-color: var(--glass-border-hover);
  background: rgba(126, 178, 90, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(108, 178, 58, 0.15);
}
.btn-sm { padding: 9px 18px; font-size: 0.87rem; }
.btn .ic { width: 17px; height: 17px; stroke: currentColor; }

/* ---------- Navbar ---------- */
.nav-wrap { position: fixed; top: 14px; left: 0; right: 0; z-index: 100; padding-inline: 24px; }
.nav {
  width: min(1120px, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 18px;
  border-radius: 980px;
  background: rgba(10, 14, 8, 0.55);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--glass-border);
  transition: box-shadow 0.3s, background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(10, 14, 8, 0.82);
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  color: #f4faee;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(81, 143, 41, 0.45);
}
.logo-photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.logo-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; }
.logo-dot { color: var(--green-light); }

.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a {
  display: block;
  padding: 8px 13px;
  border-radius: 980px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--green-tint); color: var(--green-bright); }
.nav-links a.active { background: var(--green-tint); color: var(--green-bright); font-weight: 600; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle { display: flex; background: rgba(126, 158, 110, 0.1); border-radius: 980px; padding: 3px; }
.lang-btn {
  border: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-mute);
  padding: 5px 12px;
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.lang-btn.active { background: var(--green); color: #f4faee; }

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
}
.menu-btn span {
  display: block;
  width: 20px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s;
}
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 48px;
  min-height: 96vh;
  padding-top: 130px;
  padding-bottom: 50px;
}
.terminal-line {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.t-prompt { color: var(--green-light); }
.t-out { color: var(--ink); font-weight: 600; }
.caret {
  display: inline-block;
  width: 9px; height: 1.15em;
  background: var(--green-light);
  vertical-align: text-bottom;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(126, 178, 90, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 980px;
  padding: 7px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--green-bright);
  margin-bottom: 24px;
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-light);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(108, 178, 58, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(108, 178, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(108, 178, 58, 0); }
}

.hero-name {
  margin-top: 22px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.hero-name span { color: var(--ink-mute); font-weight: 500; }
.hero-lead {
  margin-top: 14px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 580px;
}
.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-social { display: flex; align-items: center; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.hero-social a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(126, 158, 110, 0.07);
  border: 1px solid var(--glass-border);
  color: var(--ink-soft);
  transition: transform 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.hero-social a:hover {
  color: var(--green-bright);
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(108, 178, 58, 0.25);
}
.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  font-size: 0.88rem;
  font-family: var(--mono);
  color: var(--ink-mute);
}
.hero-location .ic { width: 15px; height: 15px; stroke: var(--ink-mute); }

.hero-visual { position: relative; display: grid; place-items: center; }
.hero-photo {
  position: relative;
  width: min(320px, 76vw);
  aspect-ratio: 1;
  border-radius: 40px;
  overflow: hidden;
  background: linear-gradient(150deg, #16210f, #1d2d12 55%, #243a14);
  border: 1px solid var(--glass-border-hover);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(108, 178, 58, 0.12);
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-size: 7rem;
  font-weight: 700;
  color: rgba(244, 250, 238, 0.92);
  background: linear-gradient(150deg, var(--green-dark), var(--green-deep));
}
.hero-photo.no-photo .photo-fallback { display: grid; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 36px 28px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--green-bright), var(--green-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.88rem; color: var(--ink-soft); font-weight: 500; }

/* ---------- Sobre mí ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  margin-top: 36px;
  align-items: start;
}
.about-text p { font-size: 1.06rem; color: var(--ink-soft); margin-bottom: 18px; }
.about-text strong { color: var(--ink); font-weight: 600; }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini-card { padding: 22px 20px; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; }
.mini-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--glass-border-hover); }
.mini-card h3 { font-size: 1rem; margin: 12px 0 6px; letter-spacing: -0.01em; }
.mini-card p { font-size: 0.87rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Dominios ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px; }
.skill-card { padding: 24px; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; }
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--glass-border-hover); }
.skill-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  background: rgba(126, 158, 110, 0.07);
  border: 1px solid var(--glass-border);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 980px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chips span:hover {
  background: var(--green-tint);
  color: var(--green-bright);
  border-color: var(--glass-border-hover);
}
.chips-sm span { font-size: 0.75rem; padding: 4px 10px; }
.chips-mono span { font-family: var(--mono); font-size: 0.78rem; }

/* ---------- Formación (curriculum) ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.edu-card { padding: 26px; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; }
.edu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--glass-border-hover); }
.edu-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-light);
  letter-spacing: 0.12em;
}
.edu-card h3 { font-size: 1.08rem; letter-spacing: -0.015em; margin: 8px 0 14px; }

/* ---------- Stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.stack-group { padding: 20px 22px; }
.stack-group h3 {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 12px;
}

/* ---------- Proyectos ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; }
.project {
  display: flex;
  flex-direction: column;
  padding: 26px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.project:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--glass-border-hover); }
.project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.project h3 { font-size: 1.18rem; letter-spacing: -0.02em; }
.project-link {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.05rem;
  color: var(--green-bright);
  background: var(--green-tint);
  border: 1px solid var(--glass-border);
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.project-link:hover { background: var(--green); color: #f4faee; transform: rotate(45deg); }
.project-tag {
  display: inline-block;
  width: fit-content;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-bright);
  background: var(--green-tint);
  border: 1px solid var(--glass-border);
  padding: 3px 10px;
  border-radius: 980px;
  margin-bottom: 10px;
}
.project-sub { font-size: 0.86rem; font-weight: 600; color: var(--green-light); margin-bottom: 10px; }
.project-desc { font-size: 0.93rem; color: var(--ink-soft); flex-grow: 1; margin-bottom: 16px; }
.more-projects { text-align: center; margin-top: 38px; }

/* ---------- Ruta de aprendizaje ---------- */
.route {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  counter-reset: step;
}
.route-step {
  position: relative;
  padding: 20px 22px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.route-step:hover { transform: translateY(-4px); border-color: var(--glass-border-hover); box-shadow: var(--shadow-hover); }
.route-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-light);
  letter-spacing: 0.12em;
}
.route-step h3 { font-size: 1rem; margin: 6px 0 4px; letter-spacing: -0.01em; }
.route-step p { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-mute); }

/* ---------- Certificaciones ---------- */
.certs-road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.cert-card {
  position: relative;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.cert-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--glass-border-hover); }
.cert-status {
  display: inline-block;
  width: fit-content;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(126, 158, 110, 0.08);
  border: 1px solid var(--glass-border);
  padding: 4px 11px;
  border-radius: 980px;
  margin-bottom: 14px;
}
.cert-card h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.cert-org { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-mute); margin: 3px 0 12px; }
.cert-card p:last-child { font-size: 0.88rem; color: var(--ink-soft); }
.cert-final {
  border-color: rgba(140, 200, 100, 0.45);
  background: linear-gradient(160deg, rgba(108, 178, 58, 0.12), rgba(20, 28, 16, 0.8));
  box-shadow: 0 0 40px rgba(108, 178, 58, 0.15), var(--shadow);
  animation: glow 3.2s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 30px rgba(108, 178, 58, 0.12), var(--shadow); }
  50% { box-shadow: 0 0 55px rgba(108, 178, 58, 0.3), var(--shadow); }
}
.cert-final .cert-status {
  color: #f4faee;
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  border-color: transparent;
}
.cert-final h3 { color: var(--green-bright); }
.certs-note {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-mute);
  text-align: center;
}

/* ---------- Trayectoria ---------- */
.timeline { position: relative; margin-top: 40px; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--green-light), rgba(81, 143, 41, 0.08));
  border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 22px; }
.tl-dot {
  position: absolute;
  left: -28px;
  top: 28px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green-light);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px rgba(108, 178, 58, 0.4), 0 0 12px rgba(108, 178, 58, 0.5);
}
.tl-card { padding: 24px 28px; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; }
.tl-card:hover { transform: translateX(4px); box-shadow: var(--shadow-hover); border-color: var(--glass-border-hover); }
.tl-date {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-light);
}
.tl-card h3 { font-size: 1.14rem; letter-spacing: -0.015em; margin-top: 6px; }
.tl-org { font-size: 0.9rem; font-weight: 600; color: var(--ink-mute); margin: 2px 0 10px; }
.tl-card .tl-desc { font-size: 0.94rem; color: var(--ink-soft); }
.tl-extra { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- Recursos ---------- */
.resources-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.res-col { padding: 26px; }
.res-col h3 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--green-bright);
  margin-bottom: 18px;
}
.res-item { padding: 13px 0; border-bottom: 1px solid rgba(126, 178, 90, 0.1); }
.res-item:last-child { border-bottom: none; padding-bottom: 0; }
.res-item a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}
.res-item a:hover { color: var(--green-bright); }
.res-item a::after { content: "↗"; font-size: 0.75em; color: var(--ink-mute); }
.res-item p { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: clamp(32px, 5vw, 60px); }
.contact-info h2 { margin-bottom: 14px; }
.contact-info > p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.03rem; margin-bottom: 26px; }
.contact-links { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s, transform 0.2s;
  width: fit-content;
}
.contact-links a:hover { color: var(--green-bright); transform: translateX(3px); }
.contact-links .ic { width: 18px; height: 18px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--ink);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(126, 158, 110, 0.05);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--ink-mute); }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 4px rgba(108, 178, 58, 0.15);
}
.form-status { font-size: 0.9rem; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: var(--green-bright); }
.form-status.err { color: #e07856; }

/* ---------- Footer ---------- */
.footer { padding-top: clamp(60px, 7vw, 90px); }
.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(126, 178, 90, 0.12);
}
.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand .logo-name { font-size: 1.15rem; }
.footer-tag {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--ink-mute);
  margin-bottom: 20px;
  max-width: 300px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  background: rgba(126, 158, 110, 0.07);
  border: 1px solid var(--glass-border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.footer-social svg { width: 20px; height: 20px; fill: var(--ink-soft); transition: fill 0.25s; }
.footer-social a:hover { transform: translateY(-3px); border-color: var(--glass-border-hover); }
.footer-social a.s-gmail:hover { background: rgba(234, 67, 53, 0.12); box-shadow: 0 0 22px rgba(234, 67, 53, 0.25); }
.footer-social a.s-gmail:hover svg { fill: #ea4335; }
.footer-social a.s-linkedin:hover { background: rgba(10, 102, 194, 0.14); box-shadow: 0 0 22px rgba(10, 102, 194, 0.3); }
.footer-social a.s-linkedin:hover svg { fill: #4da3e8; }
.footer-social a.s-github:hover { background: rgba(255, 255, 255, 0.08); box-shadow: 0 0 22px rgba(255, 255, 255, 0.12); }
.footer-social a.s-github:hover svg { fill: #fff; }
.footer-social a.s-thm:hover { background: rgba(196, 30, 58, 0.12); box-shadow: 0 0 22px rgba(196, 30, 58, 0.25); }
.footer-social a.s-thm:hover svg { fill: #e8556d; stroke: #e8556d; }

.footer-col h3 {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--green-bright); }
.footer-bottom {
  text-align: center;
  padding: 26px 0 34px;
  color: var(--ink-mute);
  font-size: 0.85rem;
}

/* ---------- Animaciones de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.65, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.65, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .t-anim .w { opacity: 1; transform: none; filter: none; transition: none; }
  .orb, .badge-dot, .caret, .cert-final { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .certs-road { grid-template-columns: repeat(2, 1fr); }
  .route { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 120px; gap: 52px; }
  .hero-visual { order: -1; margin-top: 10px; }
  .hero-photo { width: min(240px, 68vw); }
  .about-grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .resources-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 880px) {
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: rgba(10, 14, 8, 0.96);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
  }
  .nav { position: relative; }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 16px; font-size: 1rem; }
  .menu-btn { display: flex; }
  .nav-cv { display: none; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 36px); }
  .hero-cta .btn { width: 100%; }
  .hero-location { margin-left: 0; width: 100%; margin-top: 6px; }
  .certs-road, .route { grid-template-columns: 1fr; }
  .about-cards { grid-template-columns: 1fr; }
}
