/* ==========================================================================
   Max Sepúlveda — Sistema de diseño editorial
   Marfil cálido · bandas carbón · tipografía dual · grain fílmico
   ========================================================================== */

:root {
    /* Tinta y papel */
    --ink: #1b1713;
    --ink-deep: #14100d;
    --ink-soft: #40372e;

    --paper: #f6f2ea;
    --paper-warm: #ede6da;

    /* Bronce */
    --bronze: #a2764a;
    --bronze-deep: #83603c;
    --bronze-light: #cfa878;

    /* Texto */
    --color-text: #221c16;
    --color-text-light: #6f6558;

    /* Compatibilidad con variables previas */
    --color-primary: var(--ink);
    --color-primary-dark: var(--ink-deep);
    --color-primary-light: var(--ink-soft);
    --color-secondary: var(--ink-soft);
    --color-accent: var(--bronze);
    --color-background: var(--paper);
    --color-background-alt: var(--paper-warm);
    --color-background-dark: var(--ink);
    --color-border: rgba(27, 23, 19, 0.14);

    /* Hairlines */
    --hairline: rgba(27, 23, 19, 0.14);
    --hairline-strong: rgba(27, 23, 19, 0.32);
    --hairline-inverse: rgba(255, 255, 255, 0.16);
    --hairline-inverse-strong: rgba(255, 255, 255, 0.34);

    /* Tipografía */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;

    /* Métricas */
    --container-max: 1200px;
    --spacing-unit: 1rem;
    --header-h: 76px;

    --sf-section-padding: clamp(4.5rem, 9vw, 8rem);
    --sf-container-max: var(--container-max);
    --sf-stack-gap: calc(var(--spacing-unit) * 2);
    --sf-transition: 0.3s ease;
    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);

    --shadow-sm: 0 1px 2px rgba(20, 16, 13, 0.05);
    --shadow-md: 0 10px 30px rgba(20, 16, 13, 0.10);
    --shadow-lg: 0 30px 70px rgba(20, 16, 13, 0.22);
    --shadow-plate: 0 40px 90px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 14px 34px rgba(131, 96, 60, 0.16);

    /* Grain fílmico */
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

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

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--paper);
    overflow-x: hidden;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Grain global muy sutil: unifica y disimula artefactos */
body::after {
    content: '';
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image: var(--grain);
    background-repeat: repeat;
    opacity: 0.05;
    pointer-events: none;
    z-index: 2000;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.12;
    color: var(--color-text);
    letter-spacing: 0.005em;
    margin-top: 0;
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.375rem; }

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

/* El <picture> es solo un selector de formato (WebP/JPG); no debe alterar el
   layout que ya aplica a los <img> que envuelve. */
picture {
    display: contents;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--sf-transition);
}

a:hover {
    color: var(--bronze-deep);
}

.container,
.sf-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    width: 100%;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--ink);
    color: var(--paper);
    padding: 0.6rem 1.2rem;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    z-index: 3000;
}

.skip-link:focus {
    top: 0;
}

/* Kicker — micro tipografía editorial */
.sf-section-header__kicker,
.page-header__kicker,
.project-header__kicker {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--bronze-deep);
    margin: 0 0 1.1rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.nav-container {
    max-width: none;
    margin: 0;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    height: var(--header-h);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-text);
    flex-shrink: 0;
    transition: color 0.4s ease;
}

.logo:hover {
    color: var(--bronze-deep);
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: clamp(1.4rem, 3vw, 2.6rem);
}

.nav-menu a {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0.4rem 0;
    position: relative;
    transition: color 0.35s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease-out-expo);
}

.nav-menu a:hover::after,
.nav-menu a[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
    color: var(--color-text);
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-left: auto;
}

.header-contact__item {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    white-space: nowrap;
    transition: color 0.35s ease;
}

.header-contact__item:hover {
    color: var(--bronze-deep);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--color-text);
    transition: var(--sf-transition);
}

/* Header sólido al hacer scroll */
.site-header.is-scrolled {
    background: rgba(246, 242, 234, 0.92);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    border-bottom-color: var(--hairline);
}

