/*
 * =========================================
 * VARIABLES & RESET
 * =========================================
 */
:root {
    --bg-body: #020610;
    --bg-card: #0f172a;
    --bg-card-hover: #1e293b;
    --bg-modal: #0f172a;

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;

    --accent-red: #ef4444;
    --accent-red-hover: #dc2626;
    --accent-red-glow: rgba(239, 68, 68, 0.4);

    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);

    --spacing-container: 1200px;
    --spacing-section: 80px;

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
    border: none;
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
    box-shadow: 0 0 15px var(--accent-red-glow);
}

.btn-primary:hover {
    background-color: var(--accent-red-hover);
    box-shadow: 0 0 25px var(--accent-red-glow);
    transform: translateY(-2px);
}

/*
 * =========================================
 * HEADER
 * =========================================
 */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(2, 6, 16, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
}

/* Links de navegação */
.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    font-size: 1rem;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Linha indicadora */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-red);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Apenas o link ativo tem a linha permanente */
.nav-links a.active::after {
    width: 100% !important;
}

/* Hover temporário para feedback visual (exceto quando já ativo) */
.nav-links a:not(.active):hover::after {
    width: 100%;
}

/*
 * =========================================
 * HERO
 * =========================================
 */
.hero {
    position: relative;
    min-height: 50vh;
    padding: 60px 0;
    background-image:
        linear-gradient(
            90deg,
            #020d17 0%,
            rgba(2, 13, 23, 0.85) 35%,
            rgba(2, 13, 23, 0.15) 100%
        ),
        url("../images/hero.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--spacing-container);
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-subtitle {
    color: var(--accent-red);
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.logo-hero img {
    height: 100px;
    width: auto;
    display: block;
}

.hero-description {
    margin-top: 20px;
    color: var(--text-secondary);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

/*
 * =========================================
 * PROJECTS
 * =========================================
 */
.projects {
    padding: var(--spacing-section) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.section-title i {
    color: var(--accent-red);
}

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

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #1e293b;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.05);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.active {
    background-color: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

.status-dot.planned {
    background-color: var(--text-secondary);
}

/*
 * =========================================
 * MODAL
 * =========================================
 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close:hover,
.close:focus {
    color: var(--text-primary);
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-body {
    padding: 25px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.modal-tag {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.05);
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.modal-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-red);
    font-weight: 600;
    text-decoration: underline;
}

.modal-link:hover {
    text-decoration: none;
}

/*
 * =========================================
 * FOOTER
 * =========================================
 */
footer {
    background-color: #02040a;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo img {
    height: 60px;
    display: block;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.heart {
    color: var(--accent-red);
}

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

    .hero {
        text-align: center;
        padding-top: 40px;
    }

    .hero-inner {
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
