:root {
    --bg-color: #05070a;
    /* Fundo neutro quase preto */
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.07);
    /* Menos translúcido */
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --primary-gradient: linear-gradient(135deg, #001222 0%, #00a9e0 100%);
    /* Gradiente mais sóbrio */
    --blob-1-color: rgba(0, 169, 224, 0.3);
    /* Azul claro Datalin com baixa opacidade */
    --blob-2-color: rgba(0, 40, 85, 0.4);
    /* Azul escuro Datalin com baixa opacidade */
    --blob-3-color: rgba(0, 119, 182, 0.2);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    /* Remove body padding for fluid feel */
}

/* Background Blobs Animation */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: drift 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--blob-1-color);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--blob-2-color);
    bottom: 10%;
    right: 10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--blob-3-color);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* Glassmorphism Container */
.glass-container {
    width: 100%;
    /* max-width removed for container-fluid */
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    box-shadow: var(--glass-shadow);
    padding: 2rem 2%;
    /* Responsive horizontal padding */
    z-index: 1;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #00a9e0);
    /* Destaque azul claro */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.github-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

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

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

/* Intro Layout - Side-by-Side Cards */
.intro-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: stretch;
    /* Garante altura igual entre Coluna Esquerda e Direita */
}

.intro-column-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.intro-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.2rem;
    line-height: 1.6;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.intro-column-left .intro-card {
    flex: 1;
    /* Faz os dois cards da esquerda dividirem o espaço e preencherem a altura */
}

.intro-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(0, 169, 224, 0.4);
}

.intro-column-right .intro-card {
    height: 100%;
    justify-content: center;
    /* Centraliza conteúdo emocional no card grande */
}

.intro-card h2 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(to right, #fff, #00a9e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro-card p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.2rem;
}

.intro-card p:last-child {
    margin-bottom: 0;
}

.emotional-card {
    border-left: 4px solid #00a9e0;
}

/* Card Styling */
.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.card p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.card .tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    color: #fff;
    align-self: flex-start;
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.glass-modal {
    background: rgba(20, 20, 25, 0.95);
    /* Darker background for readability */
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #ddd;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
}

.close-btn:hover {
    color: #fff;
}

/* Markdown Content Styling */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-body code {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.markdown-body ul,
.markdown-body ol {
    margin-left: 20px;
    margin-bottom: 1rem;
}

.markdown-body hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.markdown-body a {
    color: #667eea;
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.5);
}

footer a {
    color: #fff;
    text-decoration: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .glass-container {
        padding: 2rem 3%;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .about-project,
    .intro-section {
        grid-template-columns: 1fr;
        padding: 2rem;
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .glass-container {
        padding: 3rem 1.5rem;
        border-radius: 0;
        /* Keep it fluid on mobile too */
    }

    .about-project {
        padding: 1.5rem;
        margin-bottom: 3rem;
    }

    .about-content h2,
    .emotional-content h2 {
        font-size: 1.6rem;
    }

    .emotional-content {
        padding-left: 1rem;
    }

    header {
        margin-bottom: 2rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

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

    .card {
        padding: 1.5rem;
    }

    .glass-modal {
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .close-btn {
        top: 1rem;
        right: 1rem;
    }

    .markdown-body h1 {
        font-size: 1.8rem;
    }

    .markdown-body h2 {
        font-size: 1.5rem;
    }

    .markdown-body h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }

    .github-btn {
        width: 100%;
        text-align: center;
    }
}