:root {
  --ink: #0b0d10;
  --paper: #f4f5f6;
  --muted: #a9afb6;
  --line: rgba(255,255,255,.14);
  --orange: #2587e8;
  --white: #fff;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--white);
  background: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
a { color: inherit; }
.skip { position: fixed; top: -100px; left: 1rem; z-index: 20; background: var(--orange); color: #111; padding: .7rem 1rem; }
.skip:focus { top: 1rem; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 80px;
  margin: 0;
  padding: .85rem max(1rem, calc((100vw - var(--max)) / 2));
  background: rgba(9,11,14,.97);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar-close, .menu-toggle {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  color: #f5f6f7;
  background: #191c22;
}
.topbar-close { text-decoration: none; }
.topbar-close svg, .menu-toggle svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.topbar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: clamp(1.2rem, 4.4vw, 1.55rem);
  font-weight: 780;
  letter-spacing: -.035em;
  text-decoration: none;
  white-space: nowrap;
}
.menu-toggle { margin-left: auto; cursor: pointer; }
.menu-close-icon { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon { display: none; }
.menu-toggle[aria-expanded="true"] .menu-close-icon { display: block; }
.site-menu {
  position: absolute;
  top: calc(100% + .55rem);
  right: max(1rem, calc((100vw - var(--max)) / 2));
  display: grid;
  min-width: 205px;
  gap: .15rem;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #11151b;
  box-shadow: 0 18px 45px rgba(0,0,0,.4);
}
.site-menu[hidden] { display: none; }
.site-menu a { padding: .75rem .8rem; border-radius: 11px; color: #e4e7eb; font-size: .98rem; text-decoration: none; }
.site-menu a:hover, .site-menu a:focus-visible { background: rgba(255,255,255,.08); color: #fff; }
.site-menu .nav-cta { border: 1px solid var(--line); }

main { overflow: hidden; }
.hero, .profile, .projects, .closing, footer { max-width: var(--max); margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.hero {
  min-height: 82vh;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 6rem;
}
.eyebrow { margin: 0 0 1.2rem; color: var(--orange); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 1.6rem; font-size: clamp(3.25rem, 7.5vw, 7rem); line-height: .96; letter-spacing: -.065em; }
h1 em { display: block; color: var(--muted); font-style: normal; font-weight: 450; }
.lead { max-width: 690px; margin-bottom: 2.3rem; color: #c6cbd0; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .75rem 1.2rem; border-radius: 999px; font-weight: 750; text-decoration: none; }
.button.primary { background: var(--orange); color: #111; }
.button.primary:hover, .button.primary:focus-visible { background: #5aabf6; }
.button.secondary { border: 1px solid var(--line); color: #e8eaec; }
.button.secondary:hover, .button.secondary:focus-visible { border-color: #70777f; }
.hero-brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 2rem;
}
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 112px;
  gap: .45rem;
  padding: .55rem .8rem .65rem;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  background: #10141a;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.hero-brand:hover, .hero-brand:focus-visible {
  border-color: var(--orange);
  background: #151a21;
  transform: translateY(-2px);
}
.hero-brand:focus-visible { outline: 3px solid rgba(255,107,26,.45); outline-offset: 3px; }
.hero-brand img { display: block; width: 100%; height: 68px; object-fit: contain; }
.hero-brand-interpretercore img { transform: scale(1.716); }
.hero-brand-starfus img { transform: scale(.88); }
.hero-brand-centercar {
  width: min(320px, 100%);
  height: auto;
  aspect-ratio: 900 / 530;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
.hero-brand-centercar img { width: 100%; height: 100%; object-fit: contain; transform: none; }
.hero-brand span { display: inline-flex; align-items: center; gap: .38rem; color: #e8eaec; font-size: .86rem; font-weight: 750; line-height: 1.05; letter-spacing: .025em; text-align: center; }
.hero-brand span::before {
  content: "✦";
  color: #b9f5ff;
  font-size: .9em;
  text-shadow: 0 0 5px rgba(95,224,255,.9), 0 0 13px rgba(54,155,255,.65);
  animation: entry-glint 3.2s ease-in-out infinite;
}
@keyframes entry-glint {
  0%, 100% { opacity: .58; transform: scale(.88) rotate(-10deg); }
  48% { opacity: 1; transform: scale(1.16) rotate(12deg); }
}
.signature { padding: 2rem 0 2rem 2rem; border-left: 1px solid var(--line); }
.signature p { margin: 0; color: #e9ebed; font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 700; line-height: 1.12; letter-spacing: -.04em; }
.sig-label, .signature span:last-child { color: var(--muted); font-size: .85rem; }
.sig-quote { display: block; font-style: italic; }
.sig-line { width: 70px; height: 3px; margin: 1.8rem 0; background: var(--orange); }

.profile { padding-top: 7rem; padding-bottom: 7rem; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr 2.2fr; gap: 2rem; align-items: start; margin-bottom: 4.5rem; }
.section-heading h2, .closing h2 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.6rem); line-height: 1.02; letter-spacing: -.055em; }
.profile-grid { display: grid; grid-template-columns: 1fr 2.2fr; gap: 2rem; }
.profile-lead { max-width: 370px; color: #c8cdd2; font-size: 1.14rem; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.principles article { padding: 1.4rem 1.5rem 0 0; }
.principles span { color: var(--orange); font-size: .75rem; font-weight: 800; }
.principles h3 { margin: 2.5rem 0 .7rem; font-size: 1.3rem; }
.principles p { color: var(--muted); font-size: .95rem; }

.resume { max-width: var(--max); margin: 0 auto; padding: 7rem 1.5rem; border-top: 1px solid var(--line); }
.resume { scroll-margin-top: 100px; }
.resume-card { display: grid; grid-template-columns: 4cm minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(135deg, #11151b, #0d1014); }
.resume-photo { display: block; width: 4cm; height: 4cm; max-width: 4cm; max-height: 4cm; object-fit: cover; object-position: center; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; }
.resume-copy { min-width: 0; }
.resume-copy .eyebrow { margin-bottom: .7rem; }
.resume-copy h3 { margin: 0 0 .85rem; font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.04em; }
.resume-intro { max-width: 650px; color: #c8cdd2; font-size: 1.08rem; }
.resume-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin: 1.6rem 0 0; }
.resume-facts div { min-width: 0; padding-top: .9rem; border-top: 1px solid var(--line); }
.resume-facts dt { margin-bottom: .45rem; color: var(--orange); font-size: .8rem; font-weight: 800; }
.resume-facts dd { margin: 0; color: #c8cdd2; font-size: .95rem; }

.projects { padding-top: 7rem; padding-bottom: 7rem; border-top: 1px solid var(--line); }
.project-list { border-top: 1px solid var(--line); }
.project {
  display: grid;
  grid-template-columns: .7fr 1fr 1.5fr .8fr;
  gap: 1.5rem;
  align-items: center;
  min-height: 150px;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding .25s ease, background .25s ease;
}
.project:hover, .project:focus-visible { padding-left: 1.25rem; padding-right: 1.25rem; background: rgba(255,255,255,.035); }
.project-kicker { color: var(--orange); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.project h3 { margin: 0; font-size: 1.65rem; letter-spacing: -.035em; }
.project p { margin: 0; color: var(--muted); font-size: .95rem; }
.visit { color: #d9dde0; font-size: .9rem; text-align: right; }

.closing { padding-top: 8rem; padding-bottom: 8rem; text-align: center; }
.closing h2 { max-width: 850px; margin: 0 auto 2.5rem; }
footer { display: flex; justify-content: space-between; padding-top: 2rem; padding-bottom: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

@media (max-width: 820px) {
  .topbar { padding-left: 1rem; padding-right: 1rem; }
  .site-menu { right: 1rem; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 5rem; }
  .hero-brands { justify-content: center; }
  .hero-brand { width: min(240px, calc(50vw - 2rem)); height: 104px; }
  .hero-brand img { height: 58px; }
  .hero-brand-centercar { width: min(320px, 100%); height: auto; aspect-ratio: 900 / 530; }
  .hero-brand-centercar img { height: 100%; object-fit: contain; }
  .hero-brand-interpretercore img { transform: none; }
  .signature { padding-left: 1.3rem; }
  .section-heading, .profile-grid { grid-template-columns: 1fr; }
  .resume { padding-top: 5rem; padding-bottom: 5rem; }
  .resume-card { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1rem; }
  .resume-facts { grid-template-columns: 1fr; gap: .8rem; margin-top: 1.1rem; }
  .resume-facts div { padding-top: .65rem; }
  .principles { grid-template-columns: 1fr; }
  .principles article { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
  .project { grid-template-columns: 1fr; gap: .7rem; }
  .project .visit { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .hero-brand span::before { animation: none; }
}

/* Tomy: asistente independiente del sitio personal */
.tomy-launcher {
  position: fixed;
  z-index: 30;
  right: 18px;
  bottom: 12px;
  width: 104px;
  height: 124px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 22px rgba(0, 139, 255, .38));
  transition: transform .2s ease, filter .2s ease;
}
.tomy-launcher:hover, .tomy-launcher:focus-visible {
  transform: translateY(-4px) scale(1.025);
  filter: drop-shadow(0 10px 28px rgba(0, 174, 255, .55));
  outline: none;
}
.tomy-launcher img { width: 100%; height: 100%; object-fit: contain; }
.tomy-launcher .tomy-hint {
  position: absolute;
  right: 93px;
  bottom: 31px;
  width: max-content;
  max-width: min(230px, 65vw);
  padding: .62rem .9rem;
  border: 1px solid rgba(60, 170, 255, .32);
  border-radius: 999px;
  color: #f4f9ff;
  background: rgba(7, 21, 43, .96);
  box-shadow: 0 10px 32px rgba(0,0,0,.26);
  font: 700 .86rem/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.tomy-launcher:hover .tomy-hint, .tomy-launcher:focus-visible .tomy-hint { opacity: 1; transform: translateX(0); }
.tomy-window {
  position: fixed;
  z-index: 31;
  right: 24px;
  bottom: 132px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 28px));
  height: min(570px, calc(100dvh - 165px));
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(55, 164, 255, .36);
  border-radius: 24px;
  color: #f4f8ff;
  background: #091322;
  box-shadow: 0 24px 80px rgba(0,0,0,.55), 0 0 36px rgba(0,139,255,.16);
  font: 16px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
}
.tomy-window[hidden] { display: none; }
.tomy-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(110deg, #0d2a52, #081221 75%);
}
.tomy-avatar {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(50,166,255,.45);
  border-radius: 15px;
  background: rgba(5,16,32,.9);
}
.tomy-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tomy-identity { min-width: 0; flex: 1; }
.tomy-identity strong { display: block; font-size: 1rem; }
.tomy-identity span { display: block; color: #b6c8df; font-size: .82rem; }
.tomy-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  color: #eaf4ff;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  font: 400 1.45rem/1 Inter, sans-serif;
}
.tomy-close:hover { background: rgba(255,255,255,.12); }
.tomy-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .75rem;
  overflow-y: auto;
  padding: 1rem;
  scrollbar-color: #2668a9 transparent;
}
.tomy-bubble {
  max-width: 90%;
  padding: .78rem .9rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 17px 17px 17px 5px;
  background: #111f31;
  color: #eef5ff;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.tomy-bubble.user {
  align-self: flex-end;
  border-color: rgba(31, 147, 255, .28);
  border-radius: 17px 17px 5px 17px;
  background: #123d71;
}
.tomy-bubble.status { color: #a9bed5; font-style: italic; }
.tomy-sources { display: grid; gap: .35rem; margin: -.35rem 0 .2rem .25rem; font-size: .82rem; }
.tomy-sources a { color: #83c8ff; text-decoration: underline; text-underline-offset: 2px; }
.tomy-suggestions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .25rem; }
.tomy-suggestions button {
  padding: .52rem .68rem;
  border: 1px solid rgba(59,159,247,.36);
  border-radius: 999px;
  color: #d8ecff;
  background: rgba(20,68,117,.38);
  cursor: pointer;
  font: 600 .8rem/1.25 Inter, ui-sans-serif, system-ui, sans-serif;
}
.tomy-suggestions button:hover { background: rgba(29,100,169,.6); }
.tomy-form {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem;
  border-top: 1px solid rgba(255,255,255,.1);
  background: #08101d;
}
.tomy-form input {
  min-width: 0;
  flex: 1;
  min-height: 48px;
  padding: .68rem .85rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: #fff;
  background: #101d2d;
  font: 16px/1.35 Inter, ui-sans-serif, system-ui, sans-serif;
}
.tomy-form input::placeholder { color: #9aabc0; }
.tomy-form input:focus { outline: 2px solid #148dff; outline-offset: 1px; }
.tomy-send {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #04101f;
  background: #28a7ff;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 800;
}
.tomy-send:hover { background: #62c0ff; }
.tomy-send:disabled { opacity: .55; cursor: wait; }
.tomy-footnote { margin: 0; padding: 0 .9rem .55rem; color: #92a7bd; background: #08101d; font-size: .72rem; }
@media (max-width: 600px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .hero, .hero-copy, .signature { min-width: 0; width: 100%; }
  .hero { gap: 2.75rem; padding-top: 2.75rem; padding-bottom: 3rem; }
  h1 { max-width: 100%; font-size: clamp(2.6rem, 11vw, 3.5rem); line-height: 1.02; letter-spacing: -.055em; overflow-wrap: anywhere; }
  .lead { max-width: 100%; font-size: 1.08rem; overflow-wrap: anywhere; }
  .signature { padding: 1.5rem 0 1.5rem 1rem; }
  .tomy-launcher { right: 8px; bottom: 6px; width: 88px; height: 106px; }
  .tomy-window { right: 10px; bottom: 103px; width: calc(100vw - 20px); height: min(570px, calc(100dvh - 125px)); min-height: 360px; border-radius: 20px; }
  .tomy-launcher .tomy-hint { right: 79px; bottom: 24px; }
}
