/* ==================================================
   CONFIGURACION GENERAL
   ================================================== */

:root {
    --bg: rgb(1, 6, 8);
    --bg-light: rgb(5, 14, 16);
    --bg-card: rgb(8, 19, 20);

    /* Paleta inspirada en Mushishi */
    --mushi-green: #8fa69a;
    --mushi-green-dark: #526d62;
    --mushi-beige: #c5bda5;
    --mushi-light: #e4e0cf;

    --text: #e7e8df;
    --text-muted: #919b96;

    --border: rgba(143, 166, 154, 0.18);

    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

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

.container {
    width: min(calc(100% - 40px), var(--max-width));
    margin-inline: auto;
}

/* ==================================================
   NAVEGACION
   ================================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(1, 6, 8, 0.88);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.logo span {
    color: var(--mushi-green);
}

nav {
    display: flex;
    gap: 32px;
}

nav a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav a:hover {
    color: var(--mushi-green);
    transform: translateY(-2px);
}

/* ==================================================
   ELEMENTOS GENERALES
   ================================================== */

.eyebrow {
    color: var(--mushi-green);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
}

h1, h2, h3 {
    line-height: 1.1;
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    max-width: 750px;
}

h2 span, h1 span {
    color: var(--mushi-green);
}

p {
    color: var(--text-muted);
}

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

.hero {
    min-height: calc(100vh - 76px);
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    align-items: center;
    gap: 80px;
    padding-top: 80px;
    padding-bottom: 100px;
}

.hero-text {
    max-width: 760px;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    margin-bottom: 32px;
}

.hero-description {
    max-width: 650px;
    font-size: 1.1rem;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 40px;
}

.btn {
    padding: 13px 23px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.85rem;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

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

.btn-primary {
    background: var(--mushi-green);
    color: var(--bg);
    border-color: var(--mushi-green);
}

.btn-primary:hover {
    background: var(--mushi-light);
    border-color: var(--mushi-light);
}

.btn-linkedin:hover {
    border-color: var(--mushi-green);
    color: var(--mushi-green);
}

/* Tarjeta del Hero */
.hero-card {
    padding: 40px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(143, 166, 154, 0.08), rgba(1, 6, 8, 0.1));
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

.card-number {
    position: absolute;
    top: 25px;
    right: 25px;
    color: var(--mushi-green);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
}

.hero-card p {
    color: var(--mushi-light);
    font-size: 1.15rem;
    line-height: 1.8;
}

.card-line {
    width: 50px;
    height: 1px;
    background: var(--mushi-green);
    margin: 25px 0 12px;
}

.hero-card span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ==================================================
   SECCIONES
   ================================================== */

.section {
    padding-top: 120px;
    padding-bottom: 120px;
}

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

.section-heading h2 {
    max-width: 800px;
}

/* ==================================================
   SOBRE MI
   ================================================== */

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: stretch;
}

.content-card {
    padding: 38px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    min-height: 300px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.content-card:hover {
    border-color: rgba(143, 166, 154, 0.45);
    transform: translateY(-5px);
}

.content-card.large {
    grid-row: auto;
}

.content-card h3 {
    font-size: 1.35rem;
    margin-bottom: 25px;
    color: var(--mushi-light);
}

.content-card p {
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.content-card strong {
    color: var(--mushi-beige);
    font-weight: 500;
}

.card-icon {
    display: block;
    color: var(--mushi-green);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    margin-bottom: 60px;
}

/* ==================================================
   ASIR / TRAYECTORIA
   ================================================== */

.section-alt {
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.asr-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 100px;
    align-items: start;
}

.asr-intro {
    max-width: 500px;
}

.asr-intro p {
    margin-bottom: 22px;
    font-size: 1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.skill {
    padding: 30px;
    min-height: 180px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
}

.skill:hover {
    background: rgba(143, 166, 154, 0.05);
}

.skill span {
    color: var(--mushi-green);
    font-size: 0.7rem;
}

.skill h3 {
    margin-top: 30px;
    margin-bottom: 8px;
    color: var(--mushi-light);
    font-size: 1.1rem;
}

.skill p {
    font-size: 0.8rem;
}

/* ==================================================
   OBJETIVOS / FILOSOFÍA
   ================================================== */

.future-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
}

.future-card,
.quote-card {
    border: 1px solid var(--border);
    padding: 42px;
    background: var(--bg-card);
}

.future-card.featured {
    grid-row: span 2;
}

.future-number {
    color: var(--mushi-green);
    font-size: 0.7rem;
    margin-bottom: 70px;
}

.future-card h3 {
    font-size: 1.6rem;
    margin-bottom: 25px;
}

.future-card p {
    margin-bottom: 18px;
}

.future-card strong {
    color: var(--mushi-beige);
    font-weight: 500;
}

.technology {
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--mushi-light);
    letter-spacing: -0.05em;
    line-height: 1.1;
    margin-bottom: 30px !important;
}

.technology span {
    color: var(--mushi-green);
}

.quote-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quote-card p {
    color: var(--mushi-light);
    font-size: 1.3rem;
    line-height: 1.7;
}

.quote-card span {
    color: var(--mushi-green);
    font-size: 0.75rem;
    margin-top: 25px;
}

/* ==================================================
   TECNOLOGIAS
   ================================================== */

.technologies {
    padding: 70px 0;
    border-bottom: 1px solid var(--border);
}

.technology-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 35px;
}

.technology-list span {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
}

.technology-list span:hover {
    color: var(--mushi-green);
}

/* ==================================================
   AVATAR
   ================================================== */

.avatar-section {
    min-height: 700px;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    align-items: center;
    gap: 80px;
    padding-top: 120px;
    padding-bottom: 120px;
}

.avatar-text {
    max-width: 450px;
}

.avatar-text h2 {
    margin-bottom: 30px;
}

.avatar-text > p:last-child {
    max-width: 400px;
}

.avatar-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container::before {
    content: "";
    position: absolute;
    width: 75%;
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 50%;
    z-index: -1;
}

.avatar {
    width: min(100%, 600px);
    aspect-ratio: 1;
    object-fit: cover;
    filter: saturate(0.75) contrast(0.95);
    border-radius: 3px;
    border: 1px solid var(--border);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.avatar:hover {
    transform: scale(1.015);
    filter: saturate(1) contrast(1);
}

/* ==================================================
   CONTACTO
   ================================================== */

.contact {
    padding-top: 130px;
    padding-bottom: 150px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.contact h2 {
    margin: 0 auto 25px;
}

.contact > p:not(.eyebrow) {
    max-width: 500px;
    margin: 0 auto 35px;
}

.linkedin-button {
    display: inline-block;
    padding: 14px 28px;
    border: 1px solid var(--mushi-green);
    color: var(--mushi-green);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.linkedin-button:hover {
    background: var(--mushi-green);
    color: var(--bg);
    transform: translateY(-3px);
}

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

footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* ==================================================
   ANIMACIONES (Añadido para el .js)
   ================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 900px) {
    nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 50px;
        padding-top: 80px;
    }

    .hero-card {
        max-width: 600px;
    }

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

    .content-card.large {
        grid-column: span 2;
        grid-row: auto;
    }

    .asr-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .avatar-section {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .avatar-text {
        max-width: 700px;
    }
}

/* ==================================================
   RESPONSIVE MOVIL
   ================================================== */

@media (max-width: 600px) {
    .container {
        width: min(calc(100% - 28px), var(--max-width));
    }

    .navbar {
        position: relative;
    }

    .nav-content {
        min-height: auto;
        padding: 20px 0;
        align-items: flex-start;
    }

    nav {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-top: 70px;
        padding-bottom: 80px;
    }

    .hero h1 {
        font-size: clamp(3rem, 16vw, 5rem);
        margin-bottom: 25px;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-card {
        padding: 28px;
        min-height: 270px;
    }

    .section {
        padding-top: 80px;
        padding-bottom: 80px;
    }

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

    h2 {
        font-size: 2.3rem;
    }

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

    .content-card.large {
        grid-column: auto;
    }

    .content-card {
        min-height: auto;
        padding: 30px;
    }

    .card-icon {
        margin-bottom: 40px;
    }

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

    .skill {
        min-height: auto;
        padding: 28px;
    }

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

    .future-card.featured {
        grid-row: auto;
    }

    .future-card,
    .quote-card {
        padding: 30px;
    }

    .future-number {
        margin-bottom: 45px;
    }

    .technology-list {
        gap: 15px 25px;
    }

    .avatar-section {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .avatar-container::before {
        width: 90%;
    }

    .contact {
        padding-top: 90px;
        padding-bottom: 100px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}
