* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary: #1abc9c;
    --secondary: #2c3e50;
    --bg: #111;
    --text: #f4f4f4;
    --radius: 12px;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.8);
}

body {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('imagens/banner.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(26, 188, 156, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(26, 188, 156, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(26, 188, 156, 0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(10deg) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
    }
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes ripple {
    to {
        width: 300px;
        height: 300px;
    }
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background: rgba(20, 20, 20, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: slideInFromLeft 0.8s ease-out;
}

header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), #16a085, var(--primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

header nav {
    display: flex;
    gap: 20px;
}

header nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 5px 0;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

header nav a:hover::after,
header nav a.active::after {
    width: 100%;
}

header nav a:hover,
header nav a.active {
    color: var(--primary);
}

#menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#menu-toggle:hover {
    transform: rotate(90deg);
}

.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 0 20px;
    animation: fadeIn 1s ease-out;
}

.hero-content {
    max-width: 1000px;
}

.hero h1 {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    animation: slideInFromRight 1s ease-out 0.3s both;
}

.hero h1 span {
    color: var(--primary);
    animation: pulse 2s infinite;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin: 20px 0 30px;
    animation: fadeIn 1s ease-out 0.6s both;
}

.btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary), #16a085);
    color: #fff;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    display: inline-block;
    animation: fadeIn 1s ease-out 0.9s both;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #16a085, var(--primary));
}

.btn:active {
    transform: translateY(-1px);
}

.portfolio,
.jogos-hero,
.certificados-hero,
.sites-hero {
    padding: 120px 50px 50px;
    text-align: center;
    min-height: 100vh;
}

.portfolio h2,
.jogos-hero h1,
.certificados-hero h1,
.sites-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 50px;
    color: var(--primary);
    animation: slideInFromLeft 1s ease-out;
}

.projects,
.jogos-container,
.certificados-container,
.sites-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1000px;
}

.project-card,
.jogo-card,
.certificado-card,
.site-card {
    background: rgba(20, 20, 20, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    animation: cardEntrance 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.project-card:nth-child(1),
.jogo-card:nth-child(1),
.certificado-card:nth-child(1),
.site-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2),
.jogo-card:nth-child(2),
.certificado-card:nth-child(2),
.site-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3),
.jogo-card:nth-child(3),
.certificado-card:nth-child(3),
.site-card:nth-child(3) {
    animation-delay: 0.3s;
}

.project-card:nth-child(4),
.jogo-card:nth-child(4),
.certificado-card:nth-child(4),
.site-card:nth-child(4) {
    animation-delay: 0.4s;
}

.project-card:hover,
.jogo-card:hover,
.certificado-card:hover,
.site-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

.project-card img,
.jogo-card img,
.certificado-card img,
.site-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: brightness(0.8);
    transition: all 0.6s ease;
}

.project-card:hover img,
.jogo-card:hover img,
.certificado-card:hover img,
.site-card:hover img {
    transform: scale(1.1);
    filter: brightness(1);
}

.project-card h3,
.jogo-card h2,
.certificado-card h2,
.site-card h2 {
    padding: 15px 15px 5px;
    font-size: 1.3rem;
    color: var(--primary);
    transition: color 0.3s ease;
}

.project-card:hover h3,
.jogo-card:hover h2,
.certificado-card:hover h2,
.site-card:hover h2 {
    color: #fff;
}

.project-card p,
.jogo-card p,
.certificado-card p,
.site-card p {
    padding: 0 15px 15px;
    font-size: 0.95rem;
    color: #ccc;
}

.apps {
    padding: 120px 50px 60px;
    text-align: center;
    background: linear-gradient(180deg, #0a0a0a, #111);
}

.apps h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--primary);
    margin-bottom: 15px;
}

.apps>p {
    color: #aaa;
    margin-bottom: 50px;
    font-size: 1rem;
}

.apps {
    display: block;
}

.apps .program {
    max-width: 1100px;
    margin: 0 auto 30px;
    padding: 25px;
    background: rgba(20, 20, 20, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(26, 188, 156, 0.2);
    text-align: left;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.apps .program:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    border-color: var(--primary);
}

.program h2 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.program p {
    color: #ccc;
    font-size: 0.95rem;
    margin: 4px 0;
}

.program p:nth-child(3) {
    color: #fff;
    font-weight: 500;
}

.program p:nth-child(4) {
    color: #f1c40f;
}

.program p:last-child {
    color: var(--primary);
    font-weight: 600;
}

footer {
    background: var(--secondary);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    animation: fadeIn 1s ease-out;
}

footer .socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

footer .socials a {
    color: #fff;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

footer .socials a:hover {
    color: var(--primary);
    transform: translateY(-5px) scale(1.2);
}

.sobre-hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 20px 60px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('imagens/banner.png') no-repeat center center/cover;
}

.sobre-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
    max-width: 1000px;
    background: rgba(20, 20, 20, 0.85);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    animation: fadeIn 1s ease-out;
}

