/* =========================================================
   RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #080808;
    color: #f5f5f5;
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

.container {
    width: min(1180px, 90%);
    margin: 0 auto;
}


/* =========================================================
   VARIABLES
========================================================= */

:root {
    --background: #080808;
    --background-2: #0d0d0d;
    --card: #111111;
    --card-hover: #151515;

    --white: #ffffff;
    --text: #e7e7e7;
    --muted: #888888;

    --accent: #7c3aed;
    --accent-light: #9b65ff;

    --border: rgba(255, 255, 255, 0.09);

    --radius: 16px;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;

    z-index: 1000;

    background: rgba(8, 8, 8, 0.75);

    backdrop-filter: blur(15px);

    border-bottom: 1px solid transparent;

    transition: 0.3s ease;
}

.navbar.scrolled {
    border-bottom-color: var(--border);
}

.nav-container {
    height: 80px;

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

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    display: block;
    width: auto;
    height: 75px;
    max-width: 280px;
    object-fit: contain;
}

.footer-container .logo img {
    height: 38px;
}


/* ================= NAV MENU ================= */

.nav-menu {
    display: flex;
    align-items: center;

    gap: 34px;
}

.nav-menu a {
    position: relative;

    color: #888;

    font-size: 14px;
    font-weight: 500;

    transition: 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: white;
}

.nav-menu a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -8px;

    width: 0;
    height: 2px;

    background: var(--accent-light);

    transition: 0.25s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}


/* =========================================================
   BOTÓN HAMBURGUESA
========================================================= */

.menu-button {
    display: none;

    position: relative;

    width: 42px;
    height: 42px;

    padding: 0;
    margin: 0;

    border: none;

    background: transparent;

    cursor: pointer;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    z-index: 1001;
}

.menu-button span {
    display: block;

    width: 26px;
    height: 2px;

    background: #ffffff;

    border-radius: 10px;

    transform-origin: center;

    transition:
        transform 0.3s ease,
        opacity 0.2s ease,
        width 0.3s ease;
}


/* ================= HAMBURGUESA → X ================= */

.menu-button.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-button.open span:nth-child(2) {
    opacity: 0;

    width: 0;
}

.menu-button.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 100vh;

    position: relative;

    display: flex;
    align-items: center;

    overflow: hidden;
}

.hero-background {
    position: absolute;

    width: 600px;
    height: 600px;

    right: -150px;
    top: 50%;

    transform: translateY(-50%);

    background: var(--accent);

    filter: blur(180px);

    opacity: 0.12;

    pointer-events: none;
}

.hero-container {
    display: grid;

    grid-template-columns: 1.05fr 0.95fr;

    gap: 70px;

    align-items: center;
}

.hero-small {
    margin-bottom: 15px;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 4px;

    color: var(--accent-light);
}

.hero h1 {
    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(55px, 7vw, 92px);

    line-height: 0.95;

    letter-spacing: -5px;
}

.hero h1 span {
    display: block;

    color: var(--accent-light);
}

.hero h2 {
    margin-top: 25px;

    color: #d0d0d0;

    font-size: 25px;
    font-weight: 500;
}

.hero-description {
    max-width: 580px;

    margin-top: 22px;

    color: var(--muted);

    line-height: 1.8;

    font-size: 16px;
}

.status {
    display: inline-flex;
    align-items: center;

    gap: 9px;

    margin-bottom: 35px;

    padding: 8px 13px;

    border: 1px solid var(--border);

    border-radius: 100px;

    background: rgba(255, 255, 255, 0.025);

    color: #aaa;

    font-size: 12px;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #50d890;

    box-shadow: 0 0 12px #50d890;
}

.hero-buttons {
    display: flex;

    gap: 12px;

    margin-top: 35px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 15px;

    padding: 14px 23px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    transition: 0.3s ease;
}

.btn-primary {
    background: white;

    color: black;
}

.btn-primary:hover {
    transform: translateY(-3px);

    background: var(--accent-light);

    color: white;
}

.btn-secondary {
    border: 1px solid var(--border);

    color: white;
}

.btn-secondary:hover {
    background: white;

    color: black;
}

