:root {
    --bg-color: #FAF3E1;
    --text-color: #222222;
    --accent-color: #FA8112;

    --font-heading: 'Syne', sans-serif;
    --font-body: 'Space Grotesk', monospace;

    --spacing-unit: 1rem;
    --border-width: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Apply max-width only to elements that can cause overflow */
img,
video,
iframe,
svg,
.article-item,
.article-list,
.hero-content,
.view,
.main-header {
    max-width: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.5;
    height: 100vh;
    /* Full viewport height */
    overflow-y: hidden;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    display: flex;
    /* Flex container */
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 800;
}

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

/* Layout */
.main-header {
    border-bottom: var(--border-width) solid var(--text-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: var(--bg-color);
    flex: 0 0 auto;
    /* Header doesn't shrink/grow */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    /* Affordance: indica que é clicável */
}

.logo-img {
    height: 60px;
    /* +50% */
    width: auto;
}

/* Replaces .logo h1 */
.logo-svg {
    width: 240px;
    /* +50% */
    height: auto;
    color: var(--text-color);
    display: block;
}


main {
    flex: 1;
    /* Takes remaining space */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Hero Section - FIXED */
.hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* 60% texto, 40% imagem — proporção padrão */
    /* border-bottom removed */
    flex: 1;
    /* Fill main */
    height: 100%;
    min-height: 0;
    /* Anima suavemente a mudança de grid ao entrar/sair do reading-mode */
    transition: grid-template-columns 0.7s ease-in-out;
}

.hero-content {
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: var(--border-width) solid var(--text-color);
    text-align: left;
    align-items: flex-start;
    position: relative;
    /* FIX Safari/4K: clip evita scroll lateral sem criar containing-block */
    overflow: hidden;
    /* Fallback: Safari ≥15 */
    overflow: clip;
    /* Preferencial: Safari 16+, Chrome 90+, Firefox 102+ */
    min-height: 0;
}

/* No reading-mode, precisa de overflow visible para o scrollbar do artigo aparecer */
.hero.reading-mode .hero-content {
    overflow: visible;
    justify-content: flex-start;
    /* Artigo alinha pelo topo, não pelo centro */
    padding-right: 1rem;
    /* Respiro entre scrollbar e borda da imagem */
}

/* Grid expandido APENAS na tela de leitura de artigo */
.hero.reading-mode {
    grid-template-columns: 7fr 3fr;
    /* 70% texto, 30% imagem */
}

/* Typography inside views */
.view h2 {
    font-size: clamp(2rem, 10vw, 5rem);
    line-height: 0.9;
    margin-bottom: 2rem;
    word-break: break-word;
}

/* Hero SVG Desktop —
   FIX: usar width:100% em vez de width:auto para que o Flex/Grid
   determine o tamanho (previne o colapso de 300px no Safari).
   height:auto + aspect-ratio preserva proporção em qualquer resolução.
   min-height garante visibilidade mínima quando o container está sem height.
*/
.hero-svg-desktop {
    width: 100%;
    /* Preenche o container — corrige o bug 4K/Safari */
    height: auto;
    /* Mantém proporção via viewBox */
    min-height: 200px;
    /* Fallback: nunca colapsa abaixo de 200px */
    max-height: 75vh;
    /* Evita estouro vertical em telas altas */
    max-width: 100%;
    /* Nunca ultrapassa o container */
    color: var(--text-color);
    display: block;
    /* Remove espaço de linha abaixo (inline default) */
    margin-bottom: 1rem;
    overflow: visible;
    /* Texto com letter-spacing negativo não fica clipado */
    flex-shrink: 0;
    /* Dentro de flex, não deixa o SVG ser espremido */
}

/* View management */
.view {
    width: 100%;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(10px);
    pointer-events: none;
    /* Prevent clicks on hidden views */
    z-index: 0;
    /* Fallback: ensure behind active */
}

.view.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    transform: translateY(0);
    pointer-events: auto;
    /* Enable clicks */
    z-index: 10;
    /* Ensure on top */
}

.view.fading-out {
    opacity: 0;
    transform: translateY(-10px);
}

.view h3 {
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: -1px;
}

/* Article & Browse List Styling - Scrollable Card Section */
.view#articles-view,
.view#browse-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-list {
    width: 100%;
    max-width: 800px;
    margin-left: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 1.5rem 2rem 10px;
    /* Added 10px top/left for hover "breathing room" */
    display: flex;
    flex-direction: column;
}

