/* =========================================================
   Fran Pardillo · portfolio
   Colores con significado:
   naranja = idea suelta · azul = plan · verde = hecho / en marcha
   ========================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../assets/fonts/bricolage-grotesque.woff2") format("woff2-variations"),
       url("../assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/instrument-sans.woff2") format("woff2-variations"),
       url("../assets/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --muted: #555866;
  --fog: #eef0f6;
  --line: #d6d9e3;
  --orange: #ff6b1a;
  --blue: #2a3cf5;
  --blue-deep: #1d2bc4;
  --green: #16c47f;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --focus: var(--blue);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 10vw, 8.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--display); margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: 84rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem/1 var(--text);
  padding: .95rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--blue); border-color: var(--blue); }
.btn--small { padding: .6rem 1rem; font-size: .9375rem; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: .75rem var(--gutter);
  background: rgb(255 255 255 / .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__name { font: 700 1.2rem/1 var(--display); text-decoration: none; letter-spacing: -.01em; }
.topbar__nav { display: flex; gap: 1.5rem; margin-left: auto; font-size: .9375rem; }
.topbar__nav a { text-decoration: none; color: var(--muted); }
.topbar__nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 720px) {
  .topbar__nav { display: none; }
  .topbar .btn { margin-left: auto; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: var(--section); }

.hero__title {
  font-size: clamp(3.1rem, 10.5vw, 8.5rem);
  font-weight: 760;
  font-stretch: 88%;
  line-height: .92;
  letter-spacing: -.04em;
  max-width: 12ch;
}
.hero__face {
  display: inline-block;
  width: .95em; height: .95em;
  margin: 0 .04em;
  vertical-align: -.1em;
  border-radius: 38% 62% 55% 45% / 48% 42% 58% 52%;
  object-fit: cover;
  transform: rotate(-5deg);
  box-shadow: 0 0 0 .06em var(--paper), 0 0 0 calc(.06em + 3px) var(--orange);
}
.hero__lead {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 30ch;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- Tablero interactivo ---------- */
.board {
  position: relative;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  height: clamp(440px, 42vw, 560px);
  background: var(--fog);
  border-radius: 28px;
  overflow: hidden;
  --t: 0;
}
@media (max-width: 640px) { .board { height: 620px; border-radius: 20px; } }

.board__grid, .board__lanes, .board__notes { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }

.board__grid span {
  position: absolute; top: 0; bottom: 0; width: 0;
  border-left: 1px dashed #b9bfd3;
  opacity: var(--t);
}
.board__lanes li {
  position: absolute;
  font: 600 .875rem/1 var(--display);
  color: var(--muted);
  opacity: var(--t);
  white-space: nowrap;
}
.board__lanes li::after {
  content: ""; position: absolute; left: 0; height: 1px; background: #c9cedd;
  width: var(--lane-w, 0); top: var(--lane-line, 0);
}

.note {
  position: absolute; top: 0; left: 0;
  will-change: transform;
}
.note__inner {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 10px;
  background: var(--orange);
  background: color-mix(in oklab, var(--to, var(--blue)) calc(var(--nt, 0) * 100%), var(--orange));
  box-shadow: 0 calc((1 - var(--nt, 0)) * 10px) calc((1 - var(--nt, 0)) * 22px) rgb(20 20 60 / calc((1 - var(--nt, 0)) * .18));
  animation: drop .7s cubic-bezier(.2, .9, .3, 1.2) both;
  animation-delay: calc(var(--i) * 70ms + 250ms);
}
.note--done .note__inner { --to: var(--green); }

