﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0a;
    color: #e5e5e5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 1.5rem 2rem;
}

h1, h2, h3, h4, h5 {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2rem;
    margin-top: 0;
}

h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
}

p, li {
    color: #b0b0b0;
    font-size: 1.1rem;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

    a:hover {
        color: #ff6b00;
    }

.highlight {
    color: #ff6b00;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

#typed-text {
    display: block;
    min-height: 2.5rem;
}

.description {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: #b0b0b0;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
}

    header.header-visible {
        opacity: 1 !important;
        visibility: visible !important;
    }

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    border-bottom: none;
    flex-wrap: nowrap;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

    .nav-right a {
        color: #b0b0b0;
        font-size: 1rem;
        text-decoration: none;
        padding: 0.5rem 0;
        position: relative;
        white-space: nowrap;
        transition: color 0.3s ease, opacity 0.3s ease;
        min-width: 50px;
        text-align: center;
    }

        .nav-right a:hover {
            color: #ffffff;
        }

        .nav-right a.active {
            color: #ff6b00;
            font-weight: 600;
        }

            .nav-right a.active::after {
                content: '';
                position: absolute;
                bottom: -2px;
                left: 0;
                width: 100%;
                height: 2px;
                background-color: #ff6b00;
            }

.section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative;
}

    .section:last-child {
        border-bottom: none;
    }

        .section:last-child::after {
            display: none;
        }

    .section.visible {
        opacity: 1;
        transform: translateY(0);
    }

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

    .section-header h2 {
        margin-bottom: 0;
        white-space: nowrap;
    }

    .section-header .line {
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, #ff6b00, transparent);
    }

.hero {
    text-align: center;
    padding: 2rem 0;
}

.btn-primary {
    display: inline-block;
    background-color: #ff6b00;
    color: #0a0a0a;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    font-size: 1rem;
}

    .btn-primary:hover {
        background-color: #e05f00;
        color: #0a0a0a;
        transform: scale(1.02);
    }

.btn-secondary {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #1a1a1a;
    border-radius: 4px;
    color: #e5e5e5;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

    .btn-secondary:hover {
        background-color: #ff6b00;
        color: #0a0a0a;
    }

.btn-github {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.5rem 1.2rem;
    background-color: transparent;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e5e5e5;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .btn-github:hover {
        background-color: #ff6b00;
        border-color: #ff6b00;
        color: #0a0a0a;
    }

.btn-group {
    margin-top: 1rem;
}

.card {
    background-color: #0f0f0f;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    .card:hover {
        border-color: #ff6b00;
        box-shadow: 0 0 20px rgba(255, 107, 0, 0.05);
    }

.project-card {
    background-color: #0f0f0f;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

    .project-card:hover {
        transform: translateY(-4px);
        border-color: #ff6b00;
        box-shadow: 0 4px 25px rgba(255, 107, 0, 0.1);
    }

    .project-card h3 {
        color: #ffffff;
        margin-bottom: 0.3rem;
    }

.project-subtitle {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.project-desc {
    color: #b0b0b0;
}

.project-stack {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.skill-item {
    background-color: #0f0f0f;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid #1a1a1a;
    color: #b0b0b0;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

    .skill-item:hover {
        border-color: #ff6b00;
    }

.contact-list {
    list-style: none;
    padding: 0;
}

    .contact-list li {
        margin-bottom: 0.5rem;
        color: #b0b0b0;
    }

        .contact-list li strong {
            color: #e5e5e5;
        }

.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.3rem;
        color: #e5e5e5;
    }

    .form-group input {
        width: 100%;
        padding: 0.6rem;
        background-color: #1a1a1a;
        border: 1px solid #333;
        border-radius: 4px;
        color: #e5e5e5;
        font-family: inherit;
        font-size: 1rem;
        transition: border-color 0.3s ease;
    }

    .form-group textarea {
        width: 100%;
        padding: 0.6rem;
        background-color: #1a1a1a;
        border: 1px solid #333;
        border-radius: 4px;
        color: #e5e5e5;
        font-family: inherit;
        font-size: 1rem;
        transition: border-color 0.3s ease;
        resize: none;
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #ff6b00;
        }

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #1a1a1a;
    text-align: center;
}

    footer p {
        color: #666;
        font-size: 0.9rem;
        margin-top: 1rem;
    }

.hero-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

    .hero-social a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: #1a1a1a;
        color: #b0b0b0;
        font-size: 1.4rem;
        transition: all 0.3s ease;
        border: 1px solid #1a1a1a;
        text-decoration: none;
    }

        .hero-social a:hover {
            color: #ffffff;
            background-color: #ff6b00;
            border-color: #ff6b00;
            transform: translateY(-3px);
            box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
        }

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #ff6b00, #ff9a44);
    z-index: 10001;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
    pointer-events: none;
}

#backToTop {
    position: fixed;
    bottom: 100px;
    right: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ff6b00;
    color: #0a0a0a;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    z-index: 1000;
}

    #backToTop.visible {
        opacity: 1;
        visibility: visible;
    }

    #backToTop:hover {
        background-color: #e05f00;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
    }

    #backToTop:active {
        transform: scale(0.95);
    }

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(0, 200, 0, 0.15);
    border: 1px solid #00cc00;
    color: #00cc00;
}

