/*
Theme Name: Salayenko
Theme URI: https://salayenko.com
Author: Salayenko
Author URI: https://salayenko.com
Description: Tema autoral para archivo cultural e investigación independiente. Diseño editorial minimalista con tipografía Bodoni Moda + Inter.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: salayenko
*/

/* === RESET === */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

/* === VARIABLES === */
:root {
    --bg: #e6e5e1;
    --ink: #111110;
    --muted: #5a5a58;
    --max-width: 1600px;
    --grid-gap: 2rem;
    --side-padding: 2.5rem;
}

/* === GRAIN OVERLAY === */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    opacity: .38;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}

/* === BODY === */
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === TYPOGRAPHY === */
.display {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    line-height: .9;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.label {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
}

/* === LAYOUT === */
.wrap {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--side-padding);
}

.g12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
}

/* === BORDERS === */
.rule-top { border-top: 1px solid var(--ink); }
.rule-bottom { border-bottom: 1px solid var(--ink); }

/* === NAV === */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.8rem 0;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* === HAMBURGER MOBILE === */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 18px;
    position: relative;
    z-index: 101;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--ink);
    position: absolute;
    left: 0;
    transition: all .3s;
}

.nav-hamburger span:nth-child(1) { top: 0; }
.nav-hamburger span:nth-child(2) { top: 50%; }
.nav-hamburger span:nth-child(3) { bottom: 0; }

.nav-hamburger.active span:nth-child(1) { top: 50%; transform: rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { bottom: auto; top: 50%; transform: rotate(-45deg); }

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 5rem;
    padding-top: 22vh;
}

.hero-label {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    margin-bottom: 2rem;
    display: block;
}

.hero-title {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    line-height: .88;
    letter-spacing: -.02em;
    text-transform: uppercase;
    font-size: clamp(3.5rem, 8.8vw, 10.5rem);
    grid-column: 1 / -1;
}

.hero-sub {
    grid-column: 7 / 13;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding-top: 2.5rem;
}

.hero-sub p {
    font-size: 1.3rem;
    line-height: 1.35;
    color: var(--ink);
}

/* === BUTTONS === */
.btn-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ink);
    padding: .9rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    background: transparent;
    transition: background .3s, color .3s;
    cursor: pointer;
}

.btn:hover {
    background: var(--ink);
    color: var(--bg);
}

/* === SECTIONS === */
section {
    padding: 6rem 0;
}

/* === PILLARS === */
.pillar {
    padding-top: 2rem;
}

.pillar h3 {
    font-family: 'Bodoni Moda', serif;
    font-weight: 400;
    font-size: 2.4rem;
    text-transform: none;
    font-style: italic;
    line-height: 1;
    margin-bottom: 1.2rem;
}

.pillar p {
    font-size: .875rem;
    line-height: 1.75;
    color: var(--muted);
    padding-right: 2rem;
}

/* === SECTION HEAD === */
.sec-head {
    position: sticky;
    top: 8rem;
    align-self: start;
}

.sec-head-title {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: clamp(2.8rem, 4.5vw, 4.2rem);
    text-transform: uppercase;
    line-height: .9;
    letter-spacing: -.02em;
    margin-bottom: .8rem;
}

/* === ESSAYS === */
.essay-row {
    display: grid;
    grid-template-columns: 1fr 5fr 2fr;
    align-items: baseline;
    padding: 2.5rem 0;
    cursor: pointer;
    transition: background .3s;
    text-decoration: none;
    color: var(--ink);
}

.essay-row:hover {
    background: rgba(0, 0, 0, .025);
}

.essay-row:hover .essay-title {
    font-style: italic;
}

.essay-title {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    text-transform: none;
    line-height: 1.05;
    letter-spacing: -.01em;
    margin-bottom: .6rem;
    transition: font-style .2s;
}

.essay-excerpt {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.65;
    max-width: 36rem;
}

.essay-tags {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: var(--muted);
    text-align: right;
}

/* === PROJECTS === */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.proj-card {
    border: 1px solid var(--bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 3 / 4;
    text-decoration: none;
    color: var(--bg);
    position: relative;
    overflow: hidden;
    transition: transform .3s;
}

.proj-card:hover {
    transform: translateY(-5px);
}

.proj-card p {
    font-size: .82rem;
    line-height: 1.65;
    opacity: .8;
}

.proj-title {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: 2rem;
    text-transform: none;
    line-height: 1.1;
    letter-spacing: -.01em;
}

.proj-status {
    font-family: 'Inter', sans-serif;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    opacity: .45;
    display: block;
    margin-top: .6rem;
    font-weight: 400;
}

/* === ARCHIVE GRID === */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.archive-item {
    display: flex;
    flex-direction: column;
    cursor: crosshair;
}

.archive-item:nth-child(2) {
    grid-column: span 2;
    grid-row: span 2;
}

.archive-item:nth-child(5) {
    grid-column: span 2;
}

.arch-img {
    overflow: hidden;
    background: #d0cfcb;
    width: 100%;
    flex: 1;
}

.arch-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) contrast(120%) brightness(.9);
    transition: filter .5s, transform .7s;
    min-height: 180px;
}

