@import url("https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600&family=Oswald:wght@500;600;700&display=swap");

:root {
  --font-display: "Oswald";
  --font-mono: "Geist Mono";
}

:root {
  --ink: #18191d;
  --paper: #e9edeb;
  --graphite: #1b1c20;
  --accent: #3f8672;
  --accent-soft: #6b998b;
  --line: rgba(255, 255, 255, 0.1);
  --ease-out-expo: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --micro: clamp(0.54rem, 0.64vw, 0.76rem);
  --page-gutter: clamp(1.3rem, 6.5vw, 6.2rem);
  --section-top: clamp(5rem, 10vw, 9rem);
  --section-bottom: clamp(6rem, 12vw, 10rem);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scrollbar-color: rgba(107, 153, 139, .48) #0b0d0f;
  scrollbar-width: thin;
  --theme-origin-x: 50vw;
  --theme-origin-y: 50vh;
}
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: #0b0d0f; }
html::-webkit-scrollbar-thumb {
  border: 2px solid #0b0d0f;
  border-radius: 999px;
  background: rgba(107, 153, 139, .46);
}
html::-webkit-scrollbar-thumb:hover { background: rgba(167, 206, 193, .72); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: #000;
  color: var(--paper);
  font-family: var(--font-mono), "Courier New", monospace;
}
a { color: inherit; text-decoration: none; }

.stage { isolation: isolate; position: relative; z-index: 1; min-height: 100svh; display: block; overflow: visible; background: transparent; }
.portfolio-shell {
  isolation: isolate; position: relative; z-index: 1; display: grid; grid-template-rows: auto 1fr; width: 100%; min-height: 100dvh;
  overflow: hidden; border: 0; border-radius: 0;
  background: transparent; box-shadow: none;
  padding: clamp(1.1rem, 1.45vw, 1.4rem) var(--page-gutter);
  --hero-progress: 0;
}
.hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: transparent;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #000 0%, rgba(0,0,0,.78) 16%, rgba(0,0,0,.48) 32%, rgba(0,0,0,.12) 52%, transparent 76%);
}
#particleCanvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}
.site-header { display: flex; align-items: center; gap: .75rem; position: relative; z-index: 4; }
.wordmark { order: 1; flex: 0 0 auto; font-family: var(--font-display), Impact, sans-serif; font-size: clamp(.88rem, 1.25vw, 1.15rem); font-weight: 700; letter-spacing: -.025em; }
.theme-toggle { order: 2; display: inline-grid; width: 2.2rem; height: 2.2rem; place-items: center; padding: 0; border: 0; background: transparent; color: rgba(233,237,235,.74); cursor: pointer; transition: color .25s ease, transform .25s ease; }
.theme-toggle:focus-visible { color: var(--paper); outline: none; }
@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover { color: var(--paper); transform: scale(1.08); }
}
.theme-toggle__icon { display: none; width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.theme-toggle__icon--sun:not([hidden]), html:not([data-theme="light"]) .theme-toggle__icon--sun:not([hidden]) { display: block; }
html[data-theme="light"] .theme-toggle__icon--sun { display: none; }
html[data-theme="light"] .theme-toggle__icon--moon:not([hidden]) { display: block; }
.theme-toggle__icon[hidden] { display: none; }
.navigation { order: 3; display: flex; gap: clamp(1.25rem, 3.45vw, 3.7rem); min-width: 0; margin-left: calc(clamp(2rem, 7vw, 7.3rem) - 3.3rem); }
.navigation a { position: relative; color: rgba(233,237,235,.68); font-size: var(--micro); letter-spacing: .035em; white-space: nowrap; transition: color .25s ease; }
.navigation a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -.45rem; height: 1px; background: var(--accent); transition: right .3s ease; }
.navigation a:hover, .navigation a:focus-visible { color: var(--paper); }
.navigation a:hover::after, .navigation a:focus-visible::after { right: 0; }
.navigation span { color: rgba(255,255,255,.52); }
.hero-block { align-self: center; width: 100%; }
.hero-content { position: relative; z-index: 2; margin-top: 0; overflow: visible; transform: translateY(calc(var(--hero-progress) * -13vh)); opacity: calc(1 - (var(--hero-progress) * .88)); filter: blur(calc(var(--hero-progress) * 2px)); }
.eyebrow { display: none; margin: 0 0 .75rem; color: var(--accent-soft); font-size: .57rem; letter-spacing: .16em; }
.hero-title { margin: 0; width: fit-content; max-width: 100%; overflow: visible; font-family: var(--font-display), Impact, sans-serif; font-size: clamp(6rem, 10.9vw, 10.4rem); font-weight: 600; line-height: .92; letter-spacing: -.035em; text-transform: uppercase; }
.hero-title span { display: block; }
.title-morph { display: block; min-width: 13ch; overflow: visible; white-space: nowrap; }
.hero-title .morph-character { display: inline-block; transition: opacity .16s ease, filter .16s ease; }
.morph-character.is-changing { opacity: .46; }
.primary-title { color: #f7faf8; text-shadow: 0 1px 0 rgba(255,255,255,.16); }
.secondary-title { position: relative; margin-top: clamp(1.2rem, 2.4vw, 2.2rem); padding-left: clamp(.7rem, 1.2vw, 1.2rem); color: #a7cec1; }
.secondary-title::before { content: ""; position: absolute; left: 0; top: -.08em; bottom: -.12em; width: 2px; background: var(--accent); }
.signature { position: absolute; right: clamp(-110px, -3vw, -20px); bottom: -1rem; margin: 0; color: rgba(233,237,235,.94); font-size: clamp(.82rem, .95vw, 1rem); line-height: 1.5; }
.divider { position: relative; z-index: 3; margin-top: clamp(2rem, 3.2vw, 3rem); height: 1px; width: 100%; background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(63,134,114,.22) 70%, transparent); }
.divider::after { content: ""; position: absolute; inset: -1px 0 -1px 0; background: var(--accent); transform: scaleX(var(--hero-progress)); transform-origin: left center; opacity: .86; }
.lower-content { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr minmax(310px, 44%); gap: 3rem; margin-top: clamp(1.8rem, 2.5vw, 2.5rem); }
.tagline, .bio { margin: 0; }
.tagline { font-size: clamp(.59rem, .78vw, .8rem); letter-spacing: .025em; }
.tagline > span:first-child { margin-right: .9rem; color: var(--accent); }
.tagline-value { display: inline-block; max-width: 100%; color: rgba(233,237,235,.74); vertical-align: bottom; transition: transform 320ms var(--ease-out-expo), opacity 320ms var(--ease-out-expo), filter 320ms var(--ease-out-expo); }
.tagline-value.is-changing { transform: translateY(.45em); opacity: 0; filter: blur(2px); }
.bio { margin-top: clamp(3.5rem, 6vw, 5.3rem); color: rgba(255,255,255,.9); font-size: clamp(.74rem, .9vw, .92rem); line-height: 1.68; text-wrap: pretty; }
.explore { position: absolute; z-index: 4; left: clamp(1.3rem, 6.5vw, 6.2rem); bottom: clamp(1.45rem, 2vw, 2rem); padding: .35rem 0; font-size: var(--micro); letter-spacing: .03em; color: rgba(233,237,235,.74); }
.explore::before { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--accent); transition: right .35s ease; }
.explore:hover::before, .explore:focus-visible::before { right: 0; }
.explore span { margin-left: .55rem; }
/* Proyectos: órbita técnica + barrido de lectura. */

