:root {
    --bg-main: #050505;
    --bg-secondary: #0a0a0a;
    --text-primary: #ffffff;
    --text-muted: #888;
    --accent: #FF4400;
    /* Laranja vibrante */
    --accent-strong: #D93A00;
    /* Fundo de botão com texto branco (contraste AA 4.5:1) */
    --border: rgba(var(--fg-rgb), 0.1);
    --fg-rgb: 255, 255, 255;
    --bg-glow: #151515;
    --bg-nav: rgba(5, 5, 5, 0.8);
    --text-soft: #ccc;
    --code-color: #e2a97e;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    color-scheme: dark;
}

/* Modo claro: ativado por data-theme="light" no <html> (ver layouts/main.php) */
:root[data-theme="light"] {
    /* Tons pastel quentes (creme) em vez de branco puro, para reduzir o brilho */
    --bg-main: #f5efe6;
    --bg-secondary: #ece4d8;
    --text-primary: #1f1a16;
    --text-muted: #5e554c;
    --accent: #c23400;
    --accent-strong: #a82d00;
    --fg-rgb: 60, 40, 20;
    --bg-glow: #fbf7f0;
    --bg-nav: rgba(245, 239, 230, 0.85);
    --text-soft: #3a322b;
    --code-color: #8a3300;
    color-scheme: light;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.theme-toggle:hover {
    border-color: var(--accent);
}

/* Modo claro: cards um tom acima do fundo creme, para parecerem elevados */
:root[data-theme="light"] {
    --bg-card: #fbf8f3;
}

:root[data-theme="light"] .skill-card,
:root[data-theme="light"] .tech-item,
:root[data-theme="light"] .timeline-content,
:root[data-theme="light"] .timeline-content::before,
:root[data-theme="light"] .project-card,
:root[data-theme="light"] .contact-info-card,
:root[data-theme="light"] .blog-card,
:root[data-theme="light"] .blog-search {
    background: var(--bg-card);
}

:root[data-theme="light"] .skill-card,
:root[data-theme="light"] .timeline-content,
:root[data-theme="light"] .project-card,
:root[data-theme="light"] .contact-info-card,
:root[data-theme="light"] .blog-card {
    box-shadow: 0 1px 2px rgba(60, 40, 20, 0.05), 0 4px 16px rgba(60, 40, 20, 0.04);
}

/* Hover: mantém o leve tom laranja sobre o card claro */
:root[data-theme="light"] .tech-item:hover,
:root[data-theme="light"] .contact-info-card:hover,
:root[data-theme="light"] .timeline-item:hover .timeline-content,
:root[data-theme="light"] .timeline-item:hover .timeline-content::before {
    background: linear-gradient(rgba(255, 68, 0, 0.04), rgba(255, 68, 0, 0.04)), var(--bg-card);
}

:root[data-theme="light"] .project-card:hover,
:root[data-theme="light"] .blog-card:hover,
:root[data-theme="light"] .timeline-item:hover .timeline-content {
    box-shadow: 0 12px 32px rgba(60, 40, 20, 0.12), 0 0 32px rgba(255, 68, 0, 0.06);
}

.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/*Animação IMPACTANTE*/
.stroke-text-svg-animacao {
    fill: transparent;
    -webkit-text-stroke: 1px var(--text-primary);
    stroke: var(--text-primary) ;
    stroke-width: 2px;
    stroke-dasharray: 700;
    stroke-dashoffset: 700;
    animation: desenhar 3s linear forwards;
    animation-play-state: paused;
    animation-delay: .5s;

    margin-top: 15px;
    margin-left: 5px;
}

@keyframes desenhar {
    to {
        stroke-dashoffset: 0;
    }
}

.stroke-text-svg-animacao.animar {
    animation-play-state: running;
}

@media(min-width: 1253px){
    .hidden-desktop {
        display: none;
    }
}

@media(max-width: 1252px){
    .stroke-text-svg-animacao {
        display: none;
    }
}

.noise-overlay {
    display: none;
}

/* --- RESET & BASIC --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

p {
    line-height: 1.6;
}

input,
textarea,
button,
select {
    font: inherit;
}

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(circle at 50% -20%, var(--bg-glow) 0%, var(--bg-main) 80%);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    outline: none;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

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

.stroke-text {
    -webkit-text-stroke: 1px var(--text-primary);
    color: transparent;
}


/* --- PRELOADER (FIXED) --- */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease-in-out;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.loading-bar {
    width: 150px;
    height: 2px;
    background: var(--border);
    overflow: hidden;
    margin: 0 auto;
}

.bar-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    animation: loadBar 2s ease-in-out forwards;
}