/* Header transparente sobre héroes oscuros */
.home-page .site-header:not(.is-scrolled),
.about-page .site-header:not(.is-scrolled),
.projects-index .site-header:not(.is-scrolled) {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.home-page .site-header:not(.is-scrolled) .logo,
.about-page .site-header:not(.is-scrolled) .logo,
.projects-index .site-header:not(.is-scrolled) .logo {
    color: #ffffff;
}

.home-page .site-header:not(.is-scrolled) .nav-menu a,
.about-page .site-header:not(.is-scrolled) .nav-menu a,
.projects-index .site-header:not(.is-scrolled) .nav-menu a {
    color: rgba(255, 255, 255, 0.72);
}

.home-page .site-header:not(.is-scrolled) .nav-menu a:hover,
.home-page .site-header:not(.is-scrolled) .nav-menu a[aria-current="page"],
.about-page .site-header:not(.is-scrolled) .nav-menu a:hover,
.about-page .site-header:not(.is-scrolled) .nav-menu a[aria-current="page"],
.projects-index .site-header:not(.is-scrolled) .nav-menu a:hover,
.projects-index .site-header:not(.is-scrolled) .nav-menu a[aria-current="page"] {
    color: #ffffff;
}

.home-page .site-header:not(.is-scrolled) .header-contact__item,
.about-page .site-header:not(.is-scrolled) .header-contact__item,
.projects-index .site-header:not(.is-scrolled) .header-contact__item {
    color: rgba(255, 255, 255, 0.6);
}

.home-page .site-header:not(.is-scrolled) .header-contact__item:hover,
.about-page .site-header:not(.is-scrolled) .header-contact__item:hover,
.projects-index .site-header:not(.is-scrolled) .header-contact__item:hover {
    color: #ffffff;
}

.home-page .site-header:not(.is-scrolled) .menu-toggle span,
.about-page .site-header:not(.is-scrolled) .menu-toggle span,
.projects-index .site-header:not(.is-scrolled) .menu-toggle span {
    background: #ffffff;
}

/* Páginas de inicio claro: compensar header fijo */
body.project-detail {
    padding-top: var(--header-h);
}

body.project-detail .site-header {
    background: rgba(246, 242, 234, 0.92);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    border-bottom-color: var(--hairline);
}

/* ==========================================================================
   Hero base
   ========================================================================== */

.sf-block--hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
}

.sf-block--hero.sf-hero--with-background {
    overflow: hidden;
    background: var(--ink);
    color: #ffffff;
}

.sf-hero__background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.sf-hero__background--header {
    background-position: center 30%;
}

.sf-hero__background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 16, 13, 0.85), rgba(20, 16, 13, 0.25) 55%, rgba(20, 16, 13, 0.4));
}

/* Grain sobre el hero */
.sf-hero--with-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    background-repeat: repeat;
    opacity: 0.09;
    z-index: 1;
    pointer-events: none;
}

.sf-hero__layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr minmax(260px, 360px);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    width: 100%;
}

.sf-hero__content {
    position: relative;
    z-index: 1;
}

.sf-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.6rem, 5.5vw, 4.4rem);
    font-weight: 600;
    margin: 0 0 1rem;
    letter-spacing: 0.01em;
    line-height: 1.02;
}

.sf-hero--with-background .sf-hero__title {
    color: #ffffff;
}

.sf-hero__subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    color: var(--color-text-light);
    margin: 0 0 calc(var(--spacing-unit) * 2);
    max-width: 560px;
}

.sf-hero--with-background .sf-hero__subtitle {
    color: rgba(255, 255, 255, 0.82);
}

.sf-hero__cta {
    margin-top: calc(var(--spacing-unit) * 1.75);
}

.sf-hero__portrait {
    width: min(100%, 360px);
    aspect-ratio: 4 / 5;
    justify-self: center;
    position: relative;
    background-color: var(--paper-warm);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-plate);
}

.sf-hero__portrait::after {
    content: '';
    position: absolute;
    inset: -14px;
    border: 1px solid var(--hairline-inverse-strong);
    pointer-events: none;
}

/* --- Hero Home minimal: cinematográfico --- */

.home-page .sf-block--hero--minimal {
    min-height: 100vh;
    min-height: 100svh;
    align-items: flex-end;
}

.home-page .sf-block--hero--minimal .sf-hero__background {
    animation: heroZoom 2s var(--ease-out-expo) both;
}

@keyframes heroZoom {
    from { transform: scale(1.07); }
    to   { transform: scale(1); }
}

.home-page .sf-block--hero--minimal .sf-hero__background::after {
    background: linear-gradient(to top, rgba(18, 14, 11, 0.92) 0%, rgba(18, 14, 11, 0.48) 46%, rgba(18, 14, 11, 0.56) 100%);
}

.home-page .sf-block--hero--minimal .sf-hero__layout {
    grid-template-columns: 1fr;
    max-width: var(--container-max);
    padding-bottom: clamp(5rem, 13vh, 9rem);
}

.home-page .sf-block--hero--minimal .sf-hero__content {
    display: flex;
    flex-direction: column;
    max-width: none;
}

.home-page .sf-block--hero--minimal .sf-hero__portrait {
    position: absolute;
    right: clamp(1.5rem, 8vw, 6rem);
    bottom: clamp(9rem, 20vh, 13rem);
    width: clamp(150px, 16vw, 230px);
    opacity: 0.82;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.home-page .sf-block--hero--minimal .sf-hero__title {
    font-size: clamp(3.2rem, 10vw, 8rem);
    font-weight: 600;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    line-height: 0.96;
    margin: 0;
    animation: heroRise 1.1s 0.15s var(--ease-out-expo) both;
}

.home-page .sf-block--hero--minimal .sf-hero__subtitle {
    order: -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-sans);
    font-size: clamp(0.7rem, 1.1vw, 0.8rem);
    font-weight: 600;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--bronze-light);
    max-width: none;
    margin: 0 0 1.6rem;
    animation: heroRise 1.1s var(--ease-out-expo) both;
}

