.dashboard-grid {
    display: grid; 
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem; 
    max-width: 100%; 
    margin: 0 auto 2rem auto;
    padding: 0 1rem; 
    align-items: start;
}

@media screen and (max-width: 1200px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

.dash-card {
    position: relative; 
    background-color: rgba(15, 15, 15, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px; 
    padding: 2.5rem;
    display: flex; 
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.dash-card:hover { 
    transform: translateY(-5px); 
    border-color: rgba(255, 255, 255, 0.2); 
}

.dash-card h2 {
    font-size: 1.8rem; 
    margin-bottom: 1.5rem; 
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem; 
    text-transform: uppercase; 
    letter-spacing: 2px;
}

.profile-header { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
}

.profile-img-container {
    width: calc(100% + 5rem); 
    margin: -2.5rem -2.5rem 2rem -2.5rem;
    aspect-ratio: 1 / 1; 
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: none;
    z-index: 1;
}

.profile-img-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.dryoil-container {
    position: absolute;
    width: 5000px; 
    left: 50%; 
    transform: translate(-50%, -50%);
    top: 0; 
    margin-top: 35%; 
    z-index: 10; 
    pointer-events: none; 
    display: flex; 
}

.dryoil-img {
    width: 100%;
    height: 30px; 
    display: block;
    opacity: 1; 
    position: relative;
    z-index: 1;
}

#dryoilCanvas {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    z-index: 2;
    -webkit-mask-image: url('../images/dashboard/dryoil.png');
    mask-image: url('../images/dashboard/dryoil.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.timeline {
    position: relative;
    padding-left: 55px;
    margin-top: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.15);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -55px;
    top: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #dd0000, #990000);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(221, 0, 0, 0.5);
    z-index: 1;
}

.timeline-content {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.2rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.timeline-content:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.timeline-content h4 {
    color: #fff;
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
}

.timeline-company {
    color: #dd0000;
    font-weight: bold;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
    margin: 0;
}

.project-wrapper {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.project-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

div.project-list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: none;
    background: transparent;
    margin-bottom: 0;
}

.project-hidden-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 0 1rem;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease, padding 0.3s ease;
}

.project-wrapper:hover .project-hidden-actions {
    max-height: 80px; 
    opacity: 1;
    padding-bottom: 1.2rem;
    transform: translateY(0);
}

.action-btn {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: #ffffff !important; 
    border-radius: 8px;
    transition: filter 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.action-btn img,
.action-btn svg {
    width: 28px;
    height: 28px;
    fill: #dd0000; 
}

.action-btn:hover {
    filter: brightness(0.95); 
    transform: translateY(-3px);
}

.skill-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.skill-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.progress-bar-bg {
    flex-grow: 1; 
    height: 8px; 
    background-color: rgba(255, 255, 255, 0.1); 
    border-radius: 4px; 
    overflow: hidden; 
}

.progress-bar-fill { 
    height: 100%; 
    border-radius: 4px; 
    transition: width 1.5s ease-in-out; 
}

.nosql-light {
    display: none;
}

body.light-theme .nosql-dark {
    display: none;
}

.progress-bar-nosql {
    background: #ffffff !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}

body.light-theme .progress-bar-nosql {
    background: #000000 !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4) !important;
}

.skills-legend {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-title {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legend-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.legend-percent {
    font-weight: 700;
    color: #dd0000;
    width: 85px;
    flex-shrink: 0;
}

.legend-desc {
    color: #ccc;
    line-height: 1.4;
}

body.light-theme .skills-legend {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .legend-title {
    color: #666;
}

body.light-theme .legend-desc {
    color: #444;
}

.profile-card { grid-column: 1; grid-row: 1; }
.skills-card { grid-column: 2; grid-row: 1; }
.projects-card { grid-column: 3; grid-row: 1; }

.career-card {
    grid-column: 4;
    grid-row: 1 / span 2;
}

@media screen and (max-width: 1200px) {
    .profile-card, .skills-card, .projects-card, .career-card {
        grid-column: auto;
        grid-row: auto;
    }
}

body.light-theme .nosql-light {
    display: block;
}

body.light-theme .project-wrapper {
    background-color: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .project-wrapper:hover {
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .timeline::before {
    background-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .timeline-content {
    background-color: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .timeline-content:hover {
    background-color: #fff;
}

body.light-theme .timeline-content h4 {
    color: #000;
}

body.light-theme .timeline-content p {
    color: #444;
}

.profile-name { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.profile-role { font-size: 1.1rem; color: #dd0000; font-weight: 600; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1px; }
.profile-bio { font-size: 1rem; line-height: 1.6; color: #ccc; text-align: justify; }

.skill-item { margin-bottom: 1.5rem; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 0.5rem; color: #eee; font-weight: 500; font-size: 0.95rem; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #dd0000, #990000); border-radius: 4px; transition: width 1.5s ease-in-out; box-shadow: 0 0 10px rgba(221, 0, 0, 0.3); }

.project-list { display: flex; flex-direction: column; gap: 1rem; }
.project-list-item {
    display: flex; align-items: center; padding: 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s; text-decoration: none;
}

.project-thumb { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; margin-right: 1rem; background-color: #222; }
.project-info h4 { color: #fff; font-size: 1.1rem; margin-bottom: 0.2rem; }
.project-info span { font-size: 0.85rem; color: #888; }
.github-card {
    grid-column: 1 / 4;
    grid-row: 2;
    display: flex;
    flex-direction: column;
}

.github-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    width: 100%;
    flex-wrap: nowrap;
    gap: 15px;
}

.github-card-header h2 {
    margin: 0;
    white-space: nowrap;
}

.github-profile-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #24292e;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    white-space: nowrap;
}

.github-profile-btn i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.github-profile-btn:hover {
    opacity: 0.85;
    color: #ffffff;
    text-decoration: none;
}

.github-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.github-stats-row {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    flex-wrap: wrap;
}

.github-stat-box {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    flex: 1;
    min-width: 120px;
    transition: all 0.3s ease;
}

.github-stat-box:hover {
    border-color: rgba(221, 0, 0, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(221, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #dd0000;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.github-repos-section h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.github-repo-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.github-repo-list li {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    width: fit-content;
    max-width: 100%;
}

.github-repo-list li:hover {
    border-color: rgba(221, 0, 0, 0.5);
    background-color: rgba(255, 255, 255, 0.08);
}

.github-repo-list a {
    display: block;
    padding: 1rem;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    word-break: break-word;
}

.github-repo-list a::before {
    content: '📁';
    margin-right: 10px;
}

body.light-theme .github-stat-box,
body.light-theme .github-repo-list li {
    background-color: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
}
/* Correção do link Top 600 */
.link-destaque-vermelho {
    color: #dd0000;
    font-weight: bold;
    text-decoration: none;
}

.link-destaque-vermelho:hover {
    text-decoration: underline;
}

/* Correção do fundo branco dos logos dos projetos */
.bg-white {
    background-color: #ffffff;
}

/* Correção das barras de progresso (Dominação Técnica) */
.progress-flutter {
    width: 90%;
    background: linear-gradient(90deg, #42A5F5, #01579B);
    box-shadow: 0 0 10px rgba(66, 165, 245, 0.5);
}

.progress-firebase {
    width: 90%;
    background: linear-gradient(90deg, #FFCA28, #F57C00);
    box-shadow: 0 0 10px rgba(255, 202, 40, 0.5);
}

.progress-kotlin {
    width: 80%;
    background: linear-gradient(90deg, #7F52FF, #E24462);
    box-shadow: 0 0 10px rgba(127, 82, 255, 0.5);
}

.progress-swift {
    width: 75%;
    background: linear-gradient(90deg, #F05138, #D1361D);
    box-shadow: 0 0 10px rgba(240, 81, 56, 0.5);
}

/* Cor para o Tema Escuro (Padrão) */
/* Barra NoSQL - Tema Escuro (Padrão) */
.progress-nosql-w {
    width: 40% !important; /* Define a largura aqui para remover do HTML */
    background: #ffffff !important; /* Sobrescreve o gradiente vermelho com branco sólido */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}

/* Barra NoSQL - Tema Claro */
body.light-theme .progress-nosql-w {
    background: #000000 !important; /* Sobrescreve com preto sólido */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4) !important;
}

.progress-javascript {
    width: 40%;
    background: linear-gradient(90deg, #F7DF1E, #BFA100);
    box-shadow: 0 0 10px rgba(247, 223, 30, 0.5);
}

body.light-theme .stat-label { color: #555; }
body.light-theme .github-repos-section h3 { border-color: rgba(0,0,0,0.1); color: #000; }
body.light-theme .github-repo-list a { color: #000; }
body.light-theme .github-repo-list li:hover { background-color: #fff; border-color: rgba(0,0,0,0.3); }

.github-stats-container { display: flex; flex-direction: column; gap: 2rem; width: 100%; align-items: center; flex-grow: 1; margin-top: 1rem; }
.github-stats-container h3 { color: #fff; font-size: 1.2rem; margin: 1rem 0 0.5rem 0; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid rgba(221, 0, 0, 0.3); padding-bottom: 0.5rem; width: 100%; text-align: center; }
.github-flex-row, .github-projects-row { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; width: 100%; }
.github-stats-container img { max-width: 100%; object-fit: contain; }
.repo-link img { transition: transform 0.3s ease; }
.repo-link:hover img { transform: translateY(-5px); }
.github-trophies { max-width: 100%; height: auto; }

@media screen and (max-width: 1200px) {
    .github-card {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 480px) {
    .github-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
@media screen and (max-width: 1024px) {
    .dashboard-grid { 
        grid-template-columns: 1fr; 
        padding: 0 1.5rem; 
        gap: 1rem; 
    }
    
    .dash-card {
        cursor: pointer;
        padding: 1.2rem 1.5rem;
        position: relative;
        max-height: 60px;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    }
    
    /* MODIFICAÇÃO 1: Abre exceção para não esconder o header do GitHub */
    .dash-card > *:not(h2):not(.github-card-header) {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    /* Remove o botão do fluxo e a margem para o card fechar perfeitamente */
    .dash-card:not(.active) .github-card-header {
        margin-bottom: 0;
    }
    .dash-card:not(.active) .github-profile-btn {
        opacity: 0;
        pointer-events: none;
        position: absolute;
        visibility: hidden;
    }
    
    .dash-card::after {
        content: '+';
        position: absolute;
        right: 1.5rem;
        top: 1rem;
        font-size: 2.2rem;
        color: #dd0000;
        line-height: 1;
        font-weight: 300;
    }
    
    .dash-card h2 {
        margin: 0;
        border: none;
        padding: 0;
        font-size: 1.3rem;
        text-transform: uppercase;
        letter-spacing: 2px;
    }
    
    .profile-card::before {
        content: 'SOBRE MIM';
        display: block;
        font-size: 1.3rem;
        font-weight: 700;
        color: #fff;
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 2px;
    }
    
    body.light-theme .profile-card::before {
        color: #000;
    }
    
    .dash-card.active {
        max-height: 2500px; 
        padding: 2.5rem;
        transition: max-height 0.8s ease-in-out, padding 0.3s ease;
        cursor: default;
    }
    
    .dash-card.active::after {
        content: '−';
        top: 1.5rem;
        cursor: pointer;
    }
    
    .dash-card.active h2 {
        margin-bottom: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1rem;
        font-size: 1.8rem;
    }
    
    /* MODIFICAÇÃO 2: Restaura os itens quando o card é clicado e aberto */
    .dash-card.active > *:not(h2):not(.github-card-header) {
        opacity: 1;
        pointer-events: auto;
        transition: opacity 0.5s ease 0.3s; 
    }

    /* Faz o botão do perfil aparecer suavemente de novo */
    .dash-card.active .github-profile-btn {
        opacity: 1;
        pointer-events: auto;
        position: static;
        visibility: visible;
        transition: opacity 0.5s ease 0.3s;
    }
    
    .profile-card.active::before {
        display: none;
    }
    
    .profile-card.active .profile-name {
        font-size: 2rem;
        text-align: center;
        margin-bottom: 0.5rem;
        text-transform: none;
        letter-spacing: normal;
    }
    
    .dryoil-container { 
        width: 300%; 
        top: 0;
        margin-top: 35%;
    }
    
}

body.light-theme .dash-card { background-color: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.1); }
body.light-theme .dash-card h2, body.light-theme .profile-name, body.light-theme .project-info h4 { color: #000; }
body.light-theme .profile-bio, body.light-theme .skill-info, body.light-theme .project-info span { color: #444; }
body.light-theme .profile-role { color: #cc0000; }