/* =========================================
   IDENTIDADE VISUAL
========================================= */

:root {
    --background: #080a0f;
    --background-soft: #0d1017;
    --card: #11151e;
    --card-hover: #151a25;

    --text: #f2f0f7;
    --text-soft: #a7a5b1;
    --text-muted: #686773;

    --purple: #b99cff;
    --purple-dark: #7f63bd;
    --purple-contrast: #16121f;

    --green: #a7e8c4;

    --border: #252a35;

    --max-width: 1180px;

    --font-main: "Inter", sans-serif;
    --font-mono: "DM Mono", monospace;
    --font-hand: "Caveat", cursive;
}

[data-theme="light"] {
    --background: #f6f5fa;
    --background-soft: #eeecf5;
    --card: #ffffff;
    --card-hover: #faf9fd;

    --text: #17141f;
    --text-soft: #4d4a58;
    --text-muted: #7a7786;

    --purple: #6a4bb0;
    --purple-dark: #9a85d1;
    --purple-contrast: #ffffff;

    --green: #1f7a4d;

    --border: #dcd8e6;
}


/* =========================================
   BASE
========================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

ul, ol {
    list-style: none;
}

img, svg {
    display: block;
}

main {
    overflow-x: clip;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 3px;
    border-radius: 4px;
}

.section {
    width: min(var(--max-width), calc(100% - 80px));
    margin: 0 auto;
    padding: 90px 0;
}

.band {
    background: var(--background-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    margin-bottom: 36px;
}

.section-title h2,
.about-text h2,
.contact-content h2 {
    font-size: clamp(28px, 3.4vw, 38px);
    line-height: 1.15;
    letter-spacing: -1px;
    font-weight: 600;
}

.section-title p {
    max-width: 560px;
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 15px;
}

.section-title .section-lead {
    max-width: none;
}

.ui-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    fill: none;
    stroke: var(--green);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hand-note {
    font-family: var(--font-hand);
    color: var(--text);
    line-height: 1.05;
    transform: rotate(-8deg);
}

.hand-note svg {
    width: 90px;
    margin-top: 6px;
    fill: none;
    stroke: var(--green);
    stroke-width: 4;
    stroke-linecap: round;
}


/* =========================================
   BOTÕES
========================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.25s ease;
}

.button.primary {
    background: var(--purple);
    color: var(--purple-contrast);
}

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

.button.secondary,
.button.ghost {
    border: 1px solid var(--text-soft);
    color: var(--text);
}

.button.secondary:hover,
.button.ghost:hover {
    border-color: var(--purple);
    background: var(--card);
}

.button.ghost {
    margin-top: 28px;
    border-color: var(--purple-dark);
    padding: 10px 18px;
    font-size: 13px;
}


/* =========================================
   NAVBAR
========================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 72px;
    padding: 0 max(40px, calc((100% - var(--max-width)) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: color-mix(in srgb, var(--background) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 500;
    color: var(--purple);
}

.navbar nav {
    display: flex;
    gap: 32px;
}

.navbar nav a {
    color: var(--text-soft);
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: 0.2s ease;
}

.navbar nav a:hover {
    color: var(--text);
    border-bottom-color: var(--purple);
}

.theme-toggle {
    position: relative;
    width: 42px;
    height: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--card);
    cursor: pointer;
}

.theme-toggle span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text);
    transition: transform 0.25s ease;
}

.theme-toggle[aria-pressed="true"] span {
    transform: translateX(20px);
    background: var(--purple);
}


/* =========================================
   HERO
========================================= */

.hero {
    width: min(var(--max-width), calc(100% - 80px));
    min-height: 600px;
    margin: 0 auto;
    padding: 60px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-hello {
    color: var(--green);
    font-size: 15px;
    font-weight: 500;
}

.hero h1 {
    margin-top: 10px;
    font-size: clamp(44px, 5.6vw, 68px);
    line-height: 1.02;
    letter-spacing: -2px;
    font-weight: 600;
}

.hero-role {
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 18px;
}

.hero-description {
    max-width: 460px;
    margin-top: 22px;
    color: var(--text-soft);
    font-size: 16px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.hero-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-soft);
}

.hero-contacts li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-contacts .ui-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.hero-contacts a:hover {
    color: var(--purple);
}

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1;
    justify-self: center;
}