.wip-message {
    margin-top: 4rem;
    border-left: var(--border-width) solid var(--text-color);
    padding-left: 1.5rem;
    opacity: 0.6;
}

.wip-message h3 {
    height: auto !important;
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

.wip-message p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    max-width: 400px;
}

/* Custom scrollbar for brutalist look */
.article-list::-webkit-scrollbar {
    width: 8px;
}

.article-list::-webkit-scrollbar-track {
    background: transparent;
    border-left: 1px solid var(--text-color);
}

.article-list::-webkit-scrollbar-thumb {
    background: var(--text-color);
}

.article-item {
    background-color: var(--bg-color);
    border: var(--border-width) solid var(--text-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* Ensure padding doesn't affect width */
    max-width: 100%;
    overflow: visible !important;
    word-wrap: break-word;
}

.article-item:hover {
    background-color: white;
    transform: translate(-6px, -6px);
    /* Slightly more pronounced but safe now */
    box-shadow: 6px 6px 0px var(--text-color);
}


/* TAREFA 1: Títulos de Artigos
   font-weight 800->700 alivia a massa visual em multi-linha.
   line-height 1.3->1.15 é mais editorial e seco (brutalista).
   letter-spacing -0.5px compensa o peso menor, mantendo aperto tipográfico. */
.article-item h4 {
    font-size: clamp(0.85rem, 4vw, 1.8rem);
    font-weight: 700;
    margin: 0.5rem 0;
    line-height: 1.15;
    letter-spacing: -0.5px;
    padding-bottom: 2px;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
    -webkit-hyphens: none;
    color: var(--text-color);
    display: block;
}

/* Smaller title for cards with long wide words */
.compact-title h4 {
    font-size: clamp(0.6rem, 3.2vw, 1.8rem);
}

/* Shared Tag Styles */
.card-tags,
.detail-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-tags {
    margin-top: 1rem;
}

.detail-tags {
    margin-bottom: 2rem;
    gap: 0.8rem;
}

/* Limit to 4 tags per row/view */
.card-tags .tag:nth-child(n+5),
.detail-tag:nth-child(n+5) {
    display: none;
}

.article-item .tag,
.detail-tag {
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    letter-spacing: 1px;
    width: fit-content;
    text-transform: uppercase;
}

.article-item .tag {
    background-color: var(--text-color);
    color: var(--bg-color);
    font-size: 0.65rem;
    display: inline-block;
}

.detail-tag {
    background-color: var(--accent-color);
    color: var(--text-color);
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
}


.article-item .date {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

/* TAREFA 3: Ritmo Visual — parágrafos dos cards com mais respiro */
.article-item p {
    font-size: 1rem;
    opacity: 0.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-bottom: 0.75rem;
    line-height: 1.55;
}

/* Article Detail View Styling */
#article-detail-view {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Garante que só o #article-full-content faça scroll */
    width: 100%;
    /* Ocupa todo o espaço do hero-content */
}

.detail-header {
    height: 80px;
    /* Reduced from 120px */
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Space for title */
    flex: 0 0 auto;
    position: relative;
    padding-right: 1.5rem;
}

.sticky-title {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: clamp(0.9rem, 3.5vw, 1.2rem);
    pointer-events: none;
    max-width: 80%;
    text-align: right;
    line-height: 1.1;
    display: block;
}

.sticky-title.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Shared View Header Styling */
.view-header {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    flex: 0 0 auto;
    padding: 1rem 2rem 1rem 0;
    gap: 1rem;
}

/* Tag Select Styling */
.tag-select-container {
    padding: 0;
    width: auto;
    max-width: 100%;
}

.tag-select {
    width: 100%;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--font-body);
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 0.8rem 1.2rem;
    min-height: 48px;
    /* Standard accessible touch target size */
    border: var(--border-width) solid var(--text-color);
    border-radius: 4px;
    /* Slightly softer brutalism for mobile */
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FAF3E1' stroke-width='3' stroke-linecap='square' stroke-linejoin='arcs'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tag-select:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
    transform: translate(-4px, -4px);
    box-shadow: 4px 4px 0px var(--text-color);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23222222' stroke-width='3' stroke-linecap='square' stroke-linejoin='arcs'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.tag-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.back-btn {
    background: none;
    border: 1px solid var(--text-color);
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

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

/* Onboarding Styling */
.onboarding-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 5rem;
}