.archive-item:hover .arch-img img {
    filter: none;
    transform: scale(1.02);
}

.arch-meta {
    display: flex;
    justify-content: space-between;
    padding: .4rem 0;
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
}

.arch-meta span:last-child {
    color: var(--muted);
}

/* === VIDEO === */
.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .6;
    filter: grayscale(100%);
    transition: opacity .3s;
    display: block;
    position: absolute;
    inset: 0;
}

.video-wrap:hover img {
    opacity: .8;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent 60%);
    z-index: 1;
}

.play-btn {
    position: relative;
    z-index: 2;
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: -.01em;
    color: #fff;
    border: 1px solid #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(4px);
    transition: all .3s;
    background: transparent;
    cursor: pointer;
}

.video-wrap:hover .play-btn {
    background: rgba(255, 255, 255, .1);
    transform: scale(1.04);
}

.video-meta {
    position: absolute;
    bottom: 1.5rem;
    left: 2rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    opacity: .8;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.video-meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    display: inline-block;
}

/* === ABOUT === */
.about-img {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #d0cfcb;
    position: relative;
    filter: grayscale(1);
    transition: filter .7s;
}

.about-img:hover {
    filter: none;
}

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

.about-img-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: #fff;
    mix-blend-mode: difference;
}

/* === LINK ARROW === */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
}

.link-arrow:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* === FOOTER === */
.footer-name {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.02em;
    text-transform: uppercase;
    font-size: clamp(4rem, 10vw, 10rem);
    margin-bottom: 3rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 3rem;
    row-gap: 1.5rem;
}

.footer-links a {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    position: relative;
    padding-bottom: .25rem;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s;
}

.footer-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid rgba(17, 17, 16, .15);
    padding-top: 1.5rem;
}

/* === ESSAY FILTERS === */
.essay-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
}

.essay-filter-btn {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: .6rem 1.2rem;
    border: 1px solid transparent;
    transition: all .3s;
}

.essay-filter-btn:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.essay-filter-btn.active {
    color: var(--ink);
    border-color: var(--ink);
}

/* === PAGINATION === */
.pagination {
    margin-top: 3rem;
    display: flex;
    gap: .5rem;
    justify-content: center;
}

.pagination a,
.pagination span {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: .6rem 1rem;
    border: 1px solid transparent;
    transition: all .3s;
}

.pagination a:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.pagination .current {
    color: var(--ink);
    border-color: var(--ink);
}

/* === SINGLE ENSAYO === */
.ensayo-header {
    padding-top: 14rem;
    padding-bottom: 4rem;
}

.ensayo-meta {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.ensayo-body {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 var(--side-padding);
}

.ensayo-body p {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ink);
    margin-bottom: 1.5rem;
}

.ensayo-body h2 {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem;
    line-height: 1.1;
}

.ensayo-body h3 {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem;
    line-height: 1.2;
}

.ensayo-body blockquote {
    border-left: 2px solid var(--ink);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--muted);
}

.ensayo-body img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
}

.ensayo-body ul,
.ensayo-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.ensayo-body li {
    margin-bottom: .5rem;
    line-height: 1.7;
}

.ensayo-nav {
    max-width: 700px;
    margin: 4rem auto;
    padding: 3rem var(--side-padding) 0;
    border-top: 1px solid var(--ink);
    display: flex;
    justify-content: space-between;
}

.ensayo-nav a {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    max-width: 45%;
}

.ensayo-nav a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ensayo-nav-label {
    display: block;
    color: var(--muted);
    margin-bottom: .5rem;
}

/* === EPISODIOS === */
.temporada-block {
    margin-bottom: 4rem;
}

.temporada-header {
    padding: 2rem 0;
    margin-bottom: 1rem;
}

.episodio-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 0;
    text-decoration: none;
    color: var(--ink);
    transition: background .3s;
}

.episodio-row:hover {
    background: rgba(0, 0, 0, .025);
}

.episodio-num {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: 1.8rem;
    min-width: 3rem;
}

.episodio-info h3 {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.2;
    margin-bottom: .3rem;
}

