/* style.css - Sistema de Design do Portfólio de Valdir Jagmin */

/* -------------------------------------------------------------
   1. Variáveis e Tokens de Design (Suporta Temas Claro e Escuro)
   ------------------------------------------------------------- */
:root {
    /* Fontes */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: 'Lora', Georgia, "Times New Roman", serif;

    /* Configurações Globais */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    
    --shadow-premium: 0 10px 30px -15px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.03);
}

/* Tema Claro (Sofisticado, Paleta Quente de Galeria) */
body.light-theme {
    --bg-page: hsl(40, 20%, 97%); /* Fundo Off-White Quente */
    --bg-surface: hsl(0, 0%, 100%);
    --bg-surface-hover: hsl(40, 10%, 94%);
    --bg-glass: rgba(247, 245, 242, 0.85);
    
    --text-primary: hsl(200, 20%, 12%);
    --text-secondary: hsl(200, 10%, 30%);
    --text-muted: hsl(200, 10%, 50%);
    
    --accent: hsl(20, 70%, 45%); /* Terracota / Rust Red */
    --accent-hover: hsl(20, 80%, 35%);
    --accent-light: hsla(20, 70%, 45%, 0.1);
    --border-color: hsl(40, 10%, 88%);
    --border-color-focus: hsl(20, 70%, 45%);
}

/* Tema Escuro (Moderno, Galeria Noturna) */
body.dark-theme {
    --bg-page: hsl(210, 15%, 8%); /* Preto Azulado */
    --bg-surface: hsl(210, 15%, 11%);
    --bg-surface-hover: hsl(210, 15%, 15%);
    --bg-glass: rgba(18, 22, 28, 0.85);
    
    --text-primary: hsl(210, 15%, 90%);
    --text-secondary: hsl(210, 10%, 72%);
    --text-muted: hsl(210, 10%, 52%);
    
    --accent: hsl(25, 90%, 60%); /* Ocre Vibrante */
    --accent-hover: hsl(25, 100%, 70%);
    --accent-light: hsla(25, 90%, 60%, 0.15);
    --border-color: hsl(210, 15%, 16%);
    --border-color-focus: hsl(25, 90%, 60%);
    
    --shadow-premium: 0 10px 30px -15px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
}

/* -------------------------------------------------------------
   2. Estilos Globais e Reset
   ------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease, color 0.5s ease;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
}

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

/* Section Tag e Título Geral */
.section-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------
   3. Header e Navegação (Glassmorphism Sticky)
   ------------------------------------------------------------- */
.header-portfolio {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
}

.logo-portfolio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
}

.logo-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--accent);
    color: #fff;
    font-size: 0.9rem;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-sans);
    font-weight: 700;
}

.logo-name {
    letter-spacing: -0.5px;
}

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition-smooth);
}

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

.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-switch-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.theme-switch-btn:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

/* Hamburguer Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 25px;
}

.mobile-menu-btn .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-smooth);
}

/* -------------------------------------------------------------
   4. Seção Hero (Layout Editorial Elegante)
   ------------------------------------------------------------- */
.hero-section {
    padding: 6rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin: 0.5rem 0 1.5rem 0;
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background-color: var(--bg-surface-hover);
    transform: translateY(-2px);
}

/* Wrapper Imagem Destaque */
.featured-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.featured-image-wrapper:hover {
    box-shadow: var(--shadow-hover);
}

.hero-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.featured-image-wrapper:hover .hero-img {
    transform: scale(1.03);
}

.hero-img-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.4rem 1rem;
    border-radius: var(--border-radius-sm);
}

/* -------------------------------------------------------------
   5. Seção O Artista / Biografia
   ------------------------------------------------------------- */
.about-section {
    background-color: var(--bg-surface);
    padding: 7rem 2rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-container {
    max-width: 1300px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
    align-items: center;
}

.artist-portrait-card {
    background-color: var(--bg-page);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
}

.portrait-img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.25rem;
}

.portrait-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.portrait-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.about-text-column h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.about-lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-text-column p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    text-align: justify;
}

/* Citação Artística */
.artist-quote {
    background-color: var(--bg-page);
    border-left: 3px solid var(--accent);
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    font-style: italic;
}

.artist-quote p {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: left;
}