.onboarding-content {
    max-width: 90%;
    width: 800px;
    border-left: 6px solid var(--accent-color);
    padding-left: clamp(1rem, 5vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.onboarding-content p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    opacity: 0.7;
    flex: 1;
}

.onboarding-arrow {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--accent-color);
    animation: bounce 2s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* Container de scroll: preenche a coluna, respiro via padding-right */
#article-full-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 1.5rem;
    /* Respiro interno entre texto e scrollbar */
    width: 100%;
    max-width: 100%;
}

#article-full-content h2 {
    font-size: clamp(1.4rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    overflow-wrap: break-word;
    word-break: keep-all;
    hyphens: none;
    -webkit-hyphens: none;
}

/* Tags consolidated above */

#article-full-content .meta {
    font-weight: 700;
    margin-bottom: 2rem;
    display: block;
    color: var(--accent-color);
}

/* TAREFA 2: Foco no Texto — corpo do artigo com fonte maior e mais linha de respiro */
#article-full-content p {
    font-size: 1.25rem;
    /* Era 1.2rem */
    line-height: 1.75;
    /* Era 1.6 — leitura mais confortável */
    margin-bottom: 2rem;
    /* Era 1.5rem — mais respiro entre parágrafos */
}

/* TAREFA 3: Ritmo Visual — mais espaço em torno da blockquote */
#article-full-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 3rem 0;
    /* Era 2rem — mais destaque e respiro */
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.5;
}

.author-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: var(--border-width) solid var(--text-color);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background-color: rgba(0, 0, 0, 0.03);
    /* Subtle background */
    padding: 2rem;
}

.author-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: var(--border-width) solid var(--text-color);
    filter: grayscale(1);
    transition: filter 0.3s;
}

.author-img:hover {
    filter: grayscale(0);
}

.author-info h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.author-info p {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0 !important;
    opacity: 0.8;
}

/* Styling the detail scrollbar similar to list */
#article-full-content::-webkit-scrollbar {
    width: 6px;
}

#article-full-content::-webkit-scrollbar-track {
    background: transparent;
}

#article-full-content::-webkit-scrollbar-thumb {
    background: var(--text-color);
    opacity: 0.3;
}

.about-text {
    margin-top: 2rem;
    font-size: 1.3rem;
    max-width: 500px;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.hero-graphic {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--text-color);
    color: var(--bg-color);
    overflow: hidden;
    position: relative;
}

/* Grid expandido APENAS na tela de leitura de artigo */
.hero.reading-mode {
    grid-template-columns: 3fr 1fr;
    /* 75% texto, 25% imagem */
    transition: grid-template-columns 0.5s ease-in-out;
}

.circle {
    width: 80%;
    /* Responsive width */
    max-width: 400px;
    aspect-ratio: 1 / 1;
    /* Keep it circular */
    height: auto;
    background-color: var(--accent-color);
    border-radius: 50%;
    /* Subtle animation */
    animation: pulse 8s infinite ease-in-out;
    /* Default return transition: 4s (used when .expanded is removed) */
    transition: background-color 0.5s ease-in-out,
        transform 4s ease-in-out,
        border-color 0.3s ease,
        width 4s ease-in-out,
        height 4s ease-in-out,
        max-width 4s ease-in-out,
        border-radius 4s ease-in-out;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    will-change: transform, width, height, border-radius;
    /* GPU pre-calculation */
}

.circle.pulse-off {
    /* Don't stop all animations, just override the transform scale */
    transform: scale(1) !important;
    /* Lock scale at exactly 1 */
    transition: transform 2s cubic-bezier(0.33, 1, 0.68, 1) !important;
    /* Smooth transition from current pulse scale to 1 */
}

/* ── Animação de Saída (botão Voltar) ────────────────────────────── */

/* Oculta o círculo sem flash enquanto o painel redimensiona */
.circle.hidden-for-entry {
    opacity: 0 !important;
    pointer-events: none;
}

/* Fase 2: bola aparece com fade-in simples após o painel terminar */
@keyframes circleAppear {
    from {
        opacity: 0;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.circle.entering {
    animation: circleAppear 0.8s ease-out forwards;
}

/* ─────────────────────────────────────────────────────────────────── */

/* Bloqueia TODA interação durante a animação — previne bugs de clique múltiplo */
body.anim-lock {
    pointer-events: none;
    user-select: none;
}

/* ─────────────────────────────────────────────────────────────────── */

.circle.expanded {
    border-radius: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;

    /* Animação mínima: direto do círculo para fill completo em 2s */
    animation: morphExpansion 2s ease-in-out forwards;
}

@keyframes morphExpansion {
    from {
        width: 80%;
        height: 80%;
        max-width: 400px;
        border-radius: 50%;
    }

    to {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
    }
}

.circle-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 1;
    filter: grayscale(1) contrast(1.1);
}

.circle-image.visible {
    opacity: 1;
}

.circle.has-cover {
    background-color: #222;
    /* Darker background when showing image */
    border-color: var(--accent-color);
    transform: scale(1.1);
}

/* Overlay mask for the image */
/* Removed orange overlay */
.circle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 2;
}

.circle.has-cover::after {
    opacity: 0;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.85);
    }

    100% {
        transform: scale(1);
    }
}

/* Logo Styling */
.logo {
    font-size: 2.5rem;
    line-height: 0.9;
}

.logo .highlight {
    color: var(--accent-color);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* Extra trick: push the near-white background to pure white so multiply hides it perfectly */
    filter: brightness(1.05) contrast(1.2);
}

/* Nav Styling */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    font-weight: 700;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 2px;
}

.main-nav a:hover {
    color: var(--accent-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* Footer - HIDDEN */
.main-footer {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .view-header {
        height: auto;
        flex-direction: column;
        align-items: stretch;
        /* Stretch children (selector) to full width */
        padding: 1.5rem 0;
        gap: 1.5rem;
    }

    .tag-select-container {
        width: 100%;
        margin-right: 0;
        padding: 0 1rem;
    }

    .tag-select {
        font-size: 0.9rem;
        /* Smaller text for mobile space */
        padding: 0.7rem 1rem;
        /* Larger tap area padding */
        width: 100%;
    }

    .onboarding-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .onboarding-arrow {
        order: -1;
        /* Arrow above text on mobile too */
        transform: rotate(0deg);
        /* Keep it pointing up */
    }

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

    .hero-graphic {
        display: none;
    }

    /* Mobile: Disable hover effects that cause horizontal scroll */
    .article-item:hover {
        transform: none;
        box-shadow: none;
        background-color: white;
    }

    .tag-select:hover {
        transform: none;
        box-shadow: none;
    }

    /* Improve mobile navigation */
    .main-nav ul {
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
    }

    .main-nav a {
        font-size: 1rem;
        padding: 0.5rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* 4K Display Optimizations (2560px+) */
@media (min-width: 2560px) {

    /* Scale up base font size */
    html {
        font-size: 18px;
    }

    /* Scale up the circle for large screens */
    .circle {
        max-width: 800px;
    }

    /* Scale up typography */
    .view h2 {
        font-size: clamp(3rem, 8vw, 8rem);
    }

    /* Increase spacing */
    .hero-content {
        padding: 0 4rem;
    }

    /* FIX: Garantir que o SVG nunca colapsa em 4K — min-height relativo à viewport */
    .hero-svg-desktop {
        min-height: 40vh;
        max-height: 70vh;
    }

    .article-item {
        padding: 2.5rem;
        margin-bottom: 2.5rem;
    }

    .article-item h4 {
        font-size: 2.2rem;
    }

    .article-item p {
        font-size: 1.3rem;
    }
}

/* Ultra-wide 4K (3840px+) */
@media (min-width: 3840px) {
    html {
        font-size: 20px;
    }

    .circle {
        max-width: 1200px;
    }

    .hero-content {
        padding: 0 6rem;
    }

    /* FIX: Em ultrawide o SVG já escala via width:100%, mas garantimos
       que o min-height seja proporcional à viewport */
    .hero-svg-desktop {
        min-height: 50vh;
    }

    .article-item {
        padding: 3rem;
        margin-bottom: 3rem;
    }
}

/* =========================================
   MOBILE EDITORIAL HEADER IMPLEMENTATION
   ========================================= */

/* Default: Hide Mobile Header & SVG on Desktop */
.mobile-header,
.hero-svg-mobile {
    display: none;
}

@media (max-width: 768px) {

    /* Mobile Scroll Enable */
    body {
        overflow-y: auto !important;
        /* Force native scroll on mobile */
        height: auto !important;
        /* Let body grow beyond viewport */
        display: block !important;
        /* Override flex so content flows and triggers window scroll */
    }

    /* Adjust Main Container for scroll */
    main {
        overflow: visible;
        /* Allow content to flow */
        height: auto;
    }

    .view {
        position: relative;
        /* Stack normally */
        height: auto;
        opacity: 1;
        visibility: visible;
        /* Override desktop visibility: hidden */
        overflow: visible;
        transform: none;
        pointer-events: auto;
    }

    /* Hide inactive views completely */
    .view:not(.active) {
        display: none !important;
    }

    /* Start Hero at top */
    .hero {
        min-height: 80vh;
        /* Ensure hero takes space */
    }

    /* Hide Desktop Hero SVG on Mobile */
    .hero-svg-desktop {
        display: none !important;
    }

    /* Show Mobile Hero SVG */
    .hero-svg-mobile {
        display: block !important;
        width: 80%;
        max-width: 300px;
        height: auto;
        color: var(--text-color);
    }

    /* Hide Legacy Desktop Header */
    .main-header {
        display: none !important;
    }

    /* Show Mobile Header */
    .mobile-header {
        display: block;
        position: fixed;
        top: 0;
        z-index: 1000;
        background-color: var(--bg-color);
        width: 100%;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
    }

    /* LAYER 1: Editorial (Collapsible) */
    .mobile-editorial-layer {
        padding: 1rem;
        text-align: left;
        max-height: 75px;
        overflow: hidden;
        opacity: 1;
        border-bottom: 1px solid var(--text-color);
        background-color: var(--bg-color);
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        transition: max-height 0.2s ease-in, opacity 0.15s ease-out, padding 0.2s ease-in;
    }

    /* SVG Main Logo for Mobile */
    .mobile-logo-svg {
        width: 200px;
        height: auto;
        display: block;
        color: var(--text-color);
        margin: 0;
    }

    .mobile-logo-img {
        width: 50px;
        height: auto;
        margin-bottom: 0;
        display: block;
        mix-blend-mode: darken;
    }

    /* Collapsed State: Smooth slide-up */
    .mobile-header.collapsed .mobile-editorial-layer {
        max-height: 0;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    /* LAYER 2: Functional (Sticky Tabs) */
    .mobile-functional-layer {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0 1rem;
        height: 50px;
        background-color: var(--bg-color);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        gap: 1rem;
        position: relative;
        z-index: 1001;
    }

    /* Sticky Logo: Fades in on collapse */
    .mobile-sticky-logo {
        width: 30px;
        height: auto;
        opacity: 0;
        mix-blend-mode: darken;
        transition: opacity 0.2s ease-out 0.05s;
        cursor: pointer;
        /* Affordance: indica que é clicável */
        /* 50ms delay so it appears as editorial fades */
    }

    /* Reveal Sticky Logo with fade */
    .mobile-header.collapsed .mobile-sticky-logo {
        opacity: 1;
    }

    .mobile-tabs {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 1.5rem;
        height: 100%;
        align-items: center;
        flex: 1;
    }

    /* =========================================
       MOBILE ARTICLES: STRUCTURED CARDS
       ========================================= */
    .article-list {
        padding: 1rem;
        padding-bottom: 4rem;
    }

    .article-item {
        background-color: var(--bg-color);
        border: var(--border-width) solid var(--text-color);
        /* Strong Border */
        border-radius: 4px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.05);
    }

    .article-item:active {
        transform: scale(0.98);
        /* Tactile feedback */
    }

    .article-item .date {
        font-size: 0.8rem;
        opacity: 0.6;
        margin-bottom: 0.5rem;
        display: block;
        font-family: var(--font-body);
    }

    /* TAREFA 1: Títulos mobile — mesmos ajustes do desktop */
    .article-item h4 {
        font-size: 1.6rem;
        font-weight: 700;
        line-height: 1.15;
        letter-spacing: -0.5px;
        margin-bottom: 0.8rem;
    }

    /* TAREFA 3: Ritmo Visual mobile */
    .article-item p {
        font-size: 1rem;
        line-height: 1.55;
        opacity: 0.9;
        margin-bottom: 1rem;
    }

    .card-tags .tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        border: 1px solid var(--accent-color);
        color: var(--accent-color);
    }

    .mobile-tabs::-webkit-scrollbar {
        display: none;
    }

    .mobile-tabs li a {
        font-family: 'Syne', sans-serif;
        font-size: 0.9rem;
        font-weight: 700;
        text-decoration: none;
        color: var(--text-color);
        text-transform: uppercase;
        opacity: 0.5;
        transition: opacity 0.2s;
        white-space: nowrap;
        position: relative;
        padding: 0.5rem 0;
    }

    .mobile-tabs li.active a {
        opacity: 1;
    }

    .mobile-tabs li.active a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--accent-color);
    }

    /* Adjust Hero padding since layout changed */
    .hero {
        padding-top: 1rem !important;
        /* Reset padding */
    }

    main {
        padding-top: 125px;
    }
}