.home-page .sf-block--hero--minimal .sf-hero__subtitle::before {
    content: '';
    width: 52px;
    height: 1px;
    background: var(--bronze-light);
    flex-shrink: 0;
}

@keyframes heroRise {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Hero Home portada: centrado sobre fondo blanco --- */

.home-page .sf-block--hero--portada {
    min-height: 100vh;
    min-height: 100svh;
    text-align: center;
}

.home-page .sf-block--hero--portada .sf-hero__layout {
    grid-template-columns: 1fr;
    justify-items: center;
    max-width: var(--container-max);
    padding-top: clamp(5rem, 14vh, 9rem);
    padding-bottom: clamp(5rem, 14vh, 9rem);
}

.home-page .sf-block--hero--portada .sf-hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none;
}

.home-page .sf-block--hero--portada .sf-hero__title {
    font-size: clamp(3.2rem, 10vw, 8rem);
    font-weight: 600;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    line-height: 0.96;
    margin: 0 0 1.8rem;
    animation: heroRise 1.1s 0.15s var(--ease-out-expo) both;
}

.home-page .sf-block--hero--portada .sf-hero__subtitle {
    font-family: var(--font-sans);
    font-size: clamp(0.7rem, 1.1vw, 0.8rem);
    font-weight: 600;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--bronze-deep);
    max-width: none;
    margin: 0;
    animation: heroRise 1.1s var(--ease-out-expo) both;
}

.home-page .sf-block--hero--portada .sf-hero__scroll {
    right: 50%;
    transform: translateX(50%);
    color: var(--color-text-light);
}

.home-page .sf-block--hero--portada .sf-hero__scroll:hover {
    color: var(--ink);
}

.home-page .sf-block--hero--portada .sf-hero__scroll-line {
    background: rgba(34, 28, 22, 0.28);
}

.home-page .sf-block--hero--portada .sf-hero__scroll-line::after {
    background: var(--ink);
}

/* Navigation sobre la portada clara */
.home-page .site-header:not(.is-scrolled) {
    background: rgba(246, 242, 234, 0.92);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    border-bottom-color: var(--hairline);
}

.home-page .site-header:not(.is-scrolled) .logo {
    color: var(--color-text);
}

.home-page .site-header:not(.is-scrolled) .nav-menu a {
    color: var(--color-text-light);
}

.home-page .site-header:not(.is-scrolled) .nav-menu a:hover,
.home-page .site-header:not(.is-scrolled) .nav-menu a[aria-current="page"] {
    color: var(--color-text);
}

.home-page .site-header:not(.is-scrolled) .header-contact__item {
    color: var(--color-text-light);
}

.home-page .site-header:not(.is-scrolled) .header-contact__item:hover {
    color: var(--bronze-deep);
}

.home-page .site-header:not(.is-scrolled) .menu-toggle span {
    background: var(--color-text);
}

/* Indicador de scroll */
.sf-hero__scroll {
    position: absolute;
    right: clamp(1.25rem, 4vw, 2.5rem);
    bottom: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.sf-hero__scroll:hover {
    color: #ffffff;
}

.sf-hero__scroll-label {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

.sf-hero__scroll-line {
    width: 1px;
    height: 72px;
    background: rgba(255, 255, 255, 0.35);
    position: relative;
    overflow: hidden;
}

.sf-hero__scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    animation: scrollLine 2.4s ease-in-out infinite;
    will-change: transform;
}

@keyframes scrollLine {
    0%   { transform: translateY(-100%); }
    55%  { transform: translateY(100%); }
    100% { transform: translateY(100%); }
}

/* --- Hero Sobre Max: banda carbón editorial --- */

.sf-block--hero--about {
    min-height: 78vh;
    text-align: left;
    align-items: flex-end;
    padding-top: calc(var(--header-h) + 3rem);
    padding-bottom: clamp(3.5rem, 9vh, 6rem);
}

.sf-block--hero--about .sf-hero__background::after {
    background: linear-gradient(to top, rgba(18, 14, 11, 0.92) 0%, rgba(18, 14, 11, 0.45) 55%, rgba(18, 14, 11, 0.55) 100%);
}

.sf-block--hero--about .sf-hero__layout {
    grid-template-columns: 1.15fr minmax(240px, 340px);
    align-items: end;
}

.sf-block--hero--about .sf-hero__title {
    font-size: clamp(3rem, 7vw, 5.6rem);
    line-height: 0.98;
}

.sf-block--hero--about .sf-hero__title::before {
    content: '';
    display: block;
    width: 52px;
    height: 1px;
    background: var(--bronze-light);
    margin-bottom: 1.6rem;
}

.sf-block--hero--about .sf-hero__subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    max-width: 34em;
    margin-left: 0;
    margin-right: 0;
}

