@font-face { font-family: "Satoshi"; src: url("fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("fonts/satoshi-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("fonts/satoshi-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("fonts/satoshi-900.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --outer: #ddd2bc;
  --bg: #f3ede0;
  --panel: #e8dfce;
  --avena: #d7c9b1;
  --line: #cdbfa6;
  --ink: #1d2a34;
  --ink-2: #4a5864;
  --slate: #3a5f7a;
  --slate-deep: #2b475b;
  --slate-ink: #1f3544;
  --terra: #c15c3d;
  --terra-deep: #9c4328;
  --terra-soft: #eda285;
  --cream: #f7f2e8;
  --gutter: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--outer); color: var(--ink); font: 400 1.0625rem/1.7 "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul, dl, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--terra-soft); outline-offset: 3px; border-radius: 4px; }
.frame { width: min(1240px, 100% - var(--gutter) * 2); margin-inline: auto; padding-bottom: 12px; }

/* NAV PILL */
.pill { position: sticky; top: 10px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 58px; margin-top: 10px; padding: 0 8px 0 20px; border-radius: 999px; background: rgb(31 53 68 / 0.9); backdrop-filter: blur(10px); border: 1px solid rgb(247 242 232 / 0.14); color: var(--cream); }
.pill__name { font-weight: 700; text-decoration: none; white-space: nowrap; }
.pill__links { display: none; gap: 26px; font-size: 0.95rem; font-weight: 500; }
.pill__links a { text-decoration: none; opacity: 0.8; }
.pill__links a:hover, .pill__links a.is-current { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--terra-soft); }
.pill__end { display: flex; align-items: center; gap: 8px; }
.pill__cta { display: none; padding: 10px 20px; border-radius: 999px; background: var(--cream); color: var(--slate-ink); font-weight: 700; font-size: 0.92rem; text-decoration: none; }
.pill__cta:hover { background: var(--terra-soft); }
.lang { display: flex; border: 1px solid rgb(247 242 232 / 0.25); border-radius: 999px; overflow: hidden; }
.lang button { font: 500 0.82rem/1 "Satoshi", sans-serif; color: var(--cream); background: none; border: 0; padding: 9px 12px; cursor: pointer; opacity: 0.8; }
.lang button[aria-pressed="true"] { background: var(--cream); color: var(--slate-ink); opacity: 1; }

/* HERO */
.hero { position: relative; margin-top: -68px; padding: 104px 22px 56px; border-radius: 28px; overflow: hidden; color: var(--cream); background: radial-gradient(60% 50% at 82% 18%, rgb(193 92 61 / 0.38), transparent 70%), linear-gradient(140deg, var(--slate-ink) 0%, var(--slate-deep) 55%, var(--slate) 120%); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(247 242 232 / 0.09) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.hero__grid { position: relative; display: grid; gap: 44px; align-items: center; }
.chip { display: inline-block; padding: 7px 15px; border-radius: 999px; background: rgb(247 242 232 / 0.1); border: 1px solid rgb(247 242 232 / 0.22); font-size: 0.9rem; font-weight: 500; margin-bottom: 22px; }
h1 { font-weight: 700; font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1.1; letter-spacing: -0.01em; }
h1 em { font-style: normal; color: var(--terra-soft); }
.lead { margin-top: 22px; max-width: 48ch; font-size: clamp(1.08rem, 2.2vw, 1.22rem); line-height: 1.6; color: rgb(247 242 232 / 0.82); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 0.97rem; text-decoration: none; border: 1.5px solid transparent; transition: background 0.15s, color 0.15s, transform 0.15s; }
button.btn { font-family: inherit; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn--go { background: var(--terra-deep); color: var(--cream); padding-right: 8px; }
.btn--go i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cream); color: var(--terra-deep); font-style: normal; transition: transform 0.2s; }
.btn--go:hover i { transform: translateX(3px); }
.btn--go:hover { background: #b24f31; }
.btn--ghost { background: none; border-color: rgb(247 242 232 / 0.45); color: var(--cream); }
.btn--ghost:hover { background: var(--cream); color: var(--slate-ink); }
.btn--dark { background: var(--slate-deep); }
.btn--dark i { color: var(--slate-deep); }
.btn--dark-solid { background: var(--slate-ink); color: var(--cream); }
.btn--dark-solid:hover { background: #162733; }

.hero__links { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 34px; }
.hero__links a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgb(247 242 232 / 0.08); border: 1px solid rgb(247 242 232 / 0.18); font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.hero__links a:hover { background: rgb(247 242 232 / 0.2); }

.hero__art { position: relative; width: min(100%, 380px); justify-self: center; padding: 18px 0 6px; }
.disc { position: absolute; width: 78%; aspect-ratio: 1; right: -4%; top: 0; border-radius: 50%; background: var(--terra); opacity: 0.92; }
.arch { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: 999px 999px 22px 22px; background: #8a8a8a; }
.badge { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 16px; background: rgb(31 53 68 / 0.55); backdrop-filter: blur(10px); border: 1px solid rgb(247 242 232 / 0.25); font-size: 0.9rem; font-weight: 500; }
.badge b { font-size: 1.3rem; font-weight: 700; line-height: 1; }
.badge--a { left: -6px; bottom: 22%; }
.badge--b { right: -4px; top: 6%; font-size: 0.82rem; }
.spin { position: absolute; right: -6px; bottom: 6px; width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; background: var(--slate-ink); border: 1px solid rgb(247 242 232 / 0.3); text-decoration: none; }
.spin svg { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); animation: turn 18s linear infinite; }
.spin text { font: 700 11px "Satoshi", sans-serif; fill: var(--cream); letter-spacing: 1.2px; }
.spin i { font-style: normal; font-size: 1.4rem; color: var(--terra-soft); transition: transform 0.2s; }
.spin:hover i { transform: translateY(3px); }
@keyframes turn { to { transform: rotate(360deg); } }

/* VALUE BAR (overlaps hero) */
.bar { position: relative; z-index: 2; display: grid; gap: 22px; margin: -28px 14px 0; padding: 26px 24px; border-radius: 24px; background: var(--ink); color: var(--cream); }
.bar h2 { font-weight: 700; font-size: 1.5rem; line-height: 1.2; margin-bottom: 8px; }
.bar p { font-size: 0.97rem; line-height: 1.55; color: rgb(247 242 232 / 0.78); }
.bar a { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 0.95rem; color: var(--terra-soft); text-decoration: none; }
.bar a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar article + article { padding-top: 22px; border-top: 1px solid rgb(247 242 232 / 0.16); }

/* SHEET (light panel) */
.sheet { margin-top: -26px; padding: 52px 20px 56px; border-radius: 28px; background: var(--bg); }
.kicker { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 700; color: var(--terra-deep); margin-bottom: 12px; }
.kicker::before { content: ""; width: 9px; height: 9px; background: var(--terra); transform: rotate(45deg); }
.kicker--light { color: var(--terra-soft); }
.kicker--light::before { background: var(--terra-soft); }
h2 { font-weight: 700; }
.block__title { font-size: clamp(1.9rem, 4.6vw, 2.6rem); line-height: 1.15; margin-bottom: 30px; }


.about { position: relative; display: grid; grid-template-columns: 1fr; align-items: start; }
.about__photo { grid-area: 1 / 1; justify-self: end; width: 80%; max-width: 380px; pointer-events: none; }
.about__photo img { display: block; width: 100%; height: auto; }
.about .kicker { grid-area: 1 / 1; align-self: start; width: 46%; margin-bottom: 0; position: relative; z-index: 2; }
.about h2 { grid-area: 1 / 1; align-self: start; width: 46%; margin-top: 34px; font-size: clamp(1.55rem, 6.4vw, 2rem); line-height: 1.15; position: relative; z-index: 2; }
.about__text { display: contents; }
.about__text > p:not(.kicker) { grid-column: 1; grid-row: 2; margin-top: 26px; color: var(--ink-2); max-width: 58ch; }
.about .facts { grid-column: 1; grid-row: 3; display: grid; gap: 8px; margin: 22px 0 0; }
.about .facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.about .facts span { font-size: 0.82rem; color: var(--ink-2); }
.about .facts b { font-weight: 700; font-size: 0.92rem; text-align: right; }
.about .btn { grid-column: 1; grid-row: 4; justify-self: start; margin-top: 24px; }

/* MARQUEE */
.marquee { display: flex; overflow: hidden; margin: 56px -20px 0; padding: 18px 0; background: var(--avena); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; flex: none; gap: 12px; padding-right: 12px; animation: scroll 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track li { white-space: nowrap; padding: 8px 18px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-weight: 500; font-size: 0.97rem; }
.marquee__track li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: var(--terra); }
@keyframes scroll { to { transform: translateX(-100%); } }

/* STORY: chapters pile up as you scroll (only when they fit the screen) */
.block { padding-top: 64px; }
.stack { --base: 84px; --step: 20px; display: grid; gap: 18px; }
.slide { display: grid; grid-template-columns: 1fr; column-gap: 44px; padding: 26px 22px 30px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); }
.slide__when { font-size: 1rem; font-weight: 700; color: var(--terra-deep); margin-bottom: 12px; }
.slide h3 { font-weight: 700; font-size: clamp(1.4rem, 3.2vw, 1.75rem); line-height: 1.22; margin-bottom: 12px; }
.slide p { color: var(--ink-2); max-width: 64ch; }
.slide .chips { margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; font-weight: 500; background: var(--bg); }
.slide--2, .slide--4, .slide--5 { color: var(--cream); border-color: transparent; }
.slide--2 { background: var(--slate-deep); }
.slide--4 { background: var(--ink); }
.slide--5 { background: var(--terra-deep); }
.slide--2 p, .slide--4 p, .slide--5 p { color: rgb(247 242 232 / 0.84); }
.slide--2 .slide__when, .slide--4 .slide__when { color: var(--terra-soft); }
.slide--5 .slide__when { color: var(--cream); }
.slide--2 .chips li, .slide--4 .chips li, .slide--5 .chips li { background: rgb(247 242 232 / 0.12); border-color: rgb(247 242 232 / 0.3); color: var(--cream); }
.stack-on { gap: 32px; }
.stack-on .slide { position: sticky; top: calc(var(--base) + var(--i) * var(--step)); box-shadow: 0 -10px 24px -12px rgb(29 42 52 / 0.3); }

/* HELP (slate panel) */
.help { display: grid; gap: 30px; margin-top: 12px; padding: 52px 20px; border-radius: 28px; color: var(--cream); background: linear-gradient(150deg, var(--slate-ink), var(--slate-deep)); }
.help__intro h2 { font-size: clamp(1.9rem, 4.6vw, 2.6rem); line-height: 1.15; margin-bottom: 14px; }
.help__intro p:not(.kicker) { color: rgb(247 242 232 / 0.78); max-width: 44ch; }
.projects { border-top: 1px solid rgb(247 242 232 / 0.3); }
.proj { border-bottom: 1px solid rgb(247 242 232 / 0.2); }
.proj summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 2px; cursor: pointer; list-style: none; }
.proj summary::-webkit-details-marker { display: none; }
.proj summary::after { content: "+"; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgb(247 242 232 / 0.4); border-radius: 50%; font-size: 1.3rem; line-height: 1; transition: background 0.2s, color 0.2s; }
.proj[open] summary::after { content: "\2212"; background: var(--terra-soft); border-color: var(--terra-soft); color: var(--slate-ink); }
.proj summary:hover .proj__problem { color: var(--terra-soft); }
.proj__problem { font-weight: 700; font-size: 1.2rem; line-height: 1.3; transition: color 0.15s; }
.proj__body { padding: 0 2px 26px; max-width: 62ch; animation: open 0.25s ease; }
.proj__body p { color: rgb(247 242 232 / 0.8); }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags li { font-size: 0.85rem; font-weight: 500; border: 1px solid rgb(247 242 232 / 0.3); background: rgb(247 242 232 / 0.08); border-radius: 999px; padding: 3px 11px; }

/* SKILLS */
.skillsec { position: relative; overflow: hidden; margin-top: 12px; padding: 56px 20px; border-radius: 28px; background: var(--bg); }
.skills { display: grid; gap: 28px; }
.skills h3 { font-size: 0.95rem; font-weight: 700; color: var(--terra-deep); margin-bottom: 12px; }

/* CLOSING */
.closing { display: grid; gap: 34px; margin-top: 12px; padding: 52px 22px; border-radius: 28px; color: var(--cream); background: radial-gradient(70% 90% at 100% 0%, rgb(237 162 133 / 0.35), transparent 65%), var(--terra-deep); }
.closing h2 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.1; margin-bottom: 14px; }
.closing p { max-width: 40ch; margin-bottom: 26px; }
.closing__list { border-top: 1px solid rgb(247 242 232 / 0.35); align-self: center; }
.closing__list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid rgb(247 242 232 / 0.35); }
.closing__list span { grid-column: 1 / -1; font-size: 0.85rem; opacity: 0.85; }
.closing__list a { font-weight: 700; font-size: 1.15rem; text-decoration: none; overflow-wrap: anywhere; }
.closing__list a:hover { text-decoration: underline; text-underline-offset: 5px; }
.copy { font: 500 0.82rem/1 "Satoshi", sans-serif; background: none; border: 1px solid rgb(247 242 232 / 0.45); color: var(--cream); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.copy:hover { background: var(--cream); color: var(--terra-deep); }

.foot a { text-underline-offset: 3px; }
.foot a:hover { color: var(--terra-deep); }
.foot { padding: 26px 8px 18px; font-size: 0.88rem; color: var(--ink-2); }

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn--go i, .spin i, .proj summary::after, .copy { transition: none; }
  .btn:hover { transform: none; }
  .spin svg { animation: none; }
  .marquee { flex-wrap: wrap; mask-image: none; }
  .marquee__track { animation: none; flex-wrap: wrap; }
  .marquee__track[aria-hidden="true"] { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .proj__body { animation: none; }
}

@media (max-width: 759px) {
  .stack { --base: 78px; --step: 12px; }
  .slide { padding: 20px 18px 24px; }
  .slide p { font-size: 0.95rem; line-height: 1.55; }
  .slide h3 { font-size: 1.3rem; margin-bottom: 10px; }
  .slide .chips { display: none; }
}


@media (min-width: 760px) {
  :root { --gutter: 20px; }
  .pill__cta { display: inline-block; }
  .hero { padding: 120px 44px 70px; margin-top: -68px; }
  .bar { grid-template-columns: repeat(3, 1fr); gap: 36px; margin: -34px 36px 0; padding: 32px 36px; }
  .bar article + article { padding-top: 0; border-top: 0; padding-left: 36px; border-left: 1px solid rgb(247 242 232 / 0.16); }
  .sheet { padding: 72px 44px 72px; margin-top: -30px; }
  .marquee { margin-inline: -44px; }
  .slide { grid-template-columns: 190px 1fr; padding: 40px 44px 44px; }
  .slide__when { grid-column: 1; grid-row: 1 / span 3; font-size: 1.15rem; margin: 2px 0 0; }
  .slide > :not(.slide__when) { grid-column: 2; }
      .skills { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; }
  .help, .skillsec, .closing { padding: 68px 44px; }
}

@media (min-width: 980px) {
  .about { display: block; min-height: 720px; }
  .about__photo { position: absolute; right: 0; top: 0; bottom: 0; width: 54%; max-width: none; }
  .about__photo img { position: absolute; right: 0; bottom: 0; height: 100%; width: auto; max-width: 100%; }
  .about__text { display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; width: 58%; min-height: 720px; }
  .about .kicker, .about h2 { width: auto; }
  .about h2 { margin-top: 0; font-size: clamp(2rem, 3.4vw, 2.9rem); margin-bottom: 18px; }
  .about .facts { grid-template-columns: 1fr; max-width: 420px; }
  .about .btn { align-self: flex-start; }
  .pill__links { display: flex; }
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 40px; }
  .hero__art { width: 100%; max-width: 430px; justify-self: end; }
  .help { grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
  .help__intro { position: sticky; top: 100px; }
  .closing { grid-template-columns: 1fr 1fr; gap: 64px; }
}

.skillsec > :not(.skillsec__fig) { position: relative; z-index: 1; }
.skillsec__fig { display: none; position: absolute; right: -2%; bottom: 0; width: min(34%, 400px); height: auto; pointer-events: none; }
@media (min-width: 980px) {
  .skillsec__fig { display: block; }
  .skillsec .skills { max-width: 62%; }
}

/* CV viewer */
.btn--solid { background: var(--terra-deep); color: var(--cream); padding: 10px 18px; font-size: 0.92rem; }
.btn--solid:hover { background: #b24f31; }
.cv { width: min(1100px, 96vw); height: min(92vh, 1100px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); overflow: hidden; }
.cv[open] { display: flex; flex-direction: column; }
.cv::backdrop { background: rgb(20 32 40 / 0.74); backdrop-filter: blur(4px); }
.cv__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.cv__title { font-size: 1.02rem; font-weight: 700; }
.cv__actions { display: flex; align-items: center; gap: 8px; }
.cv__close { width: 42px; height: 42px; display: grid; place-items: center; border: 1.5px solid var(--slate-deep); border-radius: 50%; background: none; color: var(--slate-deep); font: 700 1rem/1 "Satoshi", sans-serif; cursor: pointer; }
.cv__close:hover { background: var(--slate-deep); color: var(--cream); }
.cv__pages { flex: 1; overflow: auto; padding: 18px 14px 28px; background: #cbbfa8; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.cv__pages canvas { display: block; margin: 0 auto 16px; max-width: none; height: auto; background: #fff; box-shadow: 0 6px 24px rgb(29 42 52 / 0.28); border-radius: 3px; cursor: zoom-in; }
.cv__zoom { display: flex; align-items: center; border: 1.5px solid var(--slate-deep); border-radius: 999px; overflow: hidden; }
.cv__zoom button { height: 38px; min-width: 38px; padding: 0 10px; background: none; border: 0; color: var(--slate-deep); font: 700 1.15rem/1 "Satoshi", sans-serif; cursor: pointer; }
.cv__zoom button:hover { background: var(--slate-deep); color: var(--cream); }
.cv__zoom .cv__pct { min-width: 58px; font-size: 0.82rem; border-inline: 1px solid var(--line); }
.cv__msg { color: var(--ink-2); padding: 24px 8px; text-align: center; }
.cv__msg a { color: var(--terra-deep); font-weight: 700; }
.btn--solid { white-space: nowrap; }
.cv__bar > * { min-width: 0; }
@media (max-width: 560px) {
  .cv { width: 100vw; height: 100dvh; border-radius: 0; }
  .cv__pages { padding: 12px 8px 20px; }
  .cv__title { display: none; }
  .cv__bar { padding: 8px 10px; justify-content: flex-end; }
  .cv__actions { gap: 6px; width: 100%; justify-content: space-between; }
  .cv__zoom button { min-width: 36px; padding: 0 8px; height: 40px; }
  .cv__zoom .cv__pct { min-width: 52px; }
  .btn--solid { padding: 10px 14px; font-size: 0.85rem; }
  .cv__close { width: 40px; height: 40px; flex: none; }
}

/* Avoid a flash of English while the Spanish text is applied */
.pre-es body { visibility: hidden; }
