/* Reset e Base */
:root {
    --primary-color: #ffffff;
    --secondary-color: #8a2be2;
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-gray: #888;
    --card-bg: rgba(10, 10, 10, 0.6);
    --card-border: rgba(255, 255, 255, 0.05);
    --flashlight-color: rgba(215, 215, 215, 0.132); /* Lanterna ainda mais potente */
    --particle-color: rgba(255, 255, 255, 0.4);
    --glass-bg: rgba(0, 0, 0, 0.8);
    --boot-bg: #000;
    --accent-glow: rgba(255, 255, 255, 0.2);
    --card-face-overlay: radial-gradient(circle, transparent 20%, #000000 120%);
    --qr-bg: #000;
}

body.light-mode {
    --bg-color: #f8f9fa;
    --text-color: #1a1a1a;
    --text-gray: #5a5a5a;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --flashlight-color: rgba(0, 0, 0, 0.05);
    --particle-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(230, 230, 230, 0.8);
    --accent-glow: rgba(0, 0, 0, 0.1);
    --card-face-overlay: none; /* Remove a fumaça no modo claro */
    --qr-bg: #fff;
    --primary-color: #000000; 
    --secondary-color: #6a1b9a;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
}

/* Bloqueio de scroll durante o boot */
body.loading {
    overflow: hidden;
}

/* Tela de Boot */
#boot-loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Changa', monospace;
    padding: 20px;
}

#boot-ascii {
    color: #fff;
    text-shadow: 0 0 15px #fff, 0 0 30px rgba(255,255,255,0.2);
    font-size: clamp(3px, 0.8vw, 10px);
    line-height: 1.2;
    margin-bottom: 40px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#boot-terminal {
    color: #666; /* Cinza */
    font-size: 0.85rem;
    width: 100%;
    max-width: 600px;
    height: 150px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.boot-line {
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.boot-line.highlight {
    color: #fff;
    text-shadow: 0 0 5px #fff;
}

#boot-progress {
    color: #fff;
    font-family: monospace;
    font-size: 1rem;
    margin-top: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Name Prompt Styles */
#name-prompt-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 21000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Changa', sans-serif;
}

.prompt-box {
    text-align: center;
}

.prompt-text {
    color: #666;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

#user-name-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    color: #fff;
    font-size: 2rem;
    text-align: center;
    outline: none;
    transition: border-color 0.3s, text-shadow 0.3s;
    font-family: 'Changa', sans-serif;
}

#user-name-input:focus {
    border-bottom-color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Sistema de Notificação */
#notification-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 30000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    pointer-events: none;
}

.notification {
    background: rgba(15, 15, 15, 0.9);
    border-left: 2px solid #fff;
    color: #fff;
    padding: 15px 25px;
    font-family: 'Changa', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    transform: translateX(150%);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: auto;
    min-width: 250px;
    backdrop-filter: blur(10px);
    user-select: none;
    cursor: grab;
}

.notification.show {
    transform: translateX(0);
    border-color: #fff;
    text-shadow: 0 0 8px #fff;
}

.notification.dragging {
    transition: none;
    cursor: grabbing;
    opacity: 0.8;
}

.notif-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--primary-color);
    width: 100%;
    transform-origin: left;
}

.notif-accent {
    color: #666;
    margin-right: 10px;
}

/* Scanlines sutis por cima de tudo */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.087) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
}

/* Canvas de Glitch */
#glitch-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.2; 
}

body.light-mode #glitch-canvas {
    opacity: 0.05;
}

/* Lanterna de Exploração */
#flashlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 90vw;
    height: 90vh;
    pointer-events: none;
    z-index: 0; /* Logo abaixo das scanlines */
    background: radial-gradient(
        circle 400px at var(--mouse-x, -10%) var(--mouse-y, -10%),
        var(--flashlight-color) 0%,
        transparent 13%, /* Núcleo ultra focado */
        transparent 100%
    );
}

/* Linhas de Degradê Fixas */
.gradient-line {
    position: fixed;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1000;
}

/* Tipografia para Títulos */
h1, h2, h3, .logo {
    font-family: 'Changa', sans-serif;
}

.top-line {
    top: 0;
    background: linear-gradient(90deg, #ffffff, var(--primary-color));
}

.bottom-line {
    bottom: 0;
    background: linear-gradient(90deg, var(--secondary-color), #4b0082);
}

/* Seção de Boas-vindas */
.welcome-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: flex-start; /* Alinha o container de conteúdo à esquerda */
    align-items: center;
    background: #000;
    overflow: hidden;
    z-index: 10;
    padding-left: 10%; /* Recuo lateral para o texto */
}

.welcome-bg {
    position: absolute;
    inset: 0;
    background: url('https://i.pinimg.com/originals/3a/82/56/3a8256b391b0de71639848f2815c2b14.gif') no-repeat center center;
    background-size: cover;
    opacity: 1;
    filter: brightness(0.8) contrast(1.4); 
    animation: welcome-bg-zoom 10s linear infinite alternate;
    z-index: 1;
}

@keyframes welcome-bg-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

/* Efeito de Vinheta Intensa */
.welcome-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 20%, #000 100%);
    z-index: 2;
    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 10; /* Agora acima da máscara de escuridão */
    text-align: left;
    max-width: 700px;
    padding: 40px;
    padding-left: 30px;
    font-family: 'Changa', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); /* Garante leitura sobre qualquer parte da imagem */
    border-left: 1px solid rgba(255, 255, 255, 0.1); /* Linha vertical estilo terminal */
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    transform: translateY(var(--welcome-parallax, 0));
    transition: transform 0.1s ease-out;
}

.hidden-penguin {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 3; /* Atrás da máscara (z-index 5) para ser revelado pela lanterna */
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.hidden-penguin img {
    width: 60px;
    image-rendering: pixelated;
}

.speech-bubble {
    background: #fff;
    color: #000;
    padding: 5px 12px;
    border-radius: 8px;
    font-family: 'Changa', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 10px;
    position: relative;
    text-transform: uppercase;
}

.neon-flicker {
    animation: neon-flicker-anim 5s infinite;
}

@keyframes neon-flicker-anim {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 0 0 8px #fff, 0 0 15px var(--accent-glow);
        opacity: 1;
    }
    20%, 24%, 55% {
        text-shadow: none;
        opacity: 0.4;
    }
}

.welcome-content h1 {
    font-size: clamp(2.5rem, 10vw, 6rem);
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1;
}

.welcome-content p {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-gray);
    line-height: 1.6;
    letter-spacing: 0.5px;
    font-weight: 300;
    margin-bottom: 20px;
}

.welcome-content p:last-child {
    margin-bottom: 0;
}

/* A Camada de Escuridão que o Mouse Revela */
.welcome-mask {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 5; /* Entre o fundo/partículas e o texto */
    pointer-events: none;
    -webkit-mask-image: radial-gradient(
        circle 600px at var(--mouse-x, -500px) calc(var(--mouse-y, -500px) + var(--scroll-y, 0px)),
        transparent 5%, /* Núcleo muito mais focado e forte */
        black 100%
    );
    mask-image: radial-gradient(
        circle 600px at var(--mouse-x, -500px) calc(var(--mouse-y, -500px) + var(--scroll-y, 0px)),
        transparent 5%,
        black 100%
    );
    transition: -webkit-mask-image 0.1s ease, mask-image 0.1s ease;
}

.welcome-particles {
    position: absolute;
    inset: 0;
    z-index: 2; /* Fica atrás da máscara para só ser revelada pela luz */
    pointer-events: none;
}

.welcome-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    filter: blur(1px);
    animation: float-dust 15s linear infinite;
}

body.light-mode .welcome-mask {
    display: none; /* No modo claro, removemos a escuridão artificial */
}

body.light-mode .welcome-bg {
    opacity: 0.2;
    filter: grayscale(1) invert(1);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 10%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.logo {
    position: relative;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
    transition: 0.3s;
    cursor: pointer;
    display: inline-block;
}

.logo::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.logo:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Easter Egg do Gatinho */
.cat-pixel {
    width: 35px;
    height: 35px;
    margin-left: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cat-pixel.active {
    opacity: 1;
    animation: cat-loop-anim 0.8s steps(1) infinite;
}

@keyframes cat-loop-anim {
    0% { background-image: url('../../midias/imgs/gatinho_estheeggframe1.png'); }
    50% { background-image: url('../../midias/imgs/gatino_estheggframe2.png'); }
}

body.light-mode .logo {
    font-weight: 800;
    color: #000;
    text-shadow: 0 0 20px var(--accent-glow);
}

.logo:hover {
    text-shadow: 0 0 15px var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Botão de Tema */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 10px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
}

.theme-btn:hover { border-color: var(--primary-color); }

.theme-svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5px; /* Traço mais fino e minimalista */
}

/* Seção Sobre (Texto à Direita) */
.container {
    padding: 100px 10%;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Divide a tela ao meio */
    width: 100%;
    align-items: center;
}

.about-image {
    width: 100%;
    max-width: 450px;
    filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.2));
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0) rotate(0deg); filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.2)); }
    50% { transform: translateY(-20px) rotate(2deg); filter: drop-shadow(0 0 40px rgba(138, 43, 226, 0.4)); }
}

/* Cartão 3D Interativo */
.card-3d-container {
    perspective: 1500px;
    width: 100%;
    max-width: 400px;
    height: 500px;
    margin: 0 auto;
    cursor: pointer;
}

.card-3d {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 20px;
}

.card-3d.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    transform-style: preserve-3d; /* Permite parallax interno */
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

body.light-mode .card-face {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.card-face::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-face-overlay);
    pointer-events: none;
    z-index: 2;
    transition: background 0.5s ease;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-back {
    transform: rotateY(180deg);
    background: var(--card-bg);
    flex-direction: column;
    transform-style: preserve-3d;
}

.github-profile {
    text-decoration: none;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform-style: preserve-3d;
}

.github-profile img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    transform: translateZ(60px); /* Efeito de profundidade na foto */
}

.github-profile span {
    font-family: 'Changa', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 1px;
    transform: translateZ(40px);
    color: var(--text-color);
    text-shadow: none;
}

body.light-mode .github-profile span {
    color: #000;
    font-weight: 700;
}

.profile-stats-mini {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    transform: translateZ(30px);
    font-family: 'Changa', monospace;
}

.profile-stats-mini span {
    font-size: 0.8rem !important;
    color: rgba(255, 255, 255, 0.5);
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--text-gray);
    max-width: 80%;
    margin-top: 10px;
    transform: translateZ(30px); /* Efeito de profundidade na bio */
}

.card-glare {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
    border-radius: 20px;
}

.about-content {
    padding-left: 50px;
    border-left: 1px solid #222; /* Linha sutil de separação */
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 300;
    background: linear-gradient(to right, var(--text-color), var(--text-gray));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Seção de Habilidades */
.skills-section {
    padding: 100px 10%;
    background: transparent;
    text-align: center;
}

.skills-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: center;
    margin-bottom: 80px;
}

.skills-stack img {
    max-width: 100%;
    display: inline-block;
    filter: grayscale(1) brightness(0.8) drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
    transition: transform 0.6s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.8s ease, filter 0.4s;
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    will-change: transform, filter;
}

/* Skill icons ganham cor no tema claro */
body.light-mode .skills-stack img {
    filter: grayscale(0.4) brightness(1);
}

.skills-stack img.visible {
    opacity: 1;
    transform: translateY(0);
}

.skills-stack img:hover {
    filter: grayscale(0) brightness(1.1) drop-shadow(0 15px 15px var(--accent-glow));
    transform: translateY(-25px) scale(1.25) rotate(var(--tilt, 0deg)) !important;
    z-index: 10;
    transition: transform 0.1s ease-out, filter 0.3s !important;
    transition-delay: 0s !important;
}

.skills-grid-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1000px;
}

.skill-category {
    padding: 15px;
    background: transparent;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    transition: border-color 0.3s;
}

.skill-label {
    font-family: 'Changa', monospace;
    font-size: 0.75rem;
    color: var(--text-gray);
    display: block;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.skill-category p {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.skill-category:hover {
    border-left-color: var(--primary-color);
    background: linear-gradient(90deg, var(--card-border) 0%, transparent 100%);
}

.stats-img {
    max-width: 100%;
    margin-top: 15px;
    opacity: 0.7;
    transition: 0.3s;
}

.stats-img:hover {
    opacity: 1;
}

.stats-img.graph {
    filter: brightness(1.2);
}

.about-content h2::after {
    content: '|';
    margin-left: 5px;
    color: var(--primary-color);
    animation: blink 1s infinite;
}

.about-content p {
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 1.1rem;
    max-width: 500px;
}

.about-content strong, .skill-category h3 {
    color: var(--text-color);
}

/* Seção de Serviços */
.services-section {
    position: relative;
    padding: 100px 10%;
    text-align: center;
    background: transparent;
    overflow: hidden;
}

.services-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../midias/imgs/toque.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efeito Parallax */
    opacity: 0.35; /* Opacidade controlada para não ofuscar os cards */
    z-index: 0;
    pointer-events: none;
    /* Máscara para suavizar a entrada e saída da imagem no fundo preto */
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

body.light-mode .services-section::before {
    filter: invert(1);
    opacity: 0.12; /* Opacidade reduzida para não brigar com o conteúdo claro */
}

.services-section > * {
    position: relative;
    z-index: 1;
}

.skills-section h2, .services-section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 300;
}

.services-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 30px;
    padding: 20px 0;
    scrollbar-width: none; /* Firefox */
}

.services-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.61);
    border: 0rgba.7px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 18%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: 0.3s;
    opacity: 1;
}

.carousel-btn.disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

.carousel-btn:hover {
    background: #ffffff;
    color: #000;
    box-shadow: 0 0 15px #ffffff;
}

.carousel-btn.prev {
    left: -60px;
}

.carousel-btn.next {
    right: -60px;
}

.service-item {
    flex: 0 0 320px;
    padding: 40px 30px;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    transition: all 0.5s ease-in-out, border-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.3; /* Base mais apagada */
    transform: translateY(30px);
    border-radius: 12px;
    position: relative;
    /* Efeito de desfoque progressivo (feathering) nas bordas */
    -webkit-mask-image: radial-gradient(circle, black 70%, transparent 100%);
    mask-image: radial-gradient(circle, black 70%, transparent 100%);
    filter: blur(6px); /* Efeito de fora de foco */
}

body.light-mode .service-item {
    opacity: 0.7; /* Aumentado o destaque dos cards inativos */
    filter: blur(2px); 
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .service-item:hover,
body.light-mode .service-item.focused {
    opacity: 1 !important;
    filter: blur(0) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Camada de Scanline exclusiva para o hover da imagem */
.service-item::before {
    content: '';
    position: absolute;
    top: 40px; /* Alinhado com o padding interno */
    width: 120px;
    height: 120px;
    background: repeating-linear-gradient(transparent 0%, transparent 50%, var(--card-border) 50%, var(--card-border) 100%);
    background-size: 100% 4px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 4px;
}

.service-item.visible {
    transform: translateY(0);
}

/* Nova Seção de Contato */
.contact-section {
    position: relative;
    min-height: 100vh;
    padding: 60px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: transparent;
    perspective: 1000px;
    overflow: hidden;
}

.contact-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 50px;
}

.contact-card {
    background: rgba(15, 15, 15, 0);
    padding: 30px;
    border-bottom: 0.8px solid var(--card-border);
    border-top: 0.8px solid var(--card-border);
    border-radius: 3px;
    min-width: 280px;
    transition: transform 0.5s cubic-bezier(0.1, 0.7, 0.1, 1), border-color 0.4s, background 0.4s, box-shadow 0.4s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-style: preserve-3d;
    will-change: transform;
}

.qrcode-wrapper {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateZ(25px);
    overflow: hidden;
    border-radius: 4px;
}

.qrcode-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    top: -100%;
    width: 100%;
    height: 2px;
    background: #ffffff;
    box-shadow: 0 0 15px #ffffff, 0 0 30px #ffffff;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
}

.contact-card:hover .qrcode-wrapper::after {
    opacity: 0.8;
    animation: scan-line-qr 2.5s linear infinite;
}

.contact-qrcode {
    width: 140px;
    height: 140px;
    border: 1px solid #222;
    padding: 10px;
    transition: 0.3s ease;
    filter: grayscale(1) brightness(0.7);
}

.contact-card:hover {
    /*border-color: #ffffff;  Branco Neon */
     border-bottom: 1px solid #575757; /* Cinza escuro */
    border-top: 1px solid #575757; /* Cinza escuro */
    border-right: 1px solid #575757; /* Cinza escuro */
    border-left: 1px solid #575757; /* Cinza escuro */

    background: var(--bg-color);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.05);
    transition: transform 0.1s ease-out, border-color 0.4s, background 0.4s, box-shadow 0.4s !important;
    transition-delay: 0s !important;
}

.contact-card:hover .contact-qrcode {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    filter: grayscale(0) brightness(1);
}

.contact-label {
    display: block;
    font-family: 'Changa', sans-serif;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 10px;
    letter-spacing: 2px;
    transform: translateZ(15px);
}

.contact-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
    transform: translateZ(20px);
}

.contact-card:hover .contact-label {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.contact-card:hover .contact-link {
    color: #ffffff;
    text-shadow: 0 0 10px #ffffff;
}

@keyframes scan-line-qr {
    0% { top: -10%; }
    100% { top: 110%; }
}

/* Estado de Foco (cards centrais) */
.service-item.focused {
    opacity: 1;
    filter: blur(0);
}

.service-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    background: var(--card-bg);
    box-shadow: 0 0 25px var(--accent-glow);
    opacity: 1 !important;
    filter: blur(0) !important;
    z-index: 10;
}

.service-item:hover::before {
    opacity: 1;
    animation: scanline-move 2s linear infinite;
}

.service-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 15px;
    fill: #00d4ff;
    opacity: 0.8;
}

.service-item h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Ajuste de texto para cards de projeto */
.service-item p {
    color: var(--text-gray);
}

/* Ajuste para imagens dos projetos */
.footer-logo {
    width: 120px;
    height: 120px;
    object-fit: contain; /* Garante que a imagem caiba sem distorcer */
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
    transition: transform 0.3s ease;
}

.service-item:hover .footer-logo {
    filter: brightness(1.2) contrast(1.1) drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    transform: translateY(-5px);
}

@keyframes scanline-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    border-radius: 4px;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Seção de Currículo */
.curriculum-section {
    position: relative;
    min-height: 100vh;
    padding: 60px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: transparent;
    overflow: hidden;
}

.curriculum-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.3) 0%, transparent 65%);
    opacity: var(--cv-light-opacity, 0);
    pointer-events: none;
    z-index: 1;
}

/* Efeito de Poeira/Partículas */
.cv-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: var(--cv-light-opacity, 0);
    transition: opacity 0.3s ease, transform 0.3s ease-out;
    /* Máscara para que as partículas apareçam mais onde a luz bate */
    -webkit-mask-image: radial-gradient(circle at 50% -10%, black 0%, transparent 70%);
    mask-image: radial-gradient(circle at 50% -10%, black 0%, transparent 70%);
    backface-visibility: hidden;
    transform: translateZ(0);
}

.particle {
    position: absolute;
    background: var(--particle-color);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
    will-change: transform;
}