.sf-block--hero--about .sf-hero__portrait {
    display: block;
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 2.2rem;
    border-radius: 0;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.35s ease;
    border: 1px solid var(--hairline-strong);
    color: var(--color-text);
    background: transparent;
    cursor: pointer;
}

.btn:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    text-decoration: none;
}

.btn-primary {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.btn-primary:hover {
    background: var(--bronze-deep);
    border-color: var(--bronze-deep);
    color: #ffffff;
}

.btn-outline {
    border-color: var(--hairline-strong);
    color: var(--color-text);
}

.btn-outline:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

/* ==========================================================================
   Secciones
   ========================================================================== */

section.sf-block {
    padding: var(--sf-section-padding) 0;
}

.sf-section-header {
    text-align: center;
    margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.sf-section-header__title {
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 600;
    margin: 0 0 1rem;
    line-height: 1.05;
}

.sf-section-header__subtitle {
    font-size: 1.0625rem;
    color: var(--color-text-light);
    max-width: 620px;
    margin: 0 auto;
}

.sf-section-footer {
    text-align: center;
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.sf-stack > .sf-block + .sf-block {
    margin-top: 0;
}

/* ==========================================================================
   Page header (Proyectos)
   ========================================================================== */

.page-header {
    padding: calc(var(--header-h) + 4rem) 0 4rem;
    text-align: center;
}

.page-header h1 {
    margin: 0 0 var(--spacing-unit);
}

.page-header .intro {
    color: var(--color-text-light);
    max-width: 650px;
    margin: 0 auto;
}

.page-header--image {
    position: relative;
    min-height: 64vh;
    display: flex;
    align-items: flex-end;
    text-align: left;
    padding: calc(var(--header-h) + 4rem) 0 clamp(3rem, 8vh, 5rem);
    background: var(--ink);
    color: #ffffff;
    overflow: hidden;
}

.page-header__background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.page-header__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(18, 14, 11, 0.9) 0%, rgba(18, 14, 11, 0.35) 55%, rgba(18, 14, 11, 0.5) 100%);
}

.page-header--image::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    background-repeat: repeat;
    opacity: 0.09;
    z-index: 1;
    pointer-events: none;
}

.page-header__content {
    position: relative;
    z-index: 2;
}

.page-header--image .page-header__kicker {
    color: var(--bronze-light);
}

.page-header--image .page-header__kicker::before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    width: 44px;
    height: 1px;
    background: var(--bronze-light);
    margin-right: 0.9rem;
}

.page-header--image h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    color: #ffffff;
    line-height: 0.98;
    margin: 0 0 1.2rem;
}

.page-header--image .intro {
    margin: 0;
    max-width: 34em;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.page-header--image .intro p {
    margin: 0;
}

/* ==========================================================================
   Tiles de proyectos
   ========================================================================== */

.projects-section {
    padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
    gap: clamp(1rem, 2.2vw, 1.75rem);
}

.project-card {
    position: relative;
    background: var(--ink);
    overflow: hidden;
}

.project-card__link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    color: #ffffff;
    overflow: hidden;
}

.project-card__media {
    position: absolute;
    inset: 0;
}

.project-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.94);
    transition: transform 1.4s var(--ease-out-expo), filter 0.8s ease;
}

.project-card__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 12, 9, 0.88) 0%, rgba(16, 12, 9, 0.25) 52%, rgba(16, 12, 9, 0.12) 100%);
    transition: background 0.6s ease;
}

.project-card__link::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    background-repeat: repeat;
    opacity: 0.07;
    pointer-events: none;
}

.project-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: clamp(1.4rem, 3vw, 2rem);
    z-index: 2;
}

.project-card__tags {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    margin: 0 0 0.6rem;
}

.project-card__title {
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    font-weight: 600;
    line-height: 1.08;
    color: #ffffff;
    margin: 0;
}

.project-card__summary {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    max-width: 46ch;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s var(--ease-out-expo), opacity 0.5s ease, margin 0.5s ease;
}

.project-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--bronze-light);
    margin-top: 0.9rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
}

.project-card__cta-arrow {
    transition: transform 0.4s var(--ease-out-expo);
}

.project-card__year {
    position: absolute;
    top: 1.3rem;
    right: 1.4rem;
    z-index: 2;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.6);
}

.project-card__link:hover .project-card__media img,
.project-card__link:focus-visible .project-card__media img {
    transform: scale(1.055);
    filter: saturate(1.05);
}

