:root {
    --brand-lime: #CBFE00;
    --brand-lime-soft: rgba(203, 254, 0, 0.18);

    --bg-main: #212121;
    --bg-nav: rgba(0, 0, 0, 0.6);
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-card-inner: rgba(255, 255, 255, 0.04);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-lime: rgba(203, 254, 0, 0.15);

    --text-main: #FFFFFF;
    --text-muted: #cfcfcf;
    --text-soft: rgba(255, 255, 255, 0.7);

    --grid-line: rgba(255, 255, 255, 0.03);
    --glow-a: rgba(203, 254, 0, 0.20);
    --glow-b: rgba(203, 254, 0, 0.25);
    --glow-c: rgba(203, 254, 0, 0.14);

    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.35);
    --shadow-lime: 0 10px 40px rgba(203, 254, 0, 0.25);

    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================= */
/* MODO ZEN */
/* ========================= */

body.zen-mode {
    --brand-lime: #A3C9A8;
    --brand-lime-soft: rgba(163, 201, 168, 0.18);

    --bg-main: #F5F2ED;
    --bg-nav: rgba(255, 255, 255, 0.72);
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-card-inner: #fdfdfc;

    --border-color: #E2DDD5;
    --border-lime: rgba(163, 201, 168, 0.35);

    --text-main: #43423E;
    --text-muted: #84827E;
    --text-soft: rgba(67, 66, 62, 0.7);

    --grid-line: rgba(67, 66, 62, 0.05);
    --glow-a: rgba(163, 201, 168, 0.28);
    --glow-b: rgba(226, 221, 213, 0.65);
    --glow-c: rgba(163, 201, 168, 0.18);

    --shadow-soft: 0 14px 45px rgba(67, 66, 62, 0.10);
    --shadow-lime: 0 14px 45px rgba(163, 201, 168, 0.22);
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    transition: var(--transition);
}

/* ========================= */
/* BACKGROUND ANIMADO */
/* ========================= */

.bg {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -2;
    background:
        radial-gradient(circle at 20% 30%, var(--glow-a), transparent 40%),
        radial-gradient(circle at 80% 70%, var(--glow-b), transparent 40%),
        radial-gradient(circle at 50% 50%, var(--glow-c), transparent 50%);
    filter: blur(140px);
    animation: move 18s infinite alternate ease-in-out;
    transition: var(--transition);
}

@keyframes move {
    0% {
        transform: translate(-10%, -10%) scale(1);
    }

    100% {
        transform: translate(10%, 10%) scale(1.2);
    }
}

.grid {
    position: fixed;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    transition: var(--transition);
}

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

nav {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 12px 25px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    z-index: 100;
    transition: var(--transition);
}

nav.scrolled {
    background: var(--bg-nav);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
    align-items: center;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    opacity: 0.72;
    padding: 8px 4px;
    border-radius: 20px;
    transition: var(--transition);
}

nav a:hover {
    opacity: 1;
    color: var(--brand-lime);
}

.floating-theme-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;

    width: 58px;
    height: 58px;

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

    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-nav);
    color: var(--text-main);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);

    cursor: pointer;
    transition: var(--transition);
}

.floating-theme-btn i {
    font-size: 18px;
    transition: var(--transition);
}

.floating-theme-btn:hover {
    transform: translateY(-4px) scale(1.06);
    border-color: var(--brand-lime);
    color: var(--brand-lime);
    box-shadow: var(--shadow-lime);
}

body.zen-mode .floating-theme-btn {
    background: rgba(255, 255, 255, 0.78);
    border-color: #E2DDD5;
    color: #6f9f75;
}


body.zen-mode .floating-theme-btn i {
    color: #f59e0b;
    transform: rotate(0deg);
}

body.zen-mode .floating-theme-btn:hover {
    color: #6f9f75;
    border-color: #A3C9A8;
}