/* Trayectoria: flujo vertical de telemetría que acompaña el timeline. */

/* Contacto: túnel convergente + pulso de conexión. */
.impact-section { isolation: isolate; position: relative; z-index: 1; scroll-margin-top: 2rem; overflow: hidden; padding: var(--section-top) var(--page-gutter) var(--section-bottom); border-top: 1px solid rgba(255,255,255,.09); background: rgba(16,31,34,.28); }
.impact-inner { position: relative; z-index: 1; width: min(100%, 1260px); margin: 0 auto; }
.impact-header { max-width: 42rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.impact-kicker { margin: 0 0 1rem; color: var(--accent-soft); font-size: .54rem; letter-spacing: .16em; }
.impact-header h2 { margin: 0; font-family: var(--font-display), Impact, sans-serif; font-size: clamp(3rem, 6vw, 5.7rem); font-weight: 600; line-height: .88; letter-spacing: -.032em; text-transform: uppercase; text-wrap: balance; }
.impact-intro { max-width: 48ch; margin: 1.2rem auto 0; color: rgba(233,237,235,.68); font-size: clamp(.66rem, .82vw, .78rem); line-height: 1.55; text-wrap: pretty; }
.service-catalog { display: grid; gap: .75rem; }
.service-primary-stack { display: grid; gap: .65rem; }
.service-bar, .service-card { min-width: 0; border: 1px solid rgba(233,237,235,.17); border-radius: 11px; background: rgba(233,237,235,.065); transition: opacity .5s var(--ease-out-expo), transform .5s var(--ease-out-expo), border-color .28s ease, background-color .28s ease; }
.service-bar, .service-card { position: relative; overflow: hidden; }
.service-bar, .service-card, .project-card, .project-detail { min-width: 0; }
.service-bar__copy, .service-card__body, .project-card strong, .project-card__type, .project-card__line, .project-detail h3, .project-detail__columns p, .project-detail__bottom strong { min-width: 0; overflow-wrap: break-word; word-break: normal; }
.scroll-motion .service-bar, .scroll-motion .service-card, .scroll-motion .career-entry, .scroll-motion .projects-header, .scroll-motion .project-detail { opacity: .18; transform: translateY(24px); }
.scroll-motion .service-bar.is-visible, .scroll-motion .service-card.is-visible, .scroll-motion .career-entry.is-visible, .scroll-motion .projects-header.is-visible, .scroll-motion .project-detail.is-visible { opacity: 1; transform: translateY(0); }
.scroll-motion .service-bar:nth-child(2), .scroll-motion .service-secondary-grid .service-card:nth-child(2) { transition-delay: 70ms; }
.scroll-motion .service-bar:nth-child(3), .scroll-motion .service-secondary-grid .service-card:nth-child(3) { transition-delay: 140ms; }
.scroll-motion .service-secondary-grid .service-card:nth-child(4) { transition-delay: 210ms; }
.scroll-motion .service-secondary-grid .service-card:nth-child(5) { transition-delay: 280ms; }
.service-bar:hover, .service-bar:focus-within, .service-card:hover, .service-card:focus-within { border-color: rgba(107,153,139,.62); background: rgba(233,237,235,.085); }
.career-section { isolation: isolate; position: relative; z-index: 1; scroll-margin-top: 2rem; overflow: hidden; padding: var(--section-top) var(--page-gutter) var(--section-bottom); border-top: 1px solid rgba(255,255,255,.09); background: rgba(18,30,27,.24); }
.career-inner { position: relative; z-index: 1; width: min(100%, 1260px); margin: 0 auto; }
.career-header { max-width: 40rem; margin: 0 auto clamp(3rem, 6vw, 5rem); text-align: center; }
.career-kicker { margin: 0 0 1rem; color: var(--accent-soft); font-size: .54rem; letter-spacing: .16em; text-transform: uppercase; }
.career-header h2 { margin: 0; color: var(--paper); font-family: var(--font-display), Impact, sans-serif; font-size: clamp(3rem, 12vw, 6.4rem); font-weight: 600; line-height: .86; letter-spacing: -.032em; text-transform: uppercase; }
.career-header p { max-width: 48ch; margin: 1.2rem auto 0; color: rgba(233,237,235,.68); font-size: clamp(.66rem, .82vw, .78rem); line-height: 1.65; text-wrap: pretty; }
.career-track { position: relative; width: min(100%, 920px); margin: 0 auto; }
.career-track::before { content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; left: clamp(8rem, 28%, 15rem); width: 1px; background: rgba(107,153,139,.55); }
.career-entry { position: relative; z-index: 1; display: grid; grid-template-columns: clamp(8rem, 28%, 15rem) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: center; min-width: 0; padding: clamp(2rem, 5vw, 4rem) 0; transition: opacity .75s var(--ease-out-expo), transform .75s var(--ease-out-expo); }
.career-entry__identity { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 9rem; padding: 1.7rem clamp(1rem, 2.2vw, 2rem) 1rem 0; }
.career-entry__identity::after { content: ""; position: absolute; top: 50%; right: 0; width: .65rem; height: .65rem; border: 2px solid var(--accent-soft); border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(63,134,114,.12), 0 0 18px rgba(107,153,139,.7); transform: translate(50%, -50%); }
.career-entry__identity img { display: block; width: min(100%, 13rem); max-height: 7rem; object-fit: contain; object-position: center; }
.career-entry__date { display: block; margin-top: .7rem; color: var(--accent-soft); font-size: .52rem; line-height: 1.3; letter-spacing: .08em; text-align: center; white-space: nowrap; }
.career-entry__content { min-width: 0; max-width: 42rem; }
.career-entry__context { color: var(--accent-soft); font-size: .52rem; letter-spacing: .12em; text-transform: uppercase; }
.career-entry h3 { margin: .65rem 0 0; color: var(--paper); font-family: var(--font-display), Impact, sans-serif; font-size: clamp(1.8rem, 3.2vw, 3.25rem); font-weight: 500; line-height: .92; letter-spacing: -.022em; text-transform: uppercase; overflow-wrap: anywhere; }
.career-entry p { max-width: 50ch; margin: .85rem 0 0; color: rgba(233,237,235,.76); font-size: clamp(.58rem, .72vw, .7rem); line-height: 1.7; overflow-wrap: anywhere; }
.career-entry__keywords { display: block; margin-top: 1.1rem; padding-top: .25rem; color: var(--accent-soft); font-size: .48rem; letter-spacing: .1em; text-transform: uppercase; overflow-wrap: anywhere; }
.service-bar { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 1rem; min-height: 5.5rem; padding: .8rem 1rem; }
.service-bar__copy h3, .service-card h3 { margin: 0; color: var(--paper); font-family: var(--font-display), Impact, sans-serif; font-weight: 500; line-height: .94; letter-spacing: -.012em; text-transform: uppercase; }
.service-bar__copy h3, .service-card__body h3 { max-width: none; overflow-wrap: normal; word-break: normal; hyphens: none; text-wrap: balance; }
.service-bar__copy h3 { font-size: clamp(1.15rem, 1.75vw, 1.75rem); }
.service-bar__copy p { max-width: 48ch; margin: .38rem 0 0; color: rgba(233,237,235,.58); font-size: .58rem; line-height: 1.4; }
.service-bar__meta { display: none; color: rgba(107,153,139,.9); font-size: .49rem; line-height: 1.45; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
.service-card { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 1rem; }
.service-card--feature { min-height: 17rem; background: rgba(233,237,235,.12); }
.service-card__top { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; color: rgba(233,237,235,.55); font-size: .5rem; letter-spacing: .08em; text-transform: uppercase; }
.service-card__top > span:last-child { min-width: 0; overflow-wrap: normal; text-align: right; }
.service-card__body h3 { width: 100%; font-size: clamp(1.5rem, 2.5vw, 2.55rem); }
.service-card__body p { max-width: 38ch; margin: .75rem 0 0; color: rgba(233,237,235,.62); font-size: .6rem; line-height: 1.55; }
.service-secondary-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.service-secondary-grid .service-card { min-height: 13rem; }
.service-secondary-grid .service-card--wide { min-height: 11rem; }
.service-secondary-grid h3 { font-size: clamp(1.25rem, 1.8vw, 1.8rem); }
.service-tags { display: flex; flex-wrap: wrap; gap: .42rem .8rem; margin: 0; padding: .75rem 0 0; border-top: 1px solid rgba(233,237,235,.15); list-style: none; }
.service-tags li { color: rgba(233,237,235,.58); font-size: .5rem; letter-spacing: .04em; text-transform: uppercase; }
.service-tags li + li::before { content: "/"; margin-right: .8rem; color: var(--accent); }
.projects-section { isolation: isolate; position: relative; z-index: 1; scroll-margin-top: 1.5rem; padding: var(--section-top) var(--page-gutter) var(--section-bottom); border-top: 1px solid rgba(255,255,255,.09); background: rgba(25,23,36,.3); overflow: hidden; }
.projects-inner { position: relative; z-index: 1; width: min(100%, 1260px); margin: 0 auto; }
.projects-header { max-width: 42rem; margin: 0 auto clamp(2.6rem, 6vw, 5rem); text-align: center; }
.projects-kicker { margin: 0 0 1rem; color: var(--accent-soft); font-size: .54rem; letter-spacing: .16em; }
.projects-header h2 { margin: 0; color: var(--paper); font-family: var(--font-display), Impact, sans-serif; font-size: clamp(3rem, 12vw, 6.4rem); font-weight: 600; line-height: .86; letter-spacing: -.032em; text-transform: uppercase; }
.projects-intro { max-width: 45ch; margin: 1.2rem auto 0; color: rgba(233,237,235,.66); font-size: clamp(.66rem, .84vw, .79rem); line-height: 1.55; text-wrap: pretty; }
.project-stage { position: relative; display: grid; gap: 1.5rem; min-width: 0; }
.project-rail { position: relative; isolation: isolate; display: grid; min-width: 0; min-height: 22rem; place-items: center; perspective: 1100px; overflow: clip; cursor: grab; touch-action: pan-y; user-select: none; }
.project-rail.is-dragging { cursor: grabbing; }
.project-route { position: absolute; z-index: 0; top: 8%; left: -22%; width: 144%; height: 62%; border: 1px solid rgba(63,134,114,.36); border-radius: 50%; transform: rotateX(68deg) rotateZ(-4deg); box-shadow: 0 0 0 1px rgba(63,134,114,.06), 0 0 0 2rem rgba(63,134,114,.025); pointer-events: none; }
.project-route::after { content: ""; position: absolute; inset: 17% 12%; border: 1px solid rgba(233,237,235,.1); border-radius: 50%; }
.project-card { position: absolute; top: 50%; left: 50%; z-index: 2; display: flex; width: min(78vw, 19rem); min-height: 18rem; flex-direction: column; justify-content: space-between; padding: 1.1rem; border: 1px solid rgba(233,237,235,.24); border-radius: 11px; background: #202328; color: var(--paper); cursor: pointer; text-align: left; transform: translate(-50%, -50%) translateX(var(--project-x, 0)) translateZ(var(--project-z, 0)) rotateY(var(--project-rotate, 0deg)) scale(var(--project-scale, 1)); opacity: var(--project-opacity, 0); transform-origin: center center; will-change: transform, opacity; transition: border-color .35s ease, background-color .35s ease; }
.project-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 100% 0%, rgba(63,134,114,.16), transparent 45%); opacity: .7; pointer-events: none; }
.project-card:hover, .project-card:focus-visible { border-color: var(--accent-soft); background: #282c30; outline: none; }
.project-card.is-active { z-index: 6; --project-x: 0%; --project-z: 90px; --project-rotate: 0deg; --project-scale: 1; --project-opacity: 1; }
.project-card.is-prev, .project-card.is-next { z-index: 3; --project-z: -30px; --project-scale: .82; --project-opacity: .78; }
.project-card.is-prev { --project-x: -78%; --project-rotate: 10deg; }
.project-card.is-next { --project-x: 78%; --project-rotate: -10deg; }
.project-card.is-far-prev, .project-card.is-far-next { z-index: 1; --project-z: -100px; --project-scale: .66; --project-opacity: .4; }
.project-card.is-far-prev { --project-x: -137%; --project-rotate: 17deg; }
.project-card.is-far-next { --project-x: 137%; --project-rotate: -17deg; }
.project-card.is-hidden { z-index: 0; --project-x: 0%; --project-z: -140px; --project-rotate: 0deg; --project-scale: .58; --project-opacity: 0; pointer-events: none; }
.project-card__number, .project-card__type, .project-card__line { color: rgba(233,237,235,.52); font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; }
.project-card__number { color: var(--accent-soft); }
.project-card strong { max-width: 100%; color: var(--paper); font-family: var(--font-display), Impact, sans-serif; font-size: clamp(1.65rem, 4.5vw, 2.55rem); font-weight: 500; line-height: .98; letter-spacing: -.015em; text-transform: uppercase; }
.project-card__line { padding-top: .75rem; border-top: 1px solid rgba(233,237,235,.14); color: rgba(107,153,139,.9); font-size: .47rem; line-height: 1.65; }
.project-detail { position: relative; z-index: 3; display: grid; gap: 1.65rem; padding: 1.15rem; border: 1px solid rgba(233,237,235,.2); border-radius: 11px; background: #1b1e22; }
.project-detail__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; color: var(--accent-soft); font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; }
.project-detail__top > span { min-width: 0; overflow-wrap: anywhere; }
.project-detail h3 { max-width: 100%; margin: 0; color: var(--paper); font-family: var(--font-display), Impact, sans-serif; font-size: clamp(1.8rem, 5.1vw, 3.35rem); font-weight: 500; line-height: .96; letter-spacing: -.022em; text-transform: uppercase; }
.project-detail__columns { display: grid; gap: 1rem; }
.project-detail__columns span, .project-detail__bottom span { display: block; margin-bottom: .4rem; color: var(--accent); font-size: .5rem; letter-spacing: .12em; text-transform: uppercase; }
.project-detail__columns p { margin: 0; color: rgba(233,237,235,.78); font-size: .66rem; line-height: 1.78; }
.project-detail__bottom { display: grid; gap: .9rem; padding-top: .9rem; border-top: 1px solid rgba(233,237,235,.15); }
.project-detail__bottom p { margin: 0; }
.project-detail__bottom strong { display: block; color: rgba(233,237,235,.9); font-size: .66rem; font-weight: 400; line-height: 1.78; }
.project-detail.is-refreshing > * { animation: project-detail-refresh .45s var(--ease-out-expo) both; }
.project-detail.is-refreshing > *:nth-child(1) { animation-delay: 0ms; }
.project-detail.is-refreshing > *:nth-child(2) { animation-delay: 45ms; }
.project-detail.is-refreshing > *:nth-child(3) { animation-delay: 90ms; }
.project-detail.is-refreshing > *:nth-child(4) { animation-delay: 135ms; }
.project-controls { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.project-controls button { min-width: 2.65rem; padding: .65rem .75rem; border: 1px solid rgba(233,237,235,.2); border-radius: 999px; background: transparent; color: rgba(233,237,235,.74); cursor: pointer; font: inherit; font-size: .54rem; letter-spacing: .08em; transition: border-color .25s ease, color .25s ease, background-color .25s ease; }
.project-controls button[data-project-action="toggle"] { min-width: 2.65rem; }
.control-icon { display: grid; place-items: center; min-height: 1rem; font-size: 1rem; line-height: 1; }
.project-controls button:hover, .project-controls button:focus-visible { border-color: var(--accent-soft); background: rgba(63,134,114,.14); color: var(--paper); outline: none; }
.contact-section { isolation: isolate; position: relative; z-index: 1; scroll-margin-top: 2rem; overflow: hidden; padding: var(--section-top) var(--page-gutter) var(--section-bottom); border-top: 1px solid rgba(255,255,255,.09); background: rgba(30,22,31,.28); }
.contact-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, 1fr); gap: clamp(2.5rem, 8vw, 8rem); width: min(100%, 1080px); margin: 0 auto; align-items: start; }
.contact-copy { min-width: 0; padding-top: .5rem; }
.contact-kicker { margin: 0 0 1rem; color: var(--accent-soft); font-size: .54rem; letter-spacing: .16em; }
.contact-copy h2 { max-width: 10ch; margin: 0; color: var(--paper); font-family: var(--font-display), Impact, sans-serif; font-size: clamp(3.1rem, 5.5vw, 5.7rem); font-weight: 600; line-height: 1.02; letter-spacing: -.035em; text-transform: uppercase; overflow-wrap: normal; word-break: normal; hyphens: none; text-wrap: balance; }
.contact-intro { max-width: 45ch; margin: 1.5rem 0 0; color: rgba(233,237,235,.7); font-size: clamp(.62rem, .76vw, .75rem); line-height: 1.75; text-wrap: pretty; }
.contact-form { display: grid; gap: 1.15rem; min-width: 0; padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid rgba(233,237,235,.18); border-radius: 11px; background: #1b1e22; }
.form-field { display: grid; gap: .45rem; min-width: 0; }
.form-field label { color: var(--accent-soft); font-size: .5rem; letter-spacing: .12em; text-transform: uppercase; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-width: 0; padding: .65rem 0 .72rem; border: 0; border-bottom: 1px solid rgba(233,237,235,.2); border-radius: 0; outline: none; background: transparent; color: var(--paper); font: inherit; font-size: .65rem; line-height: 1.5; transition: border-color .25s ease, box-shadow .25s ease; }
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(233,237,235,.38); }
.form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent-soft) 50%), linear-gradient(135deg, var(--accent-soft) 50%, transparent 50%); background-position: calc(100% - .35rem) 50%, calc(100% - .05rem) 50%; background-size: .3rem .3rem, .3rem .3rem; background-repeat: no-repeat; padding-right: 1rem; }
.form-field option { background: #1b1e22; color: var(--paper); }
.form-field textarea { min-height: 7rem; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent-soft); box-shadow: 0 1px 0 var(--accent); }
.contact-submit { width: fit-content; margin-top: .35rem; padding: .75rem 0; border: 0; border-bottom: 1px solid var(--accent); background: transparent; color: var(--paper); cursor: pointer; font: inherit; font-size: .58rem; letter-spacing: .08em; transition: color .25s ease, border-color .25s ease; }
.contact-submit span { margin-left: .55rem; color: var(--accent-soft); }
.contact-submit:hover, .contact-submit:focus-visible { border-color: var(--paper); color: var(--accent-soft); outline: none; }
.contact-form.is-submitting .contact-submit { cursor: wait; opacity: .7; }
.form-status { min-height: 1.5em; margin: 0; color: var(--accent-soft); font-size: .54rem; line-height: 1.55; }
.contact-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.form-booking { width: fit-content; border-bottom: 1px solid var(--accent); color: var(--accent-soft); font-size: .54rem; line-height: 1.55; }
.form-booking:hover, .form-booking:focus-visible { border-color: var(--paper); color: var(--paper); outline: none; }
.contact-form.is-submitted { border-color: rgba(107,153,139,.62); }
.contact-form.is-submitted .contact-submit { color: var(--accent-soft); cursor: default; }