.artist-quote cite {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* -------------------------------------------------------------
   6. Seção Galeria de Obras (Filtros e Grid Dinâmicos)
   ------------------------------------------------------------- */
.gallery-section {
    padding: 7rem 2rem;
}

.gallery-container {
    max-width: 1300px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.gallery-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.gallery-header p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 2.5rem auto;
}

/* Filtros */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    background-color: var(--bg-surface);
    padding: 0.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    width: fit-content;
    margin: 0 auto;
}

.filter-tab {
    background: transparent;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-tab:hover {
    color: var(--text-primary);
}

.filter-tab.active {
    background-color: var(--accent);
    color: #fff;
}

/* Grid de Arte */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-item-art {
    position: relative;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.gallery-item-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-item-art:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.gallery-item-art:hover img {
    transform: scale(1.05);
}

/* Overlay no Hover */
.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 10%, rgba(0, 0, 0, 0.1) 90%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition-smooth);
}

.gallery-item-art:hover .item-overlay {
    opacity: 1;
}

.item-overlay span {
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    transform: translateY(10px);
    transition: var(--transition-smooth);
}

.gallery-item-art:hover .item-overlay span {
    transform: translateY(0);
}

/* Animações de filtro */
.gallery-item-art.hide {
    display: none;
}

.gallery-item-art.show {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* -------------------------------------------------------------
   7. Seção Histórico (Linha do tempo clean de 2 colunas)
   ------------------------------------------------------------- */
.timeline-section {
    background-color: var(--bg-surface);
    padding: 7rem 2rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.timeline-container {
    max-width: 1300px;
    margin: 0 auto;
}

.timeline-desc {
    color: var(--text-secondary);
    margin-bottom: 4rem;
}

.timeline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.timeline-column h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    position: relative;
}

.timeline-column h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--accent);
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.timeline-card:last-child {
    border-bottom: none;
}

.timeline-year {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-sans);
    flex-shrink: 0;
    width: 60px;
}

.timeline-card-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* -------------------------------------------------------------
   8. Seção Acervo & Preservação (Cartões com Grid)
   ------------------------------------------------------------- */
.archives-section {
    padding: 7rem 2rem;
}

.archives-container {
    max-width: 1300px;
    margin: 0 auto;
    text-align: center;
}

.archives-desc {
    color: var(--text-secondary);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.archives-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.archive-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 3rem;
    text-align: left;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.archive-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.archive-logo {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.archive-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.archive-loc {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
}

.archive-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Exposição Badge Img */
.archive-exhibition-img {
    margin-top: 1rem;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.archive-badge-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

/* Tabela Técnica MARGS */
.margs-tech-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: auto;
}

.margs-tech-table th, .margs-tech-table td {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.margs-tech-table th {
    font-weight: 600;
    width: 30%;
    color: var(--text-primary);
}

.margs-tech-table td {
    color: var(--text-secondary);
}

.margs-tech-table tr:last-child th, .margs-tech-table tr:last-child td {
    border-bottom: none;
}

/* -------------------------------------------------------------
   9. Lightbox (Modal de Slides Ampliado)
   ------------------------------------------------------------- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background-color: rgba(12, 14, 18, 0.95);
    overflow-y: auto;
}

.lightbox-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.lightbox-content {
    max-width: 90%;
    max-height: 75vh;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
    margin-top: 1.5rem;
    color: #9ab;
    font-size: 1rem;
    font-family: var(--font-serif);
    text-align: center;
    max-width: 600px;
}

/* -------------------------------------------------------------
   10. Rodapé do Portfólio
   ------------------------------------------------------------- */
.footer-portfolio {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 5rem 2rem;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
}

.footer-brand {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-links {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent);
}

.bullet {
    color: var(--border-color);
}

.footer-credits {
    font-size: 0.75rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

/* -------------------------------------------------------------
   11. Responsividade (Media Queries)
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.75rem;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-img {
        height: 380px;
    }

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

    .about-text-column h2 {
        font-size: 2rem;
        text-align: center;
    }

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

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

@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
    }

    .nav-portfolio {
        display: none; /* Esconde nav no mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }

    .nav-portfolio.active {
        display: block;
    }

    .nav-portfolio ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    .nav-portfolio li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: 1rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Animação do botão do menu */
    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .gallery-header h2, .timeline-section h2, .archives-section h2 {
        font-size: 2rem;
    }

    .archive-card {
        padding: 2rem;
    }
}
