:root {
    --cor-fundo: #0a0a0c;
    --cor-fundo2: #111116;
    --cor-texto: #f0ede8;
    --cor-muted: #7a7870;
    --cor-borda: #222228;
    --cor-cartao: #13131a;
    --cor-destaque: #00ffcc;
    --cor-destaque2: #00e6b8;
    --overlay-hero: rgba(10,10,12,0.6);
}

.modo-claro {
    --cor-fundo: #0d1117;
    --cor-fundo2: #161b22;
    --cor-texto: #cfd2d4;
    --cor-muted: #8b949e;
    --cor-borda: #30363d;
    --cor-cartao: #161b22;
    --cor-destaque: #00ffcc;
    --cor-destaque2: #00e6b8;
    --overlay-hero: rgba(13,17,23,0.6);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--cor-fundo);
    background-image: url("../IMGS/UI/Background.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    color: var(--cor-texto);
    font-family: 'DM Sans', Georgia, serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px; 
    z-index: 999;
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4rem; 
    
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--cor-borda);
    transition: background 0.3s;
}

.modo-claro .navbar { 
    background: rgba(244, 244, 240, 0.9); 
}

.nav-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: var(--cor-destaque);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.nav-logo:hover { 
    opacity: 0.75; 
}

.nav-links { 
    display: flex; 
    gap: 3rem; 
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: var(--cor-muted);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    padding: 0.5rem 0;
}
.nav-links a:hover, 
.nav-links a.active { 
    color: var(--cor-destaque); 
}

/* BOTÃO TEMA */
.botao-tema {
    background: transparent;
    border: 1px solid var(--cor-borda);
    color: var(--cor-muted);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.botao-tema:hover {
    border-color: var(--cor-destaque);
    color: var(--cor-destaque);
    background: rgba(0, 255, 204, 0.02);
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 3rem;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute; inset: 0;
    background: var(--overlay-hero);
    z-index: 1;
}

.hero-grid {
    position: absolute; inset: 0; z-index: 2;
    background-image:
        linear-gradient(rgba(0,255,204,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,204,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 25s linear infinite;
}
@keyframes gridMove {
    from { transform: translateY(0); }
    to   { transform: translateY(60px); }
}

/* LAYOUT HERO */
.hero-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    padding-top: 5rem;
}

/* CARD */
.hero-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: stretch;
    gap: 0;
    background: #0e0e14;
    border: 1px solid var(--cor-destaque);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 12px rgba(0,255,204,0.2),
        0 0 40px rgba(0,255,204,0.06),
        inset 0 0 30px rgba(0,255,204,0.02);
    animation: fadeUp 0.7s ease both;
    min-height: 260px;
}

.modo-claro .hero-card {
    background: #ffffff;
    box-shadow:
        0 0 12px rgba(0,168,150,0.2),
        0 0 40px rgba(0,168,150,0.06);
}

/* FOTO */
.hero-foto {
    width: 200px;
    height: 100%;
    object-fit: cover;
    display: block;
    border-right: 2px solid var(--cor-destaque);
    box-shadow: 4px 0 20px rgba(0,255,204,0.15);
    flex-shrink: 0;
}

.hero-foto-placeholder {
    width: 200px;
    height: 100%;
    border-right: 2px solid var(--cor-destaque);
    background: var(--cor-cartao);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--cor-destaque);
    flex-shrink: 0;
}

/* INFO */
.hero-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.8rem 1.6rem;
    gap: 0.6rem;
}

.hero-tag {
    display: inline-block;
    font-size: 0.62rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--cor-destaque);
    border: 1px solid rgba(0,255,204,0.3);
    padding: 0.25rem 0.7rem;
    border-radius: 2px;
    font-weight: 500;
    width: fit-content;
}

.hero-nome {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    line-height: 1;
    letter-spacing: 3px;
    white-space: nowrap;
}
.nome-destaque { color: var(--cor-destaque); }

.hero-sub {
    font-size: 0.82rem;
    color: var(--cor-muted);
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
}

.hero-btns {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.4rem;
}

/* BOTÃO */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.3rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 600;
    border-radius: 3px;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--cor-destaque);
    color: #0a0a0c;
    border: 1px solid var(--cor-destaque);
}
.btn-primary:hover {
    background: var(--cor-destaque2);
    border-color: var(--cor-destaque2);
    transform: translateY(-2px);
    box-shadow: 0 0 16px rgba(0,255,204,0.3);
}
.btn-outline {
    background: transparent;
    color: var(--cor-texto);
    border: 1px solid var(--cor-borda);
}
.btn-outline:hover {
    border-color: var(--cor-destaque);
    color: var(--cor-destaque);
    transform: translateY(-2px);
}

/* VÍDEO DIREITA */
.hero-video-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--cor-borda);
    animation: fadeUp 0.7s 0.2s ease both;
}

.hero-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0e0e14, #1a1a24);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video-placeholder span {
    font-size: 0.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(0,255,204,0.2);
    font-weight: 500;
}

/* SCROLL HINT */
.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 3.5rem; 
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 1.2rem; 
    color: var(--cor-muted);
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: fadeUp 0.6s 0.5s ease both, pulseScroll 2s infinite ease-in-out 1.5s;
}

.scroll-line {
    width: 50px;
    height: 1px;
    background: linear-gradient(to right, var(--cor-destaque), transparent); 
    transform-origin: left;
    animation: lineGrow 1.2s 1s ease both;
}