@keyframes intro-brand { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes intro-navigation { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes intro-hero { from { opacity: 0; transform: translateY(24px); filter: blur(3px); clip-path: inset(14% 0 0); } to { opacity: 1; transform: translateY(0); filter: blur(0); clip-path: inset(0); } }
@keyframes intro-secondary { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes project-detail-refresh { from { opacity: 0; filter: blur(2px); transform: translateY(8px); } to { opacity: 1; filter: blur(0); transform: translateY(0); } }
.intro-ready .wordmark { animation: intro-brand .55s var(--ease-out-expo) both; }
.intro-ready .navigation { animation: intro-navigation .55s var(--ease-out-expo) .1s both; }
.intro-ready .hero-title { animation: intro-hero .72s var(--ease-out-expo) .24s both; }
.intro-ready .signature { animation: intro-secondary .5s var(--ease-out-expo) .78s both; }
.intro-ready .divider { animation: intro-secondary .5s var(--ease-out-expo) .86s both; }
.intro-ready .lower-content { animation: intro-secondary .55s var(--ease-out-expo) 1s both; }
.intro-ready .explore { animation: intro-secondary .55s var(--ease-out-expo) 1.15s both; }

@media (min-width: 601px) {
  .service-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-secondary-grid .service-card--wide { grid-column: span 2; }
  .projects-section { padding-inline: var(--page-gutter); }
  .project-rail { min-height: 26rem; }
  .project-card { width: min(52vw, 20rem); }
  .project-card.is-prev { --project-x: -85%; }
  .project-card.is-next { --project-x: 85%; }
}
@media (min-width: 901px) {
  .service-catalog { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: stretch; }
  .service-bar { grid-template-columns: minmax(0, 1fr) minmax(130px, 28%); }
  .service-bar__meta { display: block; }
  .service-card--feature { height: 100%; }
  .service-secondary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .service-secondary-grid .service-card--wide { grid-column: span 2; }
  .service-secondary-grid { grid-column: 1 / -1; }
  .project-stage { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: center; column-gap: clamp(1.2rem, 3vw, 3.5rem); }
  .project-rail { grid-column: 1; grid-row: 1 / span 2; min-height: 34rem; }
  .project-detail { grid-column: 2; grid-row: 1; }
  .project-controls { grid-column: 2; grid-row: 2; }
  .project-card { width: min(30vw, 21rem); min-height: 20rem; }
  .project-card.is-prev { --project-x: -88%; }
  .project-card.is-next { --project-x: 88%; }
}
@media (max-width: 900px) {
  :root { --page-gutter: clamp(1.2rem, 6vw, 3rem); --section-top: clamp(4.5rem, 10vw, 7rem); --section-bottom: clamp(5rem, 11vw, 8rem); }
  .stage { padding: 0; place-items: stretch; }
  .portfolio-shell { width: 100%; height: auto; min-height: 100dvh; max-height: none; border: 0; border-radius: 0; padding: 1.5rem var(--page-gutter) 2rem; }
  .site-header { align-items: flex-start; justify-content: flex-start; gap: .7rem; }
  .navigation { margin-left: auto; }
  .navigation { flex: 1 1 auto; max-width: none; flex-wrap: wrap; justify-content: flex-end; gap: .75rem clamp(1rem, 3vw, 2rem); padding: .2rem 0 .85rem; }
  .navigation a { font-size: .56rem; }
  .hero-content { margin-top: 0; }
  .hero-title { font-size: clamp(4.4rem, 16.5vw, 9.2rem); }
  .signature { right: 0; bottom: -2rem; }
  .lower-content { grid-template-columns: 1fr 42%; }
  .explore { left: clamp(1.2rem, 6vw, 3rem); }
  .impact-section { padding-inline: var(--page-gutter); }
  .service-bar__meta { display: block; }
}
@media (max-width: 600px) {
  .impact-section { background: rgba(16,31,34,.22); }
  .projects-section { background: rgba(25,23,36,.2); }
  .career-section { background: rgba(18,30,27,.2); }
  .contact-section { background: rgba(30,22,31,.22); }
  .hero::after {
    background:
      linear-gradient(90deg, rgba(0,0,0,.54) 0%, rgba(0,0,0,.32) 38%, rgba(0,0,0,.14) 68%, rgba(0,0,0,.06) 100%),
      linear-gradient(180deg, transparent 0%, rgba(0,0,0,.06) 58%, rgba(0,0,0,.2) 100%);
  }
  .portfolio-shell { display: block; }
  .hero-block { padding-top: clamp(2.5rem, 7vh, 4.5rem); }
  .site-header { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: .7rem; }
  .wordmark { grid-column: 1; grid-row: 1; }
  .theme-toggle { grid-column: 2; grid-row: 1; }
  .navigation { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin: .45rem 0 0; gap: .85rem 1rem; }
  .navigation a { font-size: .56rem; }
  .hero-content { margin-top: 0; }
  .eyebrow { display: block; }
  .hero-title { max-width: 100%; font-size: clamp(2.9rem, 12.4vw, 7.2rem); line-height: .95; letter-spacing: -.03em; }
  .title-morph { min-width: 0; }
  .secondary-title { margin-top: 1.15rem; }
  .signature { bottom: -2.55rem; font-size: .72rem; }
  .divider { margin-top: 4.5rem; }
  .lower-content { grid-template-columns: 1fr; gap: 1.8rem; }
  .bio { max-width: 94%; margin-top: 0; font-size: .72rem; line-height: 1.68; }
  .tagline { font-size: .62rem; }
  .explore { position: relative; display: inline-block; left: auto; bottom: auto; margin-top: clamp(3.5rem, 11vh, 7rem); }
  .impact-section { padding-top: 5rem; padding-bottom: 6rem; }
  .impact-header { margin-bottom: 2.5rem; }
  .impact-header h2 { font-size: clamp(3rem, 14vw, 5rem); }
  .impact-intro { max-width: 30ch; margin-top: 1.5rem; }
  .service-bar { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .service-bar__meta { grid-column: 1; text-align: left; }
  .career-section { padding-inline: var(--page-gutter); }
  .career-header { margin-bottom: 2.5rem; }
  .career-header h2 { font-size: clamp(3rem, 14vw, 5rem); }
  .career-entry { grid-template-columns: clamp(5.5rem, 24vw, 8rem) minmax(0, 1fr); gap: 1.15rem; padding: 2rem 0; }
  .career-track::before { left: clamp(5.5rem, 24vw, 8rem); }
  .career-entry__identity { min-height: 6.5rem; padding-right: .85rem; }
  .career-entry__identity img { width: min(100%, 7rem); max-height: 5rem; object-position: center; }
  .career-entry__date { margin-top: .55rem; font-size: .43rem; letter-spacing: .04em; }
  .career-entry h3 { font-size: clamp(1.55rem, 8vw, 2.6rem); }
  .career-entry p { font-size: .56rem; line-height: 1.65; }
  .career-entry__keywords { font-size: .43rem; line-height: 1.5; }
  .project-stage { grid-template-columns: 1fr; }
  .project-rail { order: 1; }
  .project-controls { order: 2; }
  .project-detail { order: 3; }
  .project-controls button[data-project-action="toggle"] { min-width: 2.65rem; }
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
  .contact-copy h2 { max-width: 11ch; font-size: clamp(3rem, 13vw, 5.1rem); line-height: 1.04; }
  .contact-intro { max-width: 50ch; }
}
@media (max-width: 390px) {
  .hero-title { font-size: clamp(2.65rem, 11.4vw, 5.5rem); }
  .portfolio-shell { padding-inline: 1rem; }
  .explore { margin-top: 3.25rem; }
  :root { --page-gutter: 1rem; }
  .impact-section, .projects-section, .career-section, .contact-section { padding-inline: var(--page-gutter); }
  .service-bar__meta { font-size: .46rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero-content, .divider::after, .service-bar, .service-card, .project-card { animation: none !important; }
  .project-rail { cursor: default; }
}

/* Cambio de tema: reveal circular desde el interruptor, como una onda de agua. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2;
  animation: theme-ripple-reveal 1500ms var(--ease-out-expo) both;
}

@keyframes theme-ripple-reveal {
  from { clip-path: circle(0 at var(--theme-origin-x) var(--theme-origin-y)); }
  to { clip-path: circle(150vmax at var(--theme-origin-x) var(--theme-origin-y)); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) { animation-duration: 1ms; }
}

/* Tema claro: el oscuro permanece como estado base sin alterar. */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #18191d;
  --paper: #18191d;
  --graphite: #f0f1f0;
  --accent: #3f8672;
  --accent-soft: #6b998b;
  --line: rgba(24, 25, 29, .14);
  scrollbar-color: rgba(63, 134, 114, .52) #eef0ef;
}

html[data-theme="light"]::-webkit-scrollbar-track { background: #eef0ef; }
html[data-theme="light"]::-webkit-scrollbar-thumb { border-color: #eef0ef; background: rgba(63,134,114,.48); }
html[data-theme="light"]::-webkit-scrollbar-thumb:hover { background: rgba(107,153,139,.78); }
html[data-theme="light"] body { background: #f2f6f4; color: var(--paper); }
html[data-theme="light"] .hero::after {
  background:
    radial-gradient(circle at 78% 48%, rgba(63,134,114,.2), transparent 38%),
    linear-gradient(90deg, rgba(242,246,244,.86) 0%, rgba(242,246,244,.68) 19%, rgba(242,246,244,.38) 34%, rgba(242,246,244,.08) 52%, transparent 76%);
}
html[data-theme="light"] .navigation a { color: rgba(24,25,29,.68); }
html[data-theme="light"] .navigation span { color: rgba(63,134,114,.78); }
html[data-theme="light"] .navigation a:hover, html[data-theme="light"] .navigation a:focus-visible { color: var(--paper); }
html[data-theme="light"] .primary-title { color: #101113; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
html[data-theme="light"] .secondary-title { color: #4b5155; }
html[data-theme="light"] .signature,
html[data-theme="light"] .bio,
html[data-theme="light"] .explore { color: rgba(24,25,29,.82); }
html[data-theme="light"] .tagline-value { color: rgba(24,25,29,.7); }
html[data-theme="light"] .divider { background: linear-gradient(90deg, rgba(63,134,114,.56), rgba(63,134,114,.24) 70%, transparent); }

html[data-theme="light"] .impact-section { border-top-color: rgba(63,134,114,.3); background: linear-gradient(135deg, rgba(204,226,216,.7), rgba(236,243,239,.66) 58%, rgba(242,246,244,.52)); }
html[data-theme="light"] .career-section { border-top-color: rgba(63,134,114,.28); background: linear-gradient(135deg, rgba(214,231,222,.66), rgba(238,244,240,.62) 58%, rgba(242,246,244,.5)); }
html[data-theme="light"] .projects-section { border-top-color: rgba(63,134,114,.24); background: linear-gradient(135deg, rgba(224,235,229,.7), rgba(241,245,242,.66) 58%, rgba(242,246,244,.54)); }
html[data-theme="light"] .contact-section { border-top-color: rgba(63,134,114,.3); background: linear-gradient(135deg, rgba(207,227,218,.7), rgba(237,244,240,.64) 58%, rgba(242,246,244,.52)); }
html[data-theme="light"] .impact-intro,
html[data-theme="light"] .career-header p,
html[data-theme="light"] .projects-intro,
html[data-theme="light"] .contact-intro { color: rgba(24,25,29,.68); }
html[data-theme="light"] .service-bar,
html[data-theme="light"] .service-card { border-color: rgba(63,134,114,.28); background: rgba(247,252,249,.76); }
html[data-theme="light"] .service-bar:hover,
html[data-theme="light"] .service-bar:focus-within,
html[data-theme="light"] .service-card:hover,
html[data-theme="light"] .service-card:focus-within { border-color: rgba(63,134,114,.7); background: rgba(255,255,255,.92); }
html[data-theme="light"] .service-bar__copy p,
html[data-theme="light"] .service-card__body p,
html[data-theme="light"] .service-card__top,
html[data-theme="light"] .service-bar__meta,
html[data-theme="light"] .service-tags li { color: rgba(24,25,29,.62); }
html[data-theme="light"] .service-tags,
html[data-theme="light"] .project-detail__bottom { border-top-color: rgba(63,134,114,.24); }
html[data-theme="light"] .career-track::before { background: rgba(63,134,114,.42); }
html[data-theme="light"] .career-entry__identity::after { border-color: #6b998b; background: #18191d; box-shadow: 0 0 0 4px rgba(63,134,114,.14), 0 0 14px rgba(63,134,114,.32); }
html[data-theme="light"] .career-entry p,
html[data-theme="light"] .project-detail__columns p { color: rgba(24,25,29,.74); }
html[data-theme="light"] .project-route { border-color: rgba(63,134,114,.42); box-shadow: 0 0 0 1px rgba(63,134,114,.12), 0 0 0 2rem rgba(63,134,114,.05); }
html[data-theme="light"] .project-route::after { border-color: rgba(63,134,114,.2); }
html[data-theme="light"] .project-card { border-color: rgba(63,134,114,.38); background: #dceae3; color: var(--paper); }
html[data-theme="light"] .project-card::before { background: radial-gradient(circle at 100% 0%, rgba(63,134,114,.16), transparent 45%); }
html[data-theme="light"] .project-card:hover,
html[data-theme="light"] .project-card:focus-visible { border-color: rgba(63,134,114,.78); background: #d2e4da; }
html[data-theme="light"] .project-card__number,
html[data-theme="light"] .project-card__type,
html[data-theme="light"] .project-card__line { color: rgba(24,25,29,.56); }
html[data-theme="light"] .project-card__line { border-top-color: rgba(63,134,114,.26); }
html[data-theme="light"] .project-detail,
html[data-theme="light"] .contact-form { border-color: rgba(63,134,114,.24); background: rgba(255,255,255,.9); }
html[data-theme="light"] .project-detail__columns span,
html[data-theme="light"] .project-detail__bottom span { color: #6b998b; }
html[data-theme="light"] .project-detail__bottom strong { color: rgba(24,25,29,.82); }
html[data-theme="light"] .project-controls button { border-color: rgba(63,134,114,.34); color: rgba(24,25,29,.72); }
html[data-theme="light"] .project-controls button:hover,
html[data-theme="light"] .project-controls button:focus-visible { border-color: rgba(63,134,114,.65); background: rgba(63,134,114,.12); color: var(--paper); }
html[data-theme="light"] .form-field input,
html[data-theme="light"] .form-field select,
html[data-theme="light"] .form-field textarea { border-bottom-color: rgba(63,134,114,.34); color: var(--paper); }
html[data-theme="light"] .form-field input::placeholder,
html[data-theme="light"] .form-field textarea::placeholder { color: rgba(24,25,29,.42); }
html[data-theme="light"] .form-field option { background: #fff; color: var(--paper); }
html[data-theme="light"] .contact-form.is-submitted { border-color: rgba(63,134,114,.55); }
html[data-theme="light"] .theme-toggle { color: rgba(63,134,114,.82); }
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .theme-toggle:focus-visible { color: var(--accent); }
