/* ==========================================================================
   William Trindade — Design System (Meta Corporate Inspired / Open & Breathable)
   Tipografia Inter. Construído sobre Bootstrap 5.3.
   ========================================================================== */

/* --- TOKENS --- */
:root {
    /* Cores (Meta / Corporate Tech Theme) */
    --text: #1c2b33;
    --text-hover: #0866FF;
    --text-muted: #65676b;
    --text-inverse: #ffffff;
    --tech-blue: #0866FF;
    --tech-blue-hover: #0055d4;
    --tech-blue-on-dark: #60a5fa; /* azul legível sobre --bg-dark (contraste AA) */
    --border: transparent;
    --border-strong: transparent;
    --text-strong: #0f172a;
    --text-body: #475569;
    --text-subtle: #64748b;
    --text-on-dark: #94a3b8;
    --bg: #ffffff;
    --bg-soft: #f8f9fa;
    --bg-muted: #f1f5f9;
    --bg-dark: #0f172a;
    --line: #e2e8f0;
    --line-soft: #f0f2f5;
    --line-strong: #d1d5db;
    --status-reading: #0284c7;
    --status-read: #16a34a;

    /* Tipografia */
    --font-sans: 'Inter', sans-serif;
    --fs-h1: 3.5rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.5rem;
    --fs-h4: 1.25rem;
    --fs-h5: 1.1rem;
    --fs-h6: 1rem;
    --fs-lg: 1.15rem;
    --fs-base: 1.1rem;
    --fs-sm: 0.95rem;
    --fs-xs: 0.8rem;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;
    --lh-base: 1.6;
    --lh-tight: 1.25;
    --tracking-tight: -0.03em;
    --tracking-wide: 0.1em;

    /* Espaçamento */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;

    /* Forma (Cantos modernos arredondados, sem bordas delimitadoras) */
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 50px;
    --radius-round: 50%;
    --border-width: 0px;

    /* Movimento */
    --transition: 0.2s ease;

    /* Sombras */
    --shadow-sm: 0 1px 0 var(--line), 0 4px 16px rgba(15, 23, 42, 0.04);

    /* Área mínima de toque (WCAG 2.5.8 / guidelines mobile) */
    --tap-target: 44px;

    /* Layout */
    --nav-height: 80px;

    /* Integração com Bootstrap */
    --bs-body-font-family: var(--font-sans);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--border);
    --bs-secondary-color: var(--text-muted);
}

@media (max-width: 768px) {
    :root {
        --fs-h1: 2.75rem;
        --fs-h2: 1.85rem;
    }
}

/* --- BASE --- */
html, body {
    max-width: 100%;
    /* clip (e não hidden) para o body não virar container de rolagem e quebrar o scrollspy */
    overflow-x: clip;
    scroll-behavior: smooth;
}

/* Âncoras do menu param abaixo do navbar fixo */
html {
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    padding-top: var(--nav-height);
    line-height: var(--lh-base);
    font-size: var(--fs-base);
}

/* Link de acessibilidade: visível só ao receber foco pelo teclado */
.skip-link {
    position: fixed;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 2000;
    padding: var(--space-3) var(--space-5);
    background: var(--tech-blue);
    color: var(--text-inverse);
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    transform: translateY(-200%);
    transition: transform var(--transition);
}
.skip-link:focus {
    transform: translateY(0);
    color: var(--text-inverse);
}
main:focus { outline: none; }

/* Respeita a preferência do sistema por menos animação */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    color: var(--text);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-tight);
    line-height: var(--lh-tight);
}

h1 { font-size: var(--fs-h1); font-weight: var(--fw-extrabold); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

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

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

/* --- UTILITÁRIOS & TIPOGRAFIA --- */
.text-secondary, .text-muted { color: var(--text-muted) !important; }
.bg-light { background-color: var(--bg-soft) !important; }

.gradient-text,
.text-highlight {
    color: var(--tech-blue);
    font-weight: var(--fw-bold);
}

.text-lg { font-size: var(--fs-lg); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }

/* Eyebrow / Kicker (Meta Style) */
.ds-eyebrow,
.hero-label,
.section-eyebrow {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--tech-blue);
    font-weight: var(--fw-bold);
    margin-bottom: 1rem;
    display: inline-block;
}

