:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --border: #334155;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Header & Navigation */
header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

nav ul li a:hover {
    color: var(--text-main);
}

/* Main Sections Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 5%;
}

section {
    margin-bottom: 6rem;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Sobre Section */
#sobre {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 2rem;
    border: 4px solid var(--border);
    object-fit: cover;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

#sobre p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Projects Grid */
.projects-container, .certificados-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card, .certificado-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover, .certificado-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.project-card h3, .certificado-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.project-card p, .certificado-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Footer Section */
footer {
    background-color: #020617;
    border-top: 1px solid var(--border);
    padding: 4rem 5%;
    text-align: center;
}

#contato p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.social-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links li a {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-weight: 500;
}

.social-links li a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.calc-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    margin-top: 10px;
}

.ver-mais {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    margin-top: auto;
}

/* Responsividade */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    #sobre {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .avatar {
        margin: 0 auto;
    }

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

    .social-links li a {
        flex-direction: column;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}