.project-card__link:hover .project-card__veil,
.project-card__link:focus-visible .project-card__veil {
    background: linear-gradient(to top, rgba(16, 12, 9, 0.94) 0%, rgba(16, 12, 9, 0.4) 58%, rgba(16, 12, 9, 0.2) 100%);
}

.project-card__link:hover .project-card__summary,
.project-card__link:focus-visible .project-card__summary {
    max-height: 7em;
    opacity: 1;
    margin-top: 0.7rem;
}

.project-card__link:hover .project-card__cta,
.project-card__link:focus-visible .project-card__cta {
    opacity: 1;
    transform: translateY(0);
}

.project-card__link:hover .project-card__cta-arrow {
    transform: translateX(5px);
}

.project-card__link:focus-visible {
    outline: 2px solid var(--paper);
    outline-offset: -6px;
}

@media (hover: none) {
    .project-card__cta {
        opacity: 0.9;
        transform: none;
    }
}

/* Tags genéricos (detalle de proyecto) */
.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    padding-bottom: 0.25rem;
}

/* ==========================================================================
   Detalle de proyecto
   ========================================================================== */

article.project-detail {
    padding-bottom: calc(var(--spacing-unit) * 5);
}

.project-header {
    padding: clamp(4rem, 9vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: clamp(1rem, 3vw, 2rem);
}

.project-header h1 {
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    line-height: 1.02;
    margin: 0 0 1.4rem;
}

.project-header .summary {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    color: var(--color-text-light);
    max-width: 720px;
    margin: 0 auto 1.6rem;
}

.project-meta {
    margin: 1.4rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.project-meta time {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bronze-deep);
}

.project-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-unit);
    margin-top: 2rem;
}

.project-body {
    max-width: 720px;
    margin: calc(var(--spacing-unit) * 3) auto;
}

.project-body p {
    margin-bottom: var(--spacing-unit);
}

.project-footer {
    margin: calc(var(--spacing-unit) * 3) auto;
    max-width: 720px;
    text-align: center;
}

.project-content .sf-block:first-child {
    padding-top: clamp(2rem, 5vw, 3.5rem);
}

/* ==========================================================================
   Secciones de texto
   ========================================================================== */

.sf-text {
    display: block;
    max-width: 720px;
    margin: 0 auto;
}

.sf-text--with-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: center;
    max-width: none;
}

.sf-text--image-left .sf-text__content { order: 2; }
.sf-text--image-left .sf-text__image { order: 1; }
.sf-text--image-right .sf-text__content { order: 1; }
.sf-text--image-right .sf-text__image { order: 2; }

.sf-text__title {
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    line-height: 1.06;
    margin: 0 0 1.4rem;
}

.sf-text__title::before {
    content: '';
    display: block;
    width: 44px;
    height: 1px;
    background: var(--bronze);
    margin-bottom: 1.4rem;
}

.sf-text__body {
    line-height: 1.75;
}

.sf-text__body p:last-child {
    margin-bottom: 0;
}

.sf-text__image {
    position: relative;
    margin: 0;
}

.sf-text__image img {
    border-radius: 0;
    width: 100%;
    max-height: 600px;
    margin: 0 auto;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.sf-text__image::after {
    content: '';
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 1px solid var(--hairline-strong);
    pointer-events: none;
    z-index: -1;
}

.sf-text--image-left .sf-text__image::after {
    inset: 14px 14px -14px -14px;
}

.sf-text__image figcaption {
    margin-top: 0.75rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.sf-block--text--portrait-reference .sf-text__image {
    display: flex;
    justify-content: center;
}

.sf-block--text--portrait-reference .sf-text__image img {
    width: auto;
    max-width: min(100%, 260px);
    max-height: none;
    object-fit: contain;
}

/* ==========================================================================
   Skills (legado)
   ========================================================================== */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-card {
    background: var(--paper);
    border: 1px solid var(--hairline);
    padding: 2.25rem 1.75rem;
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    border-color: var(--bronze);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.skill-card__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    color: var(--bronze);
}

.skill-card__name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.skill-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.55;
    margin: 0 auto;
    max-width: 280px;
}

/* ==========================================================================
   Paneles de disciplina — Home
   ========================================================================== */

.sf-block--discipline-intro {
    padding-top: clamp(5rem, 11vw, 9rem);
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.sf-block--discipline-panel {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: #ffffff;
    background: var(--ink);
    padding: 0;
}

.discipline-panel__image,
.discipline-panel__overlay {
    position: absolute;
    inset: 0;
}

.discipline-panel__image {
    transform: scale(1.06);
    transition: transform 1.6s var(--ease-out-expo);
    will-change: transform;
}

.discipline-panel__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-block--discipline-panel.is-visible .discipline-panel__image {
    transform: scale(1);
}

.discipline-panel__overlay {
    background:
        linear-gradient(to top, rgba(16, 12, 9, 0.88) 0%, rgba(16, 12, 9, 0.38) 44%, rgba(16, 12, 9, 0.3) 100%);
}

.sf-block--discipline-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    background-repeat: repeat;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
}

.discipline-panel__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: clamp(4rem, 10vh, 7rem);
    padding-bottom: clamp(3.5rem, 9vh, 6.5rem);
}