.hero-photo {
    position: absolute;
    inset: 8%;
    overflow: hidden;
    border-radius: 44% 56% 52% 48% / 46% 42% 58% 54%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.hero-photo svg {
    width: 100%;
    height: 100%;
}

.blob-line {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--purple);
    stroke-width: 1.6;
}

.blob-line-2 {
    stroke: var(--purple-dark);
    transform: rotate(14deg) scale(1.03);
}

.hero-note {
    position: absolute;
    right: -30px;
    bottom: 14%;
    font-size: 30px;
}


/* =========================================
   SOBRE
========================================= */

.about {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text p {
    margin-top: 18px;
    color: var(--text-soft);
    font-size: 15.5px;
    max-width: 540px;
}

.about-info {
    border-left: 1px solid var(--border);
    padding-left: 40px;
    display: grid;
    gap: 26px;
}

.about-info li {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.about-info strong {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
}

.about-info span {
    display: block;
    color: var(--text-soft);
    font-size: 13.5px;
}


/* =========================================
   HABILIDADES
========================================= */

.skills .section-title h2 {
    color: var(--purple);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.skill {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    transition: 0.25s ease;
}

.skill:hover {
    transform: translateY(-3px);
    border-color: var(--purple-dark);
    background: var(--card-hover);
}

.skill img,
.skill-svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.skill-svg {
    stroke: var(--purple);
}

.icon-chip {
    padding: 3px;
    border-radius: 50%;
    background: #f2f0f7;
}

.icon-light {
    filter: invert(1);
}

[data-theme="light"] .icon-light {
    filter: none;
}

.skill span {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}


/* =========================================
   PROJETOS
========================================= */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.filter {
    padding: 7px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
}

.filter:hover {
    border-color: var(--purple-dark);
}

.filter.is-active {
    background: var(--purple);
    border-color: var(--purple);
    color: var(--purple-contrast);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}

.project-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    transition: border-color 0.25s ease;
}

.project-card:hover {
    border-color: var(--purple-dark);
}

.project-card.is-open {
    border-color: var(--purple);
}

.project-cover {
    aspect-ratio: 320 / 130;
    border-bottom: 1px solid var(--border);
}

.project-cover {
    overflow: hidden;
}

.project-cover svg,
.project-cover img {
    display: block;
    width: 100%;
    height: 100%;
}

.project-cover img {
    object-fit: cover;
    object-position: center 30%;
}

.project-body {
    padding: 22px 24px 24px;
}

.project-body h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tags span {
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background-soft);
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: 11px;
}

.project-body > p {
    margin-top: 12px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
    min-height: 6.4em;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 20px;
}

.repo-link {
    color: var(--purple);
    font-size: 13px;
}

.repo-link:hover {
    text-decoration: underline;
}

.investigate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px dashed var(--purple-dark);
    border-radius: 8px;
    background: transparent;
    color: var(--purple);
    font-family: var(--font-mono);
    font-size: 12.5px;
    cursor: pointer;
    transition: 0.2s ease;
}

.investigate::before {
    content: "+";
    font-size: 15px;
    line-height: 1;
}

.investigate[aria-expanded="true"]::before {
    content: "−";
}

.investigate:hover {
    border-style: solid;
    background: var(--card-hover);
}

.investigation {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: 8px;
    background: var(--background-soft);
    animation: abrir 0.3s ease both;
}

.investigation-status {
    margin-bottom: 14px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
}

.investigation-status b {
    color: var(--green);
    font-weight: 500;
}

.investigation dl {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px 14px;
}

.investigation dt {
    padding-top: 2px;
    color: var(--purple);
    font-family: var(--font-mono);
    font-size: 11px;
}

.investigation dd {
    color: var(--text-soft);
    font-size: 13.5px;
    line-height: 1.55;
}

@keyframes abrir {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}


/* =========================================
   EXPERIÊNCIA
========================================= */

.experience-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 40px;
    align-items: center;
}

.timeline {
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 12px;
    bottom: -4px;
    width: 2px;
    background: var(--green);
    opacity: 0.6;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 24px;
    padding: 0 0 38px 44px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px var(--background);
}