@keyframes loadBar {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* Classe adicionada via JS para esconder */
body.loaded .preloader {
    transform: translateY(-100%);
    pointer-events: none;
}


/* --- CURSOR (decorativo; o cursor nativo continua visível) --- */
@media (min-width: 968px) and (hover: hover) and (pointer: fine) {
    .cursor-dot,
    .cursor-outline {
        left: -100px;
        top: -100px;
    }

    .cursor-dot {
        position: fixed;
        width: 6px;
        height: 6px;
        background: var(--accent);
        border-radius: 50%;
        z-index: 9990;
        pointer-events: none;
        transform: translate(-50%, -50%);
    }

    .cursor-outline {
        position: fixed;
        width: 40px;
        height: 40px;
        border: 1px solid rgba(var(--fg-rgb), 0.3);
        border-radius: 50%;
        z-index: 9989;
        pointer-events: none;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, background 0.2s;
    }

    body.hover-active .cursor-outline {
        width: 70px;
        height: 70px;
        background: rgba(255, 68, 0, 0.1);
        border-color: var(--accent);
    }
}

/* --- COMPONENTS --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn-outline {
    border: 1px solid var(--border);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    padding-top: 8rem;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    line-height: 0.9;
    font-weight: 800;
    margin: 1.5rem 0;
}

.hero-sub {
    color: var(--text-muted);
    max-width: 450px;
    border-left: 2px solid var(--accent);
    padding-left: 1.5rem;
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    background: var(--accent-strong);
    color: #fff;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #C23400;
}

.hero-actions .btn-primary,
.hero-actions .btn-outline {
    padding: 0.9rem 1.6rem;
}

/* Miniatura só no mobile; no desktop a imagem aparece no hover (preview flutuante) */
.project-thumb {
    display: none;
}

.hero-image-container {
    height: 60vh;
    border-radius: 8px;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: 0.5s;
}

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

/* ============ MARQUEE ============ */
.marquee {
    background: var(--text-primary);
    color: var(--bg-main);
    padding: 1.5rem 0;
    overflow: hidden;
}

.track {
    white-space: nowrap;
    overflow: hidden;
}

.content {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    animation: marquee 30s linear infinite;
    color: var(--bg-main);
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* --- PROJETOS --- */

.projects-section {
    padding: 8rem 0;
    position: relative;
}

.section-label {
    font-family: var(--font-heading);
    color: var(--accent);
    letter-spacing: 2px;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 4rem;
}

.project-item {
    /* Grid fixo: a categoria fica alinhada em coluna, independente do título */
    display: grid;
    grid-template-columns: 1fr 220px auto;
    gap: 2rem;
    align-items: center;
    padding: 3rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: 0.3s;
}

.project-item:first-child {
    border-top: 1px solid var(--border);
}

.project-item:hover {
    background: var(--bg-secondary);
    padding-left: 2rem;
}

.project-details h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-top: 0.5rem;
}

.project-num {
    color: var(--text-muted);
    font-family: var(--font-heading);
    display: block;
}

.project-category {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.projects-all-link {
    display: inline-block;
    margin-top: 3rem;
    padding: 0.9rem 1.6rem;
}

.arrow-btn {
    font-size: 1.5rem;
    transition: 0.3s;
}

.project-item:hover .arrow-btn {
    color: var(--accent);
    transform: translate(4px, -4px);
}

.project-preview-wrapper {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
}

.project-preview-img {
    position: absolute;
    width: 350px;
    height: 220px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(0.8) translate(-50%, -50%);
    transition: opacity 0.3s, transform 0.3s;
}

/* --- SOBRE --- */
.about-section {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 8vw, 3rem);
    line-height: 1.1;
    margin-bottom: 2rem;
}

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

.about-text p {
    color: var(--text-primary);
    max-width: 400px;
    margin-bottom: 3rem;
}

.skill-card {
    background: rgba(var(--fg-rgb), 0.03);
    padding: 2rem;
    margin-bottom: 1rem;
    border-left: 2px solid var(--border);
    transition: 0.3s;
}

.skill-card:hover {
    border-left-color: var(--accent);
    background: rgba(var(--fg-rgb), 0.05);
}

.skill-card h3 {
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.skill-card p {
    color: var(--text-primary);
    font-size: 1rem;
}

/* --- FORMULÁRIO PRO (REDESENHADO) --- */
.footer-section {
    padding: 6rem 0 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    margin-bottom: 6rem;
}

.cta-col h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 2rem;
}

.contact-info {
    margin-top: 3rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Inputs Estilizados */
.pro-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.input-group {
    position: relative;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1rem 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.2rem;
    outline: none;
    z-index: 2;
    position: relative;
}

.input-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--text-muted);
    transition: 0.3s;
    z-index: 1;
    pointer-events: none;
}

