/* nisperi-blocks format 2 */
:root {
  --color-primary: #3f6b73;
  --color-on-primary: #ffffff;
  --color-secondary: #e4ebe8;
  --color-on-secondary: #2f3a40;
  --color-background: #f6f4ef;
  --color-surface: #fbfaf7;
  --color-text: #2f3a40;
  --color-text-muted: #5b6770;
  --color-border: #d9ddd8;
  --font-heading: 'Avenir Next', Avenir, Futura, 'Century Gothic', 'URW Gothic', Montserrat, 'Trebuchet MS', sans-serif;
  --font-body: Optima, 'Optima nova', Candara, 'Noto Sans', 'Segoe UI', 'Helvetica Neue', sans-serif;
  --radius: 12px;
  --space-base: 8px;
  --max-width: 62rem;
  --shadow: none;
}

/* Shared base: only theme custom properties (#416 vocabulary) and derived spacing steps. */
:root {
  --s1: calc(var(--space-base) * 1); --s2: calc(var(--space-base) * 2); --s3: calc(var(--space-base) * 3);
  --s4: calc(var(--space-base) * 4); --s6: calc(var(--space-base) * 6); --s8: calc(var(--space-base) * 8);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--color-background); color: var(--color-text); font: 1.0625rem/1.65 var(--font-body); }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.25; margin: 0 0 var(--s2); }