.timeline-date {
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.timeline-content h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.timeline-content h3 em {
    font-style: normal;
    font-weight: 400;
    color: var(--green);
    margin-left: 6px;
}

.timeline-content ul {
    margin-top: 10px;
    padding-left: 16px;
    list-style: disc;
    color: var(--text-soft);
    font-size: 14px;
}

.timeline-content li::marker {
    color: var(--purple-dark);
}

.timeline-result {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-soft);
    font-size: 13px;
}

.timeline-result::before {
    content: "✓ ";
    color: var(--green);
}

.experience-note {
    font-size: 34px;
    justify-self: center;
}

.courses {
    margin-top: 0;
    display: grid;
    gap: 40px;
}

.courses-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 16px;
}

.course-card {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--background-soft);
    transition: border-color .2s ease;
}

.course-card:hover {
    border-color: var(--purple-dark);
}

.course-card h3 {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
}

.course-card p {
    color: var(--text-soft);
    font-size: 13.5px;
}

.course-meta {
    margin-top: auto;
    padding-top: 8px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
}

.band .course-card,
.band .quote {
    background: var(--background);
}

.band .timeline-item::before {
    box-shadow: 0 0 0 5px var(--background-soft);
}

.course-card.is-current {
    border-color: var(--purple-dark);
    background: var(--card);
}

.course-card.is-current h3 {
    font-size: 17px;
}

.course-card.is-current .course-meta {
    color: var(--purple);
}

.study-status,
.courses-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--purple);
    color: var(--purple-contrast);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 1px;
}

.courses-label {
    background: transparent;
    border: 1px solid var(--green);
    color: var(--green);
}


.quote {
    margin-top: 40px;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--background-soft);
    font-family: var(--font-mono);
    font-size: 17px;
}

.quote span {
    color: var(--text-soft);
}


/* =========================================
   CONTATO
========================================= */

.contact {
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border);
}

.contact-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.contact-inner {
    position: relative;
    width: min(var(--max-width), calc(100% - 80px));
    margin: 0 auto;
    padding: 110px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    justify-items: center;
    text-align: center;
}

.contact-content h2 {
    color: #f2f0f7;
}

.contact-content p {
    max-width: 440px;
    margin: 14px auto 0;
    color: #d6d3df;
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.contact .button.secondary {
    color: #f2f0f7;
    border-color: #a7a5b1;
}


/* =========================================
   FOOTER
========================================= */

footer {
    padding: 22px max(40px, calc((100% - var(--max-width)) / 2));
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 12px;
}

footer a:hover {
    color: var(--purple);
}


/* =========================================
   MOVIMENTO REDUZIDO
========================================= */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}


/* =========================================
   RESPONSIVO: TABLET
========================================= */

@media (max-width: 960px) {

    .navbar nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-top: 40px;
    }

    .hero-visual {
        max-width: 380px;
    }

    .hero-note {
        right: -10px;
        font-size: 26px;
    }

    .about {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-info {
        border-left: 0;
        border-top: 1px solid var(--border);
        padding: 30px 0 0;
        grid-template-columns: 1fr 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .experience-wrap {
        grid-template-columns: 1fr;
    }

    .experience-note {
        display: none;
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}


/* =========================================
   RESPONSIVO: MOBILE
========================================= */

@media (max-width: 600px) {

    .section,
    .hero,
    .contact-inner {
        width: calc(100% - 40px);
    }

    .navbar,
    footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section {
        padding: 64px 0;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-role {
        font-size: 16px;
    }

    .hero-note {
        right: 0;
        bottom: 4%;
        font-size: 22px;
    }

    .about-info {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .skill {
        padding: 12px;
        gap: 10px;
    }

    .skill img,
    .skill-svg {
        width: 26px;
        height: 26px;
    }

    .skill span {
        font-size: 12.5px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-body > p {
        min-height: 0;
    }

    .investigation dl {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .investigation dd {
        margin-bottom: 10px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 4px;
        padding-left: 36px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .courses-grid {
        gap: 10px;
    }

    .course-card {
        padding: 14px 16px;
        gap: 2px;
    }

    .course-meta {
        padding-top: 4px;
    }

    .quote {
        font-size: 14px;
        padding: 20px;
    }

    .contact-inner {
        padding: 70px 0;
    }

    footer {
        flex-direction: column;
    }
}