.input-group .line-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border);
    transition: 0.3s;
}

/* Efeitos de Foco */
.input-group input:focus~.line-bg,
.input-group textarea:focus~.line-bg {
    height: 2px;
    background: var(--accent);
}

.input-group input:focus~label,
.input-group input:not(:placeholder-shown)~label,
.input-group textarea:focus~label,
.input-group textarea:not(:placeholder-shown)~label {
    top: -1.2rem;
    font-size: 0.8rem;
    color: var(--accent);
}

/* Botão Moderno */
.submit-btn {
    background: var(--text-primary);
    color: var(--bg-main);
    border: none;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.4s;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: var(--accent-strong);
    color: #fff;
    padding-right: 3rem;
}

.btn-icon {
    font-size: 1.5rem;
    transition: 0.3s;
    margin-top: 2px;
}

/* --- RESPONSIVO --- */
@media (max-width: 968px) {
    .desktop-only {
        display: none !important;
    }

    .hamburger-btn {
        display: flex;
    }

    .hero-container,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero {
        padding-top: 7rem;
        text-align: left;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .project-preview-wrapper,
    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .project-item {
        display: flex;
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }

    /* Título na linha inteira; categoria e seta dividem a linha de baixo */
    .project-details {
        flex: 1 1 100%;
    }

    .project-thumb {
        display: block;
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        border-radius: 4px;
        margin-bottom: 1.5rem;
        background: var(--bg-secondary);
    }
}

/* --- ANIMATIONS & REVEAL --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* Footer bottom*/
.container.bottom-flex {
    display: flex;
    justify-content: space-between;
}

.social-links {
    display: flex;
    gap: 2rem;
}

/* Área de toque de 44px sem mudar o visual (margem negativa compensa) */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: -10px;
}

.social-links .hover-trigger svg {
    stroke: var(--text-primary);
    transition: .3s ease-in;
}

.social-links .hover-trigger svg:hover {
    stroke: var(--accent);
}

/* --- NOVAS PÁGINAS (GERAL) --- */
.page-hero {
    padding: 12rem 0 6rem;
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1;
}

.page-hero .hero-sub {
    max-width: 600px;
    font-size: 1.2rem;
    color: var(--text-muted);
    border-left: 2px solid var(--accent);
    padding-left: 2rem;
}

/* --- TECH MARQUEE (ABOUT) --- */
.tech-marquee {
    position: relative;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(var(--fg-rgb), 0.05);
    border-bottom: 1px solid rgba(var(--fg-rgb), 0.05);
    padding: 2rem 0;
    overflow: hidden;
}

/* Fade nas bordas para dar profundidade */
.tech-marquee::before,
.tech-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12rem;
    z-index: 2;
    pointer-events: none;
}

.tech-marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-secondary), transparent);
}

.tech-marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-secondary), transparent);
}

.tech-track {
    overflow: hidden;
    white-space: nowrap;
}

.tech-content {
    display: inline-flex;
    align-items: center;
    gap: 3rem;
    animation: techMarquee 35s linear infinite;
}

.tech-content:hover {
    animation-play-state: paused;
}

@keyframes techMarquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.tech-item {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.4rem;
    border: 1px solid rgba(var(--fg-rgb), 0.06);
    border-radius: 50px;
    background: rgba(var(--fg-rgb), 0.03);
    transition: border-color 0.3s, background 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.tech-item:hover {
    border-color: rgba(255, 68, 0, 0.3);
    background: rgba(255, 68, 0, 0.05);
}

.tech-item img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: inline;
}

.tech-item span {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.tech-item:hover span {
    color: var(--text-primary);
}

/* --- SOBRE --- */
.about-details {
    padding: 6rem 0;
}

.about-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.expertise-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.expertise-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.expertise-item .num {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--border);
    font-size: 1.5rem;
}

.expertise-item h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.expertise-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- TIMELINE --- */
.timeline-section {
    padding: 8rem 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* Glow sutil de fundo */
.timeline-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 68, 0, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

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

/* Linha central vertical */
.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 68, 0, 0.15) 5%,
        rgba(255, 68, 0, 0.3) 50%,
        rgba(255, 68, 0, 0.15) 95%,
        transparent 100%
    );
}