/* --- NAVBAR (Minimalista, sem bordas) --- */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: none;
    padding: 20px 0;
    transition: background var(--transition), box-shadow var(--transition);
}
.navbar.is-scrolled {
    box-shadow: var(--shadow-sm);
}
.navbar-brand {
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-tight);
}
.nav-link {
    position: relative;
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin-left: 24px;
    transition: color var(--transition);
}
.navbar .nav-link:hover {
    color: var(--text);
}
/* Item da página/seção atual: texto em azul com um ponto indicador abaixo */
.navbar .nav-link.active {
    color: var(--tech-blue);
}
.navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 5px;
    height: 5px;
    border-radius: var(--radius-round);
    background: var(--tech-blue);
    transform: translateX(-50%);
}
/* O menu fica horizontal a partir de 1200px (navbar-expand-xl); abaixo disso, recolhido no ☰.
   Entre 1200px e 1399px os 11 itens só cabem com espaçamento compacto. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .nav-link { margin-left: 8px; }
}
@media (max-width: 1199.98px) {
    .nav-link { margin-left: 0; padding: var(--space-3) 0; }
    .navbar-collapse { padding: var(--space-3) 0; }
}

/* --- BOTÕES (Pill Shape, Tech Blue) --- */
.btn-primary-custom,
.ds-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    background: var(--tech-blue);
    color: var(--text-inverse);
    border: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(8, 102, 255, 0.25);
    transition: transform var(--transition), background-color var(--transition), box-shadow var(--transition);
}
.btn-primary-custom:hover,
.btn-primary-custom:active,
.ds-btn-primary:hover,
.ds-btn-primary:active {
    background: var(--tech-blue-hover);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(8, 102, 255, 0.35);
}

.btn-outline-custom,
.ds-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--line-strong);
    white-space: nowrap;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}
.btn-outline-custom:hover,
.btn-outline-custom:active,
.ds-btn-outline:hover,
.ds-btn-outline:active {
    background: var(--bg-soft);
    border-color: var(--text);
    color: var(--text);
}

@media (max-width: 576px) {
    .btn-primary-custom,
    .btn-outline-custom,
    .ds-btn-primary,
    .ds-btn-outline {
        width: 100%;
    }
}

/* --- HERO SECTION --- */
.hero-section {
    padding: 6rem 0 8rem;
    min-height: 85vh;
    display: flex;
    align-items: center;
}
.hero-text {
    color: var(--text-muted);
    font-size: var(--fs-lg);
    line-height: 1.7;
    margin-bottom: var(--space-6);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-5);
}
.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}
.hero-socials {
    display: flex;
    gap: var(--space-2);
}
.hero-img {
    width: 100%;
    height: auto;
    max-width: 480px;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-xl);
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}
.hero-social-link,
.ds-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--tap-target);
    min-height: var(--tap-target);
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: color var(--transition), transform var(--transition);
}
.hero-social-link:hover,
.ds-social-link:hover {
    color: var(--tech-blue);
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .hero-section { padding: 4rem 0; text-align: center; }
    .hero-content { margin-bottom: 3rem; }
    .hero-actions,
    .hero-btns { justify-content: center; }
    .hero-img { max-width: 320px; margin: 0 auto; display: block; }
}

/* --- SEÇÕES (Abertas, Sem Bordas / Bento Box Removido) --- */
.section-padding,
.ds-section {
    padding: var(--space-9) 0;
}
.section-header,
.ds-section-header {
    margin-bottom: var(--space-8);
    text-align: center !important;
}
.section-header h2,
.ds-section-header h2 {
    margin-bottom: var(--space-3);
    font-size: var(--fs-h2);
    font-weight: var(--fw-extrabold);
}
.section-header p,
.ds-section-header p {
    color: var(--text-muted);
    font-size: var(--fs-lg);
    max-width: 640px;
    margin: 0 auto;
}
.section-footer {
    display: flex;
    justify-content: center;
    margin-top: var(--space-7);
}

/* Estado vazio/erro dos feeds externos */
.feed-empty {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-7) 0;
    text-align: center;
    color: var(--text-muted);
}
.feed-empty p { margin: 0; }
#medium-posts { min-height: 420px; }

@media (max-width: 768px) {
    .section-padding,
    .ds-section { padding: var(--space-8) 0; }
    .section-header,
    .ds-section-header { margin-bottom: var(--space-7); }
}

