:root {
    --primary-color: #00ff9f;
    --secondary-color: #00bfff;
    --background-color: #020617;
    --surface-color: rgba(10, 10, 20, 0.85);
    --text-color: #f5f5ff;
    --font-family: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--background-color);
    color: var(--text-color);
    margin: 0;
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(0, 255, 159, 0.2);
    color: #fff;
}

.menu-btn {
    display: none;
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 4rem;
    background: linear-gradient(135deg, #000428, #004e92);
    text-align: center;
}

.particles-section {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0,255,159,0.2), transparent 60%);
    z-index: 0;
}

.hero-content h1 {
    font-size: 3rem;
    margin: 0;
}

.hero-description {
    font-size: 1.1rem;
    margin: 1rem auto;
    max-width: 540px;
}

.btn {
    font-weight: 600;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.75rem;
    color: var(--background-color);
    background: var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color);
}

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

section {
    padding: 5rem 1rem 4rem;
    position: relative;
}

#home {
    background: linear-gradient(135deg, #010627, #0c3e7d);
}

#sobre {
    background: linear-gradient(135deg, #0a1525, #121c37);
}

#resumo {
    background: linear-gradient(135deg, #040b1d, #071032);
}

#projetos {
    background: linear-gradient(135deg, #050b1a, #0d0d1f);
}

#contato {
    background: linear-gradient(135deg, #030815, #0a1126);
}

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

.hash {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-weight: 700;
}

.about-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: center;
}

.about-image img {
    width: min(220px, 70%);
    max-width: 220px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    display: block;
    margin: 0 auto;
}

.terminal-window {
    background: rgba(0, 0, 0, 0.6);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.skill-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.9rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-item i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.4rem;
}

.bio {
    margin-top: 1rem;
    line-height: 1.6;
    color: #d2d7f7;
}

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

.resume-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.resume-card ul {
    padding-left: 1.25rem;
    margin-top: 1rem;
    color: #d2d7f7;
}

.resume-card li + li {
    margin-top: 0.5rem;
}

.resume-card h3 {
    margin-top: 0;
}

.resume-card ul {
    padding-left: 1rem;
}

.portal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
    justify-items: center;
}

.portal-gallery figure {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 0.75rem;
    width: 100%;
    max-width: 220px;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 20px 40px rgba(0,0,0,0.45);
    transition: transform 0.3s ease;
}

.portal-gallery figure:hover {
    transform: translateY(-6px);
}

.portal-gallery img {
    border-radius: 10px;
    margin-bottom: 0.6rem;
    width: 100%;
}

.portal-thumb {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.portal-gallery figcaption {
    color: #d3e5ff;
    font-size: 0.9rem;
}

.portal-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 2000;
}

.portal-modal.show {
    display: flex;
}

.portal-modal__content {
    position: relative;
    background: rgba(5, 11, 27, 0.95);
    border-radius: 16px;
    padding: 1rem;
    max-width: 90vw;
    width: min(640px, 100%);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.portal-modal__content img {
    width: 100%;
    border-radius: 12px;
}

.portal-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.projeto-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

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

.tech-stack span {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}

.status-tag {
    background: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: #020617;
    margin-left: 0.5rem;
}

.contato-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.contato-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.1);
}

.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-btn {
        display: block;
    }

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

    .projeto-card {
        padding: 1.25rem;
    }
}