/* Móvil */
@media (max-width: 768px) {
    .floating-theme-btn {
        right: 18px;
        bottom: 18px;
        width: 54px;
        height: 54px;
    }

    .floating-theme-btn i {
        font-size: 17px;
    }
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 60px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

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

.hero h1 {
    font-size: clamp(42px, 6vw, 70px);
    line-height: 1.05;
    font-weight: 700;
    color: var(--text-main);
}

.hero p {
    margin-top: 24px;
    font-size: 22px;
    line-height: 1.5;
    color: var(--text-soft);
    max-width: 620px;
}

.lime {
    color: var(--brand-lime);
    text-shadow:
        0 0 10px rgba(203, 254, 0, 0.28),
        0 0 20px rgba(203, 254, 0, 0.16);
}

body.zen-mode .lime {
    text-shadow: none;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-right {
    width: 200px;
    animation: floatLogo 5s ease-in-out infinite;
    filter:
        drop-shadow(0 0 10px rgba(203, 254, 0, 0.35)) drop-shadow(0 0 30px rgba(203, 254, 0, 0.20));
    transition: var(--transition);
}

body.zen-mode .hero-logo-right {
    filter:
        drop-shadow(0 16px 35px rgba(67, 66, 62, 0.16));
}

@keyframes floatLogo {
    0% {
        transform: translateY(0px) rotate(-2deg);
    }

    50% {
        transform: translateY(-18px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(-2deg);
    }
}

/* ========================= */
/* SOCIALS */
/* ========================= */

.hero-socials {
    display: flex;
    gap: 20px;
    margin-top: 22px;
}

.hero-socials a {
    color: var(--text-main);
    font-size: 1.2rem;
    opacity: 0.62;
    transition: var(--transition);
    text-decoration: none;
}

.hero-socials a:hover {
    opacity: 1;
    color: var(--brand-lime);
    transform: translateY(-3px);
}

/* ========================= */
/* BOTONES */
/* ========================= */

.buttons {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}

.btn {
    padding: 14px 30px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-lime), #9EDB00);
    color: #212121;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

body.zen-mode .btn {
    background: var(--brand-lime);
    color: #ffffff;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lime);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--brand-lime);
    color: var(--brand-lime);
}

/* ========================= */
/* SECTION */
/* ========================= */

section {
    padding: 70px 10%;
}

.title {
    font-size: 40px;
    margin-bottom: 60px;
    color: var(--text-main);
}

.title span {
    color: var(--brand-lime);
}

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

.projects-more {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.services-container {
    display: flex;
    gap: 1.5rem;
    height: 450px;
    width: 100%;
    margin-top: 40px;
}

.service-card {
    position: relative;
    flex: 1;

    background: var(--brand-lime-soft);
    border: 1px solid var(--border-lime);

    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;

    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 2.5rem;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.services-container:hover .service-card:not(:hover) {
    flex: 0.7;
    opacity: 0.45;
    filter: grayscale(100%);
}

.services-container .service-card:hover {
    flex: 3;

    background: rgba(203, 254, 0, 0.22);
    border-color: rgba(203, 254, 0, 0.45);

    box-shadow:
        0 22px 60px rgba(203, 254, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.zen-mode .service-card {
    background: rgba(163, 201, 168, 0.18);
    border: 1px solid rgba(163, 201, 168, 0.42);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 18px 45px rgba(67, 66, 62, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.zen-mode .services-container .service-card:hover {
    background: rgba(163, 201, 168, 0.28);
    border-color: rgba(163, 201, 168, 0.72);

    box-shadow:
        0 22px 60px rgba(163, 201, 168, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.service-image-wrapper {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    filter: grayscale(60%) contrast(1.1);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

body.zen-mode .service-image {
    opacity: 0.48;
    filter: grayscale(35%) contrast(1.02);
}

.service-card:hover .service-image {
    opacity: 0.9;
    filter: grayscale(0%) contrast(1.1);
    transform: scale(1.05);
}

.service-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.42) 50%,
            transparent 100%);
}

body.zen-mode .service-image-overlay {
    background: linear-gradient(to top,
            rgba(245, 242, 237, 0.92) 0%,
            rgba(245, 242, 237, 0.45) 48%,
            rgba(245, 242, 237, 0.08) 100%);
}

.service-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    transition: var(--transition);
}

.service-icon {
    margin-bottom: 8px;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    opacity: 1;
    transition: var(--transition);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 3;
}

body.zen-mode .service-title {
    color: var(--text-main);
    text-shadow: none;
}

.service-card:hover .service-title {
    color: var(--brand-lime);
}

.service-details {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.service-card:hover .service-details {
    opacity: 1;
    max-height: 300px;
    transform: translateY(0);
}

.service-details p {
    color: #cfcfcf;
    line-height: 1.5;
    font-size: 0.95rem;
    margin-top: 10px;
}

body.zen-mode .service-details p {
    color: var(--text-muted);
}

.btn-project {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 10px;
    background: var(--brand-lime-soft);
    border: 1px solid var(--border-lime);
    color: var(--brand-lime);
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.btn-project:hover {
    background: var(--brand-lime);
    color: #212121;
    box-shadow: var(--shadow-lime);
}

body.zen-mode .btn-project:hover {
    color: #ffffff;
}

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

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

.skill-card {
    padding: 30px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-lime);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.skill-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            var(--brand-lime-soft),
            transparent);
    transition: 0.6s;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lime);
}

.skill-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
    color: var(--text-main);
}

.skill-card p {
    color: var(--text-soft);
    margin-bottom: 15px;
}

.skill-card span {
    font-size: 14px;
    color: var(--brand-lime);
    opacity: 0.9;
}

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

footer {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    opacity: 0.8;
}

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

@media (max-width: 900px) {
    .services-container {
        flex-direction: column;
        height: auto;
    }

    .service-card {
        min-height: 150px;
        flex: none;
        width: 100%;
    }

    .services-container:hover .service-card:not(:hover) {
        flex: none;
        opacity: 1;
        filter: none;
    }

    .services-container .service-card:hover,
    .services-container .service-card:active {
        flex: none;
        min-height: 350px;
        transform: scale(1.02);
    }

    .service-details {
        opacity: 1;
        max-height: 300px;
    }

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

@media (max-width: 768px) {
    nav {
        top: 15px;
        padding: 10px 14px;
        width: 92%;
        max-width: 92%;
        border-radius: 28px;
    }

    nav ul {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 14px;
    }

    .zen-toggle {
        padding: 8px 12px;
        font-size: 13px;
    }

    .hero {
        min-height: auto;
        padding-top: 135px;
        padding-bottom: 60px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        justify-items: center;
        text-align: center;
        gap: 30px;
        width: 100%;
    }

    .hero-image {
        grid-row: 1;
    }

    .hero-text {
        grid-row: 2;
        text-align: center;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 38px;
        line-height: 1.2;
        text-align: center;
        margin: 0 auto;
    }

    .hero p {
        font-size: 16px;
        text-align: center;
        max-width: 500px;
        margin: 20px auto 0 auto;
    }

    .hero-logo-right {
        width: 180px;
    }

    .hero-socials {
        justify-content: center;
        margin-bottom: 10px;
    }

    .buttons {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    section {
        padding: 80px 20px;
    }

    .title {
        font-size: 32px;
        margin-bottom: 40px;
    }

    /* ========================= */
    /* FIX LECTURA SERVICE - ZEN */
    /* ========================= */

    body.zen-mode .service-image {
        opacity: 0.18;
        filter: grayscale(45%) contrast(0.95) saturate(0.65);
    }

    body.zen-mode .service-card:hover .service-image {
        opacity: 0.26;
        filter: grayscale(25%) contrast(1) saturate(0.75);
    }

    body.zen-mode .service-image-overlay {
        background: linear-gradient(to top,
                rgba(245, 242, 237, 0.98) 0%,
                rgba(245, 242, 237, 0.86) 48%,
                rgba(245, 242, 237, 0.58) 100%);
    }

    body.zen-mode .service-title {
        color: #43423E;
        text-shadow: none;
    }

    body.zen-mode .service-details p {
        color: #5f5d58;
        font-weight: 500;
    }
}
/* =========================================================
   FEATURED PROJECTS - ZEN MODE OPACITY ONLY
   ========================================================= */

body.zen-mode #projects .service-image {
    opacity: 0.65;
    filter: grayscale(45%) contrast(0.95) saturate(0.65);
}

body.zen-mode #projects .service-card:hover .service-image {
    opacity: 0.24;
    filter: grayscale(25%) contrast(1) saturate(0.75);
}

body.zen-mode #projects .service-image-overlay {
    background: linear-gradient(
        to top,
        rgba(245, 242, 237, 0.98) 0%,
        rgba(245, 242, 237, 0.86) 48%,
        rgba(245, 242, 237, 0.58) 100%
    );
}
