/* ========================================
   CARLOS ROSSET - Site Pessoal
   Worrydream (cores BOLD) + Brittany Chiang (layout)
   ======================================== */

:root {
    --bg-primary: #10183a;
    --bg-secondary: #0d1229;
    --bg-card: #182347;
    --bg-card-hover: #1f2d5a;
    --text-primary: #ffffff;
    --text-secondary: #ace1f3;
    --text-muted: #8899aa;
    --link-color: #ffff00;
    --link-hover: #ffdd00;
    --link-visited: #ffaa00;
    --border-color: #2a3f6a;
    --border-strong: #3d5a8a;
    --accent: #ffff00;

    --font-serif: Georgia, "Times New Roman", serif;
    --font-sans:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

    --max-width: 1000px;
    --sidebar-width: 250px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
}

a:visited {
    color: var(--link-visited);
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.5rem 1rem;
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   LAYOUT
   ======================================== */

.layout {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 100;
}

.sidebar__logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-serif);
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

.sidebar__logo:hover {
    color: var(--accent);
}

.sidebar__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    margin-bottom: 2rem;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.sidebar__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.9);
}

.sidebar__nav {
    list-style: none;
    flex: 1;
}

.sidebar__nav-item {
    margin-bottom: 0.75rem;
}

.sidebar__nav-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-muted);
    font-size: 14px;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.sidebar__nav-link::before {
    content: "";
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent);
    transition: height 0.2s ease;
}

.sidebar__nav-link:hover,
.sidebar__nav-link.active {
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar__nav-link.active::before {
    height: 100%;
}

.sidebar__social {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 2rem;
}

.sidebar__social-link {
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar__social-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.sidebar__social-link svg {
    width: 22px;
    height: 22px;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
    margin-left: var(--sidebar-width);
    padding: 3rem 4rem;
    max-width: calc(var(--max-width) + var(--sidebar-width));
    width: 100%;
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    margin-bottom: 5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
}

.section__title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section__title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-content {
    max-width: 680px;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-content p:first-child {
    font-size: 20px;
    color: var(--text-primary);
    font-family: var(--font-serif);
}

.about-content strong {
    color: var(--accent);
}

/* ========================================
   TIMELINE
   ======================================== */

.timeline {
    position: relative;
    padding-left: 4rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        var(--border-color) 0%,
        var(--border-strong) 50%,
        var(--border-color) 100%
    );
}

.timeline__item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__number {
    position: absolute;
    left: -4rem;
    top: 0;
    width: 38px;
    height: 38px;
    background: var(--bg-primary);
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    z-index: 2;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.timeline__item:hover .timeline__number {
    border-color: var(--accent);
    color: var(--accent);
}

/* ========================================
   EXPERIENCE CARDS
   ======================================== */

.experience-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem 1.75rem;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.experience-card:hover {
    transform: translateX(8px);
    border-color: var(--border-strong);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.experience-card__header {
    margin-bottom: 0.75rem;
}

.experience-card__period {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.experience-card__company {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.experience-card__role {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

.experience-card__summary {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.experience-card__summary strong {
    color: var(--text-primary);
    font-weight: 500;
}

.experience-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.experience-card:hover .tag {
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

.experience-card__links {
    display: flex;
    gap: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.experience-link {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--link-color);
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.experience-link:hover {
    color: var(--link-hover);
    transform: translateX(4px);
}

/* ========================================
   DOWNLOAD SECTION
   ======================================== */

.download-box {
    background: var(--bg-card);
    border: 2px dashed var(--border-strong);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    max-width: 500px;
    transition: border-color 0.3s ease;
}

.download-box:hover {
    border-color: var(--accent);
}

.download-box__icon {
    font-size: 2.5rem;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}

.download-box__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.download-box__desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn--primary {
    background: var(--accent);
    color: var(--bg-primary);
    border: 2px solid var(--accent);
}

.btn--primary:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-2px);
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.contact-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.contact-card__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.contact-card__value {
    display: block;
    font-size: 14px;
    color: var(--link-color);
    font-weight: 500;
}

.location {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

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

.footer {
    padding-top: 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer__text {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ========================================
   ANIMATIONS
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 1rem 2rem;
        gap: 1rem;
    }

    .sidebar__logo {
        margin-bottom: 0;
        font-size: 1.75rem;
    }

    .sidebar__nav {
        display: flex;
        gap: 1.5rem;
        flex: 1;
    }

    .sidebar__nav-item {
        margin-bottom: 0;
    }

    .sidebar__nav-link::before {
        display: none;
    }

    .sidebar__nav-link:hover,
    .sidebar__nav-link.active {
        transform: none;
        color: var(--accent);
    }

    .sidebar__social {
        margin-top: 0;
        padding-top: 0;
    }

    .layout {
        flex-direction: column;
    }

    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
    }

    .timeline {
        padding-left: 3rem;
    }

    .timeline__number {
        left: -3rem;
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
}

@media (max-width: 600px) {
    .sidebar {
        padding: 1rem;
        justify-content: space-between;
    }

    .sidebar__nav {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .sidebar__social {
        order: 2;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .section__title {
        font-size: 1.25rem;
    }

    .about-content p:first-child {
        font-size: 17px;
    }

    .timeline {
        padding-left: 2.5rem;
    }

    .timeline__number {
        left: -2.5rem;
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .experience-card {
        padding: 1.25rem;
    }

    .experience-card__links {
        flex-direction: column;
        gap: 0.75rem;
    }

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

/* ========================================
   SELECTION
   ======================================== */

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

::-moz-selection {
    background: var(--accent);
    color: var(--bg-primary);
}