.hero-socials {
    display: flex;

    gap: 25px;

    margin-top: 35px;

    color: #777;

    font-size: 13px;
}

.hero-socials a:hover {
    color: white;
}


/* =========================================================
   CODE WINDOW
========================================================= */

.code-window {
    position: relative;

    width: 100%;

    background: #0d0d0d;

    border: 1px solid var(--border);

    border-radius: 13px;

    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(124, 58, 237, 0.08);

    transform: perspective(1000px) rotateY(-5deg);

    transition: 0.5s ease;
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0);
}

.window-top {
    height: 45px;

    display: flex;
    align-items: center;

    padding: 0 17px;

    border-bottom: 1px solid var(--border);
}

.window-buttons {
    display: flex;

    gap: 6px;

    width: 100px;
}

.window-buttons span {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #333;
}

.window-top p {
    color: #555;

    font-size: 12px;
}

.code-content {
    padding: 30px;

    font-family: "Courier New", monospace;

    color: #bbb;

    font-size: 13px;

    line-height: 2;
}

.indent {
    padding-left: 25px;
}

.purple {
    color: #b889ff;
}

.blue {
    color: #70b8ff;
}

.green {
    color: #72d6a0;
}

.cursor {
    display: inline-block;

    width: 7px;
    height: 15px;

    margin-left: 2px;

    vertical-align: middle;

    background: var(--accent-light);
}

.scroll-indicator {
    position: absolute;

    bottom: 30px;
    left: 50%;

    transform: translateX(-50%);

    color: #555;

    font-size: 10px;

    letter-spacing: 2px;

    text-transform: uppercase;
}

.scroll-indicator span {
    display: block;

    width: 1px;
    height: 30px;

    margin: 0 auto 8px;

    background: #555;
}


/* =========================================================
   SECTIONS
========================================================= */

.section {
    padding: 130px 0;
}

.section-header {
    margin-bottom: 70px;
}

.section-number {
    margin-bottom: 18px;

    color: var(--accent-light);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 3px;
}

.section-header h2 {
    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(40px, 5vw, 65px);

    line-height: 1.05;

    letter-spacing: -3px;
}

.section-header h2 span {
    color: #555;
}


/* =========================================================
   ABOUT
========================================================= */

.about-grid {
    display: grid;

    grid-template-columns: 1.2fr 0.8fr;

    gap: 100px;
}

.about-text {
    color: #999;

    font-size: 16px;

    line-height: 1.9;
}

.about-text p + p {
    margin-top: 20px;
}

.about-text .lead {
    color: white;

    font-size: 22px;

    line-height: 1.5;
}

.about-stats {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 1px;

    background: var(--border);

    border: 1px solid var(--border);
}

.stat {
    min-height: 160px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 30px;

    background: var(--background);
}

.stat strong {
    font-family: "Space Grotesk", sans-serif;

    font-size: 27px;
}

.stat span {
    margin-top: 7px;

    color: #666;

    font-size: 12px;
}


/* =========================================================
   SKILLS
========================================================= */

.skills-section {
    background: #0b0b0b;
}

.skills-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 15px;
}

.skill-card {
    padding: 35px 28px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition: 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-7px);

    background: var(--card-hover);

    border-color: rgba(155, 101, 255, 0.3);
}

.skill-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    margin-bottom: 30px;

    border: 1px solid var(--border);

    border-radius: 8px;

    color: var(--accent-light);

    font-size: 11px;
    font-weight: 700;
}

.skill-card h3 {
    font-family: "Space Grotesk", sans-serif;

    font-size: 20px;
}

.skill-card p {
    min-height: 80px;

    margin-top: 15px;

    color: #777;

    font-size: 13px;

    line-height: 1.7;
}

.skill-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 25px;
}

.skill-tags span,
.project-tech span {
    padding: 6px 9px;

    border: 1px solid var(--border);

    border-radius: 5px;

    color: #888;

    font-size: 10px;
}

.tech-list {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 30px;

    margin-top: 70px;

    color: #555;

    font-family: "Space Grotesk", sans-serif;

    font-size: 13px;
}


/* =========================================================
   PROJECTS
========================================================= */

