/* Fuentes alojadas en el dominio: sin peticiones a Google Fonts */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/space-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/space-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/space-mono-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/space-mono-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Identidad mblanco — familia Hermes amable: cobalto, amarillo sol, papel suave; verde para datos vivos */

:root {
  --blue: #3d4fe0;
  --blue-soft: #7c89ec;
  --blue-mist: #c3c9f7;
  --grey: #e9ebfa;
  --acid: #ffd84d;
  --paper: #f7f7f2;
  --fg: #f2f3fb;
  --ink: #23284a;
  --live: #2f9e63;
  --frame: clamp(10px, 1.4vw, 18px);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--blue);
  color: var(--ink);
  font-family: "Space Mono", "Courier New", monospace;
}

.mono {
  font-family: "Space Mono", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.display {
  font-family: "Bricolage Grotesque", "Arial Black", sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-weight: 800;
}

a { color: var(--blue); }
a:hover { color: #2735b0; }

/* Marco fijo azul alrededor del viewport, como el de Hermes */
.frame {
  position: fixed;
  inset: 0;
  border: var(--frame) solid var(--blue);
  pointer-events: none;
  z-index: 100;
}

.page {
  position: relative;
  min-height: 100vh;
  margin: var(--frame);
  background: var(--paper);
  padding: clamp(18px, 3vw, 40px) clamp(18px, 3.5vw, 48px) 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 205px 205px;
}

/* Cabecera */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
  position: relative;
  z-index: 1;
}

.wordmark {
  text-decoration: none;
  font-family: "Bricolage Grotesque", "Arial Black", sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-weight: 800;
  font-size: clamp(20px, 2vw, 26px);
  color: var(--blue);
  display: inline-grid;
  overflow: hidden;
  line-height: 1.15;
}
.wm-face {
  grid-area: 1 / 1;
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}
.wm-alt { transform: translateY(100%); }
.wordmark:hover .wm-face,
.wordmark:focus-visible .wm-face { transform: translateY(-100%); }
.wordmark:hover .wm-alt,
.wordmark:focus-visible .wm-alt { transform: translateY(0); }

.nav { display: flex; gap: clamp(14px, 2vw, 28px); font-size: 11px; align-items: center; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.cta-chip { background: var(--acid); color: #2735b0; padding: 6px 14px; }
.cta-chip:hover { background: #ffe985; color: #2735b0; }

/* Foco de teclado */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.cell.acid :focus-visible { outline-color: var(--ink); }

/* Bento */
.bento {
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.cell {
  border: 2px solid var(--blue);
  background: var(--paper);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.cell:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 0 var(--blue);
}

.cell.blue { background: var(--blue); color: var(--fg); }
.cell.acid { background: var(--acid); color: var(--blue); }

.label { font-size: 10px; font-weight: 400; margin: 0; color: var(--blue); }
.cell.blue .label.accent { color: var(--acid); }
.cell.acid .label { color: #2735b0; }
.value { font-size: 13px; line-height: 1.6; margin: 0; text-transform: none; letter-spacing: 0; }
.small { font-size: 11px; margin: 0; }
.dim { color: #aab3f5; }
.cell.blue .dim { color: #aab3f5; }
.accent { color: var(--acid); }

/* Hero */
.hero {
  grid-column: span 8;
  grid-row: span 2;
  min-height: 420px;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  margin: 0;
  font-size: clamp(48px, 8.5vw, 110px);
  line-height: 0.92;
  text-wrap: balance;
  color: var(--blue);
}

.role {
  margin: 12px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}
.role span { font-weight: 400; color: var(--ink); opacity: 0.8; letter-spacing: 0; text-transform: none; }

.lede {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  max-width: 480px;
  text-transform: none;
  letter-spacing: 0;
}
.lede .mobile-only { display: none; }

.hero-field,
.hero-static {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-static {
  display: none;
  background-image: radial-gradient(circle, var(--blue-mist) 1.1px, transparent 1.4px);
  background-size: 26px 26px;
  opacity: 0.6;
}
.hero > :not(.hero-field):not(.hero-static) { position: relative; z-index: 1; }

.hero h1 span {
  display: inline-block;
  animation: hero-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero h1 span:nth-child(2) { animation-delay: 0.12s; }

@keyframes hero-rise {
  0% { opacity: 0; transform: translateY(0.35em); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 span { animation: none; }
  .hero-field { display: none; }
  .hero-static { display: block; }
  .wm-face, .portrait-alt, .author-alt { transition: none; }
}

/* Retrato */
.portrait {
  grid-column: span 4;
  grid-row: span 2;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  position: relative;
}

.portrait .portrait-alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.portrait.is-wink .portrait-alt { opacity: 1; }
@media (hover: hover) {
  .portrait:hover .portrait-alt { opacity: 1; }
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05);
}

/* Celdas de datos */
.notes { grid-column: span 8; grid-row: span 2; justify-content: flex-start; gap: 16px; }
.projects { grid-column: span 4; grid-row: span 2; justify-content: flex-start; gap: 16px; }

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.project-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--grey);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.project-list a { text-decoration: none; font-weight: 700; }
.dim-ink { color: var(--ink); opacity: 0.72; }

.timeline { grid-column: span 12; grid-row: span 2; justify-content: flex-start; gap: 16px; }
.t-role { font-weight: 700; color: var(--blue); }
.contact { grid-column: span 6; }
.now { grid-column: span 6; justify-content: flex-start; gap: 16px; }


.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.notes-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--grey);
}

.notes-list li:first-child { padding-top: 4px; }

.note-link {
  font-size: clamp(19px, 1.9vw, 25px);
  line-height: 1.25;
  text-decoration: none;
}

.note-date { font-size: 11px; color: var(--ink); opacity: 0.7; white-space: nowrap; }
.notes-foot { margin-top: auto; }
.mail-big {
  font-family: "Bricolage Grotesque", "Arial Black", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  color: var(--blue);
  text-decoration: none;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.mail-big:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.contact-note { font-size: 13px; line-height: 1.5; margin: 0; color: var(--ink); text-transform: none; letter-spacing: 0; max-width: 34ch; }

.social { display: flex; gap: 16px; align-items: center; }
.social a { color: var(--blue); display: inline-flex; }
.social a:hover { color: #2735b0; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  display: inline-block;
  flex-shrink: 0;
}
.dot.acid { background: var(--live); }
.pulse { animation: pulse 2s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.code {
  margin: 0;
  font-size: 12px;
  line-height: 1.9;
  color: #dde1fb;
  text-transform: none;
  letter-spacing: 0;
  white-space: pre-wrap;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--acid);
  animation: blink 1.1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 4px;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.tools {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  border-top: 2px solid #5a6ae8;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.tools li { display: flex; gap: 14px; }

.note-title { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.2; margin: 0; }
.note-title a { text-decoration: none; }

.cta { font-size: clamp(28px, 2.6vw, 36px); line-height: 0.95; margin: 0; }

.big { font-size: clamp(32px, 3vw, 42px); color: var(--blue); margin: 0; }

/* Pie con wordmark gigante recortado */
.foot {
  margin-top: auto;
  position: relative;
  height: clamp(80px, 11vw, 130px);
  overflow: hidden;
  z-index: 1;
}

.ghost {
  position: absolute;
  bottom: clamp(-40px, -5vw, -66px);
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(110px, 17vw, 220px);
  line-height: 1;
  color: var(--blue);
  white-space: nowrap;
  opacity: 0.92;
}

.foot-meta {
  position: absolute;
  bottom: 12px;
  right: 0;
  background: var(--paper);
  padding: 2px 0 2px 10px;
}

/* Responsive */
@media (max-width: 1020px) {
  .hero, .portrait, .notes, .projects { grid-column: span 12; grid-row: span 1; }
  .hero { min-height: 340px; }
  .portrait { max-height: 420px; }
  .music, .activity, .note, .contact, .now, .lab { grid-column: span 6; }
}

@media (max-width: 640px) {
  .music, .activity, .note, .contact, .now, .lab { grid-column: span 12; }
  .nav a:not(.cta-chip) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .arc, .pulse, .eq i, .cursor { animation: none; }
}

@media (max-width: 640px) {
  .notes-list li { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (max-width: 640px) {
  .hero { min-height: auto; padding: 22px 20px 24px; }
  .hero h1 { font-size: clamp(48px, 15vw, 64px); }
  .lede { font-size: 14px; line-height: 1.55; }
  .lede .trim { display: none; }
  .lede .mobile-only { display: inline; }
}

@media (max-width: 640px) {
  .ghost { display: none; }
  .foot { height: auto; padding: 4px 0 8px; }
  .foot-meta { position: static; text-align: right; padding: 0; }
}

/* Tablet: el pie mantiene el fantasma pero la línea del nombre sube, sin solaparse */
@media (min-width: 641px) and (max-width: 1020px) {
  .foot { height: 150px; }
  .foot-meta { top: 0; bottom: auto; }
}