.perfil-foto {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: float 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.perfil-foto:hover {
    transform: scale(1.05);
    animation-play-state: paused;
}

.sobre-texto {
    flex: 1;
    min-width: 300px;
    animation: slideInFromRight 1s ease-out 0.3s both;
}

.sobre-texto h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.sobre-texto p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #ddd;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.sobre-texto p:nth-child(2) {
    animation-delay: 0.5s;
}

.sobre-texto p:nth-child(3) {
    animation-delay: 0.7s;
}

.sobre-texto p:nth-child(4) {
    animation-delay: 0.9s;
}

.jogo-card {
    background: linear-gradient(145deg, #2c2c3e, #232333);
    position: relative;
    overflow: hidden;
}

.jogo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(26, 188, 156, 0.1), transparent);
    transition: left 0.6s ease;
}

.jogo-card:hover::before {
    left: 100%;
}

.jogo-card:hover {
    transform: translateY(-15px) scale(1.05) rotateY(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(26, 188, 156, 0.3);
}

.jogo-card.loading {
    background: linear-gradient(90deg, #2c2c3e 25%, #3a3a4e 50%, #2c2c3e 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.certificado-card a,
.site-links a {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), #16a085);
    color: #fff;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 10px;
}

.certificado-card a:hover,
.site-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.site-links {
    display: flex;
    gap: 10px;
    padding: 0 15px 20px;
    justify-content: center;
}

.site-links a.secondary {
    background: transparent;
    border: 2px solid var(--primary);
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.certificados-hero {
    background: radial-gradient(circle at top, #1a1a1a, #000);
}

.certificado-card {
    background: linear-gradient(160deg, #1b1b1b, #0e0e0e);
    border-radius: 16px;
    border: 1px solid rgba(26, 188, 156, 0.25);
    position: relative;
    overflow: hidden;
}

.certificado-card::after {
    content: "CERTIFICADO";
    position: absolute;
    top: 18px;
    right: -45px;
    transform: rotate(45deg);
    background: var(--primary);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 6px 50px;
    letter-spacing: 1px;
}

.certificado-card img {
    height: 170px;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.85);
    transition: all 0.5s ease;
}

.certificado-card:hover img {
    filter: grayscale(0) brightness(1);
    transform: scale(1.05);
}

.certificado-card h2 {
    font-size: 1.2rem;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.certificado-card p {
    font-size: 0.9rem;
    color: #bbb;
    line-height: 1.4;
}

.certificado-card a {
    margin: 15px auto 20px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.certificado-card a:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px rgba(26, 188, 156, 0.5);
}

.sites-hero {
    background: linear-gradient(180deg, #050505, #111);
}

.site-card {
    background: #0b0b0b;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
            transparent,
            rgba(26, 188, 156, 0.18),
            transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.site-card:hover::before {
    opacity: 1;
}

.site-card img {
    height: 230px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.site-card:hover img {
    transform: scale(1.08);
}

.site-card h2 {
    font-size: 1.45rem;
    padding-top: 10px;
}

.site-card p {
    font-size: 0.95rem;
    color: #aaa;
}

.site-links {
    display: flex;
    gap: 12px;
    padding: 0 20px 25px;
    z-index: 2;
    position: relative;
    justify-content: center;
}

.site-links a {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 0.9rem;
}

.site-links a.primary {
    background: linear-gradient(135deg, var(--primary), #16a085);
    color: #000;
    font-weight: 700;
}

.site-links a.secondary {
    background: transparent;
    border: 2px solid #333;
    color: #eee;
}

.site-links a.secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.certificados-container,
.sites-container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    header nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 15px;
        flex-direction: column;
        background: rgba(20, 20, 20, 0.98);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    header nav.active {
        display: flex;
    }

    #menu-toggle {
        display: block;
    }

    .hero,
    .portfolio,
    .jogos-hero,
    .certificados-hero,
    .sites-hero {
        padding: 100px 20px 40px;
    }

    .sobre-container {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 30px;
    }

    .perfil-foto {
        width: 180px;
        height: 180px;
    }

    .projects,
    .jogos-container,
    .certificados-container,
    .sites-container {
        grid-template-columns: 1fr;
    }

    .apps {
        display: grid;
        grid-template-columns: 1fr;
    }

    .apps .program {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px 30px;
        align-items: center;
    }

    .program h2 {
        grid-column: span 2;
    }

    .program p {
        margin: 2px 0;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .sobre-texto h1 {
        font-size: 2rem;
    }

    .apps {
        padding: 100px 20px 40px;
    }

    .apps .program {
        padding: 20px;
    }

    .program h2 {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}