/* ========================================
   SALGE Portfolio - Estilos
   ======================================== */

/* Variáveis CSS */
:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f5f5f5;
    --color-text: #1a1a1a;
    --color-title: #3f3f3f;
    --color-text-muted: #666666;
    --color-text-light: #999999;
    --color-border: #e5e5e5;
    --color-card-bg: #1a1a1a;
    --font-display: 'Jost', Futura, 'Trebuchet MS', sans-serif;
    --font-body: 'Jost', Futura, 'Trebuchet MS', sans-serif;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* Reset e Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   HEADER - Estilo igual ao print
   ======================================== */

.header {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo centralizado */
.header-logo {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1;
}

.header-logo a {
    color: var(--color-title);
    transition: opacity 0.3s var(--transition-smooth);
}

.header-logo a:hover {
    opacity: 0.7;
}

/* Container de navegação e social */
.header-nav-social {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Navegação */
.header-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color 0.3s var(--transition-smooth);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.45rem;
    height: 1px;
    background-color: currentColor;
}

/* Social */
.header-social {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    border-radius: 50%;
    transition: all 0.3s var(--transition-smooth);
}

.social-icon:hover {
    background-color: var(--color-bg-alt);
    transform: translateY(-2px);
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main {
    min-height: calc(100vh - 200px);
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 3rem 2rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: var(--color-title);
}

.page-description {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   FEATURED SECTION
   ======================================== */

.featured {
    padding: 2rem 2rem 4rem;
    display: flex;
    justify-content: center;
}

.featured-card {
    width: 100%;
    max-width: 900px;
}

.featured-link {
    display: block;
}

.featured-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
}

.featured-link:hover .featured-image img {
    transform: scale(1.03);
}

.featured-info {
    text-align: center;
}

.featured-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.featured-year {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.featured-description {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   PREVIEW SECTIONS
   ======================================== */

.preview-section {
    padding: 4rem 2rem;
}

.preview-section--alt {
    background-color: var(--color-bg-alt);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* ========================================
   PROJECTS GRID
   ======================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s var(--transition-smooth);
    display: block;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--transition-smooth);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s var(--transition-smooth);
}

.project-card:hover .project-badge {
    transform: scale(1.1);
}

.project-badge--live {
    width: auto;
    height: auto;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.project-info {
    background-color: var(--color-card-bg);
    padding: 1rem 1.25rem;
}

.project-title {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.project-description {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-all {
    text-align: center;
    margin-top: 2.5rem;
}

.view-all-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    transition: color 0.3s var(--transition-smooth);
}

.view-all-link:hover {
    color: var(--color-text);
}

/* ========================================
   PROJECTS PAGE
   ======================================== */

.projects-page {
    padding: 0 2rem 4rem;
}

.projects-page .projects-grid {
    max-width: 1200px;
}

/* ========================================
   MASONRY GALLERY
   ======================================== */

.gallery-section {
    padding: 0 2rem 4rem;
}

.masonry-grid {
    column-count: 4;
    column-gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.masonry-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 1rem;
    break-inside: avoid;
}

.masonry-item img {
    width: 100%;
    height: auto;
    transition: transform 0.5s var(--transition-smooth);
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.masonry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.3s var(--transition-smooth);
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

.masonry-title {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    letter-spacing: 0.05em;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    padding: 2.25rem 2rem;
    background-color: var(--color-text);
    color: white;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.footer-link {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s var(--transition-smooth);
}

.footer-link:hover {
    opacity: 1;
}

.footer-copy {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
    text-align: center;
}

/* ========================================
   ANIMAÇÕES
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay para cards */
.project-card:nth-child(1) { transition-delay: 0s; }
.project-card:nth-child(2) { transition-delay: 0.1s; }
.project-card:nth-child(3) { transition-delay: 0.2s; }
.project-card:nth-child(4) { transition-delay: 0.3s; }
.project-card:nth-child(5) { transition-delay: 0.4s; }
.project-card:nth-child(6) { transition-delay: 0.5s; }
.project-card:nth-child(7) { transition-delay: 0.6s; }
.project-card:nth-child(8) { transition-delay: 0.7s; }

/* ========================================
   RESPONSIVIDADE
   ======================================== */

/* Tablets */
@media (max-width: 1024px) {
    .header {
        padding: 2rem 1.5rem;
    }

    .header-logo {
        font-size: 3rem;
    }

    .header-nav-social {
        gap: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .masonry-grid {
        column-count: 3;
    }
}

/* Tablets pequenos */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem;
    }

    .header-logo {
        font-size: 2rem;
    }

    .header-nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.7rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .masonry-grid {
        column-count: 2;
    }

    .featured-image {
        aspect-ratio: 16 / 10;
    }

    .featured-title {
        font-size: 1.25rem;
    }

    .footer-links {
        gap: 2rem;
    }

    .footer-link {
        font-size: 0.9rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }

    .header-logo {
        font-size: 2.25rem;
    }

    .header-nav-social {
        flex-direction: column;
        gap: 1rem;
    }

    .header-nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.7rem;
    }

    .social-icon {
        width: 32px;
        height: 32px;
    }

    .social-icon svg {
        width: 16px;
        height: 16px;
    }

    .featured {
        padding: 1rem 1rem 3rem;
    }

    .preview-section {
        padding: 3rem 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .masonry-grid {
        column-count: 1;
    }

    .masonry-column {
        gap: 0.75rem;
    }

    .gallery-section {
        padding: 0 1rem 3rem;
    }

    .page-header {
        padding: 2rem 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .footer {
        padding: 1.75rem 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ========================================
   ACESSIBILIDADE
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Foco visível para navegação por teclado */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
}

.social-icon:focus-visible {
    outline-offset: 2px;
}

/* ========================================
   PÁGINA SOBRE
   ======================================== */

.about-section {
    padding: 2rem 2rem 6rem;
}

.about-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.about-image {
    position: sticky;
    top: 2rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.about-content {
    padding-top: 0.5rem;
}

.about-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    color: var(--color-title);
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.about-text p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

.about-skills {
    margin-bottom: 3rem;
}

.skills-title,
.contact-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
}

.skill-tag {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background-color: var(--color-bg-alt);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s var(--transition-smooth);
}

.skill-tag:hover {
    background-color: var(--color-text);
    color: white;
}

.about-contact {
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.contact-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.contact-email {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    display: inline-block;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-text);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--transition-smooth);
}

.contact-email:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Página Sobre - Versão Simples (sem foto) */
.about-section--simple {
    padding: 4rem 2rem 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 300px);
}

.about-container--simple {
    display: block;
    max-width: 680px;
    text-align: center;
}

.about-kicker {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.about-section--simple .about-title {
    margin-bottom: 1.5rem;
}

.about-section--simple .about-skills {
    margin-bottom: 2.5rem;
}

.about-section--simple .skills-list {
    justify-content: center;
}

.about-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
}

.about-content--simple {
    padding: 0;
}

.about-text--simple {
    margin-bottom: 2rem;
}

.about-text--simple p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

.about-text--simple p + p {
    margin-top: 1rem;
}

/* Responsividade - Sobre */
@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }

    .about-title {
        font-size: 1.75rem;
        text-align: center;
    }

    .about-content {
        text-align: center;
    }

    .skills-list {
        justify-content: center;
    }
    
    .about-section--simple {
        padding: 3rem 1.5rem 5rem;
        min-height: auto;
    }
    
    .about-text--simple p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .about-section {
        padding: 1rem 1rem 4rem;
    }

    .about-title {
        font-size: 1.5rem;
    }

    .about-text p {
        font-size: 0.95rem;
    }
    
    .about-section--simple {
        padding: 2rem 1rem 4rem;
    }
    
    .about-text--simple p {
        font-size: 0.95rem;
    }
}