/* Cada item da timeline — grid de 3 colunas */
.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 0;
    margin-bottom: 3.5rem;
    align-items: start;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Spacer (coluna vazia no lado oposto) */
.timeline-spacer {
    min-height: 1px;
}

/* Marcador central (dot + ano) */
.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    z-index: 2;
    padding-top: 1.5rem;
}

.timeline-year {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 1px;
    white-space: nowrap;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 68, 0, 0.4);
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-item:hover .timeline-dot {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 68, 0, 0.3);
    transform: scale(1.3);
}

.timeline-item:hover .timeline-dot::after {
    opacity: 1;
}

/* Card de conteúdo */
.timeline-content {
    background: rgba(var(--fg-rgb), 0.02);
    border: 1px solid rgba(var(--fg-rgb), 0.06);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* Seta apontando para a linha — items da ESQUERDA (seta na direita do card) */
.timeline-left .timeline-content::before {
    content: '';
    position: absolute;
    top: 22px;
    right: -12px;
    width: 12px;
    height: 12px;
    background: rgba(var(--fg-rgb), 0.02);
    border-right: 1px solid rgba(var(--fg-rgb), 0.06);
    border-top: 1px solid rgba(var(--fg-rgb), 0.06);
    transform: rotate(45deg);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Seta apontando para a linha — items da DIREITA (seta na esquerda do card) */
.timeline-right .timeline-content::before {
    content: '';
    position: absolute;
    top: 22px;
    left: -12px;
    width: 12px;
    height: 12px;
    background: rgba(var(--fg-rgb), 0.02);
    border-left: 1px solid rgba(var(--fg-rgb), 0.06);
    border-bottom: 1px solid rgba(var(--fg-rgb), 0.06);
    transform: rotate(45deg);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover — card desloca para fora */
.timeline-left:hover .timeline-content {
    border-color: rgba(255, 68, 0, 0.25);
    background: rgba(255, 68, 0, 0.03);
    transform: translateX(-8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 68, 0, 0.05);
}

.timeline-right:hover .timeline-content {
    border-color: rgba(255, 68, 0, 0.25);
    background: rgba(255, 68, 0, 0.03);
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 68, 0, 0.05);
}

/* Hover — seta muda cor */
.timeline-left:hover .timeline-content::before {
    border-right-color: rgba(255, 68, 0, 0.25);
    border-top-color: rgba(255, 68, 0, 0.25);
    background: rgba(255, 68, 0, 0.03);
}

.timeline-right:hover .timeline-content::before {
    border-left-color: rgba(255, 68, 0, 0.25);
    border-bottom-color: rgba(255, 68, 0, 0.25);
    background: rgba(255, 68, 0, 0.03);
}

/* Alinhamento de texto — esquerda fica alinhado à direita */
.timeline-left .timeline-content {
    text-align: right;
}

.timeline-left .timeline-tags {
    justify-content: flex-end;
}

.timeline-left .timeline-link {
    justify-content: flex-end;
}

.timeline-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 68, 0, 0.08);
    border: 1px solid rgba(255, 68, 0, 0.15);
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    transition: color 0.3s;
}

.timeline-item:hover .timeline-content h3 {
    color: var(--accent);
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

/* Tags de tecnologia */
.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-tags span {
    background: rgba(var(--fg-rgb), 0.04);
    border: 1px solid rgba(var(--fg-rgb), 0.08);
    border-radius: 30px;
    padding: 0.2rem 0.7rem;
    font-size: 0.78rem;
    color: rgba(var(--fg-rgb), 0.6);
    font-weight: 500;
    transition: all 0.3s;
}

.timeline-item:hover .timeline-tags span {
    border-color: rgba(255, 68, 0, 0.15);
    color: rgba(var(--fg-rgb), 0.8);
}

/* Link externo */
.timeline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
}

.timeline-link:hover {
    border-bottom-color: var(--accent);
}

.timeline-link svg {
    stroke: var(--accent);
    transition: transform 0.3s;
}

.timeline-link:hover svg {
    transform: translate(3px, -3px);
}