.projects-header {
    display: flex;

    justify-content: space-between;

    align-items: end;

    gap: 50px;
}

.projects-intro {
    max-width: 300px;

    color: #777;

    line-height: 1.7;

    font-size: 13px;
}

.projects-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}


/* Hace que cada tarjeta de proyecto sea un enlace completo */
.project-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
    cursor: pointer;
}

.project-card-link:focus-visible {
    outline: 2px solid var(--accent, #a855f7);
    outline-offset: 5px;
    border-radius: 12px;
}

.project-card-link .project-card {
    height: 100%;
}

.project-card {
    overflow: hidden;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition: 0.35s ease;
}

.project-card:hover {
    transform: translateY(-8px);

    border-color: rgba(155, 101, 255, 0.3);
}

.project-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
}

.project-card-peluqueria {
    margin-top: 20px;
}

.project-image {
    position: relative;

    min-height: 300px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 50%,
            rgba(124, 58, 237, 0.18),
            transparent 60%
        ),
        #0c0c0c;
}

.project-real-image {
    position: absolute;

    width: 82%;
    height: 78%;

    left: 50%;
    top: 55%;

    transform: translate(-50%, -50%);

    object-fit: cover;

    border: 1px solid #252525;

    border-radius: 8px;

    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(124, 58, 237, 0.08);

    transition: 0.5s ease;
}

.project-card:hover .project-real-image {
    transform: translate(-50%, -50%) scale(1.03);
}

.project-overlay {
    position: absolute;

    z-index: 2;

    top: 20px;
    left: 20px;
    right: 20px;

    display: flex;

    justify-content: space-between;

    color: #666;

    font-size: 9px;

    letter-spacing: 2px;
}

.project-info {
    padding: 35px;
}

.project-category {
    color: var(--accent-light);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 2px;
}

.project-info h3 {
    margin-top: 12px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 25px;
}

.project-info > p:not(.project-category) {
    margin-top: 12px;

    color: #777;

    font-size: 13px;

    line-height: 1.7;
}

.project-tech {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: 25px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.25s ease;
}

.project-preview-note {
    margin-top: 28px !important;
    color: var(--accent-light) !important;
    font-size: 12px !important;
    font-weight: 600;
}

.project-link:hover {
    color: var(--accent-light);
}


/* =========================================================
   SERVICES
========================================================= */

.services-section {
    background: #0b0b0b;
}

.services-list {
    border-top: 1px solid var(--border);
}

.service {
    display: grid;

    grid-template-columns: 80px 1fr 50px;

    align-items: center;

    gap: 30px;

    padding: 30px 10px;

    border-bottom: 1px solid var(--border);

    transition: 0.3s ease;
}

.service:hover {
    padding-left: 20px;
    padding-right: 20px;

    background: rgba(255, 255, 255, 0.015);
}

.service-number {
    color: #555;

    font-family: "Space Grotesk", sans-serif;

    font-size: 12px;
}

.service h3 {
    font-family: "Space Grotesk", sans-serif;

    font-size: 22px;
}

.service p {
    max-width: 600px;

    margin-top: 7px;

    color: #666;

    font-size: 13px;

    line-height: 1.6;
}

.service-arrow {
    position: relative;
    display: block;
    width: 22px;
    height: 22px;
    color: var(--accent-light);
}

/* Flechas dibujadas con CSS: se ven igual en PC y móvil, sin emojis */
.service-arrow::before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    top: 3px;
    right: 3px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.service-arrow::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 2px;
    top: 10px;
    left: 2px;
    background: currentColor;
    transform: rotate(-45deg);
    transform-origin: center;
}

.arrow-icon {
    position: relative;
    display: inline-block;
    width: 17px;
    height: 14px;
    flex: 0 0 17px;
    vertical-align: middle;
}

.arrow-icon::before {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    top: 2px;
    right: 1px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}

.arrow-icon::after {
    content: "";
    position: absolute;
    height: 2px;
    width: 14px;
    left: 1px;
    top: 6px;
    background: currentColor;
}


/* =========================================================
   CONTACT
========================================================= */

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

