:root {
  --ink: #e2f1ff;
  --muted: #8ba2c0;
  --paper: #080e18;
  --card: rgba(13, 22, 38, 0.85);
  --card-border: #1a2f4c;
  --line: #16263d;
  --blue: #00f0ff;
  --blue-deep: #0066ff;
  --cyan: #00d8f6;
  --violet: #8a2be2;
  --green: #00ff88;
  --navy: #0b1526;
  --shadow: 0 0 25px rgba(0, 240, 255, 0.15);
  --glow: 0 0 15px rgba(0, 240, 255, 0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 102, 255, 0.15) 0%, transparent 70%),
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  color: var(--ink);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

/* Canvas del fondo cibernético */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

a { color: inherit; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  width: calc(100% - 42px);
  margin: auto;
}

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  font-weight: 900;
  letter-spacing: -.06em;
  font-size: 1.35rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
.brand i { color: var(--blue); font-style: normal; }

.topbar nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.topbar nav a { text-decoration: none; transition: color 0.3s; }
.topbar nav a:hover { color: var(--blue); text-shadow: var(--glow); }

.micro {
  font: 700 .72rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--blue);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 54px;
  padding: 88px 0 80px;
  min-height: 600px;
  align-items: center;
}

.hero:before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -100px;
  top: 25px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, transparent 70%);
  opacity: .8;
  filter: blur(40px);
}

.hero h1 {
  font-size: clamp(3.8rem, 8vw, 7.8rem);
  line-height: .86;
  letter-spacing: -.06em;
  margin: 20px 0 30px;
  max-width: 760px;
  color: #fff;
}
.hero h1 span {
  color: var(--blue);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.2rem;
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.05);
  color: var(--blue);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: ui-monospace, monospace;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}
.button.primary {
  background: var(--blue);
  color: #040810;
  border-color: var(--blue);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
  background: var(--blue);
  color: #040810;
}

.profile-panel {
  position: relative;
  background: rgba(11, 21, 38, 0.85);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  min-height: 420px;
  color: #fff;
  padding: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.profile-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(140deg, #000, transparent 85%);
}
.profile-panel:after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  right: -60px;
  top: -70px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.profile-top, .profile-copy { position: relative; z-index: 1; }

.portrait {
  width: 150px;
  height: 150px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid var(--blue);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  margin-bottom: 30px;
  background: #101b2d;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dce9ff;
  font: 700 .73rem ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 15px;
}
.status b {
  display: block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green);
}

.profile-panel h2 {
  font-size: 1.5rem;
  letter-spacing: -.04em;
  margin: 10px 0 8px;
  color: #fff;
}
.profile-panel p { color: var(--muted); margin: 0; }

.profile-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 24px;
  color: var(--blue);
  font-size: .9rem;
  font-family: ui-monospace, monospace;
}

.signal {
  position: absolute;
  right: 28px;
  bottom: 28px;
  color: var(--green);
  font: 700 .72rem ui-monospace, monospace;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}
.signal:before { content: "⌁"; font-size: 1.5rem; margin-right: 7px; }

section {
  padding: 86px 0;
  border-top: 1px solid var(--line);
}

.section-grid {
  display: grid;
  grid-template-columns: .55fr 1.45fr;
  gap: 70px;
}

.label {
  color: var(--blue);
  font: 800 .74rem ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .15em;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.title {
  font-size: clamp(2.2rem, 4.5vw, 4.4rem);
  line-height: .93;
  letter-spacing: -.06em;
  margin: 15px 0;
  color: #fff;
}

.copy { font-size: 1.12rem; color: var(--muted); max-width: 760px; }
.copy strong { color: var(--blue); }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 25px;
}