/* Responsivo Timeline — collapsa para coluna única */
@media (max-width: 968px) {
    .timeline-section {
        padding: 5rem 0;
    }

    .timeline-line {
        left: 21px;
        transform: none;
    }

    /* Todos os items viram coluna única: marker | content */
    .timeline-item,
    .timeline-item.timeline-left,
    .timeline-item.timeline-right {
        grid-template-columns: 44px 1fr;
        gap: 1.5rem;
    }

    /* Reordenar: marker primeiro, content segundo, esconder spacer */
    .timeline-spacer {
        display: none;
    }

    .timeline-marker {
        order: 1;
        padding-top: 1rem;
    }

    .timeline-content {
        order: 2;
        padding: 1.5rem;
        text-align: left;
    }

    .timeline-left .timeline-content {
        text-align: left;
    }

    .timeline-left .timeline-tags,
    .timeline-left .timeline-link {
        justify-content: flex-start;
    }

    /* Seta sempre à esquerda no mobile */
    .timeline-left .timeline-content::before,
    .timeline-right .timeline-content::before {
        left: -10px;
        right: auto;
        top: 18px;
        width: 10px;
        height: 10px;
        border: none;
        border-left: 1px solid rgba(var(--fg-rgb), 0.06);
        border-bottom: 1px solid rgba(var(--fg-rgb), 0.06);
        transform: rotate(45deg);
    }

    /* Hover no mobile — desloca para direita */
    .timeline-left:hover .timeline-content,
    .timeline-right:hover .timeline-content {
        transform: translateX(6px);
    }

    .timeline-content h3 {
        font-size: 1.3rem;
    }

    .timeline-year {
        font-size: 0.7rem;
    }
}


.projects-grid-section {
    padding: 2rem 0 8rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 3.5rem;
}

.project-card {
    display: block;
    background: rgba(var(--fg-rgb), 0.02);
    border: 1px solid rgba(var(--fg-rgb), 0.05);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.project-card:hover {
    border-color: rgba(255, 68, 0, 0.4);
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 68, 0, 0.1);
}

.card-img-wrapper {
    position: relative;
    height: 320px;
    overflow: hidden;
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    filter: grayscale(0.8) contrast(1.1);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1.05);
}

.project-card:hover .card-img-wrapper img {
    filter: grayscale(0) contrast(1);
    transform: scale(1);
}

.card-overlay {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-overlay .year {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.card-info {
    padding: 2rem 1.5rem;
    position: relative;
}

.card-info .category {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 0.8rem;
    background: rgba(255, 68, 0, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.card-info h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    transition: color 0.3s;
}

.project-card:hover .card-info h3 {
    color: var(--accent);
}

.card-info p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(var(--fg-rgb), 0.05);
    padding-top: 1.5rem;
    transition: border-color 0.4s;
}

.project-card:hover .card-footer {
    border-color: rgba(255, 68, 0, 0.2);
}

.card-footer .view-project {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.card-footer svg {
    stroke: var(--text-muted);
    transition: all 0.4s;
    transform: translate(-5px, 5px);
    opacity: 0.5;
}

.project-card:hover .card-footer svg {
    stroke: var(--accent);
    transform: translate(0, 0);
    opacity: 1;
}

/* --- PREMIUM BLOG CARDS --- */
.blog-grid-section {
    padding: 2rem 0 8rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 3rem;
}

.blog-card {
    background: linear-gradient(145deg, rgba(var(--fg-rgb), 0.03) 0%, rgba(var(--fg-rgb), 0.01) 100%);
    border: 1px solid rgba(var(--fg-rgb), 0.05);
    border-top: 3px solid rgba(var(--fg-rgb), 0.1);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
    border-top-color: var(--accent);
    transform: translateY(-10px);
    background: linear-gradient(145deg, rgba(var(--fg-rgb), 0.05) 0%, rgba(var(--fg-rgb), 0.02) 100%);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(var(--fg-rgb), 0.05);
    padding-bottom: 1rem;
}

.blog-meta .category {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-meta .date {
    color: var(--text-muted);
}

.blog-link {
    display: block;
}

.blog-link h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color 0.3s;
}

.blog-card:hover .blog-link h2 {
    color: var(--accent);
}

.blog-link p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.read-more svg {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s;
    stroke: var(--accent);
}

.blog-card:hover .read-more svg {
    transform: translateX(8px);
    stroke: var(--text-primary);
}

/* --- BLOG SEARCH BAR --- */
.blog-search {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: 3rem;
    max-width: 680px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(var(--fg-rgb), 0.08);
    background: linear-gradient(145deg, rgba(var(--fg-rgb), 0.04) 0%, rgba(var(--fg-rgb), 0.01) 100%);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(255, 68, 0, 0.1), 0 0 60px rgba(255, 68, 0, 0.05);
    background: linear-gradient(145deg, rgba(var(--fg-rgb), 0.06) 0%, rgba(var(--fg-rgb), 0.02) 100%);
}

.blog-search-inner {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 1.5rem;
    gap: 1rem;
    position: relative;
}

.blog-search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.3s;
}

.blog-search:focus-within .blog-search-icon {
    color: var(--accent);
}

.blog-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1.2rem 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    outline: none;
    cursor: text;
}

.blog-search-input::placeholder {
    color: rgba(var(--fg-rgb), 0.25);
    transition: color 0.3s;
}

.blog-search-input:focus::placeholder {
    color: rgba(var(--fg-rgb), 0.4);
}

/* Remove default search X on webkit browsers */
.blog-search-input::-webkit-search-cancel-button,
.blog-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.blog-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding: 0.4rem;
    border-radius: 50%;
    transition: all 0.3s;
    flex-shrink: 0;
}