.discipline-panel__kicker {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0 0 1.1rem;
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.66);
}

.discipline-panel__num {
    color: var(--bronze-light);
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.discipline-panel__num::after {
    content: '';
    width: 44px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.discipline-panel__title {
    margin: 0 0 1.1rem;
    font-size: clamp(2.6rem, 6.5vw, 5.6rem);
    line-height: 0.97;
    color: #ffffff;
    max-width: 14em;
    text-shadow: 0 1px 28px rgba(16, 12, 9, 0.5);
}

.discipline-panel__text {
    max-width: 36em;
    margin: 0;
    font-size: clamp(1.08rem, 1.7vw, 1.35rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
    text-shadow: 0 1px 18px rgba(16, 12, 9, 0.55);
}

/* Variante sin imagen: fondo claro y contenido centrado */
.discipline-panel--text-only {
    align-items: center;
    justify-content: center;
    background: var(--paper-warm);
}

.discipline-panel--text-only .discipline-panel__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: clamp(6rem, 14vh, 9rem);
    padding-bottom: clamp(6rem, 14vh, 9rem);
}

.discipline-panel--text-only .discipline-panel__kicker {
    justify-content: center;
    color: var(--color-text-light);
}

.discipline-panel--text-only .discipline-panel__num {
    color: var(--bronze-deep);
}

.discipline-panel--text-only .discipline-panel__num::after {
    background: rgba(34, 28, 22, 0.3);
}

.discipline-panel--text-only .discipline-panel__title {
    color: var(--color-text);
    text-shadow: none;
}

.discipline-panel--text-only .discipline-panel__text {
    color: var(--color-text-light);
    text-shadow: none;
}

.discipline-panel--text-only::after {
    display: none;
}

/* Variante lámina: fondo blur + obra enmarcada */
.discipline-panel--plate {
    align-items: center;
}

.discipline-panel--plate .discipline-panel__image {
    filter: blur(36px) saturate(1.1) brightness(0.44);
    transform: scale(1.36);
}

.discipline-panel--plate.is-visible .discipline-panel__image {
    transform: scale(1.28);
}

.discipline-panel--plate .discipline-panel__overlay {
    background: rgba(16, 12, 9, 0.38);
}

.discipline-panel__content--split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(2.5rem, 6vw, 5rem);
    padding-top: clamp(5rem, 12vh, 8rem);
    padding-bottom: clamp(5rem, 12vh, 8rem);
}

.discipline-panel__plate {
    margin: 0;
    position: relative;
    justify-self: center;
}

.discipline-panel__plate img {
    display: block;
    max-height: 62vh;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    box-shadow: var(--shadow-plate);
}

.discipline-panel__plate::after {
    content: '';
    position: absolute;
    inset: -16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    pointer-events: none;
}

/* ==========================================================================
   Listas curriculares
   ========================================================================== */

/* Índice tipo colofón */
.name-list {
    list-style: none;
    columns: 3;
    column-gap: clamp(2rem, 4vw, 3.5rem);
    padding: 0;
    margin: 0;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}

.name-list li {
    break-inside: avoid;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--hairline);
    color: var(--color-text-light);
    font-size: 0.98rem;
    line-height: 1.45;
    background: none;
    border-radius: 0;
}

/* Índice numerado (otros talleres) */
.simple-list {
    list-style: none;
    counter-reset: simple-item;
    max-width: 780px;
    padding: 0;
    margin: 0 auto;
    border-top: 1px solid var(--hairline);
}

.simple-list li {
    counter-increment: simple-item;
    display: flex;
    align-items: baseline;
    gap: 1.4rem;
    padding: 1.05rem 0.25rem;
    border-bottom: 1px solid var(--hairline);
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.5;
    background: none;
    border-radius: 0;
    transition: padding-left 0.35s var(--ease-out-expo);
}

.simple-list li:hover {
    padding-left: 0.9rem;
}

.simple-list li::before {
    content: counter(simple-item, decimal-leading-zero);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--bronze-deep);
    flex-shrink: 0;
}

/* Lista con años */
.dated-list {
    list-style: none;
    max-width: 900px;
    padding: 0;
    margin: 0 auto;
    border-top: 1px solid var(--hairline);
}

.dated-list__item {
    display: grid;
    grid-template-columns: minmax(96px, 130px) 1fr;
    gap: 1.5rem;
    padding: 1.15rem 0.25rem;
    border-bottom: 1px solid var(--hairline);
}

