@import url("https://fonts.googleapis.com/css2?family=Doto:wght@400..700&family=IBM+Plex+Mono:wght@300;400;500&display=swap");

:root {
  --bg: #050505;
  --bg-soft: #0a0a0a;
  --text: #f1eee8;
  --muted: #9e9b95;
  --terminal-green: #8cff9b;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #d4d0c7;
  --pill: rgba(15, 15, 15, 0.72);
  --container: 1040px;
  --pixel: "Doto", var(--mono);
  --mono:
    "IBM Plex Mono", ui-monospace, "SFMono-Regular", "SF Mono", "Roboto Mono",
    "JetBrains Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 250;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.12;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 3px, 48px 48px;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.96rem;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

.lang {
  display: none;
}

body[data-lang="es"] .lang-es,
body[data-lang="en"] .lang-en {
  display: inline;
}

.app-shell {
  width: min(calc(100% - 28px), var(--container));
  margin: 0 auto;
  padding-bottom: 56px;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 18px 0 28px;
}

.detail-site-header {
  justify-content: space-between;
  gap: 18px;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.48);
  backdrop-filter: blur(12px);
}
.back-link,
.cv-link,
.terminal-link {
  transition: color 160ms ease, text-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.detail-sticky-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  color: var(--terminal-green);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(15, 15, 15, 0.48);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, -8px, 0);
}

.back-link {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  z-index: 35;
}
.back-link:hover,
.back-link:focus-visible {
  color: var(--text);
}

body.detail-back-stuck .detail-sticky-back {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

body.detail-back-stuck .detail-hero .back-link {
  opacity: 0;
  pointer-events: none;
}

.lang-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 0.8rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 160ms ease, background 160ms ease;
}

.lang-button.is-active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.hero,
.section,
.detail-hero,
.detail-section {
  border-top: 0;
}

.hero {
  padding: 24px 0 92px;
}

.system-line,
.section-code,
.project-code,
.detail-meta {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 320;
  letter-spacing: -0.03em;
}

h1 {
  margin-top: 16px;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1.06;
  padding-bottom: 0.08em;
}

.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;
}

.hero-title {
  width: min(100%, 930px);
  padding-bottom: 0;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}

.hero-title-mark {
  width: 100%;
  height: auto;
}

.js body.is-booting .hero-title-mark,
.js body.is-booting .hero-copy,
.js body.is-booting .hero-actions,
.js body.is-booting .system-line,
.js body.is-booting .hero-photo,
.js body.is-booting .detail-hero .back-link,
.js body.is-booting .detail-meta,
.js body.is-booting .detail-hero h1,
.js body.is-booting .detail-summary,
.js body.is-booting .detail-links,
.js body.is-booting .detail-image {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transform: translateY(8px);
}

.js body.is-booting .system-line {
  animation: boot-write 260ms steps(10, end) 40ms forwards;
}

.js body.is-booting .hero-title-mark {
  animation: boot-write 420ms steps(18, end) 100ms forwards;
}

.js body.is-booting .hero-copy {
  animation: boot-write 320ms steps(14, end) 220ms forwards;
}

.js body.is-booting .hero-actions,
.js body.is-booting .hero-actions {
  animation: boot-write 260ms steps(10, end) 300ms forwards;
}

.js body.is-booting .hero-photo {
  animation: boot-write 320ms steps(14, end) 180ms forwards;
}

.js body.is-booting .detail-hero .back-link {
  animation: boot-write 240ms steps(10, end) 60ms forwards;
}

.js body.is-booting .detail-meta {
  animation: boot-write 220ms steps(12, end) 110ms forwards;
}

.js body.is-booting .detail-hero h1 {
  animation: boot-write 380ms steps(18, end) 150ms forwards;
}

.js body.is-booting .detail-summary {
  animation: boot-write 300ms steps(14, end) 250ms forwards;
}

.js body.is-booting .detail-links {
  animation: boot-write 240ms steps(10, end) 330ms forwards;
}

.js body.is-booting .detail-image {
  animation: boot-write 320ms steps(14, end) 210ms forwards;
}

h2 {
  margin-top: 10px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
  font-size: 1.04rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 64px;
  align-items: end;
}

.hero-main {
  display: grid;
  align-content: start;
  gap: 22px;
  min-width: 0;
  max-width: none;
  transform: translate3d(0, var(--hero-main-shift, 0px), 0);
  opacity: var(--hero-main-opacity, 1);
  will-change: transform, opacity;
}

.hero-copy,
.section-text {
  max-width: 68ch;
  font-weight: 230;
}

.hero-copy {
  color: var(--text);
  font-weight: 280;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}

#artista .section-text {
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}