.note__txt {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: .55rem .8rem;
  font-family: var(--display);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.note__txt--idea { font-size: clamp(.95rem, 1.35vw, 1.1rem); color: var(--ink); }
.note__txt--plan { font-size: clamp(.8125rem, 1.1vw, 1rem); color: var(--paper); opacity: 0; }
.note--done .note__txt--plan { color: var(--ink); }
.note--done .note__txt--plan::before {
  content: ""; flex: none; width: .6em; height: .6em; margin-right: .45em;
  background: var(--ink); transform: rotate(45deg);
}

@keyframes drop {
  from { opacity: 0; transform: translateY(-40px) scale(.94); }
  to { opacity: 1; transform: none; }
}

/* ---------- Control del tablero ---------- */
.organizer {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .75rem 1rem;
  margin-top: 1.25rem;
}
.organizer__label { font: 600 .9375rem/1 var(--display); }
.organizer__label:first-child { color: var(--orange); filter: brightness(.82); }
.organizer__label--end { color: var(--blue); }

.organizer__range {
  --p: 0%;
  flex: 1 1 14rem;
  appearance: none; -webkit-appearance: none;
  height: 36px; background: transparent; cursor: grab; margin: 0;
}
.organizer__range:active { cursor: grabbing; }
.organizer__range::-webkit-slider-runnable-track {
  height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, var(--orange), var(--blue)) 0 0 / var(--p) 100% no-repeat, var(--line);
}
.organizer__range::-moz-range-track { height: 8px; border-radius: 99px; background: var(--line); }
.organizer__range::-moz-range-progress { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--orange), var(--blue)); }
.organizer__range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--ink);
  box-shadow: 0 2px 8px rgb(0 0 0 / .18);
}
.organizer__range::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink);
}
.organizer__range:focus-visible { outline: none; }
.organizer__range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--blue); outline-offset: 3px; }
.organizer__range:focus-visible::-moz-range-thumb { outline: 3px solid var(--blue); outline-offset: 3px; }

.organizer__auto {
  font: 600 .9375rem/1 var(--text);
  padding: .7rem 1.1rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.organizer__auto:hover { background: var(--ink); color: var(--paper); }

.organizer__hint { margin: .75rem 0 0; color: var(--muted); font-size: .9375rem; transition: opacity .4s; }
.organizer__hint.is-done { opacity: 0; }

@media (max-width: 640px) {
  .organizer__range { order: 3; flex-basis: 100%; }
  .organizer__label--end { margin-left: auto; }
  .organizer__auto { order: 4; }
}

/* =========================================================
   AHORA · Twotimes Games
   ========================================================= */
.now {
  --focus: var(--orange);
  background: var(--blue);
  color: var(--paper);
  padding-block: var(--section);
  overflow: hidden;
}
.now__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.now__title {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-stretch: 90%;
  line-height: .98;
  letter-spacing: -.035em;
  max-width: 14ch;
  margin-bottom: 1.5rem;
}
.now__lead { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.45; max-width: 34ch; }
.now__text > p { max-width: 58ch; }
.now__text strong { font-weight: 650; }
.now__subtitle { font-size: 1.25rem; margin: 2.25rem 0 .75rem; }
.now__list { list-style: none; margin: 0; padding: 0; max-width: 56ch; }
.now__list li {
  padding: .9rem 0 .9rem 1.6rem;
  border-top: 1px solid rgb(255 255 255 / .28);
  position: relative;
}
.now__list li::before {
  content: ""; position: absolute; left: 0; top: 1.4rem;
  width: .65rem; height: .65rem; border-radius: 3px; background: var(--orange);
}

.milestone { position: relative; }
.milestone__logo {
  width: min(78%, 320px);
  margin: 0 auto -3.2rem;
  position: relative; z-index: 1;
  transform: rotate(-6deg);
  filter: drop-shadow(0 18px 30px rgb(0 0 40 / .35));
}
.milestone__card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 24px;
  padding: 4.5rem 2rem 2rem;
}
.milestone__status {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--ink); color: var(--paper);
  font-size: .875rem; font-weight: 600;
  padding: .4rem .8rem .4rem .6rem; border-radius: 99px;
}
.pulse { width: .6rem; height: .6rem; border-radius: 50%; background: var(--green); position: relative; }
.milestone__status { background: var(--green); color: var(--ink); }
.milestone__status .pulse, .milestone__status .pulse::after { background: var(--ink); }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--green); animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { to { transform: scale(2.8); opacity: 0; } }
.milestone__title { font: 750 clamp(1.9rem, 3.2vw, 2.6rem)/1 var(--display); letter-spacing: -.03em; margin: 1rem 0 .75rem; }
.milestone__text { margin: 0; max-width: 40ch; }