/* --- CARDS & CONTEÚDO ABERTO (Substituindo o Bento Monocromático) --- */
.bento-card,
.custom-card,
.expert-card,
.academic-badge-card,
.exp-card-modern,
.medium-card,
.ds-card {
    background: var(--bg);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-7);
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform var(--transition), box-shadow var(--transition);
}
@media (max-width: 768px) {
    .bento-card,
    .custom-card,
    .expert-card,
    .academic-badge-card,
    .exp-card-modern,
    .medium-card,
    .ds-card { padding: var(--space-5); }
}

.card-title {
    font-size: var(--fs-h4);
    margin-bottom: var(--space-3);
}

.bento-card:hover,
.medium-card:hover,
.ds-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.bento-title,
.category-title,
.ds-eyebrow {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--tech-blue);
    font-weight: var(--fw-bold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bento-title i,
.category-title i,
.ds-eyebrow i { color: var(--tech-blue); }

.icon-box,
.ds-icon {
    font-size: 1.75rem;
    color: var(--tech-blue);
    margin-bottom: 1.25rem;
    display: inline-block;
}

.study-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-soft);
}
.study-item:last-child { border-bottom: none; }

.video-card-wrapper,
.ds-card-media {
    padding: 0 !important;
    background: #000;
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

/* --- ACADÊMICO --- */
.academic-title {
    font-size: var(--fs-h6);
    color: var(--text);
    margin-bottom: var(--space-2);
}
.academic-icon {
    font-size: 1.75rem;
    color: var(--tech-blue);
    margin-bottom: 1rem;
}
.institution-tag {
    font-size: 0.8rem;
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    display: block;
    margin-bottom: 0.5rem;
}

/* --- TECH PILLS & BADGES --- */
/* Pills contrastam com o fundo: brancas em seções cinza, cinza dentro de superfícies brancas */
.bg-light { --pill-bg: var(--bg); }
.bento-card,
.custom-card,
.expert-card,
.academic-badge-card,
.exp-card-modern,
.medium-card,
.ds-card,
.carousel-inner { --pill-bg: var(--bg-soft); }

.tech-pill,
.ds-pill {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 6px 10px 0;
    background: var(--pill-bg, var(--bg-soft));
    color: var(--text);
    border-radius: var(--radius-pill);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
}

.ds-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-soft);
    color: var(--tech-blue);
    border-radius: var(--radius);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
}

/* --- PROJETOS (GRID ABERTO / CAROUSEL) --- */
#project-carousel .carousel-inner {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    background: var(--bg);
    overflow: hidden;
}
.project-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 460px;
    overflow: hidden;
    border-right: none;
}
.project-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% top; /* screenshots de sites: preserva o header e equilibra texto e imagem do hero */
}
/* Descrição longa não pode esticar o slide e fazer o carrossel "pular" de altura. */
.project-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    overflow: hidden;
}
.carousel-indicators-custom {
    position: static;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0;
}
.carousel-indicators-custom button {
    position: relative;
    width: 24px !important;
    height: 24px !important;
    border: none !important;
    background: transparent !important;
    opacity: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    text-indent: 0 !important;
}
.carousel-indicators-custom button::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: var(--radius-round);
    background: var(--line-strong);
    transition: background-color var(--transition);
}
.carousel-indicators-custom button.active::after { background: var(--tech-blue); }

/* Controles de carrossel (setas + pontos) com o mesmo espaçamento em todo o site */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.nav-arrow,
.ds-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-round);
    border: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition), border-color var(--transition);
}
.nav-arrow:hover,
.ds-icon-btn:hover {
    background: var(--tech-blue);
    color: var(--text-inverse);
    border-color: var(--tech-blue);
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .project-img-wrapper {
        min-height: 280px;
        height: 280px;
    }
    .project-hero-img { object-position: left top; } /* card estreito: prioriza o título do hero */
    #project-carousel .col-lg-5 { padding: 2.5rem !important; }
    .project-description { -webkit-line-clamp: 6; line-clamp: 6; }
}

/* --- FICHA DO PROJETO (modal com print sem corte + texto completo) --- */
.project-description { position: relative; }
.project-read-more {
    position: absolute;
    right: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 0 0 var(--space-8);
    background: linear-gradient(to right, transparent, var(--bg) var(--space-7));
    border: none;
    color: var(--tech-blue);
    font: inherit;
    font-weight: var(--fw-semibold);
    line-height: inherit;
    cursor: pointer;
}
.project-read-more[hidden] { display: none; }
.project-read-more i { transition: transform var(--transition); }
.project-read-more:hover i { transform: translateX(3px); }