.profile-actions,
.artist-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.cv-prefix,
.cv-divider {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cv-link {
  color: var(--terminal-green);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(140, 255, 155, 0.18);
  animation: terminal-glow 2.8s ease-in-out infinite;
  transition:
    color 160ms ease,
    opacity 160ms ease,
    text-shadow 160ms ease;
}

.terminal-link {
  color: var(--terminal-green);
  text-shadow: 0 0 8px rgba(140, 255, 155, 0.18);
  animation: terminal-glow 2.8s ease-in-out infinite;
  transition:
    color 160ms ease,
    text-shadow 160ms ease,
    transform 160ms ease;
}

.terminal-link:hover,
.terminal-link:focus-visible {
  color: #b7ffbf;
  text-shadow:
    0 0 12px rgba(140, 255, 155, 0.35),
    0 0 24px rgba(140, 255, 155, 0.2);
}

.back-link {
  align-items: center;
  gap: 10px;
}

.cv-link:hover,
.cv-link:focus-visible {
  color: #b7ffbf;
  text-shadow:
    0 0 12px rgba(140, 255, 155, 0.35),
    0 0 24px rgba(140, 255, 155, 0.2);
}

.hero-photo {
  align-self: end;
  margin: 0;
  opacity: 0.78;
  transform: translate3d(0, var(--hero-photo-shift, 0px), 0) scale(var(--hero-photo-scale, 1));
  will-change: transform, opacity;
}

.hero-photo img {
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.06);
}

.section,
.detail-section {
  padding: 74px 0 84px;
}

.section-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 28px;
}

.data-list {
  display: grid;
  gap: 26px;
}

.data-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 0;
}

.data-label {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.data-value {
  color: var(--text);
  font-weight: 220;
}

.project-list {
  display: grid;
  gap: 40px;
}

.project-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 0;
}

.project-item img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: translate3d(0, var(--project-image-shift, 0px), 0) scale(var(--project-image-scale, 1));
  will-change: transform;
}

.project-thumb--mockup {
  object-fit: contain;
  object-position: center center;
  padding: 12px 12px 6px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.015);
  height: auto;
  display: block;
}

.project-body {
  display: grid;
  gap: 8px;
  align-content: start;
  transform: translate3d(0, var(--project-body-shift, 0px), 0);
  will-change: transform;
}

.project-body h3 {
  font-weight: 440;
}

.project-body p:last-child {
  max-width: 52ch;
  font-weight: 220;
}

.project-item:hover h3,
.project-item:focus-visible h3 {
  color: var(--accent);
}

.contact-tree {
  display: grid;
  gap: 8px;
}

