/* Víctor Sabido — portfolio. Blue, white, motion. */

:root {
  --navy: #0b2a5b;
  --blue: #1d4ed8;
  --blue-2: #2563eb;
  --sky: #60a5fa;
  --ice: #e8f1ff;
  --mist: #f5f8ff;
  --white: #ffffff;
  --ink: #0f2744;
  --muted: #5b6b82;
  --line: rgba(29, 78, 216, 0.14);
  --header-h: 68px;
  --max: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --spot-x: 50%;
  --spot-y: 50%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
  color: var(--white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--navy);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrap {
  width: min(var(--max), calc(100% - 2.4rem));
  margin-inline: auto;
}

.icon {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
}

.icon-sm {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  flex-shrink: 0;
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 8% -8%, #c9dcff 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 8%, #dbe7ff 0%, transparent 50%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--white) 72%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(11, 42, 91, 0.06);
}

.header-bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 45;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: var(--white);
  font-size: 0.72rem;
  display: grid;
  place-items: center;
}

.nav-desktop {
  display: none;
  gap: 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-desktop a {
  color: var(--muted);
}

.nav-desktop a:hover {
  color: var(--blue);
}

.burger {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.burger svg {
  width: 24px;
  height: 24px;
}

.burger .icon-close {
  display: none;
}

.site-header.menu-open .icon-open {
  display: none;
}

.site-header.menu-open .icon-close {
  display: block;
}

.nav-panel {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  max-height: 0;
  overflow: hidden;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  z-index: 30;
  transition: max-height 0.35s var(--ease);
}

.site-header.menu-open .nav-panel {
  max-height: 70vh;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 1.2rem 1.6rem;
}

.mobile-menu-inner a {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  padding: 0.55rem 0;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .burger,
  .nav-panel {
    display: none;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 3.2rem 0 4.2rem;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.7;
}

.blob-a {
  width: 280px;
  height: 280px;
  background: #93c5fd;
  top: -40px;
  right: 8%;
  animation: float 10s ease-in-out infinite;
}

.blob-b {
  width: 220px;
  height: 220px;
  background: #bfdbfe;
  bottom: 10%;
  left: -40px;
  animation: float 13s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -22px);
  }
}

.hero-grid {
  display: grid;
  gap: 2.6rem;
  align-items: center;
  position: relative;
}

.eyebrow {
  margin: 0 0 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(2.5rem, 8vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: var(--navy);
}

.hero-role {
  margin: 0 0 1rem;
  color: var(--blue);
  font-weight: 700;
  font-size: 1.15rem;
}

.lede {
  margin: 0 0 1.15rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.snapshot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.2rem;
  margin: 0 0 1.4rem;
  padding: 0.95rem 1.05rem;
  max-width: 34rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.snapshot div {
  margin: 0;
}

.snapshot dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.snapshot dd {
  margin: 0.12rem 0 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  transform: none;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-2), var(--navy));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.28);
}

.btn-primary:hover {
  color: var(--white);
}

.btn-ghost {
  background: var(--white);
  color: var(--navy);
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--blue);
}

.btn-light {
  background: var(--white);
  color: var(--navy);
}

.btn-light:hover {
  color: var(--blue);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-outline:hover {
  color: var(--white);
  border-color: var(--white);
}

.hero-photo {
  margin: 0;
  position: relative;
  justify-self: center;
  width: min(280px, 72vw);
}

.photo-ring {
  position: absolute;
  inset: -10px;
  border-radius: 28px;
  background: conic-gradient(from 180deg, var(--blue), var(--sky), var(--ice), var(--blue));
  animation: spin 42s linear infinite;
  z-index: 0;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.hero-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  border: 5px solid var(--white);
}

.photo-chip {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  box-shadow: 0 10px 24px rgba(11, 42, 91, 0.1);
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.15);
  }
}

@media (min-width: 860px) {
  .hero {
    padding: 4.5rem 0 5.5rem;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .hero-photo {
    width: 340px;
    justify-self: end;
  }
}

/* Tech bar — static, no marquee */
.techbar {
  border-block: 1px solid var(--line);
  background: var(--white);
  padding: 1.15rem 0;
}

.techbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
}

.techbar-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.techbar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.techbar-list li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--ice);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Sections */
.section {
  padding: 4.6rem 0;
}

.section-alt {
  background: var(--white);
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.2rem;
}

.section-head p.section-lead {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.num {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.section-head h2,
.contact-box h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--navy);
}

/* Cards */
.highlights {
  display: grid;
  gap: 1rem;
}

.card,
.stack-grid li,
.job {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.3rem 1.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.card::after,
.stack-grid li::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    180px circle at var(--spot-x) var(--spot-y),
    rgba(96, 165, 250, 0.22),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.card:hover,
.stack-grid li:hover {
  transform: none;
  box-shadow: none;
}

.card:hover::after,
.stack-grid li:hover::after {
  opacity: 0;
}

@media (hover: hover) {
  .card:hover,
  .stack-grid li:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(11, 42, 91, 0.1);
  }

  .card:hover::after,
  .stack-grid li:hover::after {
    opacity: 1;
  }
}