/* Botão invisível sobre o print: a imagem inteira abre a ficha. */
.project-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: var(--space-5);
    background: linear-gradient(to top, rgba(15, 23, 42, 0.35), transparent 45%);
    border: none;
    cursor: zoom-in;
    opacity: 0;
    transition: opacity var(--transition);
}
.project-zoom:hover,
.project-zoom:focus-visible { opacity: 1; }
.project-zoom:focus-visible { outline-offset: -4px; }
.project-zoom-label {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    background: var(--bg);
    color: var(--text);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}
/* Telas de toque não têm hover: o selo fica sempre visível, sem o degradê. */
@media (hover: none) {
    .project-zoom { opacity: 1; background: none; padding: var(--space-3); }
}

.project-modal .modal-content {
    position: relative;
    border: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
}
.project-modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 2;
    width: var(--tap-target);
    height: var(--tap-target);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-round);
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
    transition: background-color var(--transition), color var(--transition);
}
.project-modal-close:hover { background: var(--tech-blue); color: var(--text-inverse); }

/* Moldura de navegador: o print aparece inteiro, como um site aberto. */
.project-browser {
    margin: 0;
    padding: var(--space-7) var(--space-7) 0;
    background: var(--bg-muted);
}
.project-browser-bar {
    display: flex;
    gap: 6px;
    padding: var(--space-3) var(--space-4);
    background: var(--bg);
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 1px solid var(--line);
}
.project-browser-bar span {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-round);
    background: var(--line-strong);
}
.project-browser-img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}
.project-modal-content {
    max-width: 760px;
    padding: var(--space-7);
}
.project-modal-text {
    color: var(--text-body);
    font-size: var(--fs-base);
    line-height: 1.75;
    margin-bottom: var(--space-5);
}

@media (max-width: 991.98px) {
    .project-modal .modal-content { border-radius: 0; }
    .project-browser { padding: var(--space-8) var(--space-4) 0; }
    .project-modal-content { padding: var(--space-5) var(--space-4) var(--space-6); }
}

/* --- EXPERIÊNCIA --- */
.exp-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    object-fit: contain;
    padding: 8px;
    background: var(--bg-soft);
}
.exp-role {
    font-size: var(--fs-h4);
    margin-bottom: var(--space-1);
}
.exp-company {
    font-size: 1rem;
    font-weight: var(--fw-bold);
    color: var(--tech-blue);
    margin-bottom: 0;
}
.exp-period {
    display: inline-block;
    margin-top: var(--space-3);
    padding: 6px 14px;
    background: var(--bg-soft);
    color: var(--text-muted);
    border-radius: var(--radius);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
}
@media (min-width: 768px) {
    .exp-period { margin-top: 0; white-space: nowrap; }
}
.exp-list,
.ds-list { list-style: none; padding-left: 0; }
.exp-list li,
.ds-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.85rem;
    font-size: var(--fs-base);
    color: var(--text-muted);
}
.exp-list li::before,
.ds-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--tech-blue);
    font-weight: var(--fw-bold);
}

/* --- META NEWS CARD SYSTEM (.meta-item) --- */
.meta-item {
    display: block;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    text-decoration: none !important;
    color: inherit;
    position: relative;
}

.meta-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-muted);
}

.meta-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none !important;
    box-shadow: none !important;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.meta-item:hover .meta-img {
    transform: scale(1.02);
}