h1 { font-size: clamp(2rem, 6vw, 3rem); } h2 { font-size: 1.5rem; } h3 { font-size: 1.125rem; }
p { margin: 0 0 var(--s2); }
a { color: var(--color-primary); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 calc(var(--space-base) * 2.5); }
.section { padding-block: var(--s6); border-top: 1px solid var(--color-border); }
.skip-link { position: absolute; left: var(--s1); top: -4rem; background: var(--color-primary); color: var(--color-on-primary); padding: var(--s1) var(--s2); border-radius: var(--radius); }
.skip-link:focus { top: var(--s1); }
.button { display: inline-block; padding: calc(var(--space-base) * 1.25) calc(var(--space-base) * 2.5); border-radius: var(--radius); font: inherit; font-weight: 600; text-decoration: none; border: 1px solid var(--color-primary); cursor: pointer; }
.button--primary { background: var(--color-primary); color: var(--color-on-primary); }
.button--secondary { background: transparent; color: var(--color-primary); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: calc(var(--space-base) * 2.5); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0; padding: 0; }
.tags li { background: var(--color-secondary); color: var(--color-on-secondary); border-radius: 999px; padding: calc(var(--space-base) / 2) calc(var(--space-base) * 1.5); font-size: 0.9375rem; }
.muted { color: var(--color-text-muted); }
img.nb-fit-cover { object-fit: cover; }
img.nb-fit-contain { object-fit: contain; }
img.nb-size-s { max-width: 10rem; }
img.nb-size-m { max-width: 16rem; }
img.nb-size-l { max-width: 24rem; }
img.nb-size-full { max-width: 100%; }
img.nb-ratio-1-1 { aspect-ratio: 1 / 1; }
img.nb-ratio-4-3 { aspect-ratio: 4 / 3; }
img.nb-ratio-3-4 { aspect-ratio: 3 / 4; }
img.nb-ratio-16-9 { aspect-ratio: 16 / 9; }
img.nb-ratio-auto { aspect-ratio: auto; height: 100%; min-height: 12rem; align-self: stretch; }
.b-nav { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.b-nav__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1); padding-block: calc(var(--space-base) * 1.5); }
.b-nav__brand { font-family: var(--font-heading); font-weight: 700; color: var(--color-text); text-decoration: none; }
.b-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; }
.b-nav nav a { color: var(--color-text-muted); text-decoration: none; }
.b-nav nav a:hover { color: var(--color-primary); }
.b-nav__languages a[aria-current] { color: var(--color-text); font-weight: 600; }
/* Below 760px (#480): the links and the language switch sit in a dropdown panel opened by a hamburger (a visually hidden checkbox, focusable and keyboard-operable, over a label; no JavaScript). From 760px up the panel is transparent to layout and the button is gone, so the bar is the horizontal row it always was. */
.b-nav { position: relative; }
.b-nav__menu { display: contents; }
.b-nav__check, .b-nav__button { display: none; }
.b-nav__panel { display: contents; }
@media (max-width: 47.4375rem) {
  .b-nav__row { flex-wrap: nowrap; }
  .b-nav__menu { display: block; }
  .b-nav__button { display: flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; cursor: pointer; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); box-sizing: border-box; }
  .b-nav__check { display: block; position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
  .b-nav__check:focus-visible + .b-nav__button { outline: 2px solid var(--color-primary); outline-offset: 2px; }
  .b-nav__bars, .b-nav__bars::before, .b-nav__bars::after { display: block; width: 1.25rem; height: 2px; background: currentColor; }
  .b-nav__bars { position: relative; }
  .b-nav__bars::before, .b-nav__bars::after { content: ""; position: absolute; left: 0; }
  .b-nav__bars::before { top: -0.4rem; }
  .b-nav__bars::after { top: 0.4rem; }
  .b-nav__check:checked + .b-nav__button .b-nav__bars { background: transparent; }
  .b-nav__check:checked + .b-nav__button .b-nav__bars::before { top: 0; transform: rotate(45deg); }
  .b-nav__check:checked + .b-nav__button .b-nav__bars::after { top: 0; transform: rotate(-45deg); }
  .b-nav__panel { display: none; flex-direction: column; gap: var(--s2); position: absolute; left: 0; right: 0; top: 100%; z-index: 10; padding: var(--s2) calc(var(--space-base) * 2.5); background: var(--color-surface); border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow); }
  .b-nav__check:checked ~ .b-nav__panel { display: flex; }
  .b-nav__panel ul { flex-direction: column; gap: 0; }
  .b-nav__panel nav a { display: block; padding: var(--s1) 0; }
  .b-nav__languages { border-top: 1px solid var(--color-border); padding-top: var(--s1); }
  .b-nav__languages ul { flex-direction: row; gap: var(--s2); }
}
.b-custom { position: relative; isolation: isolate; contain: paint; overflow: clip; }
.b-custom img { display: block; max-width: 100%; height: auto; object-fit: cover; }
.b-custom img[data-aspect="1:1"] { aspect-ratio: 1 / 1; }
.b-custom img[data-aspect="4:3"] { aspect-ratio: 4 / 3; }
.b-custom img[data-aspect="3:4"] { aspect-ratio: 3 / 4; }
.b-custom img[data-aspect="16:9"] { aspect-ratio: 16 / 9; }
.b-custom img[data-aspect="3:2"] { aspect-ratio: 3 / 2; }
.b-custom img[data-aspect="2:3"] { aspect-ratio: 2 / 3; }
.b-custom img[data-aspect="4:5"] { aspect-ratio: 4 / 5; }
.b-custom img[data-aspect="21:9"] { aspect-ratio: 21 / 9; }
.b-custom figure { margin: 0 0 var(--s2); }
.b-custom figcaption { color: var(--color-text-muted); font-size: 0.9rem; }
.b-custom table { border-collapse: collapse; width: 100%; }
.b-custom th, .b-custom td { padding: var(--s1) var(--s2); border-bottom: 1px solid var(--color-border); text-align: left; }
.b-custom blockquote { margin: 0 0 var(--s2); padding-left: var(--s2); border-left: 3px solid var(--color-border); }
.b-hero-split { padding-block: var(--s8) var(--s6); }
.b-hero-split__grid { display: grid; gap: var(--s4); align-items: center; }
.b-hero-split__label { color: var(--color-primary); font-weight: 600; }
.b-hero-split__lead { font-size: 1.1875rem; max-width: 38rem; }
.b-hero-split__actions { display: flex; flex-wrap: wrap; gap: calc(var(--space-base) * 1.5); margin-top: var(--s3); }
.b-hero-split__aside { display: grid; gap: var(--s3); }
.b-hero-split__portrait { width: 100%; max-width: 20rem; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.b-hero-split__facts { margin: 0; display: grid; gap: var(--s2); }
.b-hero-split__facts dt { font-size: 0.875rem; }
.b-hero-split__facts dd { margin: 0; font-weight: 600; }
@media (min-width: 56rem) { .b-hero-split__grid { grid-template-columns: 3fr 2fr; } }
.b-about__grid { display: grid; gap: var(--s4); }
.b-about__portrait { width: 100%; max-width: 16rem; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.b-about__list { padding-left: 1.25rem; margin: 0; }
.b-about__list li { margin-bottom: var(--s1); }
@media (min-width: 56rem) { .b-about__grid { grid-template-columns: 3fr 2fr; } }
.b-timeline__line { list-style: none; margin: 0; padding: 0; }
.b-timeline__stage { position: relative; padding: 0 0 var(--s4) var(--s3); border-left: 2px solid var(--color-border); }
.b-timeline__stage:last-child { padding-bottom: 0; }
.b-timeline__stage::before { content: ""; position: absolute; left: -7px; top: 0.45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--color-primary); }
.b-timeline__period { font-size: 0.9375rem; margin-bottom: calc(var(--space-base) / 2); }
.b-timeline__stage ul { padding-left: 1.25rem; margin: 0; }
.b-skills__grid { display: grid; gap: var(--s2); }
.b-skills h3 { color: var(--color-primary); }
@media (min-width: 40rem) { .b-skills__grid { grid-template-columns: repeat(2, 1fr); } }
.b-project-grid__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--s2); }
.b-project-grid__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.b-project-grid__link { margin: var(--s2) 0 0; }
@media (min-width: 40rem) { .b-project-grid__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .b-project-grid__list { grid-template-columns: repeat(3, 1fr); } }
.b-contact__grid { display: grid; gap: var(--s4); }
.b-contact__channels { list-style: none; margin: 0; padding: 0; }
.b-contact__channels li { margin-bottom: calc(var(--space-base) * 1.5); }
.b-contact__channels span { display: block; font-size: 0.875rem; }
/* Channel values are links: the text colour (checked against the background by checkTheme), never the primary colour, which a theme may set pale (#470). Underlined so they read as links. */
.b-contact__channels a { color: var(--color-text); font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; }
.b-contact__field { margin-bottom: var(--s2); }
.b-contact__field label { display: block; font-weight: 600; margin-bottom: calc(var(--space-base) / 2); }
.b-contact__field input, .b-contact__field textarea { width: 100%; font: inherit; color: var(--color-text); background: var(--color-background); border: 1px solid var(--color-text-muted); border-radius: var(--radius); padding: var(--s1) calc(var(--space-base) * 1.5); }
.b-contact__status { margin: var(--s2) 0 0; font-weight: 600; }
.b-contact__status:empty { display: none; }
.b-contact__trap { position: absolute; left: -9999px; }
@media (min-width: 56rem) { .b-contact__grid { grid-template-columns: 2fr 3fr; } }
.b-footer { border-top: 1px solid var(--color-border); padding-block: var(--s4); color: var(--color-text-muted); font-size: 0.9375rem; }
.b-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1); }
.b-footer a { margin-right: var(--s1); }
.b-custom-portrait-centered { display: flex; justify-content: center; padding: var(--s4); }
.b-custom-portrait-centered .retrato-centrado { display: flex; justify-content: center; width: 100%; }
.b-custom-portrait-centered .retrato-centrado img { width: 100%; max-width: 16rem; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }