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

:root {
    --primary: #00ff88;
    --secondary: #00bfff;
    --accent: #ff006e;
    --dark: #0a0e27;
    --darker: #050816;
    --light: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        sans-serif;
    background: var(--darker);
    color: var(--light);
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

.bg-animation::before,
.bg-animation::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s infinite ease-in-out;
}

.bg-animation::before {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.bg-animation::after {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(100px, -100px) scale(1.1);
    }
    66% {
        transform: translate(-100px, 100px) scale(0.9);
    }
}

/* Grid Pattern Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
            rgba(0, 255, 136, 0.03) 1px,
            transparent 1px
        ),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* Custom Cursor */
#cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.15s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

#cursor.active {
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 136, 0.2);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 0;
    background: rgba(5, 8, 22, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 15px 0;
    background: rgba(5, 8, 22, 0.95);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
    text-decoration: none;
    position: relative;
    letter-spacing: -1px;
    cursor: pointer;
}

.logo::after {
    content: '_';
    color: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

nav a {
    margin-left: 40px;
    color: var(--light);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
    letter-spacing: 0.5px;
    cursor: pointer;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    position: relative;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.avatar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 50px;
}

.avatar-wrapper::before {
    content: '';
    position: absolute;
    inset: -15px;
    background: linear-gradient(
        45deg,
        var(--primary),
        var(--secondary),
        var(--accent)
    );
    border-radius: 50%;
    animation: rotate 4s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--darker);
}

.code-display {
    background: rgba(10, 14, 39, 0.8);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 15px;
    padding: 40px;
    margin: 40px auto;
    max-width: 800px;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.1);
}

.code-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(0, 255, 136, 0.05);
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.code-display::after {
    content: '● ● ●';
    position: absolute;
    top: 12px;
    left: 20px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    letter-spacing: 5px;
}

.code-text {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    line-height: 1.8;
    margin-top: 30px;
}

.keyword {
    color: #ff79c6;
}
.function {
    color: #50fa7b;
}
.string {
    color: #f1fa8c;
}
.comment {
    color: #6272a4;
    font-style: italic;
}
.variable {
    color: #8be9fd;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 30px 0 50px;
    font-family: 'Courier New', monospace;
}

.cta-button {
    display: inline-block;
    padding: 18px 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--darker);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
    cursor: pointer;
    border: none;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
}

/* Section */
.section {
    padding: 120px 0;
}

.section-title {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: rgba(10, 14, 39, 0.6);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.project-card:hover::before {
    opacity: 0.1;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.2);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    /* margin-bottom: 60px; */
}

.project-image img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    padding: 1rem;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.15);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-tech {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(0, 255, 136, 0.2);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--primary);
}

.project-content {
    padding: 30px;
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--light);
    font-weight: 700;
}

.project-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Project Detail Page */
.project-detail {
    padding: 140px 0 80px;
    min-height: 100vh;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.back-button:hover {
    gap: 15px;
}

.project-header {
    margin-bottom: 60px;
}

.project-header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.meta-item i {
    color: var(--primary);
}

.container_img-project {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 60px;
}

.project-hero-image {
    max-width: 100%;
    height: auto;
    width: clamp(250px, 50%, 400px);
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.container_img-project.desktop-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px; /* limita o tamanho máximo da imagem */
    margin-bottom: 60px;
}

.container_img-project.desktop-image img.project-hero-image {
    width: 100%; /* ocupa todo o container */
    height: auto; /* mantém proporção */
    border-radius: 12px; /* opcional, deixa com cantos arredondados */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* opcional, sombra leve */
}

.project-section {
    margin-bottom: 60px;
}

.project-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.project-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: rgba(10, 14, 39, 0.6);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-card p {
    font-size: 0.95rem;
    margin: 0;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.gallery-item {
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.tech-stack {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tech-stack .tech-tag {
    font-size: 0.9rem;
    padding: 8px 18px;
}

.project-links {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--primary);
    color: var(--darker);
    transform: translateY(-3px);
}

/* Contact Section */
.contact-section {
    background: rgba(10, 14, 39, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 100px 0;
}

.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 30px;
}

.form-control {
    width: 100%;
    padding: 18px 25px;
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--light);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--darker);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.3);
}

/* Footer */
footer {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--light);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-links a:hover {
    background: var(--primary);
    color: var(--darker);
    transform: translateY(-5px) rotate(360deg);
    border-color: var(--primary);
}

.copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* Hide/Show Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Responsive */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 2.8rem;
    }

    .code-text {
        font-size: 1.1rem;
    }

    .hero-section {
        padding: 100px 0 60px;
    }

    .contact-section {
        padding: 80px 0;
    }

    .project-detail {
        padding: 120px 0 60px;
    }

    .project-header h1 {
        font-size: 2.5rem;
    }

    .project-hero-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    header {
        padding: 20px 0;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    nav {
        display: flex;
        gap: 10px;
    }

    nav a {
        margin: 0;
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 50px;
    }

    .section-title::after {
        width: 60px;
    }

    .hero-section {
        padding: 140px 0 60px;
        min-height: auto;
    }

    .avatar-wrapper {
        width: 150px;
        height: 150px;
        margin-bottom: 30px;
    }

    .avatar-wrapper::before {
        inset: -10px;
    }

    .code-display {
        padding: 25px 20px;
        margin: 30px auto;
    }

    .code-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin: 20px 0 35px;
    }

    .cta-button {
        padding: 15px 40px;
        font-size: 0.9rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-card {
        border-radius: 15px;
    }

    .project-image {
        height: 220px;
    }

    .project-content {
        padding: 25px 20px;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 15px 20px;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 18px;
        font-size: 1rem;
    }

    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    footer {
        padding: 50px 0;
    }

    #cursor {
        display: none;
    }

    .project-header h1 {
        font-size: 2rem;
    }

    .project-hero-image {
        height: 250px;
    }

    .project-section h2 {
        font-size: 1.6rem;
    }

    .project-section p {
        font-size: 1rem;
    }

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

    .project-links {
        flex-direction: column;
    }

    .project-link {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    nav a {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .code-display {
        padding: 20px 15px;
    }

    .code-text {
        font-size: 0.75rem;
        line-height: 1.5;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .cta-button {
        padding: 14px 35px;
        font-size: 0.85rem;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .tech-tag {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .bg-animation::before,
    .bg-animation::after {
        filter: blur(60px);
    }

    .project-header h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 360px) {
    .section-title {
        font-size: 1.5rem;
    }

    .code-text {
        font-size: 0.7rem;
    }

    .avatar-wrapper {
        width: 120px;
        height: 120px;
    }
}