@keyframes lineGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes pulseScroll {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* SKILLS STRIP */
.skills-strip {
    overflow: hidden;
    border-top: 1px solid var(--cor-borda);
    border-bottom: 1px solid var(--cor-borda);
    background: rgba(10,10,12,0.7);
    backdrop-filter: blur(8px);
    padding: 1.2rem 0;
}
.modo-claro .skills-strip { background: rgba(244,244,240,0.8); }

.skills-track {
    display: flex;
    gap: 3rem;
    white-space: nowrap;
    animation: skillsScroll 30s linear infinite;
    width: max-content;
}

@keyframes skillsScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-25%); }
}

.skill-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cor-muted);
    font-weight: 500;
}
.skill-dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--cor-destaque);
    flex-shrink: 0;
}

/* SECÇÃO PROJETOS */
.seccao-projetos { padding: 7rem 4rem; }

.seccao-label {
    font-size: 0.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--cor-destaque);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.seccao-titulo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 3rem;
}

.projetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.projeto-card {
    background: var(--cor-cartao);
    border: 1px solid var(--cor-borda);
    border-radius: 12px; 
    overflow: hidden;
    text-decoration: none;
    color: var(--cor-texto);
    transition: all 0.3s;
    display: block;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.projeto-card:hover {
    border-color: var(--cor-destaque);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.08);
}

.projeto-card:hover .projeto-img img { transform: scale(1.06); }

/* CONTENTOR DA IMAGEM E VÍDEO */
.projeto-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--cor-fundo2);
    position: relative; 
}

.projeto-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

/* SUPORTE PARA VÍDEO EM HOVER */
.projeto-img .projeto-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; 
}

.projeto-card:hover .projeto-video {
    opacity: 1;
}

.projeto-img-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #111116, #1a1a24);
    color: var(--cor-muted);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.projeto-info { padding: 1.4rem; }

.projeto-genre {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cor-destaque);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.projeto-nome {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.projeto-desc {
    font-size: 0.85rem;
    color: var(--cor-muted);
    line-height: 1.6;
    font-weight: 300;
}

/* SECÇÃO CONTATOS */
.seccao-contacto {
    padding: 6rem 2rem; 
    text-align: center;
    background: rgba(10,10,12,0.5);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--cor-borda);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.modo-claro .seccao-contacto { background: rgba(244,244,240,0.6); }

.seccao-contacto .seccao-label {
    margin-bottom: 0.5rem;
}

.seccao-contacto .seccao-titulo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 6vw, 4.5rem); 
    letter-spacing: 3px;
    line-height: 1.1;
    margin-bottom: 2rem; 
}

.contacto-email {
    font-family: 'DM Sans', sans-serif; 
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--cor-destaque);
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(0, 255, 204, 0.15);
    border-radius: 4px;
    background: rgba(0, 255, 204, 0.02);
    transition: all 0.2s ease;
    margin-bottom: 2.5rem; 
}
.contacto-email:hover {
    color: #0a0a0c;
    background: var(--cor-destaque);
    border-color: var(--cor-destaque);
    box-shadow: 0 0 20px rgba(0,255,204,0.3);
    transform: translateY(-2px);
}
.modo-claro .contacto-email:hover { color: #ffffff; }

.social-links {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}
.social-links a {
    color: var(--cor-muted);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid var(--cor-borda);
    padding: 0.6rem 1.4rem;
    border-radius: 4px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.2s ease;
}
.social-links a:hover {
    color: var(--cor-destaque);
    border-color: var(--cor-destaque);
    background: rgba(0, 255, 204, 0.04);
    box-shadow: 0 0 15px rgba(0,255,204,0.1);
    transform: translateY(-2px);
}

/* FOOTER */
.rodape {
    padding: 1.5rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--cor-borda);
    font-size: 0.75rem;
    color: var(--cor-muted);
    background: rgba(10,10,12,0.7);
    backdrop-filter: blur(8px);
}
.modo-claro .rodape { background: rgba(244,244,240,0.8); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVO */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-video-wrap { display: none; }
    .hero-card { max-width: 600px; }
}

@media (max-width: 768px) {
    /* NAVBAR */
    .navbar {
        padding: 0 1.2rem;
        height: auto;
        flex-wrap: wrap;
        gap: 0;
        padding: 0.8rem 1.2rem;
    }
    .nav-logo {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
        flex: 1;
    }
    .botao-tema {
        font-size: 0.6rem;
        padding: 0.3rem 0.7rem;
    }
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
        padding: 0.6rem 0;
        border-top: 1px solid var(--cor-borda);
        margin-top: 0.4rem;
    }
    .nav-links a { font-size: 0.72rem; letter-spacing: 1.5px; }

    /* HERO */
    .hero { padding: 0 1.2rem; }
    .hero-inner { padding-top: 7rem; }
    .hero-card {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .hero-foto, .hero-foto-placeholder {
        width: 100%;
        height: 220px;
        border-right: none;
        border-bottom: 2px solid var(--cor-destaque);
        border-radius: 0;
    }
    .hero-info {
        padding: 1.4rem;
    }
    .hero-nome { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; align-items: center; }
    .scroll-hint { left: 1.2rem; bottom: 1rem; }

    /* SKILLS */
    .skills-strip { padding: 1rem 0; }

    /* PROJETOS */
    .seccao-projetos { padding: 3rem 1.2rem; }
    .seccao-titulo { font-size: 2rem; margin-bottom: 1.5rem; }
    .projetos-grid { grid-template-columns: 1fr; gap: 1rem; }

    /* CONTACTO */
    .seccao-contacto { padding: 3rem 1.2rem; }
    .seccao-contacto .seccao-titulo { font-size: 2rem; }

    /* FOOTER */
    .rodape {
        padding: 1.2rem 1.5rem;
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
    }
}