.alert-error {
    background-color: rgba(255, 0, 0, 0.15);
    border: 1px solid #ff4444;
    color: #ff4444;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #ff6b00;
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #e05f00;
    }

* {
    scrollbar-width: thin;
    scrollbar-color: #ff6b00 #1a1a1a;
}

.theme-toggle {
    background: none;
    border: none;
    color: #b0b0b0;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
    margin-left: 0.5rem;
}

    .theme-toggle:hover {
        color: #ff6b00;
        transform: rotate(20deg);
    }

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

    .language-selector .lang-link {
        display: inline-flex;
        align-items: center;
        opacity: 0.7;
        transition: opacity 0.4s ease, transform 0.3s ease, border-color 0.3s ease;
        cursor: pointer;
        padding: 2px;
        border-radius: 4px;
    }

        .language-selector .lang-link:hover {
            opacity: 1;
            transform: scale(1.05);
        }

        .language-selector .lang-link img {
            border-radius: 2px;
            display: block;
            transition: opacity 0.4s ease, transform 0.3s ease;
        }

        .language-selector .lang-link.fade-out {
            opacity: 0;
            transform: scale(0.8);
        }

        .language-selector .lang-link.fade-in {
            opacity: 1;
            transform: scale(1);
        }

        .language-selector .lang-link#lang-en,
        .language-selector .lang-link#lang-pt {
            display: none;
        }

body.light-mode {
    background-color: #f5f5f5;
    color: #1a1a1a;
}

    body.light-mode h1,
    body.light-mode h2,
    body.light-mode h3,
    body.light-mode h4,
    body.light-mode h5 {
        color: #1a1a1a;
    }

    body.light-mode p,
    body.light-mode li {
        color: #333333;
    }

    body.light-mode .highlight {
        color: #ff6b00;
    }

    body.light-mode .description {
        color: #333333;
    }

    body.light-mode .container {
        background-color: #f5f5f5;
    }

    body.light-mode header {
        background-color: rgba(245, 245, 245, 0.9);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    body.light-mode .logo {
        color: #1a1a1a;
    }

    body.light-mode .nav-right a {
        color: #555555;
    }

        body.light-mode .nav-right a:hover {
            color: #1a1a1a;
        }

        body.light-mode .nav-right a.active {
            color: #ff6b00;
        }

            body.light-mode .nav-right a.active::after {
                background-color: #ff6b00;
            }

    body.light-mode .card,
    body.light-mode .project-card,
    body.light-mode .skill-item {
        background-color: #ffffff;
        border-color: #e0e0e0;
    }

        body.light-mode .card:hover,
        body.light-mode .project-card:hover {
            border-color: #ff6b00;
            box-shadow: 0 4px 25px rgba(255, 107, 0, 0.1);
        }

    body.light-mode .skill-item {
        color: #333333;
    }

    body.light-mode .project-card h3 {
        color: #1a1a1a;
    }

    body.light-mode .project-desc {
        color: #333333;
    }

    body.light-mode .project-subtitle {
        color: #666;
    }

    body.light-mode .project-stack {
        color: #666;
    }

    body.light-mode .contact-list li {
        color: #333333;
    }

        body.light-mode .contact-list li strong {
            color: #1a1a1a;
        }

    body.light-mode .form-group label {
        color: #1a1a1a;
    }

    body.light-mode .form-group input,
    body.light-mode .form-group textarea {
        background-color: #ffffff;
        border-color: #ccc;
        color: #1a1a1a;
    }

    body.light-mode .form-group textarea {
        background-color: #ffffff;
        border-color: #ccc;
        color: #1a1a1a;
    }

        body.light-mode .form-group input:focus,
        body.light-mode .form-group textarea:focus {
            border-color: #ff6b00;
        }

    body.light-mode .form-group small {
        color: #666;
    }

    body.light-mode .language-selector .lang-link {
        opacity: 0.6;
    }

        body.light-mode .language-selector .lang-link:hover {
            opacity: 0.9;
        }

        body.light-mode .language-selector .lang-link.fade-in {
            opacity: 1;
        }

    body.light-mode footer {
        border-top: 1px solid #ddd;
    }

        body.light-mode footer p {
            color: #666;
        }

    body.light-mode .hero-social a {
        background-color: #e0e0e0;
        border-color: #ccc;
        color: #333;
    }

        body.light-mode .hero-social a:hover {
            background-color: #ff6b00;
            color: #ffffff;
        }

    body.light-mode .section {
        border-bottom: none;
    }

    body.light-mode .section-header .line {
        background: linear-gradient(90deg, #ff6b00, transparent);
    }

    body.light-mode .btn-secondary {
        background-color: #e0e0e0;
        color: #1a1a1a;
    }

        body.light-mode .btn-secondary:hover {
            background-color: #ff6b00;
            color: #ffffff;
        }

    body.light-mode .btn-github {
        border-color: #ccc;
        color: #1a1a1a;
    }

        body.light-mode .btn-github:hover {
            background-color: #ff6b00;
            border-color: #ff6b00;
            color: #ffffff;
        }

    body.light-mode .theme-toggle {
        color: #555;
    }

        body.light-mode .theme-toggle:hover {
            color: #ff6b00;
        }

    body.light-mode .alert-success {
        background-color: rgba(0, 200, 0, 0.1);
        border-color: #00cc00;
        color: #008800;
    }

    body.light-mode .alert-error {
        background-color: rgba(255, 0, 0, 0.1);
        border-color: #ff4444;
        color: #cc0000;
    }

    body.light-mode #progress-bar {
        background: linear-gradient(90deg, #ff6b00, #ff9a44);
        box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
    }

.bio {
    margin-bottom: 2rem;
}

    .bio p {
        margin-bottom: 1rem;
        font-size: 1.05rem;
    }

    .bio strong {
        color: #ffffff;
    }

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 2.5rem 0;
    position: relative;
}

    .section-divider::before,
    .section-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1));
    }

    .section-divider::after {
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
    }