.contact-box {
    position: relative;

    overflow: hidden;

    padding: 90px 70px;

    background:
        radial-gradient(
            circle at 80% 50%,
            rgba(124, 58, 237, 0.2),
            transparent 45%
        ),
        #101010;

    border: 1px solid var(--border);

    border-radius: 20px;
}

.contact-box h2 {
    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(45px, 6vw, 75px);

    line-height: 1;

    letter-spacing: -4px;
}

.contact-box h2 span {
    color: var(--accent-light);
}

.contact-box > p:not(.section-number) {
    max-width: 500px;

    margin-top: 25px;

    color: #777;

    line-height: 1.7;
}

.contact-button {
    margin-top: 35px;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    padding: 40px 0;

    border-top: 1px solid var(--border);
}

.footer-container {
    display: flex;

    align-items: center;

    justify-content: space-between;
}

.footer-container > div:first-child p {
    margin-top: 7px;

    color: #555;

    font-size: 11px;
}

.footer-links {
    display: flex;

    gap: 25px;

    color: #666;

    font-size: 12px;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    color: #444;

    font-size: 11px;
}


/* =========================================================
   ANIMATIONS
========================================================= */

.hero-content,
.hero-code {
    animation: fadeUp 0.9s ease forwards;
}

.hero-code {
    animation-delay: 0.15s;

    opacity: 0;
}

@keyframes fadeUp {

    from {
        opacity: 0;

        transform: translateY(25px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }

}

.reveal {
    opacity: 0;

    transform: translateY(35px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   RESPONSIVE - TABLET
========================================================= */

@media (max-width: 950px) {

    /* NAVBAR */

    .menu-button {
        display: flex;
    }

    .nav-menu {
        position: absolute;

        top: 80px;
        left: 0;

        width: 100%;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 0;

        padding: 10px 25px 25px;

        background: #0b0b0b;

        border-bottom: 1px solid var(--border);

        opacity: 0;

        visibility: hidden;

        transform: translateY(-10px);

        transition:
            opacity 0.3s ease,
            transform 0.3s ease,
            visibility 0.3s ease;
    }

    .nav-menu.open {
        opacity: 1;

        visibility: visible;

        transform: translateY(0);
    }

    .nav-menu a {
        padding: 16px 0;

        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .nav-menu a::after {
        display: none;
    }


    /* HERO */

    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 130px;

        padding-bottom: 100px;
    }

    .hero-code {
        max-width: 650px;
    }


    /* ABOUT */

    .about-grid {
        grid-template-columns: 1fr;

        gap: 50px;
    }


    /* SKILLS */

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    /* PROJECT */

    .project-card.featured {
        grid-column: span 1;
        display: block;
    }

    .logo img {
        height: 65px;
        max-width: 240px;
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 650px) {

    .container {
        width: 88%;
    }

    .section {
        padding: 90px 0;
    }


    /* HERO */

    .hero h1 {
        font-size: 60px;

        letter-spacing: -4px;
    }

    .hero h2 {
        font-size: 20px;
    }

    .hero-buttons {
        flex-direction: column;

        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .hero-code {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }


    /* SECTIONS */

    .section-header {
        margin-bottom: 45px;
    }

    .section-header h2 {
        font-size: 43px;

        letter-spacing: -2px;
    }


    /* SKILLS */

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

    .skill-card p {
        min-height: auto;
    }


    /* PROJECTS */

    .projects-header {
        display: block;
    }

    .projects-intro {
        margin-top: 20px;
    }

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

    .project-card.featured {
        grid-column: span 1;
    }

    .logo img {
        height: 65px;
        max-width: 240px;
    }

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

    .project-info {
        padding: 28px 22px;
    }


    /* SERVICES */

    .service {
        grid-template-columns: 35px 1fr 25px;

        gap: 10px;
    }

    .service h3 {
        font-size: 18px;
    }

    .service p {
        font-size: 12px;
    }


    /* CONTACT */

    .contact-box {
        padding: 55px 30px;
    }

    .contact-box h2 {
        font-size: 47px;

        letter-spacing: -3px;
    }


    /* FOOTER */

    .footer-container {
        flex-direction: column;

        align-items: flex-start;

        gap: 25px;
    }

}