.dated-list__year {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--bronze-deep);
    padding-top: 0.3em;
}

.dated-list__title {
    color: var(--color-text);
    line-height: 1.55;
    font-size: 1.02rem;
}

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.35rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--hairline-strong);
}

.timeline__item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 2.75rem;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__dot {
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    background: var(--bronze);
    transform: rotate(45deg);
    z-index: 1;
}

.timeline__year {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--bronze-deep);
    margin-bottom: 0.4rem;
}

.timeline__title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.45rem;
}

.timeline__desc {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.65;
    margin: 0;
    max-width: 56ch;
}

/* ==========================================================================
   Citas — banda carbón
   ========================================================================== */

.sf-block--quote {
    position: relative;
    background: var(--ink);
    color: var(--paper);
    text-align: center;
    padding: clamp(5rem, 11vw, 8.5rem) 0;
    overflow: hidden;
}

.sf-block--quote::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    background-repeat: repeat;
    opacity: 0.07;
    pointer-events: none;
}

.sf-quote {
    position: relative;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
    z-index: 1;
}

.sf-quote__text {
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 3.2vw, 2.5rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 2rem;
    color: rgba(255, 255, 255, 0.94);
    position: relative;
}

.sf-quote__text::before {
    content: '\201C';
    display: block;
    font-size: clamp(4rem, 8vw, 6.5rem);
    line-height: 0.6;
    margin-bottom: 1.4rem;
    color: var(--bronze-light);
    opacity: 0.85;
    font-family: Georgia, serif;
    position: static;
}

.sf-quote__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.sf-quote__author {
    font-family: var(--font-sans);
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--bronze-light);
}

.sf-quote__source {
    font-size: 0.95rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.55);
}

/* ==========================================================================
   Contacto
   ========================================================================== */

.sf-block--contact {
    text-align: center;
    padding: clamp(5.5rem, 12vw, 9rem) 0;
}

.sf-contact {
    max-width: 620px;
    margin: 0 auto;
}

.sf-contact__title {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    margin: 0 0 1.2rem;
}

.sf-contact__title::before {
    content: '';
    display: block;
    width: 44px;
    height: 1px;
    background: var(--bronze);
    margin: 0 auto 1.6rem;
}

.sf-contact__text {
    color: var(--color-text-light);
    margin: 0 auto calc(var(--spacing-unit) * 2.5);
    line-height: 1.7;
    max-width: 46ch;
}

.sf-contact__email {
    margin-bottom: 0.9rem;
}

.sf-contact__email-link {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 500;
    display: inline-block;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--hairline-strong);
    transition: border-color 0.35s ease, color 0.35s ease;
}

.sf-contact__email-link:hover {
    color: var(--bronze-deep);
    border-bottom-color: var(--bronze-deep);
}

.sf-contact__phone {
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}

.sf-contact__phone-link {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--color-text-light);
}

.sf-contact__phone-link:hover {
    color: var(--bronze-deep);
}

.sf-contact__social {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.sf-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--hairline-strong);
    border-radius: 0;
    background: transparent;
    color: var(--color-text);
    transition: all 0.35s ease;
}

.sf-social-link:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    text-decoration: none;
    transform: translateY(-3px);
}

/* ==========================================================================
   Galerías
   ========================================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(0.9rem, 2vw, 1.5rem);
}

.gallery-grid figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: var(--paper-warm);
}

.gallery-grid figure::before {
    content: '';
    display: block;
    padding-top: 75%;
}

.gallery-grid img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 1.2s var(--ease-out-expo), filter 0.7s ease;
}

.gallery-grid figure:hover img {
    transform: scale(1.05);
}

.sf-gallery {
    display: grid;
    gap: clamp(0.9rem, 2vw, 1.5rem);
}

.sf-gallery--cols-masonry {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.sf-gallery__item {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: var(--paper-warm);
}

.sf-gallery__item::before {
    content: '';
    display: block;
    padding-top: 75%;
}

.sf-gallery__link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    border-radius: 0;
}

.sf-gallery__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.96);
    transition: transform 1.2s var(--ease-out-expo), filter 0.7s ease;
}

.sf-gallery__link:hover img {
    transform: scale(1.06);
    filter: saturate(1.05);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    position: relative;
    background: var(--ink-deep);
    color: var(--paper);
    padding: clamp(4rem, 8vw, 6rem) 0 2.5rem;
    margin-top: 0;
    text-align: center;
    overflow: hidden;
}

.site-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    background-repeat: repeat;
    opacity: 0.06;
    pointer-events: none;
}

.footer-container {
    position: relative;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    z-index: 1;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1.6);
    margin-bottom: calc(var(--spacing-unit) * 2.5);
    text-align: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 600;
    margin: 0 0 0.4rem;
    letter-spacing: 0.03em;
    color: #ffffff;
}

.footer-tagline {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.footer-link {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.72);
}

.footer-link:hover {
    color: var(--bronze-light);
    text-decoration: none;
}

.footer-location {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
}

.footer-copy {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.35);
    margin: 0;
    padding-top: calc(var(--spacing-unit) * 1.75);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Focus / util
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--bronze-deep);
    outline-offset: 3px;
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s ease, transform 0.9s var(--ease-out-expo);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   Language switcher (legado)
   ========================================================================== */

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--hairline);
    color: var(--color-text-light);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.lang-link.active,
