/* Reset e Variáveis */
:root {
    --primary-color: #1a4187;
    --secondary-color: #0f2a5c;
    --text-color: #333;
    --light-text: #fff;
    --bg-color: #e1e5eb;
    --card-bg: rgba(255, 255, 255, 0.9);
    --gradient: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    background-image:
        radial-gradient(at 40% 20%, rgba(26, 65, 135, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(15, 42, 92, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(26, 65, 135, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Efeito Glass Morphism */
.glass-morphism {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

/* Header */
header {
    text-align: center;
    background: var(--gradient);
    color: var(--light-text);
    padding: 3rem 1rem;
    margin: 1rem;
    position: relative;
    overflow: hidden;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-pic-container {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.3);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-pic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 82, 152, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-pic-container:hover .profile-pic {
    transform: scale(1.1);
}

.profile-pic-container:hover .profile-pic-overlay {
    opacity: 1;
}

.profile-pic-overlay i {
    font-size: 2.5rem;
    color: white;
}

.header-text {
    text-align: left;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typewriter {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    position: relative;
    padding-right: 5px;
}

.typewriter::after {
    content: '|';
    position: absolute;
    right: 0;
    animation: blink 0.7s infinite;
}

.tech-stack {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.tech-badge:hover {
    transform: translateY(-2px);
}

nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Animação do cursor piscando */
@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Seções */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

h2 i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* Projetos */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-image {
    position: relative;
    overflow: hidden;
    padding-top: 60%;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .card-overlay {
    opacity: 1;
}

.tech-used {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    justify-content: center;
}

.tech-used span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: white;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.card-content p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.card-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-github,
.btn-demo {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-github {
    background: #24292e;
    color: white;
}

.btn-demo {
    background: var(--primary-color);
    color: white;
}

.btn-github:hover,
.btn-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Contato */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.contact-card h3 {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.contact-card p {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Footer */
footer {
    text-align: center;
    background: var(--gradient);
    color: var(--light-text);
    padding: 1.5rem;
    margin: 3rem 1rem 1rem 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.social-links a {
    color: var(--light-text);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.fa-heart {
    color: #ff4d4d;
    animation: pulse 1.5s infinite;
}

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

    50% {
        transform: scale(1.2);
    }

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

/* Página de Projetos */
.mini-header {
    padding: 1rem;
    margin-bottom: 2rem;
}

.mini-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.mini-header h1 {
    font-size: 1.8rem;
    margin: 0;
    background: linear-gradient(to right, #fff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.projects-page {
    min-height: calc(100vh - 200px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-card .tech-stack {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.new-project {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-project:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.new-project-content {
    color: var(--light-text);
}

.new-project i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.new-project h3 {
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

.new-project p {
    color: rgba(255, 255, 255, 0.7);
}

/* Ver Todos os Projetos Link */
.view-all-projects {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.view-all-projects:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.view-all-projects i {
    margin-left: 0.5rem;
}

/* Responsividade */
@media (max-width: 768px) {

    /* Header */
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .header-text {
        text-align: center;
    }

    .tech-stack {
        justify-content: center;
    }

    header h1 {
        font-size: 2rem;
    }

    .profile-pic-container {
        width: 150px;
        height: 150px;
    }

    nav {
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Containers e Seções */
    .container {
        padding: 1rem;
        margin: 1rem;
    }

    /* Cards de Projetos */
    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        margin-bottom: 1rem;
    }

    .card-content {
        padding: 1rem;
    }

    /* Contato */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    /* Página de Projetos */
    .mini-header nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        margin-bottom: 1rem;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }

    .grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    header h1 {
        font-size: 2.2rem;
    }
}

/* Ajustes para telas muito pequenas */
@media (max-width: 380px) {
    header h1 {
        font-size: 1.8rem;
    }

    .profile-pic-container {
        width: 120px;
        height: 120px;
    }

    .tech-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .card-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-github,
    .btn-demo {
        width: 100%;
        justify-content: center;
    }
}

/* Ajustes para telas grandes */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .grid,
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    header h1 {
        font-size: 3rem;
    }
}


.logo-apple {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;

}





/* Uniformização de cards - garante mesma altura e alinhamento */
.grid,
.projects-grid {
    align-items: stretch;
    /* garante que os itens do grid ocupem toda a altura disponível */
}

/* Aplica comportamento em colunas para que todos os cards tenham mesma estrutura */
.grid>*,
.projects-grid>* {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 420px;
    /* ajuste esse valor conforme o padrão desejado */
}

/* Mantém proporção consistente da área da imagem */
.card-image,
.project-card .card-image,
.new-project .card-image {
    padding-top: 60%;
    /* mesma proporção que já usa nos cards existentes */
}

/* Faz o conteúdo ocupar o espaço restante e empurra os links para baixo */
.card-content,
.project-card .card-content,
.new-project .card-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1 1 auto;
}

.card-links,
.project-links {
    margin-top: auto;
    /* garante que os botões/links fiquem alinhados na base do card */
    justify-content: center;
}

/* Responsivo: remove min-height em telas pequenas para evitar overflow */
@media (max-width: 768px) {

    .grid>*,
    .projects-grid>* {
        min-height: 0;
        height: auto;
    }
}

/* Modal Preview Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #fff;
    margin: 0;
    font-size: 1.8rem;
}

.close {
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close:hover,
.close:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
}

.preview-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.preview-image {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.preview-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.preview-description {
    color: #fff;
}

.preview-description h3 {
    color: #64b5f6;
    margin-bottom: 1rem;
}

.preview-description p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.preview-features {
    color: #fff;
}

.preview-features h3 {
    color: #64b5f6;
    margin-bottom: 1rem;
}

.preview-features ul {
    list-style: none;
    padding: 0;
}

.preview-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-features li:last-child {
    border-bottom: none;
}

.preview-features li i {
    color: #4caf50;
    margin-right: 0.5rem;
}

.preview-tech {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.preview-tech h3 {
    color: #64b5f6;
    margin-bottom: 1rem;
}

.preview-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.preview-links .btn-github,
.preview-links .btn-demo {
    flex: 1;
    text-align: center;
    padding: 1rem;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.preview-links .btn-github {
    background: linear-gradient(45deg, #333, #555);
    color: #fff;
}

.preview-links .btn-demo {
    background: linear-gradient(45deg, #64b5f6, #42a5f5);
    color: #fff;
}

.preview-links .btn-github:hover,
.preview-links .btn-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Estilos para botões demo como buttons */
.project-links .btn-demo,
.card-links .btn-demo {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* Responsivo para Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .preview-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .preview-links {
        flex-direction: column;
    }
}