.focus {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: all 0.3s;
  backdrop-filter: blur(8px);
}
.focus:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.focus .icon { font-size: 1.5rem; color: var(--blue); }
.focus h3 { margin: 10px 0 4px; font-size: 1.05rem; color: #fff; }
.focus p { margin: 0; color: var(--muted); font-size: .9rem; }

.timeline { display: grid; gap: 16px; }

.item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s;
  backdrop-filter: blur(8px);
}
.item:hover { border-color: var(--blue); }
.item summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 170px 1fr 24px;
  gap: 20px;
  padding: 22px 24px;
  align-items: center;
}
.item summary::-webkit-details-marker { display: none; }
.item summary:after {
  content: "+";
  color: var(--blue);
  font-size: 1.5rem;
  font-weight: 400;
  font-family: ui-monospace, monospace;
}
.item[open] summary:after { content: "−"; }

.date {
  color: var(--blue);
  font: 800 .75rem ui-monospace, monospace;
  text-transform: uppercase;
}
.item h3 { margin: 0; font-size: 1.1rem; color: #fff; }
.item summary p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }

.detail { padding: 0 24px 22px 214px; color: var(--muted); font-size: .95rem; }
.detail ul { margin: 0; padding-left: 18px; }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.cert {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 22px;
  min-height: 190px;
  position: relative;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
}
.cert:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}
.cert:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(var(--blue), var(--violet));
  border-radius: 18px 0 0 18px;
}

.cert-head { display: flex; justify-content: space-between; gap: 12px; }
.badge {
  color: var(--green);
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 4px 8px;
  border-radius: 6px;
  font: 800 .66rem ui-monospace, monospace;
  white-space: nowrap;
}

.cert h3 { margin: 17px 0 6px; font-size: 1.1rem; color: #fff; }
.cert p { margin: 0; color: var(--muted); font-size: .9rem; }
.cert a {
  display: inline-block;
  margin-top: 16px;
  color: var(--blue);
  font-size: .83rem;
  font-weight: 800;
  text-decoration: none;
  font-family: ui-monospace, monospace;
}
.cert a:hover { text-shadow: var(--glow); }

.skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.tag {
  padding: 9px 14px;
  background: rgba(0, 240, 255, 0.05);
  color: var(--blue);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  font-weight: 750;
  font-size: .85rem;
  font-family: ui-monospace, monospace;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}
.tag:hover {
  background: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  color: #fff;
}

.contact {
  border-radius: 26px;
  padding: 42px 48px;
  background: linear-gradient(135deg, rgba(11,21,38,0.95), rgba(0,102,255,0.2) 60%, rgba(138,43,226,0.3));
  border: 1px solid var(--blue);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.contact:after {
  content: "{ AI + IT + SECURITY }";
  position: absolute;
  right: 38px;
  bottom: 23px;
  color: rgba(0, 240, 255, 0.3);
  font: 800 1.1rem ui-monospace, monospace;
}
.contact h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: .95;
  letter-spacing: -.05em;
  margin: 0 0 12px;
}
.contact p { color: var(--muted); }

footer {
  padding: 28px 0 46px;
  color: var(--muted);
  font-size: .8rem;
  display: flex;
  justify-content: space-between;
  font-family: ui-monospace, monospace;
}
footer a { color: var(--blue); }

@media(max-width: 820px) {
  .topbar nav { display: none; }
  .hero, .section-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero { padding: 64px 0; }
  .profile-panel { min-height: 390px; }
  .focus-grid, .cert-grid { grid-template-columns: 1fr; }
  .item summary { grid-template-columns: 1fr 24px; gap: 7px; }
  .date { grid-column: 1 / -1; }
  .detail { padding: 0 24px 22px; }
  .contact { padding: 34px 28px; }
  .contact:after { display: none; }
  footer { display: block; }
  footer div + div { margin-top: 8px; }
}

@media print {
  #bg-canvas { display: none; }
  body { background: #fff; color: #000; }
  .topbar nav, .actions, .contact, footer { display: none; }
  .hero { padding: 35px 0; min-height: auto; }
  .profile-panel { color: #000; background: #eef3f8; box-shadow: none; border: 1px solid #ccc; }
  .profile-panel p, .profile-meta { color: #444; }
  .item { break-inside: avoid; }
}