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

*:not(dialog) {
    margin: 0;
}

:root {
    --bg-main: #0e0f13; /* fundo principal */
    --bg-alt: #14161d; /* cards / blocos */
    --border-subtle: rgba(255, 255, 255, 0.08);

    --text-main: #e6e6eb;
    --text-muted: #a0a3b1;

    --accent-primary: #5eead4; /* teal moderno */
    --accent-secondary: #7aa2f7; /* azul frio */
}

body {
    /* RESETS */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-family: "Geist Mono", monospace;
    font-optical-sizing: auto;
    min-height: 100vh;

    /* ESTILOS*/
    font-weight: 400;
    background:
        radial-gradient(
            800px circle at top left,
            rgba(94, 234, 212, 0.06),
            transparent 40%
        ),
        radial-gradient(
            600px circle at bottom right,
            rgba(122, 162, 247, 0.05),
            transparent 45%
        ),
        var(--bg-main);
    color: var(--text-main);
}

.lightmode {
    --bg-main: #f8f9fb;
    --bg-alt: #ffffff;
    --text-main: #1c1d22;
    --text-muted: #555;
    --border-subtle: rgba(0, 0, 0, 0.1);

    --accent-primary: #0ea5e9;
    --accent-secondary: #6366f1;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
    color: var(--text-muted);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --- FIM DOS RESETS --- */

header {
    position: relative;
    padding-top: 2.5rem;
}

.toggles {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.toggles button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.bandeira {
    height: 20px;
    transition: transform 0.3s ease;
    background: none;
}

.bandeira:hover,
.toggles button:hover {
    transform: scale(1.1);
    color: var(--text-main);
}

.site-header {
    text-align: center;
    margin: 2rem auto 5rem;
    max-width: 1200px;
    color: var(--accent-primary);
    padding: 0 2rem;
}

.layout {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

a {
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

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

a:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 4px;
}

.sobre {
    margin-right: 3rem;
    align-self: center;
}

.sobre p {
    line-height: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.destaque {
    font-size: 2rem;
    font-weight: 500;
}

.bold {
    font-weight: 700;
}

.projetos h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.projetos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.projeto {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-alt);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
}

.projeto h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.projeto-conteudo {
    display: flex;
    flex-direction: column;
    flex: 1;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.projeto-conteudo p {
    margin-bottom: 1rem;
}

.tecnologias {
    display: flex;
    gap: 1rem;
    font-size: 24px;
    margin-top: auto;
    justify-content: center;
    color: var(--text-muted);
}

.projeto a {
    text-decoration: none;
    margin-top: auto;
}

.projeto a::after {
    content: "->";
    display: inline-block;
    margin-left: 5px;
    transition: 0.3s;
}

.projeto a:hover::after {
    transform: translateX(5px);
    color: var(--accent-secondary);
}

.footer {
    max-width: 1200px;
    margin: 5rem auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links i {
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.footer-links i:hover {
    color: var(--accent-secondary);
}

.footer p {
    text-align: center;
    margin: 0 auto;
    font-size: 0.8rem;
}

/* --- MEDIA QUERIES --- */

/* ----- TABLET ----- */
@media screen and (max-width: 900px) {
    .projetos-grid {
        grid-template-columns: 1fr;
    }

    .projeto h3 {
        margin-bottom: 0.5rem;
    }

    .sobre {
        align-self: start;
        margin-right: 0;
    }
}

/* ----- MOBILE ----- */
@media screen and (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .site-header,
    .footer {
        margin: 2rem auto;
    }
}