@media (max-width: 860px) {
  .now__grid { grid-template-columns: 1fr; }
  .milestone { max-width: 460px; }
}

/* =========================================================
   TRAYECTORIA
   ========================================================= */
.career { padding-block: var(--section); }

.section-title {
  font-size: clamp(2.3rem, 5.2vw, 4.2rem);
  font-stretch: 90%;
  line-height: .98;
  letter-spacing: -.035em;
  max-width: 16ch;
}
.section-lead {
  margin-top: 1.25rem;
  max-width: 50ch;
  font-size: clamp(1.125rem, 1.8vw, 1.3rem);
  line-height: 1.5;
  color: #22242c;
}

.ledger {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0; margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  border-top: 2px solid var(--ink);
}
.ledger__item {
  display: flex; flex-direction: column-reverse; justify-content: flex-end;
  padding: 1.25rem 1.25rem 0 0;
}
.ledger__item + .ledger__item { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.ledger dd {
  margin: 0;
  font: 720 clamp(2.4rem, 4.4vw, 3.6rem)/1 var(--display);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.ledger dt { margin-top: .5rem; font-size: .9375rem; color: var(--muted); max-width: 22ch; line-height: 1.4; }
@media (max-width: 760px) {
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger__item:nth-child(3) { padding-left: 0; border-left: 0; }
  .ledger__item { padding-bottom: 1.25rem; }
  .ledger__item:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Escalera ---------- */
.stairs__help { margin: clamp(3rem, 6vw, 5rem) 0 1rem; color: var(--muted); font-size: .9375rem; }

.stairs {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end; gap: 6px;
  border-bottom: 3px solid var(--ink);
}
.step {
  --h: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: calc(84px + var(--h) * 44px);
  padding: .9rem 1rem;
  text-align: left;
  font: inherit; color: var(--ink);
  background: var(--fog);
  border: 0; border-radius: 14px 14px 0 0;
  cursor: pointer;
  transition: background-color .25s, color .25s;
}
.step[data-step="2"] { --h: 2; }
.step[data-step="3"] { --h: 3; }
.step[data-step="4"] { --h: 4; }
.step[data-step="5"] { --h: 5; }
.step:hover { background: #dfe3f0; }
.step[aria-selected="true"] { background: var(--blue); color: var(--paper); }
.step__n { font: 700 .875rem/1 var(--display); opacity: .65; }
.step__role { font: 680 clamp(1rem, 1.6vw, 1.25rem)/1.1 var(--display); letter-spacing: -.015em; margin-top: .4rem; }
.step__date { margin-top: auto; padding-top: .75rem; font-size: .875rem; opacity: .75; }

@media (max-width: 700px) {
  .stairs { grid-template-columns: 1fr; border-bottom: 0; border-left: 3px solid var(--ink); gap: 5px; }
  .step {
    min-height: 0;
    width: calc(66% + (var(--h) - 1) * 8.5%);
    flex-direction: row; align-items: baseline; gap: .6rem; flex-wrap: nowrap;
    border-radius: 0 12px 12px 0;
    padding: .8rem 1rem;
  }
  .step__role { margin-top: 0; min-width: 0; font-size: 1rem; }
  .step__date { margin: 0 0 0 auto; padding: 0; }
  .stairs .step:nth-child(1) { order: 5; }
  .stairs .step:nth-child(2) { order: 4; }
  .stairs .step:nth-child(3) { order: 3; }
  .stairs .step:nth-child(4) { order: 2; }
  .stairs .step:nth-child(5) { order: 1; }
}

.panel {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
  padding-top: 2rem;
  animation: panel-in .35s ease-out;
}
.panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel__head h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.03em; line-height: 1.02; }
.panel__when { color: var(--muted); margin-top: .5rem; }
.panel__lead { font-size: 1.1875rem; line-height: 1.5; max-width: 52ch; }
.panel__wins h4 { font-size: 1.0625rem; margin: 1.5rem 0 .5rem; }
.panel__wins ul { list-style: none; padding: 0; margin: 0; max-width: 58ch; }
.panel__wins li { position: relative; padding: .35rem 0 .35rem 1.9rem; }
.panel__wins li::before {
  content: ""; position: absolute; left: 0; top: .6rem;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.5L12 5.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.panel__clients { margin: 1.5rem 0 0; font-size: .9375rem; color: var(--muted); }
@media (max-width: 760px) { .panel { grid-template-columns: 1fr; } }

/* =========================================================
   PROYECTOS PROPIOS
   ========================================================= */
.side { padding-block: 0 var(--section); }
.side__grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
.project { padding: clamp(1.75rem, 3.5vw, 2.75rem); }
.project p { max-width: 56ch; }
.project__when { font-size: .9375rem; margin-bottom: .75rem; }
.project__name { font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: -.035em; line-height: 1; }
.project__role { font-weight: 600; margin: .5rem 0 1.25rem; }

.project--secta { background: var(--orange); border-radius: 24px; }
.project--ginger { border: 2px solid var(--ink); border-radius: 6px; margin-top: clamp(0rem, 6vw, 5rem); }
.project--ginger .project__when { color: var(--muted); }
.project--ginger .project__name { color: var(--blue); }

.figures {
  list-style: none; padding: 0; margin: 1.75rem 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}
.figures li { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid rgb(0 0 0 / .25); line-height: 1.3; }
.figures li:nth-child(even) { padding-left: 1rem; border-left: 1px solid rgb(0 0 0 / .25); }
.figures__n { display: block; font: 720 clamp(1.9rem, 3.4vw, 2.6rem)/1.05 var(--display); letter-spacing: -.035em; }
.project__note { margin: 0; font-weight: 600; }

@media (max-width: 860px) {
  .side__grid { grid-template-columns: 1fr; }
  .project--ginger { margin-top: 0; }
}

/* =========================================================
   ESTUDIOS
   ========================================================= */
.study { padding-block: var(--section); background: var(--fog); }
.study__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.study__langs { margin-top: 2rem; max-width: 40ch; }
.study__list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.study__list li {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line); line-height: 1.45;
}
.study__list strong { font-weight: 650; }
.study__year { font: 700 1.125rem/1.35 var(--display); color: var(--blue); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .study__grid { grid-template-columns: 1fr; } }

/* =========================================================
   CONTACTO
   ========================================================= */
.contact { --focus: var(--orange); background: var(--ink); color: var(--paper); padding-block: var(--section); }
.contact__title {
  font-size: clamp(2.6rem, 7.5vw, 6.2rem);
  font-stretch: 92%;
  line-height: .98;
  letter-spacing: -.03em;
  max-width: 15ch;
}
.contact__lead { margin-top: 1.5rem; font-size: clamp(1.125rem, 2vw, 1.35rem); max-width: 44ch; color: #d9dae0; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; }
.btn--big {
  background: var(--orange); border-color: var(--orange); color: var(--ink);
  font-size: clamp(1rem, 2.2vw, 1.3rem); padding: 1.1rem 1.6rem;
  word-break: break-all;
}
.btn--big:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--ghost { background: transparent; border-color: rgb(255 255 255 / .5); color: var(--paper); }
.btn--ghost:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.contact__links { list-style: none; display: flex; flex-wrap: wrap; gap: .75rem 2rem; padding: 0; margin: 2.5rem 0 0; color: #d9dae0; }
.contact__links a { color: var(--paper); }

/* ---------- Pie ---------- */
.footer { background: var(--ink); color: #9a9ca6; border-top: 1px solid #2a2b30; font-size: .9375rem; }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.footer p { margin: 0; }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 90;
  transform: translate(-50%, 150%);
  background: var(--paper); color: var(--ink);
  padding: .8rem 1.2rem .8rem 1rem; border-radius: 99px;
  font-weight: 600; box-shadow: 0 10px 30px rgb(0 0 0 / .25);
  display: flex; align-items: center; gap: .6rem;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.1);
}
.toast::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--green); }
.toast.is-visible { transform: translate(-50%, 0); }
.toast:empty { display: none; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