.tree-line {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.tree-child {
  padding-left: 1.35rem;
}

.tree-text {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.tree-link {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.44rem 0.3rem;
  color: #050505;
  background: var(--terminal-green);
  font-family: var(--pixel);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.hero-contact-link {
  padding: 0.28rem 0.5rem 0.34rem;
}

.tree-link:hover,
.tree-link:focus-visible {
  color: #050505;
  background: #b7ffbf;
  transform: translate3d(0, -1px, 0);
}

.detail-hero {
  padding: 26px 0 66px;
  position: relative;
  z-index: 1;
}

.detail-layout {
  display: grid;
  gap: 18px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 16px;
  transform: translate3d(0, var(--detail-back-shift, 0px), 0);
  will-change: transform;
}

.detail-summary {
  max-width: 70ch;
  margin-top: 16px;
  color: var(--text);
  font-weight: 220;
  transform: translate3d(0, var(--detail-summary-shift, 0px), 0);
  will-change: transform;
}

.detail-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.detail-gallery {
  display: grid;
  gap: 14px;
  padding: 0;
  background: transparent;
}

.detail-gallery-bottom {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(180px, 0.72fr);
  gap: 18px;
  align-items: stretch;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.gallery-card::before {
  display: none;
}

.gallery-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-photo.is-mobile-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  border-radius: 18px;
}

.gallery-card.is-preview {
  min-height: 132px;
  overflow: hidden;
}

.gallery-card.is-desktop {
  min-height: 620px;
}

.gallery-card.is-mobile {
  min-height: 420px;
}

.gallery-label,
.gallery-meta {
  position: absolute;
  z-index: 2;
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-label {
  top: 12px;
  left: 12px;
}

.gallery-meta {
  left: 12px;
  bottom: 12px;
  opacity: 0.88;
}

.gallery-label,
.gallery-meta,
.gallery-slide-title,
.gallery-wire,
.gallery-wire::before,
.gallery-wire::after {
  display: none;
}

.gallery-wire {
  display: none;
}

.gallery-card.is-desktop,
.gallery-card.is-mobile {
  background: transparent;
}

.gallery-card.is-preview .gallery-photo {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.gallery-card.is-desktop .gallery-slide > img {
  top: auto;
  bottom: 0;
  left: 50%;
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%) scale(1.08);
  transform-origin: center bottom;
  border-radius: 12px;
}

.gallery-mobile-frame {
  display: none;
}

.gallery-mobile-frame::before,
.gallery-mobile-frame::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-mobile-frame::before {
  top: 14px;
  width: 42%;
  height: 16px;
  border-radius: 999px;
}

.gallery-mobile-frame::after {
  bottom: 12px;
  width: 28%;
  height: 6px;
  border-radius: 999px;
}

.gallery-slide-stack {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: center center;
}

.gallery-card.is-mobile .gallery-photo.is-mobile-shot {
  inset: auto auto 0 50%;
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
  transform: translateX(-50%);
}

.gallery-slide {
  position: absolute;
  inset: 0;
}

.gallery-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-slide.is-active {
  inset: 0;
}

.detail-image {
  margin-top: 28px;
  border: 0;
  transform: translate3d(0, var(--detail-image-shift, 0px), 0)
    scale(var(--detail-image-scale, 1));
  will-change: transform;
}

.detail-image img {
  width: 100%;
  height: auto;
}

.detail-blocks {
  display: grid;
  gap: 28px;
  transform: translate3d(0, var(--detail-blocks-shift, 0px), 0);
  will-change: transform;
}

.detail-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 0;
  transform: translate3d(0, var(--detail-row-shift, 0px), 0);
  will-change: transform;
}

.system-line {
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}

.detail-meta {
  transform: translate3d(0, var(--detail-meta-shift, 0px), 0);
  will-change: transform;
}

.detail-hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  line-height: 1.08;
  transform: translate3d(0, var(--detail-title-shift, 0px), 0);
  will-change: transform;
}

.detail-label {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-row p {
  color: var(--text);
}

.js .reveal {
  opacity: var(--reveal-opacity, 1);
  transform: translate3d(0, var(--reveal-y, 0px), 0);
  transition:
    opacity 140ms linear,
    transform 180ms linear;
}

@keyframes terminal-glow {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(140, 255, 155, 0.14);
  }

  50% {
    text-shadow: 0 0 10px rgba(140, 255, 155, 0.22);
  }
}

@keyframes boot-write {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }
}

@media (min-width: 761px) {
  p {
    font-size: 1.04rem;
    line-height: 1.92;
  }

  .system-line,
  .section-code,
  .project-code,
  .detail-meta,
  .data-label,
  .detail-label,
  .cv-prefix,
  .cv-divider,
  .cv-link,
  .tree-text,
  .tree-link,
  .back-link {
    font-size: 0.86rem;
  }

  h2 {
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    font-weight: 430;
  }

  h3 {
    font-size: 1.14rem;
    font-weight: 390;
  }

  .hero-copy,
  .section-text,
  .data-value,
  .detail-summary,
  .project-body p:last-child,
  .detail-row p {
    font-size: 1.06rem;
    font-weight: 300;
  }

  .data-label,
  .detail-label {
    font-weight: 400;
  }

  .project-list {
    gap: 44px;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-bottom: 22px;
  }

  .detail-site-header {
    gap: 12px;
  }

  .detail-sticky-back {
    padding: 9px 14px;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
  }

  h2 {
    font-weight: 460;
  }

  h3 {
    font-weight: 420;
  }

  .hero {
    padding: 36px 0 108px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-main {
    gap: 28px;
    transform: none;
    opacity: 1;
  }

  .hero-title {
    width: 100%;
  }

  .hero-photo {
    justify-self: center;
    align-self: start;
    max-width: 220px;
    margin-top: 8px;
    transform: none;
  }

  .data-row,
  .detail-row,
  .project-item {
    grid-template-columns: 1fr;
  }

  .data-label,
  .detail-label {
    font-weight: 430;
  }

  #perfil {
    padding-top: 86px;
    padding-bottom: 102px;
  }

  #perfil .data-list {
    gap: 36px;
  }

  #perfil .data-row {
    gap: 8px;
  }

  .project-list {
    gap: 56px;
  }

  .project-item {
    gap: 14px;
  }

  .project-item img {
    height: 180px;
  }

  .project-thumb--mockup {
    height: auto;
    padding: 8px 8px 2px;
  }

  .project-body {
    gap: 10px;
  }

  .detail-gallery-bottom {
    grid-template-columns: minmax(0, 1.22fr) minmax(92px, 0.58fr);
    gap: 10px;
    align-items: end;
  }

  .gallery-card.is-desktop {
    min-height: 250px;
  }

  .gallery-card.is-mobile {
    min-height: 250px;
  }

  .gallery-card.is-desktop .gallery-slide > img {
    height: 92%;
    transform: translateX(-50%) scale(1.02);
  }

  .gallery-card.is-mobile .gallery-photo.is-mobile-shot {
    height: 82%;
  }

  .gallery-card.is-preview {
    min-height: 106px;
  }
}