.lang-link:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #ffffff;
    text-decoration: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
    .header-contact {
        display: none;
    }
}

@media (max-width: 900px) {
    :root {
        --header-h: 64px;
    }

    .sf-hero__layout {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 2);
    }

    .sf-hero__portrait {
        width: min(100%, 300px);
        order: -1;
    }

    .sf-block--hero--about {
        align-items: flex-end;
        min-height: auto;
        padding-top: calc(var(--header-h) + 4rem);
    }

    .sf-block--hero--about .sf-hero__layout {
        grid-template-columns: 1fr;
    }

    .sf-block--hero--about .sf-hero__portrait {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--hairline);
        flex-direction: column;
        padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
        gap: 0.9rem;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    /* En menú abierto los enlaces siempre en tinta */
    .home-page .site-header:not(.is-scrolled) .nav-menu.active a,
    .about-page .site-header:not(.is-scrolled) .nav-menu.active a,
    .projects-index .site-header:not(.is-scrolled) .nav-menu.active a {
        color: var(--color-text);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .discipline-panel__content--split {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-top: clamp(6rem, 14vh, 8rem);
    }

    .discipline-panel__plate {
        order: -1;
    }

    .discipline-panel__plate img {
        max-height: 44vh;
    }

    .name-list {
        columns: 2;
    }
}

@media (max-width: 768px) {
    :root {
        --sf-section-padding: clamp(3.5rem, 10vw, 5rem);
    }

    .home-page .sf-block--hero--minimal .sf-hero__title {
        font-size: clamp(2.6rem, 13vw, 4.4rem);
        letter-spacing: 0.03em;
    }

    .home-page .sf-block--hero--minimal .sf-hero__subtitle {
        letter-spacing: 0.22em;
    }

    .sf-hero__scroll {
        display: none;
    }

    .sf-block--discipline-panel {
        min-height: 88vh;
        min-height: 88svh;
    }

    .discipline-panel__title {
        font-size: clamp(2.3rem, 11vw, 3.6rem);
    }

    .page-header--image {
        min-height: 52vh;
    }

    .sf-text--with-image {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .sf-text__image {
        order: -1 !important;
    }

    .sf-text__image::after {
        inset: 10px -10px -10px 10px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-card__summary {
        display: none;
    }

    .dated-list__item {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .footer-grid {
        flex-direction: column;
        text-align: center;
    }

    .footer-contact {
        text-align: center;
    }
}

@media (max-width: 560px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .sf-gallery--cols-masonry {
        grid-template-columns: repeat(2, 1fr);
    }

    .sf-gallery__item::before {
        padding-top: 66.67%;
    }

    .name-list {
        columns: 1;
    }

    .gallery-grid figure::before {
        padding-top: 100%;
    }

    .discipline-panel__plate::after {
        inset: -10px;
    }
}

/* ==========================================================================
   Movimiento reducido
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .discipline-panel__image {
        transform: none;
    }

    .discipline-panel--plate .discipline-panel__image {
        transform: scale(1.16);
    }
}

/* ==========================================================================
   Impresión
   ========================================================================== */

@media print {
    body::after {
        display: none;
    }

    .site-header,
    .site-footer,
    .skip-link,
    .menu-toggle,
    .sf-hero__background,
    .sf-hero__scroll,
    .discipline-panel__image,
    .discipline-panel__overlay,
    .page-header__background,
    .page-header__scrim {
        display: none !important;
    }

    .sf-block--hero,
    .sf-block--discipline-panel,
    .page-header--image {
        min-height: auto;
        padding: 2rem 0;
        color: #000;
        background: none;
        page-break-after: avoid;
    }

    .sf-hero__title,
    .discipline-panel__title,
    .page-header--image h1,
    .discipline-panel__text,
    .page-header--image .intro {
        color: #000 !important;
    }

    .sf-block {
        padding: 1.5rem 0;
        page-break-inside: avoid;
    }

    .sf-block--quote {
        background: none;
        color: #000;
    }

    .sf-quote__text {
        color: #000;
    }

    .project-card__link {
        aspect-ratio: auto;
    }

    .project-card__veil {
        display: none;
    }

    a {
        color: #000 !important;
    }

    .btn {
        border: 1px solid #999;
        color: #333;
        background: none !important;
    }

    body {
        font-size: 11pt;
        line-height: 1.4;
        padding-top: 0 !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
