* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: #ffffff;
  font-family: Outfit, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.55;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(228, 192, 122, 0.28), transparent 60%),
    radial-gradient(700px 420px at -10% 20%, rgba(122, 215, 255, 0.22), transparent 55%),
    #07070c;
  overflow-wrap: anywhere;
}

body::before {
  content: "";
  position: fixed;
  inset: auto -20% -30% auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(228, 192, 122, 0.18), transparent 68%);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

a { color: #b7e4ff; }

a:focus-visible { outline: 2px solid #e4c07a; outline-offset: 3px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 7vw;
  background: rgba(7, 7, 12, 0.82);
  border-bottom: 1px solid rgba(228, 192, 122, 0.22);
  backdrop-filter: blur(12px);
}

.brand {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.nav nav a {
  position: relative;
  color: #ffffff;
  font-size: 14px;
  text-decoration: none;
}

.nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: #e4c07a;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav nav a:hover::after { transform: scaleX(1); }

.wrap { width: min(980px, calc(100% - 40px)); margin: 0 auto; }

.billboard {
  position: relative;
  isolation: isolate;
  min-height: 460px;
  margin-top: 28px;
  padding: 78px 36px 56px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(228, 192, 122, 0.32);
  background:
    radial-gradient(rgba(122, 215, 255, 0.22) 1px, transparent 1.4px),
    radial-gradient(520px 340px at 84% 22%, rgba(122, 215, 255, 0.28), transparent 64%),
    radial-gradient(420px 280px at 8% 100%, rgba(228, 192, 122, 0.18), transparent 68%),
    linear-gradient(155deg, #0c1224 0%, #141c36 48%, #0e1a28 100%);
  background-size: 22px 22px, auto, auto, auto;
}

.ide-bar {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 46px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 0 16px;
  background: rgba(7, 10, 20, 0.55);
  border-bottom: 1px solid rgba(122, 215, 255, 0.2);
}

.ide-dots { display: flex; gap: 6px; margin: 0 10px 14px 0; }
.ide-dots i { width: 8px; height: 8px; border-radius: 50%; background: #e4c07a; display: block; }
.ide-dots i:nth-child(2) { background: #7ad7ff; }
.ide-dots i:nth-child(3) { background: rgba(255, 255, 255, 0.35); }

.ide-tab {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  color: #9eb0c8;
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
}

.ide-tab.on { color: #f4f7ff; background: rgba(122, 215, 255, 0.14); }

.stack {
  position: absolute;
  z-index: 2;
  top: 68px;
  right: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 188px;
}

.stack::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: linear-gradient(#7ad7ff, #e4c07a);
}

.repo {
  position: relative;
  display: block;
  margin-left: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(122, 215, 255, 0.45);
  background: rgba(8, 12, 24, 0.72);
  color: #f4f7ff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.repo::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 50%;
  width: 18px;
  height: 2px;
  background: #7ad7ff;
}

.repo.git { border-color: rgba(228, 192, 122, 0.7); }
.repo.git::before, .repo.in::before { background: #e4c07a; }

.mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.billboard-copy { position: relative; z-index: 1; max-width: min(34rem, calc(100% - 250px)); }

.portrait {
  position: absolute;
  z-index: 1;
  right: 32px;
  bottom: 28px;
  width: 196px;
  height: 248px;
  object-fit: cover;
  object-position: center 12%;
  border-radius: 22px;
  border: 3px solid rgba(228, 192, 122, 0.85);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  animation: float 4.5s ease-in-out infinite alternate;
}

.billboard-copy > * { animation: rise 0.7s ease both; }
.billboard-copy > :nth-child(2) { animation-delay: 0.1s; }
.billboard-copy > :nth-child(3) { animation-delay: 0.18s; }
.billboard-copy > :nth-child(4) { animation-delay: 0.26s; }
.billboard-copy > :nth-child(5) { animation-delay: 0.34s; }
.billboard-copy > :nth-child(6) { animation-delay: 0.42s; }

.role {
  margin: 16px 0 0;
  color: #e4c07a;
  font-size: 20px;
  font-weight: 700;
}

.gallery, .phones {
  display: grid;
  gap: 10px;
  margin: 4px 0 14px;
}

.gallery { grid-template-columns: repeat(4, 1fr); }

.phones { grid-template-columns: repeat(3, 1fr); }

.gallery figure, .phones figure { margin: 0; }

.gallery img, .phones img {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(228, 192, 122, 0.25);
}

.gallery img { height: 110px; }

.phones img { height: 210px; object-position: top; }

figcaption {
  margin-top: 6px;
  color: #d5deea;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 10px;
  color: #e4c07a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 14ch;
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  font-size: clamp(46px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.profile { max-width: 40rem; margin: 18px 0 0; color: #f4f7ff; font-size: 18px; }

.contact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.contact a, .word {
  color: #07070c;
  background: #7ad7ff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 14px;
}

.contact a.word { background: transparent; color: #ffffff; border: 1px solid rgba(122, 215, 255, 0.85); }

h2 {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e4c07a;
}

section { padding: 34px 0; scroll-margin-top: 72px; }

article, .panel {
  background: rgba(16, 14, 32, 0.72);
  border: 1px solid rgba(228, 192, 122, 0.22);
  border-radius: 18px;
  padding: 18px 18px 8px;
  margin: 0 0 14px;
}

.head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }

h3 { margin: 0; font-size: 22px; line-height: 1.2; }

.when { margin: 4px 0 8px; color: #d5deea; }

.view ul { list-style: none; margin: 8px 0 12px; padding: 0; }

.view li {
  position: relative;
  margin: 0;
  padding: 11px 0 11px 18px;
  border-top: 1px solid rgba(228, 192, 122, 0.16);
}

.view li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ad7ff;
  box-shadow: 0 0 10px rgba(228, 192, 122, 0.8);
}

.skills { display: grid; gap: 10px; }

.skills div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 14, 32, 0.72);
  border: 1px solid rgba(228, 192, 122, 0.18);
}

dt { font-weight: 700; color: #fff; }

dd { margin: 0; color: #f4f7ff; }

.later { margin-top: 36px; }

.route {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 12px;
  padding-left: 28px;
}

.route::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(#7ad7ff, rgba(228, 192, 122, 0.35));
  transform-origin: top;
  animation: draw 1.15s ease both;
}

.stop, .marquee, .tile {
  position: relative;
  text-decoration: none;
  color: inherit;
}

.stop, .marquee {
  border-radius: 16px;
  border: 1px solid rgba(228, 192, 122, 0.2);
  background: rgba(16, 14, 32, 0.62);
  animation: rise 0.6s ease both;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.35s cubic-bezier(.2, .7, .2, 1), box-shadow 0.35s ease;
}

.route > :nth-child(2) { animation-delay: 0.08s; }
.route > :nth-child(3) { animation-delay: 0.16s; }
.route > :nth-child(4) { animation-delay: 0.24s; }
.route > :nth-child(5) { animation-delay: 0.32s; }
.route > :nth-child(6) { animation-delay: 0.4s; }
.route > :nth-child(7) { animation-delay: 0.48s; }

.stop::before, .marquee::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7ad7ff;
  box-shadow: 0 0 0 4px #07070c, 0 0 16px #7ad7ff;
  animation: pulse 2.8s ease-in-out infinite;
}

.stop {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 20px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.marquee { display: flex; flex-direction: column; padding: 14px 16px 12px; }

.marquee-top {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
}

.film {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.film img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.film img:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35); }

.peek {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  max-height: 0;
  margin-top: -12px;
  opacity: 0;
  overflow: hidden;
  translate: 0 10px;
  transition: max-height 0.45s ease, opacity 0.35s ease, translate 0.45s ease, margin-top 0.45s ease;
}

.peek img {
  width: 100%;
  min-width: 0;
  height: 176px;
  object-fit: cover;
  border-radius: 10px;
  scale: 1.06;
  transition: scale 0.45s ease, box-shadow 0.45s ease;
}

.peek img.sistema {
  object-fit: contain;
  object-position: center;
  background: #f4f6f8;
  padding: 6px;
}

.peek.tracks { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.peek.tracks img { height: 112px; }

.num { color: #e4c07a; font-size: 13px; font-weight: 700; transition: scale 0.3s ease; }

.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.stop strong, .marquee strong, .tile strong { color: #fff; font-size: 18px; }

.row-main span, .tile span, .row-when { color: #d5deea; font-size: 14px; }

.go { color: #e4c07a; font-size: 18px; transition: transform 0.35s cubic-bezier(.2, .7, .2, 1); }

.stop:hover, .stop:focus-within, .marquee:hover, .marquee:focus-within {
  border-color: rgba(122, 215, 255, 0.85);
  background: rgba(12, 32, 40, 0.92);
  transform: translateX(10px) translateY(-3px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38), 0 0 28px rgba(122, 215, 255, 0.18);
}

.stop:hover .go, .stop:focus-within .go,
.marquee:hover .go, .marquee:focus-within .go { transform: translateX(8px); }

.stop:hover .num, .stop:focus-within .num,
.marquee:hover .num, .marquee:focus-within .num { scale: 1.16; }

.stop:hover .peek, .stop:focus-within .peek {
  max-height: 196px;
  margin-top: 0;
  opacity: 1;
  translate: 0 0;
}

.stop:hover .peek img, .stop:focus-within .peek img {
  scale: 1;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.marquee:hover .film img, .marquee:focus-within .film img { transform: translateY(-6px); }

.side {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-height: 148px;
  padding: 18px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(120px 80px at 100% 0%, rgba(122, 215, 255, 0.28), transparent 70%),
    rgba(16, 14, 32, 0.78);
  border: 1px solid rgba(228, 192, 122, 0.24);
  animation: rise 0.7s ease both;
  transition: transform 0.35s cubic-bezier(.2, .7, .2, 1), border-color 0.3s ease, box-shadow 0.35s ease;
}

.side .tile:nth-child(2) { animation-delay: 0.1s; }
.side .tile:nth-child(3) { animation-delay: 0.2s; }

.tile em {
  font-family: Fraunces, Georgia, serif;
  font-style: normal;
  font-size: 40px;
  line-height: 1;
  color: rgba(228, 192, 122, 0.6);
  transition: color 0.3s ease;
}

.tile:hover, .tile:focus-visible {
  border-color: rgba(122, 215, 255, 0.85);
  transform: translateY(-8px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38), 0 0 24px rgba(122, 215, 255, 0.16);
}

.tile:hover em, .tile:focus-visible em { color: #e4c07a; }

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

.groups section { margin: 0; padding: 0; }

.groups h3 { margin-bottom: 8px; font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }

.chips span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(228, 192, 122, 0.28);
  background: rgba(16, 14, 32, 0.72);
  color: #f4f7ff;
  font-size: 13px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.chips span:hover { transform: translateY(-2px); border-color: #e4c07a; }

.view { display: none; }

.view:target { display: block; animation: rise 0.45s ease; }

body:has(.view:target) #inicio { display: none; }

.back {
  display: inline-block;
  margin: 8px 0 16px;
  color: #07070c;
  background: #7ad7ff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 14px;
}

footer {
  padding: 10px 0 40px;
  color: #d5deea;
}

@keyframes rise {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-40px, -24px, 0); }
}

@keyframes ken {
  to { transform: scale(1.16) translate3d(-2%, -1%, 0); }
}

@keyframes draw {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes float {
  to { transform: translateY(-10px); }
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 5px #07070c, 0 0 22px #7ad7ff; }
}

@media (max-width: 720px) {
  .nav, .head, .skills div { display: grid; }
  .nav { padding: 14px 18px; }
  .wrap { width: min(980px, calc(100% - 28px)); }
  .billboard { min-height: 0; padding: 64px 18px 250px; }
  .billboard-copy { max-width: none; }
  .stack { display: none; }
  .ide-tab:not(.on) { display: none; }
  .portrait { width: 148px; height: 186px; right: 16px; bottom: 18px; }
  .gallery, .phones, .side, .film { grid-template-columns: 1fr 1fr; }
  .stop { grid-template-columns: 32px minmax(0, 1fr); }
  .row-when { grid-column: 2; }
  .row-when:empty { display: none; }
  .go { display: none; }
  h1 { font-size: 42px; }
}

@media (hover: none) {
  .peek { max-height: 196px; margin-top: 0; opacity: 1; translate: 0 0; }
  .peek img { scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .peek { max-height: 196px; margin-top: 0; translate: none; }
  .peek img { scale: 1; }
  html { scroll-behavior: auto; }
}
