/* ------------------------------------------------------------
   Tomás Vallejos — Portfolio
   Visual system: editorial, technical, expressive.
------------------------------------------------------------- */

:root {
  --ink: #0b0c0c;
  --ink-soft: #131515;
  --paper: #f0eee7;
  --paper-soft: #e7e4db;
  --white: #faf9f5;
  --acid: #c8ff66;
  --acid-soft: #dfff9f;
  --violet: #9381ff;
  --muted: #9b9d96;
  --line: rgba(11, 12, 12, 0.16);
  --line-dark: rgba(250, 249, 245, 0.14);
  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-space: clamp(6.5rem, 12vw, 11rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.76, 0, 0.24, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 6rem;
  background: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--acid);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  border: 3px solid var(--ink);
  border-radius: 100px;
  background: var(--acid);
}

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

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 5px;
}

.container {
  width: min(100%, calc(var(--container) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-noise {
  position: fixed;
  z-index: 1000;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.pointer-glow {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(200, 255, 102, 0.075), transparent 68%);
  transform: translate3d(calc(var(--pointer-x, -30rem) - 50%), calc(var(--pointer-y, -30rem) - 50%), 0);
  transition: opacity 0.4s ease;
}

body.pointer-active .pointer-glow {
  opacity: 1;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--acid);
  color: var(--ink);
  font-weight: 800;
  transform: translateY(-200%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  z-index: 1100;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: var(--scroll-progress, 0%);
  height: 100%;
  background: var(--acid);
}

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  color: var(--white);
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s var(--ease-out);
}

.site-header.scrolled {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 12, 12, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 5.5rem;
  padding-inline: var(--gutter);
}

.brand {
  justify-self: start;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.brand i {
  color: var(--acid);
  font-style: normal;
}

.desktop-nav {
  display: flex;
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: center;
}

.desktop-nav a {
  position: relative;
  color: rgba(250, 249, 245, 0.72);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  transition: color 0.25s;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -0.55rem;
  left: 0;
  height: 1px;
  background: var(--acid);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--white);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.desktop-nav span {
  margin-right: 0.35rem;
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 0.61rem;
}

.header-cta {
  display: inline-flex;
  justify-self: end;
  gap: 0.75rem;
  align-items: center;
  padding: 0.72rem 1rem 0.72rem 1.1rem;
  border: 1px solid rgba(250, 249, 245, 0.28);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.header-cta:hover {
  border-color: var(--acid);
  background: var(--acid);
  color: var(--ink);
}

.menu-toggle,
.mobile-menu {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  min-height: max(760px, 100svh);
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.hero-grid-lines,
.contact-grid {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.6) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 88%);
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.hero-orb-one {
  top: -22rem;
  right: -17rem;
  width: 53rem;
  height: 53rem;
  border: 1px solid rgba(200, 255, 102, 0.2);
  background: radial-gradient(circle at 44% 45%, rgba(200, 255, 102, 0.12), transparent 65%);
}

.hero-orb-two {
  bottom: -18rem;
  left: 35%;
  width: 42rem;
  height: 42rem;
  background: radial-gradient(circle, rgba(147, 129, 255, 0.11), transparent 67%);
}

.hero-layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  padding-top: 9rem;
  padding-bottom: 5rem;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  color: rgba(250, 249, 245, 0.65);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow i {
  color: rgba(250, 249, 245, 0.26);
  font-style: normal;
}

.status-dot {
  position: relative;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 0 rgba(200, 255, 102, 0.5);
  animation: status-pulse 2.4s infinite;
}

@keyframes status-pulse {
  70% { box-shadow: 0 0 0 0.45rem rgba(200, 255, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 255, 102, 0); }
}

.hero-eyebrow {
  margin-bottom: clamp(2rem, 5vh, 4rem);
  opacity: 0;
  animation: fade-up 0.8s 0.15s var(--ease-out) forwards;
}

.hero h1 {
  max-width: 920px;
  font-size: clamp(3.75rem, 7.7vw, 8.4rem);
  font-weight: 760;
  letter-spacing: -0.075em;
  line-height: 0.8;
}

.title-line {
  display: block;
  overflow: hidden;
  padding: 0.06em 0.07em 0.06em 0;
}

.title-line > span {
  display: block;
  transform: translateY(115%);
  animation: title-in 1.2s var(--ease-out) forwards;
}

.title-line:nth-child(1) > span { animation-delay: 0.18s; }
.title-line:nth-child(2) > span { animation-delay: 0.28s; }
.title-line:nth-child(3) > span { animation-delay: 0.38s; }

.accent-line {
  padding-left: 0.5rem;
  color: var(--acid);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.08em;
}

@keyframes title-in {
  to { transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(240px, 390px) auto;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  margin-top: clamp(2.6rem, 6vh, 5rem);
  opacity: 0;
  animation: fade-up 0.9s 0.65s var(--ease-out) forwards;
}

.hero-intro {
  color: rgba(250, 249, 245, 0.64);
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
  line-height: 1.7;
}

.hero-intro strong {
  color: var(--white);
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-start;
}

.button {
  display: inline-flex;
  gap: 1.7rem;
  align-items: center;
  justify-content: space-between;
  min-width: 12.5rem;
  padding: 0.9rem 0.95rem 0.9rem 1.25rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.button-primary {
  background: var(--acid);
  color: var(--ink);
  transition: background 0.3s, transform 0.3s;
}

.button-primary:hover {
  background: var(--white);
}

.button-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  transition: transform 0.45s var(--ease-out);
}

.button:hover .button-icon {
  transform: rotate(-45deg);
}

.text-link,
.line-link {
  position: relative;
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  padding-bottom: 0.3rem;
  font-size: 0.73rem;
  font-weight: 750;
}

.text-link::after,
.line-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

.text-link:hover::after,
.line-link:hover::after {
  transform: scaleX(0.35);
}

.hero-visual {
  position: relative;
  height: min(570px, 63vh);
  min-height: 470px;
  perspective: 1200px;
  opacity: 0;
  animation: visual-in 1.2s 0.55s var(--ease-out) forwards;
}

@keyframes visual-in {
  from { opacity: 0; transform: translate3d(3rem, 2rem, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.visual-label {
  position: absolute;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  color: rgba(250, 249, 245, 0.52);
  font-family: Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
}

.visual-label i {
  color: var(--acid);
  font-style: normal;
}

.label-top {
  top: 0;
  right: 1rem;
}

.label-bottom {
  right: 0;
  bottom: 0;
}

.label-bottom i {
  width: 2.2rem;
  height: 1px;
  background: rgba(200, 255, 102, 0.7);
}

.code-window {
  position: absolute;
  top: 11%;
  left: 0;
  width: min(100%, 450px);
  overflow: hidden;
  border: 1px solid rgba(250, 249, 245, 0.15);
  border-radius: 0.8rem;
  background: rgba(20, 22, 22, 0.88);
  box-shadow: 0 2.5rem 6rem rgba(0, 0, 0, 0.48);
  transform: rotateY(7deg) rotateX(2deg);
  transform-style: preserve-3d;
  backdrop-filter: blur(16px);
  transition: transform 0.2s ease-out;
}

.window-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 3rem;
  padding: 0 0.9rem;
  border-bottom: 1px solid rgba(250, 249, 245, 0.1);
  color: rgba(250, 249, 245, 0.55);
  font-family: Consolas, monospace;
  font-size: 0.62rem;
}

.window-bar > span {
  justify-self: center;
}

.window-bar > small {
  justify-self: end;
  color: var(--acid);
  font-size: 0.58rem;
}

.window-dots {
  display: flex;
  gap: 0.36rem;
}

.window-dots i {
  width: 0.47rem;
  height: 0.47rem;
  border-radius: 50%;
  background: rgba(250, 249, 245, 0.2);
}

.window-dots i:first-child { background: #ff6b5f; }
.window-dots i:nth-child(2) { background: #f5c451; }
.window-dots i:last-child { background: #65cb70; }

.code-area {
  padding: 2rem 1.25rem 2.1rem;
  color: #d8d9d3;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: clamp(0.69rem, 1vw, 0.82rem);
  line-height: 2;
}

.code-area > div {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
}

.line-number {
  color: rgba(250, 249, 245, 0.22);
  user-select: none;
}

.code-area code b {
  color: var(--violet);
  font-weight: 500;
}

.code-area code em {
  color: var(--acid-soft);
  font-style: normal;
}

.code-space {
  min-height: 1.9em;
}

.cursor-block {
  display: inline-block;
  width: 0.48em;
  height: 1.05em;
  margin-left: 0.3em;
  vertical-align: -0.16em;
  background: var(--acid);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.window-status {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
  background: var(--acid);
  color: var(--ink);
  font-family: Consolas, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.02em;
}

.window-status span:first-child {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.window-status i {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--ink);
}

.result-card {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 13%;
  width: 48%;
  min-width: 210px;
  padding: 1.1rem;
  border-radius: 0.65rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.34);
  transform: rotate(4deg);
  animation: card-float 5s ease-in-out infinite;
}

@keyframes card-float {
  0%, 100% { transform: rotate(4deg) translateY(0); }
  50% { transform: rotate(2.5deg) translateY(-0.7rem); }
}

.result-top,
.result-footer {
  display: flex;
  justify-content: space-between;
  font-family: Consolas, monospace;
  font-size: 0.53rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-mark {
  margin: 1.6rem 0 1.3rem;
  font-size: clamp(3rem, 5vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.11em;
  line-height: 0.85;
}

.result-mark span {
  color: var(--violet);
}

.result-lines {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.6rem;
}

.result-lines i {
  width: 100%;
  height: 0.3rem;
  background: var(--ink);
}

.result-lines i:nth-child(2) { width: 76%; }
.result-lines i:nth-child(3) { width: 42%; background: var(--violet); }

.result-footer {
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  color: rgba(11, 12, 12, 0.58);
  font-size: 0.48rem;
}

/* Ticker */
.ticker {
  position: relative;
  z-index: 5;
  overflow: hidden;
  border-top: 1px solid rgba(200, 255, 102, 0.35);
  border-bottom: 1px solid rgba(200, 255, 102, 0.35);
  background: var(--acid);
  color: var(--ink);
  transform: rotate(-1deg) scale(1.02);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  align-items: center;
  padding: 0.95rem 0;
  font-family: Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  animation: ticker-scroll 28s linear infinite;
}

.ticker-track i {
  font-style: normal;
}

@keyframes ticker-scroll {
  to { transform: translateX(-50%); }
}

/* General sections */
.section {
  position: relative;
  padding-block: var(--section-space);
}

.section-header {
  margin-bottom: clamp(3.5rem, 7vw, 6.5rem);
}

.section-kicker {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  font-family: Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-kicker span {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.55rem;
}

.section-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 330px);
  gap: 3rem;
  align-items: end;
}

.section-heading-row h2,
.profile-sticky h2,
.contact-inner h2 {
  font-size: clamp(3.25rem, 7vw, 7.4rem);
  font-weight: 760;
  letter-spacing: -0.072em;
  line-height: 0.89;
}

.section-heading-row h2 em,
.profile-sticky h2 em,
.contact-inner h2 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.075em;
}

.section-heading-row p {
  max-width: 30rem;
  padding-bottom: 0.55rem;
  color: rgba(11, 12, 12, 0.58);
  font-size: 0.92rem;
  line-height: 1.7;
}

.reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Projects */
.work-section {
  overflow: hidden;
  background: var(--paper);
}

.project-list {
  display: grid;
  gap: clamp(4rem, 8vw, 8rem);
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  min-height: 570px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 2rem 6rem rgba(11, 12, 12, 0.07);
}

.project-visual {
  position: relative;
  display: block;
  min-height: 570px;
  overflow: hidden;
  background: var(--project-color, var(--violet));
  isolation: isolate;
}

.project-visual::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  background-image: linear-gradient(rgba(11, 12, 12, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 12, 12, 0.35) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
}

.project-visual::after {
  position: absolute;
  right: -20%;
  bottom: -35%;
  width: 80%;
  aspect-ratio: 1;
  border: 1px solid rgba(11, 12, 12, 0.4);
  border-radius: 50%;
  content: "";
}

.project-visual-label {
  position: absolute;
  z-index: 2;
  top: 1.5rem;
  left: 1.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(11, 12, 12, 0.28);
  border-radius: 999px;
  background: rgba(250, 249, 245, 0.25);
  font-family: Consolas, monospace;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
}

.project-visual-label i {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--ink);
}

/* Captura real del proyecto, montada en una ventana de navegador. */
.project-shot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(86%, 620px);
  overflow: hidden;
  border: 1px solid rgba(11, 12, 12, 0.78);
  border-radius: 0.85rem;
  background: var(--white);
  box-shadow: 1.2rem 1.2rem 0 rgba(11, 12, 12, 0.85);
  transform: translate(-52%, -50%) rotate(-2.6deg);
  transition: transform 0.8s var(--ease-out), box-shadow 0.8s var(--ease-out);
}

.project-card:hover .project-shot,
.project-card:focus-within .project-shot {
  box-shadow: 0.55rem 0.55rem 0 rgba(11, 12, 12, 0.85);
  transform: translate(-50%, -50%) rotate(0deg);
}

.shot-bar {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.shot-dots {
  display: flex;
  gap: 0.3rem;
}

.shot-dots i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.shot-dots i:first-child { background: #ff6b5f; }
.shot-dots i:nth-child(2) { background: #f5c451; }
.shot-dots i:last-child { background: #65cb70; }

.shot-url {
  overflow: hidden;
  color: rgba(11, 12, 12, 0.48);
  font-family: Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shot-frame {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-soft);
}

.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 1.2s var(--ease-out);
}

.project-card:hover .shot-frame img {
  transform: scale(1.03);
}

/* Captura de celular: el mockup ya trae su marco, así que flota sin
   ventana de navegador y la sombra sigue la silueta del teléfono. */
.project-phone {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) rotate(-2.6deg);
  transition: transform 0.8s var(--ease-out);
}

/* `height: auto` pisa el atributo height de la imagen: sin esto, al
   limitar sólo el ancho el teléfono se estiraba a lo alto. */
.project-phone img {
  width: auto;
  height: auto;
  max-width: min(100%, 15rem);
  max-height: 27rem;
  filter: drop-shadow(0.95rem 0.95rem 0 rgba(11, 12, 12, 0.85));
  transition: filter 0.8s var(--ease-out);
}

.project-card:hover .project-phone,
.project-card:focus-within .project-phone {
  transform: translate(-50%, -50%) rotate(0deg) scale(1.02);
}

.project-card:hover .project-phone img,
.project-card:focus-within .project-phone img {
  filter: drop-shadow(0.4rem 0.4rem 0 rgba(11, 12, 12, 0.85));
}

.project-status {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 2;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(11, 12, 12, 0.28);
  border-radius: 999px;
  background: rgba(250, 249, 245, 0.55);
  color: rgba(11, 12, 12, 0.78);
  font-family: Consolas, monospace;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.project-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 4.25rem);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  color: rgba(11, 12, 12, 0.55);
  font-family: Consolas, monospace;
  font-size: 0.59rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-copy h3 {
  max-width: 9ch;
  margin: clamp(2.5rem, 7vw, 5.5rem) 0 1.5rem;
  font-size: clamp(2.5rem, 4.4vw, 4.5rem);
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.project-copy > p {
  max-width: 30rem;
  color: rgba(11, 12, 12, 0.61);
  font-size: 0.92rem;
  line-height: 1.72;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
}

.project-tags span {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
}

.project-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 800;
}

.project-link i {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-style: normal;
  transition: background 0.3s, color 0.3s, transform 0.45s var(--ease-out);
}

.project-link:hover i {
  background: var(--project-color, var(--acid));
  color: var(--ink);
  transform: rotate(-45deg);
}

.project-title-link {
  display: inline-block;
}

.project-title-link::after {
  display: block;
  height: 3px;
  background: var(--project-color, var(--violet));
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease-out);
}

.project-card:hover .project-title-link::after,
.project-title-link:focus-visible::after {
  transform: scaleX(1);
}

.project-actions {
  display: grid;
  gap: 1.15rem;
}

.project-secondary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

.mini-link {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  color: rgba(11, 12, 12, 0.52);
  font-size: 0.68rem;
  font-weight: 700;
  transition: color 0.25s, border-color 0.25s;
}

.mini-link:hover {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.mini-link i {
  font-size: 0.8em;
  font-style: normal;
}

/* Profile */
.profile-section {
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.profile-section::before {
  position: absolute;
  top: 10%;
  right: -15rem;
  width: 35rem;
  height: 35rem;
  border: 1px solid rgba(200, 255, 102, 0.1);
  border-radius: 50%;
  content: "";
}

.profile-intro {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(4rem, 11vw, 11rem);
  padding-bottom: clamp(6rem, 12vw, 11rem);
}

.profile-sticky .section-kicker {
  color: rgba(250, 249, 245, 0.58);
}

.profile-sticky h2 em {
  color: var(--acid);
}

.profile-copy {
  align-self: end;
  max-width: 34rem;
  padding-top: 7rem;
}

.profile-lead {
  margin-bottom: 2rem;
  color: var(--white) !important;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem) !important;
  font-weight: 450;
  letter-spacing: -0.035em;
  line-height: 1.25 !important;
}

.profile-lead strong:first-child { color: var(--acid); }
.profile-lead strong:last-child { color: var(--violet); }

.profile-copy > p {
  color: rgba(250, 249, 245, 0.53);
  font-size: 0.95rem;
  line-height: 1.8;
}

.profile-copy .line-link {
  margin-top: 2.5rem;
  color: var(--white);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.principle-card {
  min-height: 320px;
  padding: clamp(1.6rem, 3.3vw, 3.2rem);
  border-right: 1px solid var(--line-dark);
  transition: background 0.45s var(--ease-out), color 0.45s var(--ease-out);
}

.principle-card:last-child {
  border-right: 0;
}

.principle-card:hover {
  background: var(--acid);
  color: var(--ink);
}

.principle-top {
  display: flex;
  justify-content: space-between;
  color: rgba(250, 249, 245, 0.4);
  font-family: Consolas, monospace;
  font-size: 0.6rem;
  transition: color 0.45s;
}

.principle-top i {
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-style: normal;
}

.principle-card h3 {
  margin: clamp(5rem, 10vw, 8rem) 0 1rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.04em;
}

.principle-card p {
  max-width: 20rem;
  color: rgba(250, 249, 245, 0.48);
  font-size: 0.78rem;
  line-height: 1.7;
  transition: color 0.45s;
}

.principle-card:hover .principle-top,
.principle-card:hover p {
  color: rgba(11, 12, 12, 0.66);
}

.craft-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.75fr 0.75fr;
  gap: 1rem;
  margin-top: clamp(5rem, 9vw, 8rem);
}

.craft-card {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border: 1px solid var(--line-dark);
  border-radius: 0.8rem;
  background: var(--ink-soft);
}

.card-label {
  color: rgba(250, 249, 245, 0.43);
  font-family: Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.craft-feature {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 1rem;
  background: var(--violet);
  color: var(--ink);
}

.craft-feature .card-label {
  color: rgba(11, 12, 12, 0.55);
}

.craft-feature h3 {
  max-width: 13ch;
  margin-top: 2rem;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.orbit-graphic {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(100%, 240px);
  aspect-ratio: 1;
}

.orbit-graphic strong {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 2.4rem;
  letter-spacing: -0.1em;
  transform: translate(-50%, -50%);
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(11, 12, 12, 0.48);
  border-radius: 50%;
  animation: orbit-spin 9s linear infinite;
}

.orbit-two {
  inset: 20%;
  animation-direction: reverse;
  animation-duration: 6s;
}

.orbit i {
  position: absolute;
  top: 50%;
  left: -0.3rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--ink);
}

@keyframes orbit-spin { to { transform: rotate(360deg); } }

.metric-card {
  display: flex;
  flex-direction: column;
  background: var(--acid);
  color: var(--ink);
}

.metric-card .card-label {
  color: rgba(11, 12, 12, 0.5);
}

.metric-card strong {
  margin-top: auto;
  font-size: clamp(7rem, 11vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.12em;
  line-height: 0.7;
}

.metric-card p {
  max-width: 12rem;
  margin-top: 1.5rem;
  font-size: 0.72rem;
  line-height: 1.5;
}

.tags-card {
  display: flex;
  flex-direction: column;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-content: flex-end;
  margin-top: auto;
}

.tag-cloud span {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: rgba(250, 249, 245, 0.7);
  font-size: 0.62rem;
}

.tag-cloud span:nth-child(2),
.tag-cloud span:nth-child(5) {
  border-color: var(--acid);
  color: var(--acid);
}

/* Journey */
.journey-section {
  background: var(--paper-soft);
}

.journey-heading h2 em {
  color: var(--violet);
}

.journey-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
}

.journey-column-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}

.journey-column-title h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.journey-column-title span {
  font-size: 1.3rem;
}

.journey-list {
  display: grid;
}

.journey-item,
.journey-empty {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.journey-item time,
.journey-empty > span {
  color: rgba(11, 12, 12, 0.48);
  font-family: Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
}

.journey-item h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.journey-link {
  text-decoration: underline;
  text-decoration-color: rgba(11, 12, 12, 0.35);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 180ms ease;
}

.journey-link::after {
  content: " ↗";
  font-size: 0.78em;
}

.journey-link:hover {
  text-decoration-color: currentColor;
}

.journey-item p,
.journey-empty p {
  color: rgba(11, 12, 12, 0.56);
  font-size: 0.75rem;
  line-height: 1.6;
}

.journey-progress {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.75rem;
}

.journey-progress-track {
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.journey-progress-fill {
  display: block;
  height: 100%;
  background: var(--violet);
  border-radius: inherit;
}

.journey-progress-label {
  color: rgba(11, 12, 12, 0.48);
  font-family: Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.journey-empty {
  min-height: 8rem;
  align-items: start;
}

.journey-empty strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.data-notice {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  max-width: 46rem;
  margin: 3rem auto 0;
  padding: 1rem 1.2rem;
  border: 1px dashed rgba(11, 12, 12, 0.25);
  border-radius: 0.6rem;
  color: rgba(11, 12, 12, 0.58);
  font-size: 0.68rem;
  line-height: 1.6;
}

.data-notice[hidden] {
  display: none;
}

.data-notice strong {
  color: var(--ink);
}

.data-notice-icon {
  display: grid;
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-family: Georgia, serif;
  font-size: 0.72rem;
  font-style: italic;
}

/* Contact */
.contact-section {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  padding: clamp(7rem, 14vw, 12rem) 0 5rem;
  background: var(--ink);
  color: var(--white);
}

.contact-grid {
  opacity: 0.045;
  -webkit-mask-image: none;
  mask-image: none;
}

.contact-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(85vw, 850px);
  aspect-ratio: 1;
  border: 1px solid rgba(200, 255, 102, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 255, 102, 0.07), transparent 64%);
  transform: translate(-50%, -50%);
}

.contact-orb::before,
.contact-orb::after {
  position: absolute;
  border: 1px solid rgba(147, 129, 255, 0.14);
  border-radius: 50%;
  content: "";
}

.contact-orb::before { inset: 12%; }
.contact-orb::after { inset: 27%; }

.contact-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.contact-kicker {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
  color: rgba(250, 249, 245, 0.55);
  font-family: Consolas, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-kicker span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--acid);
}

.contact-inner h2 {
  font-size: clamp(3.5rem, 8vw, 8.5rem);
}

.contact-inner h2 em {
  color: var(--acid);
}

.contact-button {
  display: inline-flex;
  gap: 2rem;
  align-items: center;
  margin-top: clamp(3rem, 6vw, 5.5rem);
  padding: 0.65rem 0.7rem 0.65rem 1.5rem;
  border: 1px solid rgba(250, 249, 245, 0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}

.contact-button i {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--acid);
  color: var(--ink);
  font-size: 1.1rem;
  font-style: normal;
  transition: transform 0.55s var(--ease-out);
}

.contact-button:hover {
  border-color: var(--acid);
  background: var(--acid);
  color: var(--ink);
}

.contact-button:hover i {
  background: var(--ink);
  color: var(--white);
  transform: rotate(-45deg);
}

.contact-marquee {
  position: absolute;
  right: 0;
  bottom: 1rem;
  left: 0;
  overflow: hidden;
  color: rgba(250, 249, 245, 0.04);
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.8;
  white-space: nowrap;
}

.contact-marquee span {
  display: block;
  width: max-content;
  animation: contact-scroll 40s linear infinite;
}

@keyframes contact-scroll { to { transform: translateX(-50%); } }

.site-footer {
  border-top: 1px solid rgba(250, 249, 245, 0.1);
  background: var(--ink);
  color: var(--white);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 7.5rem;
  color: rgba(250, 249, 245, 0.48);
  font-size: 0.64rem;
}

.footer-brand {
  color: var(--white);
}

.footer-inner > p {
  text-align: center;
}

.footer-inner > div {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

.footer-inner a:hover {
  color: var(--acid);
}

.noscript-message {
  position: fixed;
  z-index: 2000;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: var(--acid);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 1080px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    gap: 2rem;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 7.4vw, 6.2rem);
  }

  .hero-bottom {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
  }

  .project-card {
    grid-template-columns: 1fr 0.82fr;
  }

  .craft-grid {
    grid-template-columns: 1fr 1fr;
  }

  .craft-feature {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  :root {
    --section-space: clamp(5.5rem, 16vw, 8rem);
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    height: 4.75rem;
  }

  .desktop-nav,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    position: relative;
    z-index: 3;
    display: grid;
    gap: 0.4rem;
    width: 2.8rem;
    height: 2.8rem;
    place-content: center;
    border: 1px solid rgba(250, 249, 245, 0.25);
    border-radius: 50%;
    background: transparent;
    color: var(--white);
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 1rem;
    height: 1px;
    background: currentColor;
    transition: transform 0.4s var(--ease-out);
  }

  .menu-open .menu-toggle span:first-child {
    transform: translateY(0.22rem) rotate(45deg);
  }

  .menu-open .menu-toggle span:last-child {
    transform: translateY(-0.22rem) rotate(-45deg);
  }

  .mobile-menu {
    position: fixed;
    z-index: 1;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8rem var(--gutter) 2rem;
    background: var(--ink);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-1.5rem);
    transition: opacity 0.45s, visibility 0.45s, transform 0.45s var(--ease-out);
  }

  .menu-open .mobile-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu nav {
    display: grid;
  }

  .mobile-menu nav a {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line-dark);
    font-size: clamp(2.5rem, 9vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.06em;
  }

  .mobile-menu nav small {
    color: var(--acid);
    font-family: Consolas, monospace;
    font-size: 0.6rem;
    letter-spacing: 0;
  }

  .mobile-menu-footer {
    display: flex;
    justify-content: space-between;
    color: rgba(250, 249, 245, 0.42);
    font-family: Consolas, monospace;
    font-size: 0.55rem;
    text-transform: uppercase;
  }

  .hero {
    min-height: auto;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    padding-top: 8.5rem;
    padding-bottom: 5.5rem;
  }

  .hero h1 {
    font-size: clamp(4rem, 13.5vw, 7rem);
  }

  .hero-bottom {
    grid-template-columns: minmax(230px, 420px) auto;
  }

  .hero-visual {
    width: min(100%, 590px);
    height: 510px;
    margin: 2rem auto 0;
  }

  .section-heading-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section-heading-row p {
    padding-bottom: 0;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-visual,
  .project-card {
    min-height: 500px;
  }

  .project-content {
    min-height: 0;
    gap: 2rem;
  }

  .profile-intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profile-copy {
    max-width: 42rem;
    padding-top: 0;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .principle-card {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .principle-card:last-child {
    border-bottom: 0;
  }

  .principle-card h3 {
    margin-top: 4rem;
  }

  .journey-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
}

@media (max-width: 580px) {
  :root {
    --gutter: 1.15rem;
    --section-space: 4.5rem;
  }

  .page-noise {
    display: none;
  }

  .hero-grid-lines,
  .contact-grid {
    background-size: 48px 48px;
  }

  .hero-layout {
    padding-top: 7rem;
    padding-bottom: 3.5rem;
  }

  .hero-eyebrow {
    margin-bottom: 2rem;
  }

  .hero h1 {
    font-size: clamp(3.55rem, 17vw, 5.3rem);
    line-height: 0.84;
  }

  .accent-line {
    padding-left: 0.15rem;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    margin-top: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .button {
    width: 100%;
  }

  /* El visual decorativo del hero empujaba los proyectos casi una
     pantalla más abajo: en celular el hero queda sólo con el mensaje. */
  .hero-visual {
    display: none;
  }

  .section-heading-row h2,
  .profile-sticky h2 {
    font-size: clamp(3.15rem, 16vw, 5rem);
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-kicker {
    margin-bottom: 1.5rem;
  }

  /* Tarjetas de proyecto: en celular el contenido fluye en vez de
     repartirse en una altura mínima pensada para escritorio. */
  .project-list {
    gap: 2.5rem;
  }

  .project-card {
    min-height: 0;
  }

  .project-visual {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 0;
    padding: 4.25rem 1.1rem 1.6rem;
  }

  .project-visual-label {
    top: 1.1rem;
    left: 1.1rem;
  }

  .project-status {
    top: 1.1rem;
    right: 1.1rem;
    bottom: auto;
  }

  .project-shot,
  .project-card:hover .project-shot,
  .project-card:focus-within .project-shot {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    box-shadow: 0.6rem 0.6rem 0 rgba(11, 12, 12, 0.85);
    transform: rotate(-1.5deg);
  }

  /* El teléfono asoma desde el borde inferior: se ve lo importante de la
     pantalla sin ocupar su alto completo. */
  .project-visual:has(.project-phone) {
    padding-bottom: 0;
  }

  .project-phone,
  .project-card:hover .project-phone,
  .project-card:focus-within .project-phone {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: -6.5rem;
    transform: rotate(-2.6deg);
  }

  .project-phone img {
    width: 13.5rem;
    max-width: 100%;
    max-height: none;
    filter: drop-shadow(0.6rem 0.6rem 0 rgba(11, 12, 12, 0.85));
  }

  .project-content {
    min-height: 0;
    padding: 1.5rem 1.25rem 1.6rem;
  }

  .project-meta {
    padding-bottom: 1rem;
  }

  .project-copy h3 {
    margin: 1.5rem 0 0.9rem;
    font-size: clamp(2.3rem, 11vw, 3rem);
  }

  .project-copy > p {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .project-tags {
    gap: 0.4rem;
    margin: 1.25rem 0 1.5rem;
  }

  .project-tags span {
    padding: 0.4rem 0.65rem;
    font-size: 0.6rem;
  }

  .project-link {
    padding-top: 1.1rem;
  }

  /* Perfil: tarjetas con la altura de su contenido. */
  .principle-card {
    padding: 1.5rem 0.25rem;
  }

  .principle-card h3 {
    margin-top: 1.25rem;
  }

  .craft-grid {
    grid-template-columns: 1fr;
    margin-top: 3rem;
  }

  .craft-card {
    min-height: 0;
    padding: 1.4rem;
  }

  .craft-feature {
    grid-column: auto;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .craft-feature h3 {
    margin-top: 0.75rem;
    font-size: clamp(1.6rem, 8vw, 2.1rem);
  }

  .orbit-graphic {
    width: 6.5rem;
  }

  .metric-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1.25rem;
    align-items: end;
  }

  .metric-card .card-label {
    grid-column: 1 / -1;
    margin-bottom: 1.25rem;
  }

  .metric-card strong {
    font-size: 5.5rem;
  }

  .metric-card p {
    margin-top: 0;
  }

  .tag-cloud {
    margin-top: 1.25rem;
  }

  .journey-item,
  .journey-empty {
    grid-template-columns: 4.5rem 1fr;
  }

  .data-notice {
    font-size: 0.64rem;
  }

  .contact-section {
    min-height: 650px;
  }

  .contact-inner h2 {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .contact-button {
    width: 100%;
    justify-content: space-between;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    padding-block: 2rem;
  }

  .footer-inner > p {
    display: none;
  }

  .footer-inner > div {
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-end;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

@media (hover: none), (pointer: coarse) {
  .pointer-glow {
    display: none;
  }
}



/* CV-driven additions */
.project-card:nth-child(even) {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
}

.project-card:nth-child(even) .project-visual {
  order: 2;
}

.project-card:nth-child(even) .project-content {
  order: 1;
}

.experience-block {
  display: grid;
  grid-template-columns: minmax(180px, 0.52fr) minmax(0, 1.48fr);
  gap: clamp(2rem, 6vw, 6rem);
  margin-bottom: clamp(4.5rem, 8vw, 7rem);
  padding: clamp(1.4rem, 3vw, 2.3rem);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 1.5rem 4rem rgba(11, 12, 12, 0.08);
}

.experience-heading {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 12rem;
  padding-right: clamp(1rem, 3vw, 2.5rem);
  border-right: 1px solid var(--line-dark);
}

.experience-heading > span {
  font-family: Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.experience-heading > small {
  max-width: 11rem;
  color: rgba(250, 249, 245, 0.4);
  font-family: Consolas, monospace;
  font-size: 0.55rem;
  line-height: 1.6;
  text-transform: uppercase;
}

.experience-entries {
  display: grid;
  gap: 1.75rem;
  align-content: center;
}

.experience-entry {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
}

/* Con más de una entrada, cada una salvo la primera se separa con una
   línea en vez de amontonarse contra la anterior. */
.experience-entry + .experience-entry {
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-dark);
}

/* Algunas entradas enlazan al caso de estudio del proyecto: el ícono ya
   parece un link, así que se lo hace uno de verdad cuando corresponde. */
a.experience-entry {
  transition: opacity 0.25s;
}

a.experience-entry:hover {
  opacity: 0.85;
}

a.experience-entry:hover > i {
  transform: rotate(-45deg);
}

.experience-entry > i {
  transition: transform 0.35s var(--ease-out);
}

.experience-period {
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.experience-entry h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1;
}

.experience-entry p {
  max-width: 38rem;
  color: rgba(250, 249, 245, 0.5);
  font-size: 0.78rem;
  line-height: 1.75;
}

.experience-entry > i {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 50%;
  background: var(--acid);
  color: var(--ink);
  font-size: 1rem;
  font-style: normal;
}

@media (max-width: 820px) {
  .project-card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .project-card:nth-child(even) .project-visual,
  .project-card:nth-child(even) .project-content {
    order: initial;
  }

  .experience-block {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .experience-heading {
    min-height: auto;
    padding: 0 0 1.2rem;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .experience-heading > small {
    margin-top: 0.6rem;
  }
}

@media (max-width: 580px) {
  .experience-entry {
    grid-template-columns: 1fr auto;
  }

  .experience-period {
    grid-column: 1 / -1;
  }

  .experience-entry > i {
    width: 2.35rem;
    height: 2.35rem;
  }
}