.blog-search-clear:hover {
    color: var(--accent);
    background: rgba(255, 68, 0, 0.1);
}

.blog-search-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--accent-strong);
    border: none;
    padding: 1.2rem 2rem;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.blog-search-btn:hover {
    background: #C23400;
    padding-right: 2.5rem;
}

.blog-search-btn svg {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-search-btn:hover svg {
    transform: translateX(4px);
}

/* Search Status */
.blog-search-status {
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.blog-search-status p {
    font-size: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.blog-search-status strong {
    color: var(--text-primary);
}

.search-clear-link {
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    transition: opacity 0.3s;
    margin-left: auto;
}

.search-clear-link:hover {
    opacity: 0.7;
}

/* Empty State */
.blog-empty-state {
    text-align: center;
    padding: 6rem 2rem;
    border: 1px dashed rgba(var(--fg-rgb), 0.08);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(var(--fg-rgb), 0.02) 0%, transparent 100%);
}

.blog-empty-icon {
    margin-bottom: 2rem;
    color: rgba(var(--fg-rgb), 0.15);
}

.blog-empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-empty-state p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 400px;
    margin: 0 auto;
}

.blog-empty-state a {
    color: var(--accent);
    font-weight: 600;
    transition: opacity 0.3s;
}

.blog-empty-state a:hover {
    opacity: 0.7;
}

/* --- CONTATO PAGE (REESTRUTURADA) --- */
.contact-hero h1 {
    line-height: 1;
}

.contact-info-section {
    padding: 4rem 0 6rem;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.contact-info-card {
    background: rgba(var(--fg-rgb), 0.02);
    border: 1px solid rgba(var(--fg-rgb), 0.05);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-info-card:hover {
    border-color: rgba(255, 68, 0, 0.3);
    background: rgba(255, 68, 0, 0.03);
    transform: translateY(-6px);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 68, 0, 0.08);
    border: 1px solid rgba(255, 68, 0, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: background 0.3s;
}

.contact-info-card:hover .card-icon {
    background: rgba(255, 68, 0, 0.15);
}

.card-icon svg {
    stroke: var(--accent);
}

.contact-info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info-card p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

.contact-info-card strong {
    color: var(--text-primary);
}

.info-link {
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.3s;
    display: block;
}

.info-link:hover {
    color: var(--accent);
}

.social-list-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* CTA scroll to footer */
.contact-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 4rem 0;
    border-top: 1px solid rgba(var(--fg-rgb), 0.05);
    text-align: center;
}

.contact-cta>p {
    color: var(--text-muted);
    font-size: 1rem;
}

.contact-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    border: 1px solid rgba(var(--fg-rgb), 0.1);
    padding: 1rem 2rem;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-cta-btn svg {
    stroke: var(--accent);
    transition: transform 0.4s;
}

.contact-cta-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.contact-cta-btn:hover svg {
    transform: translateY(5px);
}

/* Limpeza de estilos antigos não usados na nova versão */
.social-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-list a:hover {
    color: var(--accent);
}

/* --- OFFCANVAS MENU --- */
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 20px;
    z-index: 101;
    padding: 12px 6px;
    margin: -12px -6px;
    box-sizing: content-box;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.offcanvas-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(var(--fg-rgb), 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    transition: right 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.offcanvas-menu.active {
    right: 0;
}

.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.close-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    transition: color 0.3s;
    padding: 0;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu-btn:hover {
    color: var(--accent);
}

.offcanvas-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: auto;
}

.offcanvas-links a {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.offcanvas-links a:hover {
    color: var(--text-primary);
    transform: translateX(10px);
}

.offcanvas-btn {
    display: inline-block;
    font-size: 1.5rem !important;
    border: 1px solid var(--accent) !important;
    padding: 1rem 2rem !important;
    border-radius: 4px;
    color: var(--accent) !important;
    text-align: center;
    margin-top: 1rem;
}

.offcanvas-btn:hover {
    background: var(--accent-strong) !important;
    color: #fff !important;
}

.offcanvas-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(var(--fg-rgb), 0.1);
    padding-top: 2rem;
}

.offcanvas-footer p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.offcanvas-email {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.offcanvas-email:hover {
    color: var(--accent);
}

@media (max-width: 968px) {
    .desktop-only {
        display: none !important;
    }

    .hamburger-btn {
        display: flex;
    }

    .projects-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card {
        padding: 1.5rem;
    }

    .contact-grid-main {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .page-hero h1 {
        font-size: 3rem;
    }

    .blog-search {
        flex-direction: column;
        border-radius: 12px;
        max-width: 100%;
    }

    .blog-search-inner {
        padding: 0 1.2rem;
    }

    .blog-search-input {
        font-size: 0.95rem;
        padding: 1rem 0;
    }

    .blog-search-btn {
        justify-content: center;
        padding: 1rem 1.5rem;
        border-top: 1px solid rgba(var(--fg-rgb), 0.05);
    }

    .blog-search-status p {
        font-size: 0.9rem;
    }

    .search-clear-link {
        margin-left: 0;
    }

    .blog-empty-state {
        padding: 4rem 1.5rem;
    }

    .blog-empty-state h3 {
        font-size: 1.4rem;
    }

    .info-link {
        font-size: 0.9rem;
    }
}

/* ============================================================
   SINGLE PAGES — PROJECT & BLOG POST
   ============================================================ */

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent);
}

.back-link svg {
    stroke: currentColor;
    transition: transform 0.3s;
}

.back-link:hover svg {
    transform: translateX(-4px);
}

/* ---- PROJECT SINGLE ---- */
.project-single-hero {
    padding-bottom: 4rem;
}

.project-single-cover {
    width: 100%;
    max-height: 65vh;
    overflow: hidden;
    background: var(--bg-secondary);
}

.project-single-cover img {
    width: 100%;
    height: 65vh;
    object-fit: cover;
    filter: grayscale(0.3);
    transition: filter 0.5s;
}

.project-single-cover:hover img {
    filter: grayscale(0);
}

.project-single-content {
    padding: 6rem 0 8rem;
}

.project-single-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 6rem;
    margin-bottom: 6rem;
    align-items: start;
}

.project-description h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(var(--fg-rgb), 0.06);
}

