:root {
    --primary-red: #d11f26;
    --dark-bg: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
}

body {
    background-color: var(--dark-bg);
    background-image: url('img/maddor.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    margin: 0px;
    padding-bottom: 50px;
}

header {
    text-align: center;
    padding: 60px 20px;
}

.logo-header:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* LA MAGIA DEL GRID */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-red);
}

.card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #252525;
}

.card-content {
    padding: 20px;
}

.tag {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.7rem;
    padding: 4px 8px;
    background: #2ecc71;
    border-radius: 4px;
    text-transform: uppercase;
}

.tag.dev {
    background: #f39c12;
}

.tag.demo {
    background: #12bff3;
}

.contact-section {
    text-align: center;
    margin-top: 80px;
}

.contact-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 30px;
    background-color: var(--primary-red);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
}

section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

section h2 {
    margin-bottom: 20px;
    color: var(--text-white);
    border-left: 4px solid var(--primary-red);
    padding-left: 10px;
}

.hero {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: url('img/Portafolio.png') center/cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 7, 0.65);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.hero-text {
    max-width: 600px;
    text-align: left;
}

.hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 0px;

    /* 🔥 sombra pro */
    text-shadow: 0 0 10px rgba(117, 0, 0, 0.8),
                 0 0 20px rgba(207, 0, 0, 0.6);
}

.hero-text h2 {
    color: var(--primary-red);
    margin-bottom: 35px;

    text-shadow: 0 0 12px rgb(0, 0, 0);
}

.hero-text p {
    color: var(--text-white);
    line-height: 1.6;

    text-shadow: 0 0 100px rgb(0, 0, 0);
}

.hero-logo img {
    width: 160px;
    transition: transform 0.3s ease;
}

.hero-logo img:hover {
    transform: scale(1.40);
}

.btn {
    margin-top: 20px;
    padding: 10px 20px;
    border: 1px solid var(--primary-red);
    color: var(--text-white);
    text-decoration: none;
    transition: 0.3s;
}

.btn:hover {
    background: var(--primary-red);
}

.hero-logo img {
    width: 160px;
    transition: transform 2.3s ease, opacity 0.3s ease;
}

@media (min-width: 769px) {

    .hero-text {
        margin-left: 110px;   /* mueve el bloque completo */
        margin-top: 100px;   /* opcional si quieres subir/bajar */
    }

    .hero-logo {
        position: absolute;
        right: 0;
        top: 30px;
        left: 1070px;
    }

}

@media (max-width: 768px) {

    .hero {
        background: var(--dark-bg); /* sin imagen */
        height: auto;
        padding: 60px 20px;
        text-align: center;
        align-items: center;
    }

    .hero::before {
        display: none; /* elimina overlay */
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-logo img {
        width: 120px;
        margin-top: 20px;
        pointer-events: none; /* evita clicks raros en mobile */
    }

    section {
        margin: 40px auto;
        padding: 0 15px;
    }

    section h2 {
        font-size: 1.3rem;
    }

    .section-desc {
        font-size: 0.9rem;
        color: var(--text-gray);
    }

}
