/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

/* Variables / Design System */
:root {
    --bg-color: #0d0606;
    --second-bg-color: #1a0b0b;
    --text-color: #e5e5e5;
    --main-color: #990000;
    --second-color: #e32636;
    --glass-bg: rgba(31, 10, 10, 0.4);
    --glass-border: rgba(227, 38, 54, 0.2);
    
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Outfit', sans-serif;
    --font-signature: 'Dancing Script', cursive;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: var(--font-primary);
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    position: relative;
    overflow-x: hidden;
}

/* Background Animated Blobs */
.blob-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 15% 50%, rgba(227, 38, 54, 0.1), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(255, 140, 0, 0.1), transparent 25%);
}

/* Glassmorphism Utilities */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(227, 38, 54, 0.4);
    box-shadow: 0 12px 40px rgba(227, 38, 54, 0.15);
}

/* Header & Navbar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(11, 12, 16, 0.8);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.header.sticky {
    padding: 1.5rem 9%;
}

.logo {
    font-size: 2.8rem;
    color: var(--second-color);
    font-weight: 800;
    font-family: var(--font-secondary);
    letter-spacing: 1px;
}

.navbar a {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-left: 3.5rem;
    font-weight: 500;
    transition: 0.3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--second-color);
}

.menu-btn {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    border-radius: 3rem;
    font-size: 1.6rem;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--second-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(102, 252, 241, 0.7);
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    color: var(--second-color);
    border: 2px solid var(--second-color);
}

.btn-secondary:hover {
    background: rgba(227, 38, 54, 0.15);
    transform: scale(1.05);
}

/* Layout Sections */
section {
    min-height: 100vh;
    padding: 10rem 9% 5rem;
}

.section-title {
    text-align: center;
    font-size: 4.5rem;
    font-family: var(--font-secondary);
    font-weight: 700;
    margin-bottom: 5rem;
}

.section-title span {
    color: var(--second-color);
}

/* Home Section */
.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
}

.home-content {
    flex: 1;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h1 {
    font-size: 6.5rem;
    font-weight: 800;
    font-family: var(--font-secondary);
    line-height: 1.2;
    background: linear-gradient(to right, #fff, var(--second-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 1rem 0;
}

.surname {
    font-family: var(--font-signature);
    font-size: 7.5rem;
    color: var(--second-color);
    -webkit-text-fill-color: var(--second-color);
    font-weight: normal;
}

.name-reveal-wrapper {
    position: relative;
    display: inline-block;
    padding-right: 50px;
}

.name-text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    max-width: 0;
    animation: revealName 1.5s cubic-bezier(0.25, 1, 0.5, 1) 0.5s forwards;
    vertical-align: bottom;
}

.ferrari-car {
    position: absolute;
    bottom: 5px;
    left: 0;
    height: 70px;
    transform: translateX(-100%);
    animation: driveFerrari 2.5s cubic-bezier(0.25, 1, 0.5, 1) 0.5s forwards;
    z-index: 2;
    pointer-events: none;
}

@keyframes revealName {
    0% { max-width: 0; }
    100% { max-width: 100%; }
}

@keyframes driveFerrari {
    0% { left: 0; transform: translateX(-100%); opacity: 1; }
    60% { left: 100%; transform: translateX(20px); opacity: 1; }
    100% { left: 100%; transform: translateX(100vw); opacity: 0; }
}

.home-content .typing-text {
    font-size: 2.6rem;
    margin-bottom: 2rem;
    min-height: 4rem;
}

.home-content .highlight {
    color: var(--second-color);
    position: relative;
}

.home-content .highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--second-color);
    border-radius: 2px;
}

.home-content p {
    font-size: 1.6rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    color: #949597;
}

.social-links {
    margin-bottom: 3rem;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: 2px solid var(--second-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--second-color);
    margin-right: 1.5rem;
    transition: 0.3s ease;
}

.social-links a:hover {
    background: var(--second-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--second-color);
    transform: translateY(-3px);
}

.btn-group {
    display: flex;
    gap: 2rem;
}