@keyframes float-dust {
    0% { transform: translate(0, 0); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { 
        transform: translate(var(--move-x), var(--move-y)); 
        opacity: 0; 
    }
}

.curriculum-section .section-title {
    position: relative;
    z-index: 2;
}

.cv-container {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.cv-card {
    background: var(--card-bg);
    padding: 50px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    max-width: 450px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    transition: transform 0.5s cubic-bezier(0.1, 0.7, 0.1, 1), opacity 0.8s ease, border-color 0.4s, background 0.4s, box-shadow 0.4s;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(30px);
    will-change: transform;
}

.cv-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.cv-card:hover {
    border-color: var(--primary-color);
    background: var(--card-bg);
    box-shadow: 0 0 40px var(--accent-glow);
    transition: transform 0.1s ease-out, border-color 0.4s, background 0.4s, box-shadow 0.4s !important;
    transition-delay: 0s !important;
}

.cv-icon {
    transform: translateZ(30px);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.cv-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    transform: translateZ(20px);
}

.cv-info p {
    color: var(--text-gray);
    font-size: 0.9rem;
    transform: translateZ(15px);
}

.cv-actions {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    transform: translateZ(25px);
}

.highlight-btn {
    background: #fff;
    color: #000 !important;
    border-color: #fff !important;
}

.btn:hover {
    background: #ffffff;
    color: #000;
    box-shadow: 0 0 15px #ffffff;
}

.glow-word {
    transition: color 0.3s, text-shadow 0.3s;
    display: inline-block;
    position: relative;
}

.glow-word:hover {
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px var(--accent-glow);
    cursor: default;
}

@keyframes blink { 50% { opacity: 0; } }

/* Footer */
.site-footer {
    position: relative;
    padding: 120px 10% 80px;
    text-align: center;
    color: var(--text-gray);
    /* Mix de gradientes para transição suave e "disfarçada" */
    background: 
        linear-gradient(to bottom, var(--bg-color) 0%, transparent 30%, transparent 70%, var(--bg-color) 100%),
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('https://i.pinimg.com/1200x/d2/8a/c0/d28ac07956ddb923ff036c3b274b4afe.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efeito Parallax para profundidade */
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.9); /* Sombra interna para efeito de túnel/profundidade */
    overflow: hidden;
}

.footer-content {
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 1); /* Garante leitura sobre o fundo animado */
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Mobile */
@media (max-width: 768px) {
    /* Ajuste de tipografia base */
    body { font-size: 14px; }

    /* Boot Loader - Forçando o ASCII a caber na tela */
    #boot-ascii { 
        font-size: 3px !important; /* Tamanho mínimo para não quebrar */
        margin-bottom: 20px;
        line-height: 1;
    }
    #boot-terminal { font-size: 0.75rem; height: 120px; }

    /* Barra de Navegação */
    .top-bar { 
        padding: 20px 5%; 
        flex-direction: column; 
        gap: 15px; 
    }
    .nav-links { 
        gap: 12px; 
        flex-wrap: wrap; 
        justify-content: center; 
    }
    .nav-links a { font-size: 0.8rem; letter-spacing: 1px; }

    /* Seções e Container */
    .container, .skills-section, .services-section, .curriculum-section, .contact-section { 
        padding: 60px 5%; 
    }

    /* Sobre Mim */
    .about-section {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .about-content { padding-left: 0; border-left: none; }
    .about-content h2 { font-size: 2rem; }
    
    .card-3d-container { 
        height: 400px; 
        max-width: 300px; 
    }

    /* Skills */
    .skills-stack {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .skills-stack img { width: 45px; }

    /* Projetos (Carrossel) */
    .carousel-btn { display: none; }
    .service-item { 
        flex: 0 0 85vw; /* Ocupa quase a tela toda, mas deixa ver o próximo */
        padding: 30px 20px;
    }

    /* Currículo */
    .cv-card { padding: 30px 20px; }

    /* Contato */
    .contact-grid { gap: 20px; }
    .contact-card { 
        width: 100%; 
        min-width: unset; 
    }

    /* Notificações no Mobile */
    #notification-container {
        top: 20px;
        right: 5%;
        left: 5%;
        width: 90%;
    }
    .notification {
        min-width: unset;
        width: 100%;
    }

    /* Wiki Mobile Adjustments */
    .wiki-wrapper {
        flex-direction: column;
    }
    .wiki-sidebar {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid var(--card-border);
        padding: 20px !important;
    }
}

.full-screen-section {
    width: 100%;
    height: 110vh;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.extra-reveal-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.extra-image-bg {
    position: absolute;
    inset: 0;
    background: url('https://i.pinimg.com/originals/6d/78/71/6d78711d7c8438405ee8a5a50114f9ac.gif') no-repeat center center;
    background-size: cover;
    z-index: 1;
    /* Efeito de escurecimento inicial */
    filter: brightness(0.6) contrast(1.2) grayscale(0.5);
    transition: filter 0.3s ease;
}

.ascii-art-bg {
    color: var(--primary-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(3px, 0.45vw, 10px);
    line-height: 1.1;
    opacity: 0.7;
    pointer-events: none;
    user-select: none;
    white-space: pre;
    text-align: center;
    z-index: 2;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

/* Janela de Desenho (Folha) */
.drawing-window.card {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 320px;
    min-width: 200px;
    height: 400px;
    min-height: 150px;
    background-color: rgba(26, 26, 26, 0.4); /* Translúcido */
    backdrop-filter: blur(12px) saturate(160%); /* Efeito Glassmorphism */
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid #333;
    border-radius: 8px;
    z-index: 3; /* Atrás da máscara (5), na frente da imagem (1) */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Necessário para o resize funcionar corretamente */
    resize: both; /* Permite redimensionar a janela */
    transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
    cursor: default;
}

.drawing-window.active-sheet {
    border-color: #fff !important; /* Borda branca sólida para destaque */
    background-color: rgba(35, 35, 35, 0.6); /* Um pouco mais opaca quando ativa */
    /* Brilho neon para destacar a janela ativa sobre o fundo escuro */
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15) !important;
    z-index: 1000 !important;
}

.tools {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #252525;
    border-bottom: 1px solid #333;
    cursor: grab; /* Indica que a barra é arrastável */
}

.tools:active {
    cursor: grabbing;
}

.circle { padding: 0 4px; }
.circle svg {
    display: block;
    transition: filter 0.2s;
}
.circle:hover svg { filter: brightness(1.2); }

.red { background-color: #ff605c; }
.yellow { background-color: #ffbd44; }
.green { background-color: #00ca4e; }

.window-title {
    font-family: 'Changa', sans-serif;
    font-size: 0.7rem;
    color: #666;
    margin-left: 15px;
    flex-grow: 1;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-mini-gif {
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
    filter: brightness(0.8);
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.extra-reveal-wrapper.flashlight-active .window-mini-gif {
    opacity: 1;
}

.drawing-controls {
    display: flex;
    gap: 8px;
}

.tool-btn {
    background: transparent;
    border: 1px solid #444;
    color: #fff;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: 0.2s;
}

.tool-btn.active {
    background: #444;
    border-color: var(--primary-color);
}

.card__content {
    flex-grow: 1;
    position: relative;
    background: #fff; /* Fundo da folha branco para desenhar */
    cursor: crosshair;
}

#drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.extra-content-overlay {
    position: absolute;
    bottom: 10%;
    left: 10%;
    z-index: 10;
    max-width: 600px;
    text-align: left;
}

.restricted-info-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.hooded-man-gif {
    width: 120px;
    image-rendering: pixelated;
    opacity: 0;
    object-fit: cover;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.extra-reveal-wrapper.flashlight-active .hooded-man-gif {
    opacity: 0.9;
}

/* A máscara que esconde a arte e é revelada pelo mouse */
.extra-mask {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 5;
    pointer-events: none;
    
    /* Inicialmente sem máscara (tudo escuro) */
    -webkit-mask-image: none;
    mask-image: none;
}

/* Ativado via JavaScript quando o usuário clica no trigger */
.extra-reveal-wrapper.flashlight-active .extra-mask {
    -webkit-mask-image: radial-gradient(
        circle 400px at var(--mouse-x, -500px) var(--mouse-y, -500px),
        transparent 0%,
        black 80%
    );
    mask-image: radial-gradient(
        circle 400px at var(--mouse-x, -500px) var(--mouse-y, -500px),
        transparent 0%,
        black 80%
    );
    mask-composite: intersect;
    -webkit-mask-composite: destination-in;
}

body.light-mode .extra-mask {
    display: none;
}

/* Wiki Specific Styles */
.wiki-wrapper {
    display: flex;
    min-height: 100vh;
    margin-top: 2px;
}

.wiki-sidebar {
    width: 280px;
    padding: 40px;
    border-right: 1px solid var(--card-border);
    position: sticky;
    top: 100px;
    height: calc(100vh - 100px);
    overflow-y: auto;
}

.wiki-sidebar h4 {
    font-family: 'Changa', sans-serif;
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.wiki-nav {
    list-style: none;
}

.wiki-nav li {
    margin-bottom: 12px;
}

.wiki-nav a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.9rem;
    transition: 0.3s;
}

.wiki-nav a:hover {
    color: var(--text-color);
    padding-left: 5px;
}

.wiki-nav a.active {
    color: var(--primary-color);
    padding-left: 10px;
    font-weight: 700;
    text-shadow: 0 0 8px var(--accent-glow);
}

/* Snake Game Styles */
.game-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 50000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(15px);
}

.game-window {
    background: #050505;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px var(--accent-glow);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Changa', monospace;
}

.game-header {
    background: var(--card-bg);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
}

.terminal-title {
    color: var(--primary-color);
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.close-btn {
    background: transparent;
    border: none;
    color: #ff0055;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Efeito de Tremida para o Jogo */
.game-window.shake-effect {
    animation: game-shake 0.15s ease-out;
}

@keyframes game-shake {
    0% { transform: translate(0); }
    25% { transform: translate(-3px, 0); }
    50% { transform: translate(3px, 0); }
    75% { transform: translate(-2px, 0); }
    100% { transform: translate(0); }
}

.game-body {
    padding: 20px;
    background: #000;
}

#snake-canvas {
    background: #020202;
    display: block;
    border: 1px solid #111;
    image-rendering: pixelated;
}

.game-footer {
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    color: var(--text-gray);
    font-size: 0.8rem;
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
}

#snake-score {
    color: #fff;
}

.game-hint {
    opacity: 0.6;
}

.wiki-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
    margin-bottom: 60px;
}

.wiki-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Telas Médias (Tablets e Laptops pequenos) */
@media (min-width: 769px) and (max-width: 1150px) {
    .contact-card {
        flex: 0 1 calc(50% - 20px); /* Ocupa metade da largura menos metade do gap */
    }
}