.meta-content {
    margin-top: 1rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.meta-title {
    color: var(--text-strong) !important;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.meta-date {
    color: var(--text-subtle);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 8px;
}

.meta-snippet {
    color: var(--text-body);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
    line-height: 1.5;
}

.meta-link {
    position: relative;
    z-index: 2;
    color: var(--tech-blue);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-item:hover .meta-link {
    text-decoration: underline;
}

.meta-link i {
    transition: transform 0.2s ease;
}

.meta-item:hover .meta-link i {
    transform: translateX(4px);
}

/* --- CITAÇÃO --- */
.quote-section {
    padding: var(--space-9) 0;
    text-align: center;
    background: var(--bg);
}
.quote-text { font-size: 1.75rem; font-weight: var(--fw-semibold); color: var(--text); max-width: 800px; margin: 0 auto; line-height: 1.4; }
.quote-author {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 1.25rem;
    display: block;
    font-weight: var(--fw-medium);
}

/* --- FOOTER --- */
footer {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    padding: 5rem 0 3rem;
    font-size: var(--fs-sm);
}
footer h5, footer a { color: var(--text-inverse); }
.footer-brand h5 { font-size: 1.35rem; margin-bottom: 0.5rem; font-weight: var(--fw-bold); }
.footer-eyebrow {
    display: inline-block;
    margin-bottom: var(--space-3);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--tech-blue-on-dark);
}
.footer-title {
    color: var(--text-inverse);
    font-size: var(--fs-h2);
    font-weight: var(--fw-extrabold);
    margin-bottom: var(--space-3);
}
.footer-text {
    max-width: 520px;
    margin: 0 auto var(--space-6);
    color: var(--text-on-dark);
    font-size: var(--fs-base);
}
footer .btn-primary-custom { box-shadow: none; }
.footer-contact-info { list-style: none; padding: 0; margin: var(--space-7) 0 var(--space-5); }
.footer-contact-info li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.footer-contact-info a:hover { color: var(--tech-blue-on-dark); }
.social-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-5) 0;
}
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap-target);
    height: var(--tap-target);
    font-size: 1.35rem;
    color: var(--text-on-dark);
    transition: color var(--transition), transform var(--transition);
}
.social-btn:hover { color: var(--tech-blue-on-dark); transform: translateY(-2px); }
.footer-divider,
.ds-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 3rem 0; border: 0; }
.footer-bottom { font-size: 0.85rem; color: var(--text-on-dark); }

#scroll-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 48px; height: 48px;
    background: var(--tech-blue);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-round);
    display: none;
    align-items: center; justify-content: center;
    z-index: 999; cursor: pointer;
    box-shadow: 0 4px 15px rgba(8, 102, 255, 0.3);
    transition: background-color var(--transition), transform var(--transition);
}
#scroll-top:hover { background: var(--tech-blue-hover); transform: translateY(-3px); }

/* --- EDITORIAL REFINED CARDS & SECTION STYLES --- */
.editorial-card {
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    border-radius: 24px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.editorial-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.editorial-quote {
    font-style: italic;
    border-left: 3px solid var(--tech-blue);
    padding-left: 1rem;
    color: var(--text-body);
    font-size: 1.15rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

.focus-minimal-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: transparent;
    padding: 0;
    height: 100%;
}

.focus-icon-box {
    width: 72px;
    height: 72px;
    background-color: var(--bg-muted);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--tech-blue);
    font-size: 2rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.focus-text-box {
    text-align: left;
}

.focus-title {
    display: block;
    color: var(--text-strong);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    line-height: 1.3;
    margin-bottom: 6px;
}

.focus-description {
    color: var(--text-subtle);
    font-size: var(--fs-sm);
}

.focus-heading {
    font-size: 0.85rem;
    font-weight: var(--fw-bold);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-subtle);
}

/* --- SOBRE --- */
.about-title {
    font-size: var(--fs-h2);
    line-height: var(--lh-tight);
}

.about-text {
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-actions {
    margin-top: 2rem;
}

/* --- MINHA BIBLIOTECA (Horizontal Scroll Snap Carousel) --- */
.books-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 1rem;
}

.books-track::-webkit-scrollbar {
    display: none;
}

.book-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-snap-align: start;
    flex-shrink: 0;
    flex: 0 0 calc(25% - 1.125rem);
}

@media (max-width: 991px) {
    .book-item {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (max-width: 576px) {
    .book-item {
        flex: 0 0 80%;
    }
}

.book-cover-wrapper {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-muted);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-item:hover .book-cover-wrapper {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
}

.book-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.book-status {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.status-lendo {
    color: var(--status-reading);
}

.status-lido {
    color: var(--status-read);
}

.book-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.15rem;
}

.book-author {
    font-size: 0.85rem;
    color: var(--text-subtle);
    margin-bottom: 0.5rem;
}

.book-buy-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tech-blue);
    text-decoration: none;
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.book-buy-btn:hover {
    color: var(--tech-blue-hover);
    text-decoration: underline;
}

/* --- CAROUSEL DOTS (.carousel-dot) --- */
.carousel-dot {
    position: relative;
    width: 24px;
    height: 24px;
    background: transparent;
    cursor: pointer;
    border: none;
    padding: 0;
}
.carousel-dot::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: var(--radius-round);
    background-color: var(--line-strong);
    transition: background-color var(--transition), transform var(--transition);
}
.carousel-dot.active::after {
    background-color: var(--tech-blue);
    transform: scale(1.2);
}
.yt-track {
    /* Altura reservada: evita que o conteúdo abaixo "pule" quando o feed carrega */
    min-height: 360px;
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 1rem;
}
.yt-track::-webkit-scrollbar { display: none; }
.yt-track > :not(.yt-card) { align-self: center; }
.yt-card {
    flex: 0 0 calc((100% - 4rem) / 3);
    scroll-snap-align: start;
}