.home-img {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-box {
    position: relative;
    width: 35vw;
    max-width: 450px;
    aspect-ratio: 1 / 1; /* Garante um quadrado perfeito */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--second-color);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.2;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

.home-img img {
    width: 90%;
    height: 90%;
    object-fit: cover;
    object-position: top center; /* Alinha o topo da imagem ao topo do círculo para não cortar a cabeça */
    border-radius: 50%;
    border: 3px solid var(--glass-border);
    z-index: 2;
    position: relative;
    flex-shrink: 0;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* About Section */
.about {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-container {
    max-width: 900px;
    width: 100%;
}

.about-text p {
    font-size: 1.6rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #b0b1b3;
}

.about-text strong {
    color: #fff;
    font-weight: 600;
}

.skills-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 3rem;
}

.skills-chips span {
    font-size: 1.4rem;
    padding: 0.8rem 1.6rem;
    background: rgba(102, 252, 241, 0.1);
    color: var(--second-color);
    border: 1px solid rgba(102, 252, 241, 0.2);
    border-radius: 2rem;
    font-weight: 500;
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 3rem;
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    padding-left: 8rem;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--second-color);
    border: 4px solid var(--bg-color);
    border-radius: 50%;
    left: 3rem;
    top: 5px;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 10px rgba(227, 38, 54, 0.5);
}

.timeline-date {
    font-size: 1.4rem;
    color: var(--second-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-item h3 {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.timeline-item h4 {
    font-size: 1.6rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.timeline-item p {
    font-size: 1.5rem;
    line-height: 1.7;
    color: #b0b1b3;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.project-img {
    height: 200px;
    background: linear-gradient(45deg, var(--second-bg-color), rgba(102, 252, 241, 0.1));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8rem;
    color: rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--glass-border);
}

.project-content {
    padding: 2.5rem;
}

.project-date {
    font-size: 1.3rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.project-content h3 {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.project-content h4 {
    font-size: 1.5rem;
    color: #949597;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.project-content p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #b0b1b3;
    margin-bottom: 2rem;
}

.project-tech {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-tech span {
    font-size: 1.2rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: #fff;
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.edu-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.edu-icon {
    font-size: 4rem;
    color: var(--second-color);
    background: rgba(102, 252, 241, 0.1);
    padding: 1.5rem;
    border-radius: 1.2rem;
}

.edu-info h3 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.edu-info h4 {
    font-size: 1.4rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.edu-info p {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #b0b1b3;
}

/* Contact Section */
.contact-container {
    display: flex;
    gap: 5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.info-item {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.info-item i {
    font-size: 3rem;
    color: var(--second-color);
    background: rgba(102, 252, 241, 0.1);
    width: 6rem;
    height: 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.info-item h4 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.info-item p {
    font-size: 1.5rem;
    color: #b0b1b3;
}

.contact-form {
    flex: 1.5;
}

.contact-form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact-form .input-box input,
.contact-form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.8rem;
    margin-bottom: 1.5rem;
    transition: 0.3s ease;
}

.contact-form .input-box input {
    width: 48%;
}

.contact-form .input-box input:focus,
.contact-form textarea:focus {
    border-color: var(--second-color);
    background: rgba(255, 255, 255, 0.05);
}

.contact-form textarea {
    resize: none;
}

.contact-form .btn {
    margin-top: 1rem;
    cursor: pointer;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 3rem 9%;
    background: rgba(31, 40, 51, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
    font-size: 1.5rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem;
    background: var(--second-color);
    border-radius: 0.8rem;
    transition: 0.3s ease;
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--bg-color);
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--second-color);
}

/* Animations */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 5%;
    }
    section {
        padding: 10rem 5% 5rem;
    }
    .home {
        flex-direction: column-reverse;
        text-align: center;
    }
    .home-content h3 {
        font-size: 2.6rem;
    }
    .home-content h1 {
        font-size: 5rem;
    }
    .social-links {
        justify-content: center;
    }
    .btn-group {
        justify-content: center;
    }
    .home-img .img-box {
        width: 50vw;
        height: 50vw;
    }
    .contact-container {
        flex-direction: column;
    }
}

@keyframes waveAnim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }
    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 5%;
        background: rgba(11, 12, 16, 0.95);
        backdrop-filter: blur(15px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        display: none;
        flex-direction: column;
        text-align: center;
    }
    .navbar.active {
        display: flex;
    }
    .navbar a {
        margin: 1.5rem 0;
        font-size: 2rem;
    }
    .contact-form .input-box input {
        width: 100%;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }
    .timeline::after {
        left: 2rem;
    }
    .timeline-dot {
        left: 2rem;
    }
    .timeline-item {
        padding-left: 5rem;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 650px;
    background: var(--bg-color);
    border-radius: 1.2rem;
    padding: 0;
    transform: translateY(-20px);
    animation: slideDown 0.3s forwards;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(102, 252, 241, 0.1);
    border: 1px solid var(--glass-border);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 3.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s ease;
}

.close-modal:hover {
    color: var(--second-color);
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideDown {
    to { transform: translateY(0); }
}