.episodio-info p {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.5;
}

.episodio-duracion {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    color: var(--muted);
}

/* === SINGLE EPISODIO === */
.episodio-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    margin-bottom: 3rem;
}

.episodio-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.episodio-transcripcion {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem var(--side-padding) 0;
    border-top: 1px solid var(--ink);
}

.episodio-transcripcion h2 {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 2rem;
}

.episodio-transcripcion p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* === ABOUT PAGE === */
.about-section {
    margin-bottom: 4rem;
}

.about-section h2 {
    font-family: 'Bodoni Moda', serif;
    font-weight: 600;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.about-section p {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 1rem;
    max-width: 34rem;
}

/* === CONTACT PAGE === */
.contact-types {
    margin-bottom: 3rem;
}

.contact-types li {
    font-size: .95rem;
    color: var(--muted);
    line-height: 2;
    list-style: none;
    padding-left: 1.5rem;
    position: relative;
}

.contact-types li::before {
    content: '—';
    position: absolute;
    left: 0;
}

.contact-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
    display: block;
    margin-bottom: .5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    padding: .8rem 0;
    border: none;
    border-bottom: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    outline: none;
    transition: border-color .3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-bottom-color: var(--muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    padding: 1rem 0;
    font-size: .85rem;
}

.form-message.success { color: #2a6e3f; }
.form-message.error { color: #9A2A1A; }

/* === FOTO GALLERY === */
.foto-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.foto-item {
    cursor: crosshair;
}

.foto-item:nth-child(3n+1) {
    grid-column: span 2;
}

.foto-img-wrap {
    overflow: hidden;
    background: #d0cfcb;
}

.foto-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%) contrast(120%) brightness(.9);
    transition: filter .5s, transform .7s;
}

.foto-item:hover .foto-img-wrap img {
    filter: none;
    transform: scale(1.02);
}

.foto-caption {
    padding: .5rem 0;
}

/* === LIGHTBOX === */
.foto-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.foto-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.foto-lightbox-close,
.foto-lightbox-prev,
.foto-lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    font-family: 'Inter', sans-serif;
    z-index: 1001;
    opacity: .7;
    transition: opacity .3s;
}

.foto-lightbox-close:hover,
.foto-lightbox-prev:hover,
.foto-lightbox-next:hover {
    opacity: 1;
}

.foto-lightbox-close {
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
}

.foto-lightbox-prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.foto-lightbox-next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    :root {
        --side-padding: 1.5rem;
    }

    .g12 {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-title {
        grid-column: 1 / -1;
    }

    .hero-sub {
        grid-column: 1 / -1;
    }

    .pillar-wrap > .pillar {
        grid-column: span 4 !important;
    }

    .sec-head {
        position: relative;
        top: auto;
        grid-column: 1 / -1 !important;
    }

    .essays-list {
        grid-column: 1 / -1 !important;
    }

    .essay-row {
        grid-template-columns: 1fr;
        gap: .5rem;
    }

    .essay-tags {
        text-align: left;
    }

    .series-video {
        grid-column: 1 / -1 !important;
    }

    .proj-grid {
        grid-template-columns: 1fr;
    }

    .proj-card {
        aspect-ratio: auto;
        min-height: 280px;
    }

    .archive-wrap {
        grid-column: 1 / -1 !important;
    }

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

    .archive-item:nth-child(2) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .archive-item:nth-child(5) {
        grid-column: span 1;
    }

    .about-image-col {
        grid-column: 1 / -1 !important;
    }

    .about-text-col {
        grid-column: 1 / -1 !important;
    }

    .projects-list {
        grid-column: 1 / -1 !important;
    }

    /* Nav mobile */
    .nav-hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right .3s;
        z-index: 100;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: .8rem;
        text-align: center;
    }

    .foto-gallery {
        grid-template-columns: 1fr;
    }

    .foto-item:nth-child(3n+1) {
        grid-column: span 1;
    }

    .episodio-row {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }

    .episodio-row > div:last-child {
        display: none;
    }

    .essay-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .5rem;
    }

    .essay-filter-btn {
        white-space: nowrap;
    }
}

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

    .hero {
        padding-top: 15vh;
        padding-bottom: 3rem;
    }

    /* Reduce grain opacity on mobile for performance */
    body::before {
        opacity: .2;
    }

    .ensayo-nav {
        flex-direction: column;
        gap: 2rem;
    }

    .ensayo-nav a {
        max-width: 100%;
    }

    .ensayo-nav div:last-child {
        text-align: left;
    }

    section {
        padding: 4rem 0;
    }

    .pillar {
        grid-column: 1 / -1 !important;
    }
}