@media (max-width: 991px) {
    .yt-card { flex-basis: calc((100% - 2rem) / 2); }
}
@media (max-width: 576px) {
    .yt-card { flex-basis: 85%; }
}

/* --- DESIGN SYSTEM (amostras de cor) --- */
.ds-swatch-card {
    padding: var(--space-4);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
}
.ds-swatch {
    height: 64px;
    margin-bottom: var(--space-3);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.ds-swatch-name {
    display: block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: var(--text);
}
.ds-swatch-value {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* --- PÁGINA DE ARTIGOS (Listagem) --- */
.articles-page-title {
    font-size: var(--fs-h1);
    margin-bottom: var(--space-3);
}

.articles-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.articles-search {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    max-width: 480px;
    padding: 12px 24px;
    background: var(--bg-soft);
    border-radius: var(--radius-pill);
    color: var(--text-subtle);
    transition: box-shadow var(--transition);
}
.articles-search:focus-within {
    box-shadow: 0 0 0 2px var(--tech-blue);
}
.articles-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: var(--fs-sm);
    outline: none;
}

.articles-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
}
.article-tag {
    padding: 6px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--bg);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}
.article-tag:hover {
    color: var(--text);
    border-color: var(--line-strong);
}
.article-tag.active {
    background: var(--tech-blue);
    border-color: var(--tech-blue);
    color: var(--text-inverse);
}

/* --- LEITOR DE ARTIGOS --- */
.article-section {
    padding: var(--space-8) 0 var(--space-9);
}

.article-reader {
    max-width: 720px;
    margin: 0 auto;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    margin-bottom: var(--space-6);
}
.article-back:hover { color: var(--tech-blue); }
.article-back i { transition: transform var(--transition); }
.article-back:hover i { transform: translateX(-4px); }

.article-header { margin-bottom: var(--space-7); }
.article-title {
    font-size: 2.75rem;
    font-weight: var(--fw-extrabold);
    color: var(--text-strong);
    margin-bottom: var(--space-4);
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    color: var(--text-subtle);
    font-size: var(--fs-sm);
}

.article-body {
    color: var(--text-body);
    font-size: var(--fs-lg);
    line-height: 1.8;
    overflow-wrap: break-word;
}
.article-body > * + * { margin-top: var(--space-5); }
.article-body p { margin-bottom: 0; }
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
    color: var(--text-strong);
    margin-top: var(--space-7);
    margin-bottom: 0;
}
.article-body h1, .article-body h2, .article-body h3 { font-size: var(--fs-h3); }
.article-body h4 { font-size: var(--fs-h4); }
.article-body a {
    color: var(--tech-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.article-body a:hover { color: var(--tech-blue-hover); }
.article-body strong { color: var(--text-strong); }
.article-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius);
}
.article-body figure { margin: var(--space-6) 0; }
.article-body figcaption {
    margin-top: var(--space-3);
    text-align: center;
    color: var(--text-subtle);
    font-size: var(--fs-sm);
}
.article-body blockquote {
    border-left: 3px solid var(--tech-blue);
    padding-left: var(--space-5);
    font-style: italic;
    color: var(--text);
}
.article-body ul,
.article-body ol { padding-left: var(--space-5); }
.article-body li + li { margin-top: var(--space-2); }
.article-body code {
    background: var(--bg-muted);
    color: var(--text-strong);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.875em;
}
.article-body pre {
    background: var(--bg-dark);
    color: var(--line);
    padding: var(--space-5);
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    line-height: 1.6;
    overflow-x: auto;
}
.article-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
.article-body hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: var(--space-7) 0;
    opacity: 1;
}

.article-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

@media (max-width: 768px) {
    .article-title { font-size: 2rem; }
    .article-body { font-size: var(--fs-base); }
    .article-footer { flex-direction: column; text-align: center; }
}

/* --- MOBILE FIXES --- */
@media (max-width: 991px) {
    .study-list-mobile-fix { max-height: none !important; overflow: visible !important; }
    .bento-card { margin-bottom: 1.5rem; }
    .video-card-wrapper { min-height: 240px !important; }
    .container { padding-left: 20px !important; padding-right: 20px !important; }
}
