        /* Reset & Theming */
        :root {
            /* Light Theme (Default) */
            --color-background: #f4f4f4;
            --color-surface: #ffffff;
            --color-primary: #1A1A1A;
            --color-secondary: #555555;
            --color-accent: #FFD700;
            --color-text-on-dark: #fdfdfd;
            --color-text-on-light: #1f1f1f;
            --color-text-on-accent: #3d3400;
            --color-success: #2ecc71;
            --color-error: #e74c3c;
            --color-shadow: rgba(0, 0, 0, 0.08);
            --border-radius: 8px;
            --transition-speed: 0.3s;
        }

        body.dark-mode {
            /* Dark Theme */
            --color-background: #121212;
            --color-surface: #1E1E1E;
            --color-primary: #f0f0f0;
            --color-secondary: #aaaaaa;
            --color-text-on-light: #e0e0e0;
            --color-shadow: rgba(0, 0, 0, 0.4);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            scroll-behavior: smooth;
            cursor: none;
        }

        body {
            font-family: 'Inter', sans-serif;
            line-height: 1.7;
            background-color: var(--color-background);
            color: var(--color-text-on-light);
            font-weight: 400;
            overflow-x: hidden;
            transition: background-color var(--transition-speed), color var(--transition-speed);
        }
        
        body.touch-device * {
            cursor: auto;
        }

        .container {
            width: 90%;
            max-width: 1100px;
            margin: 0 auto;
            padding: 0 15px;
        }
        
        a, button {
            cursor: none;
        }

        h1, h2, h3 {
            font-weight: 700;
            color: var(--color-primary);
            margin-bottom: 0.5em;
        }

        h1 {
            font-size: clamp(2.5rem, 5vw, 3.5rem);
        }

        h2 {
            font-size: clamp(1.8rem, 4vw, 2.5rem);
            text-align: center;
            margin-bottom: 1.5em;
            padding-top: 40px; 
        }

        h3 {
            font-size: clamp(1.2rem, 3vw, 1.5rem);
        }

        p {
            margin-bottom: 1em;
            font-size: clamp(0.9rem, 2.5vw, 1rem);
            font-weight: 300;
        }

        a {
            text-decoration: none;
            color: var(--color-primary);
            font-weight: 500;
            transition: color var(--transition-speed);
        }
        a:hover {
            color: var(--color-accent);
            text-shadow: none;
        }

        img {
            max-width: 100%;
            height: auto;
            display: block;
            border-radius: var(--border-radius);
        }

        /* Header */
        .main-header {
            background-color: var(--color-surface);
            padding: 1rem 0;
            position: sticky;
            top: 0;
            width: 100%;
            z-index: 1000;
            box-shadow: 0 2px 10px var(--color-shadow);
            transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
        }

        .main-header .container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: clamp(1.5rem, 3vw, 1.8rem);
            font-weight: 700;
        }
        
        .header-right {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .main-nav ul {
            list-style: none;
            display: flex;
            gap: 10px; 
        }

        .main-nav a {
            color: var(--color-text-on-light);
            padding: 0.5em 1em;
            border-radius: var(--border-radius);
            transition: all var(--transition-speed) ease;
            font-weight: 500;
            position: relative;
        }
        
        .main-nav a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -2px;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--color-accent);
            transition: width var(--transition-speed) ease;
        }

        .main-nav a:hover::after,
        .main-nav a.active::after {
            width: 70%;
        }
        
        .main-nav a:hover,
        .main-nav a.active {
            color: var(--color-primary);
        }
        
        /* Theme Toggle Button */
        #theme-toggle {
            background: none;
            border: none;
            padding: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--color-secondary);
        }
        #theme-toggle:hover {
            color: var(--color-accent);
        }
        #theme-toggle svg {
            width: 24px;
            height: 24px;
            transition: transform 0.5s ease;
        }
        #theme-toggle .sun { display: none; }
        #theme-toggle .moon { display: block; }
        
        body.dark-mode #theme-toggle .sun { display: block; }
        body.dark-mode #theme-toggle .moon { display: none; }
        
        body.dark-mode #theme-toggle .sun { transform: rotate(180deg); }
        body:not(.dark-mode) #theme-toggle .moon { transform: rotate(-180deg); }


        /* Hero Section */
        #hero {
            min-height: calc(100vh - 70px);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 4rem 0;
            position: relative; 
            background-color: #1A1A1A; 
            color: #fdfdfd;
        }
        
        /* --- Terminal Animation --- */
        #terminal {
            font-family: 'Fira Code', monospace;
            color: #fdfdfd;
            text-align: left;
            width: 90%;
            max-width: 650px;
            background: #252525;
            padding: 2rem;
            border-radius: var(--border-radius);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            border: 1px solid #444;
        }
        .terminal-line {
            line-height: 1.5;
            font-size: clamp(0.9rem, 2.5vw, 1.1rem);
        }
        .terminal-line .prompt {
            color: var(--color-accent);
            margin-right: 0.5rem;
        }
        .terminal-line .highlight {
             color: var(--color-accent);
             font-weight: bold;
        }
        .cursor {
            display: inline-block;
            width: 10px;
            height: 1.5rem;
            background: var(--color-accent);
            animation: blink 1s infinite;
        }
        
        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0; }
        }

        .hero-buttons {
            margin-top: 2rem;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
        }
        .hero-buttons.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Sections */
        section {
            padding: 4rem 0; 
            position: relative;
            z-index: 2;
        }

        #sobre, #contato, .main-footer {
            background-color: var(--color-surface);
        }
        
        #sobre .container, #contato .container {
            max-width: 800px; 
            text-align: center;
        }

        .profile-pic-container {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            overflow: hidden;
            margin: 0 auto 1.5em auto;
            box-shadow: 0 0 0 4px var(--color-surface), 0 0 0 8px var(--color-accent); 
        }

        .profile-pic-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* Skills Tags */
        .skills-list {
            list-style: none;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin-top: 1.5em;
        }

        .skills-list li {
            background-color: var(--color-secondary); 
            color: #fdfdfd;
            padding: 0.5em 1em;
            border-radius: var(--border-radius);
            font-size: 0.9em;
            font-weight: 500;
            transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
        }
        
        body.dark-mode .skills-list li {
            color: #121212;
        }
        
        .skills-list li:hover {
            background-color: var(--color-accent);
            color: var(--color-text-on-accent);
        }
        
        /* Projetos */
        #projetos {
            background-color: var(--color-background);
        }
        .projetos-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }

        .projeto-card {
            background: var(--color-surface);
            border-radius: var(--border-radius);
            box-shadow: 0 5px 15px var(--color-shadow);
            overflow: hidden;
            transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, border-left-color var(--transition-speed) ease, background-color var(--transition-speed) ease;
            display: flex;
            flex-direction: column;
            border-left: 4px solid transparent; 
        }

        .projeto-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 10px 25px var(--color-shadow); 
            border-left-color: var(--color-accent); 
        }
        
        .projeto-info {
            padding: 1.5rem;
            flex-grow: 1; 
            display: flex;
            flex-direction: column;
            justify-content: space-between; 
        }
        .projeto-info h3 {
            margin-bottom: 0.5em;
        }
        .projeto-info p {
            font-size: 0.9em;
            margin-bottom: 1.5rem;
            flex-grow: 1;
            color: var(--color-secondary);
        }
        
        /* --- Project Carousel --- */
        .carousel-container {
            position: relative;
            overflow: hidden;
            border-radius: var(--border-radius);
        }
        .carousel-track {
            display: flex;
            transition: transform 0.5s ease-in-out;
        }
        .carousel-slide {
            min-width: 100%;
            position: relative;
        }
        .carousel-slide img {
            width: 100%;
            height: 300px;
            object-fit: cover;
            display: block;
            border-radius: 0;
        }
        .carousel-button {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background-color: rgba(0, 0, 0, 0.4);
            border: none;
            color: white;
            padding: 0.5rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            transition: opacity 0.3s ease;
            opacity: 0;
        }
        .carousel-container:hover .carousel-button {
            opacity: 1;
        }
        .carousel-button.prev {
            left: 10px;
        }
        .carousel-button.next {
            right: 10px;
        }
        .carousel-dots {
            position: absolute;
            bottom: 15px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 8px;
        }
        .carousel-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.5);
            transition: background-color 0.3s ease;
        }
        .carousel-dot.active {
            background-color: white;
        }

        /* Botão Primário (Hero) */
        #hero .btn-primary { 
            display: inline-block;
            padding: 0.75em 1.75em;
            border-radius: 50px;
            font-weight: 700;
            transition: all var(--transition-speed) ease-in-out;
            text-align: center;
            margin: 1rem 0.5rem;
            border: 2px solid transparent; 
            font-size: clamp(0.9rem, 2vw, 1rem);
            background-color: var(--color-accent);
            color: var(--color-text-on-accent);
            border-color: var(--color-accent);
        }
        #hero .btn-primary:hover {
            background-color: transparent;
            color: var(--color-accent);
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
        }
        
        /* Botão Secundário do Hero (Sempre Branco) */
        #hero .btn-secondary { 
            display: inline-block;
            padding: 0.75em 1.75em;
            border-radius: 50px;
            font-weight: 700;
            transition: all var(--transition-speed) ease-in-out;
            text-align: center;
            margin: 1rem 0.5rem;
            font-size: clamp(0.9rem, 2vw, 1rem);
            background-color: transparent;
            color: #fdfdfd;
            border: 2px solid #fdfdfd; 
        }
        #hero .btn-secondary:hover {
            color: #1A1A1A;
            background-color: #fdfdfd;
            transform: scale(1.05);
        }
        
        /* Botões dos Projetos (Adaptáveis) */
        .projeto-card .btn-secondary {
            display: inline-block;
            padding: 0.75em 1.75em;
            border-radius: 50px;
            font-weight: 700;
            transition: all var(--transition-speed) ease-in-out;
            text-align: center;
            font-size: clamp(0.9rem, 2vw, 1rem);
            background-color: transparent;
            color: var(--color-primary);
            border: 2px solid var(--color-secondary);
            margin-top: 1rem;
        }
        .projeto-card .btn-secondary:hover {
            color: var(--color-background);
            background-color: var(--color-primary);
            border-color: var(--color-primary);
            transform: scale(1.05);
        }

        /* Contact Form */
        #contato form {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-top: 2rem;
            position: relative;
        }

        #contato input[type="text"],
        #contato input[type="email"],
        #contato textarea {
            width: 100%;
            padding: 0.8em;
            border: 1px solid var(--color-secondary); 
            border-radius: var(--border-radius);
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
            transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
            background-color: var(--color-background);
            color: var(--color-text-on-light);
        }

        #contato input[type="text"]:focus,
        #contato input[type="email"]:focus,
        #contato textarea:focus {
            outline: none;
            border-color: var(--color-accent); 
            box-shadow: 0 0 8px rgba(255, 215, 0, 0.7); 
        }
        #contato textarea {
            min-height: 150px;
            resize: vertical;
        }
        
        .form-status {
            margin-top: 1em;
            font-weight: 500;
            min-height: 1.2em;
        }
        .form-status.success {
            color: var(--color-success);
        }
        .form-status.error {
            color: var(--color-error);
        }

        .submit-btn-animated {
            width: 180px;
            height: 60px;
            background: none;
            border: 4px solid var(--color-primary);
            border-radius: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.5s ease;
            padding: 0;
            margin: 1rem auto 0 auto;
            position: relative;
            -webkit-tap-highlight-color: transparent;
        }

        .submit-btn-animated span,
        .submit-btn-animated svg {
            position: absolute;
            color: var(--color-primary);
            fill: transparent;
            text-transform: uppercase;
            letter-spacing: 2px;
            font-weight: bold;
            transition: all 0.5s ease;
        }

        .submit-btn-animated.loading {
            width: 60px;
            border-radius: 50%;
            border-color: transparent;
            border-top-color: var(--color-secondary);
            animation: spin 1.5s linear infinite;
        }

        .submit-btn-animated.loading span {
            opacity: 0;
            transform: scale(0.5);
        }

        .submit-btn-animated.success {
            width: 60px;
            border-radius: 50%;
            background-color: var(--color-success);
            border-color: var(--color-success);
            animation: none;
        }

        .submit-btn-animated.success span {
            opacity: 0;
        }

        .submit-btn-animated.success svg {
            fill: #fdfdfd;
            opacity: 1;
            transform: scale(1);
        }

        .submit-btn-animated.error {
            width: 60px;
            border-radius: 50%;
            background-color: var(--color-error);
            border-color: var(--color-error);
            animation: shake 0.5s ease;
        }

        .submit-btn-animated.error span {
            opacity: 0;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            50% { transform: translateX(5px); }
            75% { transform: translateX(-5px); }
        }

        .social-links {
            margin-top: 2rem;
            display: flex;
            justify-content: center;
            gap: 1.5rem;
        }

        .social-links a {
            font-size: 1.8rem; 
            color: var(--color-secondary); 
            transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
        }

        .social-links a:hover {
            color: var(--color-accent); 
            transform: scale(1.2);
        }

        /* Footer */
        .main-footer {
            text-align: center;
            padding: 2rem 0;
            background-color: var(--color-surface);
            color: var(--color-text-on-light); 
            font-size: 0.9em;
        }
        .main-footer p {
             margin-bottom: 0.5em;
        }
        .main-footer a {
            color: var(--color-accent);
            text-decoration: underline;
        }
         .main-footer a:hover {
            text-decoration: none;
            text-shadow: none;
        }

        /* Mobile Menu */
        .menu-toggle {
            display: none;
            z-index: 1001;
        }
        
        @media (max-width: 768px) {
            .main-nav {
                display: none;
            }
            .menu-toggle {
                display: block;
            }

            .main-nav.active { /* Para mostrar o menu no mobile */
                display: block;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100vh;
                background-color: var(--color-surface);
                z-index: 1000;
                padding-top: 5rem;
                transition: left 0.3s ease-in-out;
            }

            .main-nav.active ul {
                display: flex; 
                flex-direction: column;
                align-items: center;
                gap: 2rem;
            }

            .main-nav.active a {
                font-size: 1.5rem;
            }

            .main-nav.active a::after { 
                bottom: -5px;
            }

            #hero {
                min-height: calc(80vh - 65px);
                padding: 2rem 0;
            }
            
            .projetos-grid {
                grid-template-columns: 1fr; 
            }
        }
        
        /* Animação de Scroll */
        .animated-section {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        }
        .animated-section.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Custom Cursor */
        .custom-cursor {
            position: fixed;
            top: 0;
            left: 0;
            pointer-events: none;
            z-index: 9999;
            transition: transform 0.2s ease-out;
        }
        .custom-cursor.dot {
            width: 8px;
            height: 8px;
            background-color: var(--color-primary);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: background-color var(--transition-speed) ease;
        }
        .custom-cursor.outline {
            width: 40px;
            height: 40px;
            border: 2px solid var(--color-primary);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
        }
        .custom-cursor.hover .outline {
            width: 60px;
            height: 60px;
            border-color: var(--color-accent);
        }

        body.cursor-on-dark .custom-cursor.dot {
            background-color: var(--color-text-on-dark);
        }
        body.cursor-on-dark .custom-cursor.outline {
            border-color: var(--color-text-on-dark);
        }