.project-description p {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.9;
}

/* Sidebar */
.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar-block h4 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.sidebar-block p {
    color: var(--text-muted);
    font-size: 1rem;
}

.tech-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tech-tags li {
    background: rgba(var(--fg-rgb), 0.04);
    border: 1px solid rgba(var(--fg-rgb), 0.08);
    border-radius: 30px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.project-cta-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--accent-strong);
    color: #fff;
    padding: 1.2rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.project-cta-btn:hover {
    opacity: 0.85;
}

/* Nav de volta */
.project-nav {
    border-top: 1px solid rgba(var(--fg-rgb), 0.06);
    padding-top: 3rem;
}

.project-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.3s;
}

.project-nav-back:hover {
    color: var(--text-primary);
}

.project-nav-back svg {
    transition: transform 0.3s;
}

.project-nav-back:hover svg {
    transform: translateX(-4px);
}

/* ---- BLOG POST ---- */
.blog-post-hero {
    padding-bottom: 4rem;
}

.post-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.post-category {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-dot {
    color: var(--text-muted);
}

.post-date,
.post-read-time {
    color: var(--text-muted);
}

.blog-post-content {
    padding: 4rem 0 8rem;
}

/* Tipografia editorial do conteúdo Markdown */
.post-body {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.9;
    color: rgba(var(--fg-rgb), 0.85);
}

/* Índice lateral "Nesta página" (só em telas largas) */
.post-body h2,
.post-body h3 {
    scroll-margin-top: 110px;
}

.post-toc {
    display: none;
}

@media (min-width: 1280px) {
    .post-layout {
        display: grid;
        grid-template-columns: 1fr 720px 1fr;
        column-gap: 3rem;
        align-items: start;
    }

    .post-layout .post-body {
        grid-column: 2;
        margin: 0;
    }

    .post-toc {
        display: block;
        grid-column: 3;
        position: sticky;
        top: 120px;
        max-width: 260px;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        font-size: 0.85rem;
        line-height: 1.45;
    }
}

.post-toc-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-toc li {
    margin-bottom: 0.75rem;
}

.post-toc li.toc-h3 {
    padding-left: 1rem;
}

.post-toc a {
    color: rgba(var(--fg-rgb), 0.55);
    transition: color 0.2s;
}

.post-toc a:hover,
.post-toc a[aria-current="true"] {
    color: var(--text-primary);
}

.post-toc-top {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.post-body h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin: 3.5rem 0 1.5rem;
    color: var(--text-primary);
    padding-top: 3rem;
    border-top: 1px solid rgba(var(--fg-rgb), 0.06);
}

.post-body h2:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.post-body h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
}

