* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
}

h1, h2 {
    font-weight: 700;
}

p {
    margin-top: 30px;
    font-size: 1.35rem;
    color: #e2e8f0;

}

section {
    padding: 80px 10%;
    text-align: center;
}

.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    background: url("background-header.png") center/cover no-repeat;
    overflow: hidden;
}

/* camada escura para suavizar a imagem */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 0.85),
        rgba(15, 23, 42, 0.65)
    );
}

/* conteúdo central */
.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    width: 80%;
    max-width: 1200px;
}

/* texto */
.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.1;
    background: linear-gradient(90deg, #38bdf8, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text h2 {
    margin-top: 20px;
    font-size: 1.6rem;
    color: #cbd5e1;
}

.hero-text p {
    margin-top: 30px;
    font-size: 1.35rem;
    color: #e2e8f0;
    max-width: 550px;
}

/* foto menor ao lado */
.hero-photo img {
    width: 320px;
    height: auto;
    object-fit: cover;
    transition: 0.4s ease;
}
.hero-photo img:hover {
    transform: scale(1.03);
}

/* indicador de scroll */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator span {
    display: block;
    width: 2px;
    height: 35px;
    background: #38bdf8;
    animation: scroll 1.5s infinite;
    opacity: 0.7;
}

@keyframes scroll {
    0% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(10px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 0.7; }
}

.hero-chart {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.12;
    pointer-events: none;
}

/* animação da linha */
.chart-line {
    stroke-width: 1.2; /* bem mais fino */
    stroke-linecap: round;
    stroke-linejoin: round;

    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;

    animation: drawLine 6s ease forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.chart-line-up,
.chart-line-down {
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawLine 5s ease forwards, floatLine 6s ease-in-out 5s infinite alternate;
    opacity: 0.12;
}

@keyframes floatLine {
    from { transform: translateY(0px); }
    to { transform: translateY(-6px); }
}


@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}


.hero h1 {
    font-size: 3rem;
}

.hero h2 {
    font-size: 1.5rem;
    margin: 10px 0;
    color: #38bdf8;
}

.hero p {
    max-width: 600px;
    margin: 20px auto;
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: #38bdf8;
    color: #0f172a;
    text-decoration: none;
    border-radius: 30px;
    transition: 0.3s ease;
    font-weight: bold;
}

.btn:hover {
    background: #0ea5e9;
    transform: scale(1.05);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.skill-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    transition: 0.3s ease;
}

.skill-card:hover {
    background: #334155;
    transform: translateY(-5px);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.portfolio-item {
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s ease;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portfolio-item:hover {
    background: #475569;
    transform: scale(1.03);
}

.contact {
    background: #1e293b;
}

footer {
    padding: 20px;
    text-align: center;
    background: #0f172a;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ANIMAÇÃO */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}



@media (max-width: 768px) {

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item {
        height: 250px;
    }

    /* HERO menor */
    .hero {
        height: auto;
        padding: 60px 20px;
    }

    /* Empilhar conteúdo */
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        width: 100%;
    }

    /* Reduzir tamanho dos textos */
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text h2 {
        font-size: 1.2rem;
    }

    .hero-text p {
        font-size: 1rem;
        margin-top: 15px;
    }

    /* Reduzir foto */
    .hero-photo img {
        width: 180px;
    }

    /* Reduzir um pouco o gráfico animado */
    .hero-chart {
        opacity: 0.08;
    }
}