.icon-badge {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  color: var(--blue);
  background: var(--ice);
  flex-shrink: 0;
}

.job-top .icon-badge {
  margin-bottom: 0;
}

.kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.card p {
  margin: 0;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

@media (min-width: 760px) {
  .highlights {
    grid-template-columns: 1fr 1fr;
  }
}

/* Timeline */
.exp-path {
  list-style: none;
  margin: 0 0 2.2rem;
  padding: 0;
  display: none;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.exp-path li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  background: var(--mist);
  border: 1px solid var(--line);
  font-weight: 800;
  color: var(--navy);
}

.exp-path li span {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  background: var(--ice);
  color: var(--blue);
}

.exp-path li.is-now {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(11, 42, 91, 0.18);
}

.exp-path li.is-now span {
  background: var(--white);
  color: var(--blue);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
  position: relative;
}

.timeline > li {
  display: grid;
  gap: 0.75rem;
}

.when-col {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.when-num {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(145deg, var(--blue-2), var(--navy));
  box-shadow: 0 0 0 6px var(--ice);
  flex-shrink: 0;
}

.when {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--navy);
  line-height: 1.2;
}

.when time {
  color: var(--navy);
}

.when-to {
  font-weight: 700;
  color: var(--muted);
}

.job {
  padding: 1.5rem 1.35rem 1.55rem;
}

.job.is-now {
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(135deg, var(--blue), var(--sky)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 16px 40px rgba(11, 42, 91, 0.1);
}

.job-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem 0.85rem;
  margin-bottom: 0.95rem;
  position: relative;
  z-index: 1;
}

.job-titles {
  min-width: 0;
}

.job-flag {
  grid-column: 2;
  justify-self: start;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
}

.job h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.where {
  margin: 0.15rem 0 0;
  font-weight: 700;
}

@media (min-width: 700px) {
  .job-top {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .job-titles {
    flex: 1;
    min-width: 0;
  }

  .job-flag {
    grid-column: auto;
    margin-left: auto;
    flex-shrink: 0;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    background: var(--blue);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
  }
}

.job > p {
  margin: 0;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.kit {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  position: relative;
  z-index: 1;
}

.kit li {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.8rem 0.8rem;
  border-radius: 12px;
  background: var(--mist);
  border: 1px solid var(--line);
  color: var(--blue);
}

.kit strong {
  color: var(--navy);
  font-size: 0.92rem;
}

.kit span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .kit {
    grid-template-columns: repeat(3, 1fr);
  }
}

.wins {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  background: var(--mist);
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.wins li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--ink);
}

.wins li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--blue);
}

.tags {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

.tags li {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--ice);
}

@media (min-width: 700px) {
  .exp-path {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    position: relative;
  }

  .exp-path::before {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 50%;
    height: 2px;
    background: var(--ice);
    z-index: 0;
  }

  .exp-path li {
    justify-content: center;
    position: relative;
    z-index: 1;
  }
}

@media (min-width: 800px) {
  .timeline {
    padding-left: 0.4rem;
  }

  .timeline::before {
    content: "";
    position: absolute;
    left: 1.25rem;
    top: 1.3rem;
    bottom: 1.3rem;
    width: 2px;
    background: linear-gradient(var(--blue), #cfe0ff);
  }

  .timeline > li {
    grid-template-columns: 7.4rem 1fr;
    gap: 1.5rem;
  }

  .when-col {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 1.35rem;
    position: relative;
    z-index: 1;
  }
}

/* Stack */
.stack-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.stack-grid li {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  padding: 1.1rem 1rem 1.15rem;
  color: var(--blue);
}

.stack-grid strong {
  color: var(--navy);
  font-size: 1rem;
}

.stack-grid span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

@media (min-width: 760px) {
  .stack-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* About */
.about-grid {
  display: grid;
  gap: 1.6rem;
}

.about-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 40rem;
}

.facts {
  display: grid;
  gap: 1.4rem;
}

.facts h3 {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.plain span {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
}

@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .about-grid .section-head {
    grid-column: 1 / -1;
  }
}

/* Contact */
.contact-box {
  background: linear-gradient(145deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  border-radius: 24px;
  padding: 2.3rem 1.5rem 2.5rem;
  box-shadow: 0 24px 60px rgba(11, 42, 91, 0.22);
}

.contact-box .num {
  color: #bfdbfe;
}

.contact-box :focus-visible {
  outline-color: #fff;
}

.contact-box h2 {
  color: var(--white);
  max-width: 18ch;
  margin-bottom: 0.7rem;
}

.contact-lead {
  margin: 0;
  color: #dbe7ff;
  max-width: 32rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

@media (min-width: 700px) {
  .contact-box {
    padding: 3.2rem 3rem;
  }
}

/* Footer */
.site-footer {
  padding: 1.3rem 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .blob,
  .photo-ring,
  .dot {
    animation: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