.post-body p {
    margin-bottom: 1.8rem;
}

.post-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-body strong {
    color: var(--text-primary);
    font-weight: 700;
}

.post-body em {
    font-style: italic;
}

.post-body ul,
.post-body ol {
    margin: 0 0 1.8rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.post-body li {
    color: rgba(var(--fg-rgb), 0.8);
}

.post-body blockquote {
    border-left: 3px solid var(--accent);
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    background: rgba(255, 68, 0, 0.05);
    border-radius: 0 8px 8px 0;
}

.post-body blockquote p {
    color: rgba(var(--fg-rgb), 0.9);
    font-size: 1.2rem;
    margin: 0;
}

.post-body pre {
    background: var(--bg-secondary);
    border: 1px solid rgba(var(--fg-rgb), 0.08);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.post-body code {
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--code-color);
    line-height: 1.6;
}

.post-body p code,
.post-body li code {
    background: rgba(var(--fg-rgb), 0.06);
    border-radius: 4px;
    padding: 0.15em 0.4em;
    color: var(--code-color);
    font-size: 0.9em;
}

.post-body hr {
    border: none;
    border-top: 1px solid rgba(var(--fg-rgb), 0.08);
    margin: 3rem 0;
}

/* ---- TABLE STYLING ---- */
.post-body .table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 2.5rem 0;
    border: 1px solid rgba(var(--fg-rgb), 0.08);
    border-radius: 8px;
    background: var(--bg-secondary);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    -webkit-overflow-scrolling: touch;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 400px;
}

.post-body thead {
    background: rgba(255, 68, 0, 0.06);
    border-bottom: 2px solid var(--accent);
}

.post-body th {
    padding: 1rem 1.5rem;
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.post-body th:first-child {
    border-left: 3px solid var(--accent);
    border-radius: 8px 0 0 0;
}

.post-body th:last-child {
    border-radius: 0 8px 0 0;
}

.post-body tbody tr {
    border-bottom: 1px solid rgba(var(--fg-rgb), 0.05);
    transition: background 0.25s ease;
}

.post-body tbody tr:nth-child(even) {
    background: rgba(var(--fg-rgb), 0.02);
}

.post-body tbody tr:last-child {
    border-bottom: none;
}

.post-body tbody tr:hover {
    background: rgba(255, 68, 0, 0.06);
}

.post-body td {
    padding: 0.9rem 1.5rem;
    color: rgba(var(--fg-rgb), 0.7);
    vertical-align: middle;
    line-height: 1.6;
    transition: color 0.25s ease;
}

.post-body td:first-child {
    color: rgba(var(--fg-rgb), 0.9);
    font-weight: 600;
    border-left: 3px solid transparent;
    transition: border-color 0.25s ease, color 0.25s ease;
}

.post-body tbody tr:hover td {
    color: var(--text-primary);
}

.post-body tbody tr:hover td:first-child {
    border-left-color: var(--accent);
}

.post-body img {
    border-radius: 8px;
    margin: 2rem auto;
}

/* Post footer */
.post-footer {
    max-width: 720px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(var(--fg-rgb), 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.post-tags-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tag-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag-pill {
    background: rgba(255, 68, 0, 0.1);
    border: 1px solid rgba(255, 68, 0, 0.2);
    color: var(--accent);
    border-radius: 30px;
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-share a {
    color: var(--text-muted);
    transition: color 0.3s;
}

.post-share a:hover {
    color: var(--text-primary);
}

.post-share svg {
    display: block;
}

.post-back-cta {
    max-width: 720px;
    margin: 4rem auto 0;
}

/* Responsivo */
@media (max-width: 968px) {
    .project-single-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .project-single-cover img {
        height: 40vh;
    }

    .post-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-body {
        font-size: 1.05rem;
    }

    .post-body h2 {
        font-size: 1.6rem;
    }
}

/* ---- PAGINATION ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.page-info {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-outline.disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: not-allowed;
}
/* --- MOVIMENTO REDUZIDO --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

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

    /* Sem a animação, o traço do IMPACTANTE ficaria invisível */
    .stroke-text-svg-animacao {
        stroke-dashoffset: 0;
    }
}