.divider-icon {
    color: #ff6b00;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 0.8rem;
    opacity: 1;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-highlight {
    border-left: 3px solid #ff6b00;
}

body.light-mode .bio strong {
    color: #1a1a1a;
}

body.light-mode .project-highlight p {
    color: #333333;
}

body.light-mode .section-divider::before {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1));
}

body.light-mode .section-divider::after {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.1), transparent);
}

body.light-mode .divider-icon {
    color: #ff6b00;
    opacity: 1;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.4);
}

#inicio {
    padding-top: 11rem;
    padding-bottom: 12rem;
}

#sobre {
    padding-top: 2rem;
    padding-bottom: 9rem;
}

#projetos {
    padding-top: 2rem;
    padding-bottom: 9rem;
}

#contacto {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.bio {
    margin-bottom: 1.5rem;
}

.section-divider {
    margin: 1.5rem 0;
}

.project-card:last-child {
    margin-bottom: 0;
}

#contacto .card:last-child {
    margin-bottom: 0;
}

#notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    max-width: 350px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

    #notification.show {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }

    #notification.success {
        background-color: #00cc00;
        border-left: 4px solid #009900;
    }

    #notification.error {
        background-color: #ff4444;
        border-left: 4px solid #cc0000;
    }

    #notification .notification-close {
        background: none;
        border: none;
        color: #fff;
        font-size: 1.2rem;
        cursor: pointer;
        margin-left: 1rem;
        opacity: 0.7;
        transition: opacity 0.3s ease;
        pointer-events: auto;
    }

        #notification .notification-close:hover {
            opacity: 1;
        }

body.light-mode #notification.success {
    background-color: #28a745;
    border-left-color: #1e7e34;
    color: #fff;
}

body.light-mode #notification.error {
    background-color: #dc3545;
    border-left-color: #bd2130;
    color: #fff;
}

.page-transition {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    .page-transition.loaded {
        opacity: 1;
        transform: translateY(0);
    }

body.light-mode .page-transition {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-right a {
    min-width: 50px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
}

    .logo img {
        display: block;
        height: 50px;
        width: auto;
        margin-left: 15px;
    }

    .logo .logo-dark {
        display: block;
    }

    .logo .logo-light {
        display: none;
    }

body.light-mode .logo .logo-dark {
    display: none;
}

body.light-mode .logo .logo-light {
    display: block;
}

/* ===== RESPONSIVIDADE PARA TELEMÓVEL ===== */
@media (max-width: 700px) {
    /* Menu empilhado verticalmente */
    nav {
        flex-direction: column;
        align-items: center;
        padding: 0.5rem 1rem;
    }

    .nav-left {
        margin-bottom: 0.3rem;
    }

    .logo img {
        height: 35px;
        margin-left: 0;
    }

    .nav-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem 0.8rem;
        margin-top: 0.3rem;
    }

        .nav-right a {
            font-size: 0.8rem;
            min-width: auto;
            padding: 0.2rem 0.3rem;
        }

    .language-selector .lang-link img {
        width: 18px;
        height: 12px;
    }

    .theme-toggle {
        font-size: 1rem;
        padding: 0.2rem 0.3rem;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .container {
        padding: 5rem 1rem 1rem;
    }

    .section {
        min-height: auto;
        padding: 3rem 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

        .section-header .line {
            display: none;
        }
}

.language-selector .lang-link#lang-en:not([style*="display: none"]),
.language-selector .lang-link#lang-pt:not([style*="display: none"]) {
    display: inline-flex !important;
}
