/* ============ RESET & BASE ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --purple: #9338F4;
    --purple-light: #a85ff6;
    --purple-dark: #6b20c0;
    --blue-deep: #0019FF;
    --blue-light: #00B1FF;
    --sideral: #02021E;
    --bg-dark: #0a0a0a;
    --text-white: #f0eef5;
    --text-muted: rgba(255,255,255,0.6);
    --card-bg: #111111;
    --card-accent: #1a1230;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--purple) transparent;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(147, 56, 244, 0.25);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 56, 244, 0.45);
}

body {
    background: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Quicksand', sans-serif;
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a, button, input, textarea, select, label, [role="button"], .bento-img, .bento-tag, .btn-fixed, .ms-line-card, .ms-cta-button, .lightbox, .lightbox-close, .lightbox-arrow, .lightbox-img-wrap {
    cursor: none !important;
}

/* ============ CURSOR ============ */
#custom-cursor {
    position: fixed;
    top: 0; left: 0;
    z-index: 99999;
    pointer-events: none;
    mix-blend-mode: screen;
    will-change: transform;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
    opacity: 0;
}
#custom-cursor.visible { opacity: 1; }
#custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 12px; height: 12px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: radial-gradient(circle, #fff 0%, rgba(147,56,244,0.6) 70%, transparent 100%);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(147,56,244,0.5), 0 0 20px rgba(147,56,244,0.2);
}
#cursor-trail {
    position: fixed;
    inset: 0;
    z-index: 99998;
    pointer-events: none;
    width: 100vw;
    height: 100vh;
}

/* ============ NAVIGATION ============ */
#main-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 3rem;
    background: linear-gradient(to bottom, rgba(255,255,255,0.03), transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
#main-nav.nav-solid { background: rgba(255,255,255,0.04); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.06); }

.nav-logo { height: 22px; width: auto; filter: brightness(1.1); transition: opacity 0.3s; }
.nav-logo:hover { opacity: 0.7; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.2rem;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--purple-light);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: #fff; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: rgba(139, 92, 246, 0.35); text-decoration-thickness: 1.5px; }

.has-dropdown { position: relative; }
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 200px;
    background: rgba(12, 11, 24, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    padding: 12px 0 0.6rem;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown li a {
    display: block;
    padding: 0.6rem 1.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}
.dropdown li a::after { display: none; }
.dropdown li a:hover { background: rgba(139, 92, 246, 0.15); color: var(--purple-light); }

.social-icons { display: flex; gap: 1rem; }
.social-icons a { opacity: 0.7; transition: opacity 0.3s ease, transform 0.3s ease; display: flex; }
.social-icons a:hover { opacity: 1; transform: scale(1.15); }

.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: none;
    padding: 5px;
    z-index: 9999;
}
.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s;
}
.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.97);
    z-index: 8999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
.mobile-nav-overlay.open { opacity: 1; visibility: visible; }
.mobile-nav-links {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.mobile-nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 1px;
    transition: color 0.3s;
}
.mobile-nav-link:hover { color: var(--purple-light); }
.mobile-nav-link.active { color: var(--purple-light); text-shadow: 0 0 10px rgba(168, 95, 246, 0.5), 0 0 20px rgba(168, 95, 246, 0.2); }
.mobile-nav-dropdown {
    list-style: none;
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.mobile-nav-dropdown .mobile-nav-link { font-size: 1rem; opacity: 0.7; }
.mobile-nav-socials { display: flex; gap: 1.5rem; margin-top: 3rem; }
.mobile-nav-socials a { color: white; display: flex; transition: opacity 0.3s; }
.mobile-nav-socials a:hover { opacity: 0.6; }

/* ============ FIXED BUTTONS ============ */
#fixed-buttons {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-fixed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.4rem;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: var(--purple-light);
    text-decoration: none;
    backdrop-filter: blur(10px);
}
.btn-fixed:hover {
    background: rgba(139, 92, 246, 0.35);
    border-color: var(--purple-light);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    transform: scale(1.05);
}
.btn-star {
    font-size: 0.9em;
    display: inline-block;
    animation: starTwinkle 2s ease-in-out infinite;
}
@keyframes starTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

/* ============ HERO — VIDEO ============ */
/* ============ HERO — video + frosted glass title ============ */
.ms-hero {
    position: relative;
    height: 200vh;
}
.ms-hero-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 2;
}
.ms-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.ms-hero-glass {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    backdrop-filter: blur(16px) saturate(0.8);
    -webkit-backdrop-filter: blur(16px) saturate(0.8);
    background: rgba(5, 3, 12, 0.3);
    will-change: opacity;
}
.ms-hero-title-glow {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
    text-align: center;
    color: rgba(180, 120, 255, 0.9);
    text-shadow:
        0 0 20px rgba(168, 95, 246, 0.6),
        0 0 50px rgba(168, 95, 246, 0.35),
        0 0 90px rgba(147, 56, 244, 0.2),
        0 0 140px rgba(147, 56, 244, 0.1);
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    margin: 0;
    white-space: nowrap;
}
.ms-hero-subtitle {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 60%;
    transform: translate(-50%, -50%);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.04em;
    text-align: center;
    color: rgba(220, 200, 255, 0.8);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}
.ms-hero-label {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(168,95,246,0.85);
    opacity: 0;
    will-change: opacity, transform;
}
.label-star {
    font-size: 0.65rem;
    opacity: 0.7;
    animation: starPulse 3s ease-in-out infinite;
}
.label-star:last-child { animation-delay: 1.5s; }
@keyframes starPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}
.ms-hero-blur-exit {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: var(--bg-dark, #0a0a0a);
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
}

/* ============ ORNAMENT DIVIDER ============ */
.ms-intro-ornament,
.ms-cta-ornament,
.ms-other-ornament {
    display: none;
}

/* ============ INTRO ============ */
.ms-intro {
    padding: 4rem 5% 4rem;
    position: relative;
    background: var(--bg-dark);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ms-intro-blobs {
    display: none;
}
.ms-intro::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 0;
    width: 100%;
    height: 160px;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-dark) 100%);
    pointer-events: none;
    z-index: 2;
}
.ms-intro::after {
    display: none;
}
.ms-intro-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.ms-intro-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.02em;
    color: rgba(200, 170, 255, 0.85);
    margin-bottom: 1.5rem;
}
.ms-intro-text {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 300;
    line-height: 2.2;
    letter-spacing: 0.02em;
}
.ms-intro-text .intro-word {
    color: rgba(255,255,255,0.13);
    transition: color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), text-shadow 0.6s ease;
    display: inline;
    position: relative;
}
.ms-intro-text .intro-word.lit {
    color: rgba(255,255,255,0.88);
    text-shadow: none;
}
.ms-intro-text .intro-word.glow {
    color: #fff;
    text-shadow: 0 0 8px rgba(200,170,255,0.9), 0 0 20px rgba(168,95,246,0.5), 0 0 40px rgba(147,56,244,0.25);
}
/* ── Shimmer glint that follows text reveal ── */
.shimmer-glint {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 3px 1.5px rgba(255,255,255,0.95),
        0 0 8px 3px rgba(220,200,255,0.6),
        0 0 16px 6px rgba(168,95,246,0.3);
    opacity: 0;
    will-change: transform;
}
.shimmer-glint.active {
    opacity: 1;
}
/* Small white stars near the glint */
.glint-star {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    color: rgba(255,255,255,0.9);
    font-size: 8px;
    text-shadow: 0 0 3px rgba(255,255,255,0.8), 0 0 6px rgba(200,180,255,0.4);
    animation: glintStarFade 0.5s ease-out forwards;
}
@keyframes glintStarFade {
    0% { opacity: 1; transform: translateY(0) scale(0.6); }
    30% { opacity: 1; transform: translateY(-6px) scale(1); }
    100% { opacity: 0; transform: translateY(-18px) scale(0.15); }
}
.ms-intro-line {
    width: 0;
    height: 2px;
    margin: 2rem auto 0;
    background: linear-gradient(90deg, transparent, rgba(168,95,246,0.6), transparent);
    border-radius: 2px;
}

/* Applications list */
.ms-applications {
    margin-top: 3rem;
    opacity: 0;
    transform: translateY(20px);
}
.ms-applications-label {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--purple-light);
    margin-bottom: 1.2rem;
}
.ms-applications-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 0;
}
.ms-app-item {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
    font-weight: 400;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.02em;
    transition: color 0.3s;
    opacity: 0;
    transform: scale(0.85);
    display: inline-block;
}
.ms-app-item:hover {
    color: rgba(255,255,255,0.9);
}
.ms-app-dot {
    font-size: 0.4rem;
    color: var(--purple-light);
    opacity: 0;
    margin: 0 0.8rem;
    vertical-align: middle;
}

/* ============ BENTO GRID GALLERY ============ */
.ms-project {
    padding: 3rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}
.ms-project + .ms-project {
    margin-top: 3.5rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0.5rem;
    position: relative;
    z-index: 1;
}

/* Layout: Project 1 — Info left, wide image right, then 3 across */
.bento-grid > .bento-info { grid-column: 1; grid-row: 1; }
.bento-grid > .bento-wide { grid-column: 2 / 4; grid-row: 1; }
.bento-grid > .bento-card:nth-child(3) { grid-column: 1; grid-row: 2; }
.bento-grid > .bento-card:nth-child(4) { grid-column: 2; grid-row: 2; }
.bento-grid > .bento-card:nth-child(5) { grid-column: 3; grid-row: 2; }

/* Layout: Project 2 — wide image left, info right (mirrored) */
.bento-grid-alt > .bento-wide { grid-column: 1 / 3; grid-row: 1; }
.bento-grid-alt > .bento-info { grid-column: 3; grid-row: 1; }
.bento-grid-alt > .bento-card:nth-child(3) { grid-column: 1; grid-row: 2; }
.bento-grid-alt > .bento-card:nth-child(4) { grid-column: 2; grid-row: 2; }
.bento-grid-alt > .bento-card:nth-child(5) { grid-column: 3; grid-row: 2; }

/* Colombiana: info+wide row 1, then 2+2 */
.bento-grid-6 > .bento-info { grid-column: 1; grid-row: 1; }
.bento-grid-6 > .bento-wide { grid-column: 2 / 4; grid-row: 1; }
.bento-grid-6 > .bento-card:nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
.bento-grid-6 > .bento-card:nth-child(4) { grid-column: 3; grid-row: 2; }
.bento-grid-6 > .bento-card:nth-child(5) { grid-column: 1; grid-row: 3; }
.bento-grid-6 > .bento-card:nth-child(6) { grid-column: 2 / 4; grid-row: 3; }

/* ============ BENTO CARD BASE ============ */
.bento-card {
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    min-height: 280px;
    opacity: 0;
    will-change: transform, opacity;
}

/* ============ BENTO IMAGE CARD ============ */
.bento-img {
    background: var(--card-bg);
    cursor: none;
    transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.bento-img picture {
    display: contents;
}
.bento-img img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: -10%;
    left: 0;
    transition: filter 0.7s ease;
    will-change: transform;
}
.bento-img:hover img {
    filter: brightness(1.1) saturate(1.15);
    transform: scale(1.04);
    transition: filter 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.bento-img:hover {
    box-shadow: 0 0 40px rgba(147, 56, 244, 0.2), 0 16px 40px rgba(0,0,0,0.6), 0 0 80px rgba(147, 56, 244, 0.06);
    transform: translateY(-6px) scale(1.015);
}
.bento-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 40%);
    pointer-events: none;
    transition: opacity 0.4s;
}
.bento-img:hover .bento-img-overlay {
    opacity: 0.3;
}

/* Glow border on hover */
.bento-img::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    transition: border-color 0.4s, box-shadow 0.4s;
    pointer-events: none;
    z-index: 2;
}
.bento-img:hover::after {
    border-color: rgba(147, 56, 244, 0.35);
    box-shadow: inset 0 0 40px rgba(147, 56, 244, 0.1), 0 0 25px rgba(147, 56, 244, 0.15);
}

/* Wide card taller row */
.bento-wide {
    min-height: 380px;
}

/* ============ BENTO INFO CARD (liquid glass) ============ */
.bento-info {
    padding: 2.2rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
    min-height: 380px;
    transition: box-shadow 0.5s ease;
}
.bento-info:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 40px rgba(147, 56, 244, 0.1),
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(147, 56, 244, 0.12);
}

.bento-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}
.bento-label svg {
    color: var(--purple-light);
    opacity: 0.8;
}

.bento-project-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
}

.bento-project-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.65);
    font-weight: 300;
}

.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.bento-tag {
    padding: 0.4rem 1rem;
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--purple-light);
    background: rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: none;
}
.bento-tag:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--purple-light);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    transform: scale(1.05);
}

/* ============ GLASSMORPHISM ============ */
.liquid-glass {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(15, 12, 25, 0.2) 50%,
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(60px) saturate(1.1) brightness(0.95);
    -webkit-backdrop-filter: blur(60px) saturate(1.1) brightness(0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 50px rgba(255, 255, 255, 0.02),
        0 8px 32px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}
.liquid-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.08) 20%,
        transparent 40%,
        transparent 65%,
        rgba(255, 255, 255, 0.04) 85%,
        rgba(255, 255, 255, 0.06) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.liquid-glass::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse at 25% 15%, rgba(255,255,255,0.04) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* ============ NOISE OVERLAY ============ */
.noise-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.25;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 240px 240px;
    border-radius: inherit;
    z-index: 1;
}

/* ============ LIGHTBOX ============ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50000;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
    backdrop-filter: blur(20px);
}
.lightbox.open {
    opacity: 1;
    visibility: visible;
}
.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 2.5rem;
    cursor: none;
    transition: color 0.3s, transform 0.3s;
    z-index: 3;
    line-height: 1;
}
.lightbox-close:hover {
    color: #fff;
    transform: rotate(90deg);
}
.lightbox-img-wrap {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.8rem;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.lightbox.open .lightbox-img-wrap img {
    opacity: 1;
    transform: scale(1);
}
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    transition: all 0.3s;
    z-index: 3;
}
.lightbox-arrow:hover {
    background: rgba(147,56,244,0.25);
    border-color: rgba(147,56,244,0.5);
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.5);
}
.lightbox-swipe-hint {
    display: none;
    position: absolute;
    bottom: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    gap: 0.6rem;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.lightbox-swipe-hint.show { opacity: 1; }
@media (max-width: 768px) {
    .lightbox-swipe-hint { display: flex; }
}

/* ============ BENTO GRID — LARGE (7 images) ============ */
.bento-grid-large {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: minmax(340px, auto) minmax(280px, auto) minmax(280px, auto) minmax(280px, auto);
}
/* Row 1: info + wide */
.bento-grid-large > .bento-card:nth-child(1) { grid-column: 1; grid-row: 1; }
.bento-grid-large > .bento-card:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
/* Row 2: 1 small + 1 wide */
.bento-grid-large > .bento-card:nth-child(3) { grid-column: 1; grid-row: 2; }
.bento-grid-large > .bento-card:nth-child(4) { grid-column: 2 / 4; grid-row: 2; }
/* Row 3: wide-left + 1 small */
.bento-grid-large > .bento-card:nth-child(5) { grid-column: 1 / 3; grid-row: 3; }
.bento-grid-large > .bento-card:nth-child(6) { grid-column: 3; grid-row: 3; }
/* Row 4: 1 small + wide-right */
.bento-grid-large > .bento-card:nth-child(7) { grid-column: 1; grid-row: 4; }
.bento-grid-large > .bento-card:nth-child(8) { grid-column: 2 / 4; grid-row: 4; }

/* ============ BENTO GRID — COMPACT (2 images) ============ */
.bento-grid-compact {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
}
.bento-grid-compact > .bento-wide { grid-column: 1 / 3; grid-row: 1; }
.bento-grid-compact > .bento-info { grid-column: 3; grid-row: 1; }
.bento-grid-compact > .bento-full { grid-column: 1 / 4; grid-row: 2; min-height: 420px; }

/* Mirror: info first, wide second */
.bento-grid-compact > .bento-info:first-child { grid-column: 1; grid-row: 1; }
.bento-grid-compact > .bento-info:first-child ~ .bento-wide { grid-column: 2 / 4; grid-row: 1; }

/* ============ BENTO GRID — SINGLE ROW (info + 2 images) ============ */
.bento-grid-row {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: minmax(380px, auto);
}
.bento-grid-row > .bento-card:nth-child(1) { grid-column: 1; grid-row: 1; }
.bento-grid-row > .bento-card:nth-child(2) { grid-column: 2; grid-row: 1; }
.bento-grid-row > .bento-card:nth-child(3) { grid-column: 3; grid-row: 1; }

/* ============ EXPLORE OTHER LINES ============ */
/* ============ BOTTOM SKY BACKGROUND ============ */
.ms-bottom-sky {
    position: relative;
    background:
        radial-gradient(ellipse 80% 50% at 50% 50%,
            rgba(8, 10, 35, 0.7) 0%,
            rgba(5, 5, 20, 0.4) 40%,
            transparent 70%
        ),
        linear-gradient(
            to bottom,
            var(--bg-dark) 0%,
            rgba(6, 6, 18, 1) 8%,
            rgba(8, 8, 25, 1) 25%,
            rgba(10, 10, 30, 1) 45%,
            rgba(8, 8, 25, 1) 65%,
            rgba(6, 6, 18, 1) 85%,
            var(--bg-dark) 100%
        );
}
.ms-bottom-sky canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.ms-bottom-sky > *:not(canvas) {
    position: relative;
    z-index: 1;
}

.ms-other-lines {
    padding: 5rem 5% 2rem;
    text-align: center;
    position: relative;
}
.ms-other-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
}
.ms-other-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(20px);
}
.ms-lines-grid {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
}
.ms-line-wrap {
    position: relative;
    display: inline-block;
}
.ms-line-wrap::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 52px;
    padding: 2px;
    background: conic-gradient(
        from var(--line-angle, 0deg),
        transparent 0%,
        transparent 55%,
        rgba(168, 95, 246, 0.6) 70%,
        rgba(200, 170, 255, 1) 80%,
        #fff 84%,
        rgba(200, 170, 255, 1) 88%,
        rgba(168, 95, 246, 0.6) 94%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
    visibility: hidden;
}
.ms-line-wrap:hover::before {
    opacity: 1;
    visibility: visible;
}
.ms-line-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: rgba(10, 10, 15, 0.85);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-white);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 0.4s, box-shadow 0.4s, transform 0.4s, border-color 0.4s;
    position: relative;
    z-index: 2;
}
.ms-line-wrap:hover .ms-line-card {
    background: rgba(15, 12, 25, 0.95);
    border-color: rgba(168, 95, 246, 0.3);
    box-shadow: 0 0 30px rgba(147, 56, 244, 0.25), 0 0 60px rgba(147, 56, 244, 0.1);
    transform: translateY(-2px);
}

/* ============ CTA ============ */
.ms-cta {
    padding: 5rem 5% 8rem;
    text-align: center;
    position: relative;
}
.ms-cta-headline {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-white);
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}
.ms-cta-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
}
.ms-cta-headline em {
    font-size: 0.72em;
    color: var(--purple-light);
}
.ms-cta-button-wrap {
    position: relative;
    display: inline-block;
}
.ms-cta-button-wrap::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 52px;
    padding: 2px;
    background: conic-gradient(
        from var(--btn-angle, 0deg),
        transparent 0%,
        transparent 60%,
        rgba(168, 95, 246, 0.8) 72%,
        rgba(200, 170, 255, 1) 80%,
        #fff 84%,
        rgba(200, 170, 255, 1) 88%,
        rgba(168, 95, 246, 0.8) 94%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}
.ms-cta-button-wrap:hover::before {
    opacity: 1;
    animation: borderTrace 2.5s linear infinite;
}
.ms-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    background: rgba(10, 10, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 0.4s, box-shadow 0.4s, transform 0.4s, border-color 0.4s;
    position: relative;
    z-index: 2;
}
.ms-cta-button-wrap:hover .ms-cta-button {
    background: rgba(15, 12, 25, 0.95);
    border-color: rgba(168, 95, 246, 0.3);
    box-shadow: 0 0 30px rgba(147, 56, 244, 0.25), 0 0 60px rgba(147, 56, 244, 0.1);
    transform: translateY(-2px);
}
@keyframes borderTrace {
    0% { --btn-angle: 0deg; }
    100% { --btn-angle: 360deg; }
}
@property --btn-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ============ BUTTON SPARKLES ============ */
.btn-sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: var(--dot-size, 2px);
    height: var(--dot-size, 2px);
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    box-shadow: 0 0 3px rgba(200,170,255,0.4);
    animation: btnSparkleFade 1.4s ease-out forwards;
}
@keyframes btnSparkleFade {
    0% { opacity: 0.8; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--drift-x), var(--drift-y)) scale(0.3); }
}

/* ============ FOOTER ============ */
#footer {
    padding: 4rem 2rem 2rem;
    background: transparent;
    position: relative;
}
.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.footer-logo {
    width: 220px;
    height: auto;
    margin: 0 auto 0.8rem;
    opacity: 0.8;
    transition: opacity 0.4s, filter 0.4s, transform 0.4s;
}
.footer-logo:hover {
    opacity: 1;
    filter: brightness(1.6) drop-shadow(0 0 18px rgba(168, 95, 246, 0.5));
    transform: scale(1.02);
}
.footer-tagline {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.footer-socials a { opacity: 0.5; transition: opacity 0.3s ease, transform 0.3s ease; }
.footer-socials a:hover { opacity: 1; transform: scale(1.2); }
.footer-copy {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.08em;
}

/* ============ POPUP FORM ============ */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.4s;
}
.popup-overlay.open { display: flex; opacity: 1; }
.popup-overlay #popup-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.glow-spot {
    position: absolute;
    pointer-events: none;
    filter: blur(25px);
    opacity: 0;
    animation: glowPulse var(--dur) ease-in-out var(--delay) infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0; transform: scale(0.7) rotate(0deg); }
    30% { opacity: 0.9; transform: scale(1.1) rotate(8deg); }
    70% { opacity: 0.6; transform: scale(0.95) rotate(-5deg); }
}
.popup-modal {
    position: relative;
    z-index: 1;
    width: min(420px, 90vw);
    max-height: 96vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 28px 32px;
    border-radius: 24px;
    background: rgba(12, 8, 24, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.popup-modal::-webkit-scrollbar { display: none; }
.popup-overlay.open .popup-modal {
    transform: translateY(0) scale(1);
}
.popup-inner {
    position: relative;
    z-index: 1;
}
.popup-close {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.6rem;
    cursor: none;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    transition: color 0.2s;
    z-index: 2;
}
.popup-close:hover { color: var(--purple-light); }
.popup-title {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1.4rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--purple-light);
    margin: 0 0 6px;
    letter-spacing: 0.01em;
}
.popup-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(200, 170, 255, 0.5);
    margin: 0 0 20px;
    letter-spacing: 0.03em;
}
.popup-form { display: flex; flex-direction: column; gap: 0.9rem; }
.popup-field { display: flex; flex-direction: column; gap: 0.3rem; }
.popup-field label {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(200, 170, 255, 0.55);
}
.popup-field input,
.popup-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--purple-light);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    resize: none;
}
.popup-field textarea { min-height: 60px; }
.popup-field input::placeholder,
.popup-field textarea::placeholder { color: rgba(255, 255, 255, 0.2); }
.popup-field input:focus,
.popup-field textarea:focus {
    border-color: rgba(147, 56, 244, 0.4);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 20px rgba(147, 56, 244, 0.15);
}
.popup-field input:-webkit-autofill,
.popup-field input:-webkit-autofill:hover,
.popup-field input:-webkit-autofill:focus,
.popup-field input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(22, 22, 22, 0.95) inset !important;
    -webkit-text-fill-color: var(--purple-light) !important;
    caret-color: var(--purple-light);
    border-color: rgba(255, 255, 255, 0.08) !important;
    transition: background-color 5000s ease-in-out 0s;
}
.popup-submit {
    width: auto;
    margin: 12px auto 0;
    padding: 14px 40px;
    display: block;
    background: rgba(147, 56, 244, 0.06);
    border: 1px solid rgba(168, 95, 246, 0.5);
    border-radius: 30px;
    color: var(--purple-light);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    cursor: none;
    transition: all 0.3s ease;
}
.popup-submit:hover {
    background: rgba(147, 56, 244, 0.15);
    box-shadow: 0 0 20px rgba(147, 56, 244, 0.25);
    transform: translateY(-1px);
}
.popup-submit:active { transform: translateY(0); }
.popup-footer-note {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.8rem;
    color: rgba(200, 170, 255, 0.5);
    margin: 12px 0 0;
    letter-spacing: 0.05em;
    text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto auto;
    }
    /* Project 1 layout on tablet */
    .bento-grid > .bento-info { grid-column: 1; grid-row: 1; }
    .bento-grid > .bento-wide { grid-column: 2; grid-row: 1; }
    .bento-grid > .bento-card:nth-child(3) { grid-column: 1; grid-row: 2; }
    .bento-grid > .bento-card:nth-child(4) { grid-column: 2; grid-row: 2; }
    .bento-grid > .bento-card:nth-child(5) { grid-column: 1 / 3; grid-row: 3; }

    /* Project 2 alt layout on tablet */
    .bento-grid-alt > .bento-wide { grid-column: 1; grid-row: 1; }
    .bento-grid-alt > .bento-info { grid-column: 2; grid-row: 1; }
    .bento-grid-alt > .bento-card:nth-child(3) { grid-column: 1; grid-row: 2; }
    .bento-grid-alt > .bento-card:nth-child(4) { grid-column: 2; grid-row: 2; }
    .bento-grid-alt > .bento-card:nth-child(5) { grid-column: 1 / 3; grid-row: 3; }

    .bento-card { min-height: 240px; }
    .bento-wide, .bento-info { min-height: 320px; }

    /* Large grid on tablet */
    .bento-grid-large { grid-template-columns: repeat(2, 1fr); }
    .bento-grid-large > .bento-card:nth-child(1) { grid-column: 1; grid-row: 1; }
    .bento-grid-large > .bento-card:nth-child(2) { grid-column: 2; grid-row: 1; }
    .bento-grid-large > .bento-card:nth-child(3) { grid-column: 1; grid-row: 2; }
    .bento-grid-large > .bento-card:nth-child(4) { grid-column: 2; grid-row: 2; }
    .bento-grid-large > .bento-card:nth-child(5) { grid-column: 1 / 3; grid-row: 3; }
    .bento-grid-large > .bento-card:nth-child(6) { grid-column: 1; grid-row: 4; }
    .bento-grid-large > .bento-card:nth-child(7) { grid-column: 2; grid-row: 4; }
    .bento-grid-large > .bento-card:nth-child(8) { grid-column: 1 / 3; grid-row: 5; }

    /* Compact grid on tablet */
    .bento-grid-compact { grid-template-columns: repeat(2, 1fr); }
    .bento-grid-compact > .bento-wide { grid-column: 1; grid-row: 1; }
    .bento-grid-compact > .bento-info { grid-column: 2; grid-row: 1; }
    .bento-grid-compact > .bento-info:first-child { grid-column: 1; grid-row: 1; }
    .bento-grid-compact > .bento-info:first-child ~ .bento-wide { grid-column: 2; grid-row: 1; }
    .bento-grid-compact > .bento-full { grid-column: 1 / 3; grid-row: 2; }

    /* Row grid on tablet */
    .bento-grid-row { grid-template-columns: repeat(2, 1fr); }
    .bento-grid-row > .bento-card:nth-child(1) { grid-column: 1; grid-row: 1; }
    .bento-grid-row > .bento-card:nth-child(2) { grid-column: 2; grid-row: 1; }
    .bento-grid-row > .bento-card:nth-child(3) { grid-column: 1 / 3; grid-row: 2; min-height: auto; }

    /* Colombiana grid on tablet */
    .bento-grid-6 { grid-template-columns: repeat(2, 1fr); }
    .bento-grid-6 > .bento-info { grid-column: 1; grid-row: 1; }
    .bento-grid-6 > .bento-wide { grid-column: 2; grid-row: 1; }
    .bento-grid-6 > .bento-card:nth-child(3) { grid-column: 1; grid-row: 2; }
    .bento-grid-6 > .bento-card:nth-child(4) { grid-column: 2; grid-row: 2; }
    .bento-grid-6 > .bento-card:nth-child(5) { grid-column: 1; grid-row: 3; }
    .bento-grid-6 > .bento-card:nth-child(6) { grid-column: 2; grid-row: 3; }

    .ms-lines-grid { flex-direction: column; align-items: center; }
    .ms-line-wrap { width: 100%; max-width: 320px; }
    .ms-line-card { width: 100%; }
}

@media (max-width: 768px) {
    body { cursor: auto; }
    a, button { cursor: auto; }
    a, button, input, textarea, select, label, [role="button"], .bento-img, .bento-tag, .btn-fixed, .ms-line-card, .ms-cta-button, .lightbox, .lightbox-close, .lightbox-arrow, .lightbox-img-wrap { cursor: auto !important; }
    #custom-cursor, #cursor-trail { display: none; }

    #main-nav { padding: 0.8rem 1.2rem; }
    .nav-center { display: none; }
    .nav-right .social-icons { display: none; }
    .hamburger-btn { display: flex; }
    .mobile-nav-overlay { display: flex; }
    .nav-logo { height: 28px; }

    #fixed-buttons {
        right: 50%;
        transform: translateX(50%);
        top: auto;
        bottom: 1.2rem;
        flex-direction: row;
        gap: 0.6rem;
        width: calc(100% - 2rem);
        justify-content: center;
    }
    .btn-fixed {
        font-size: 0.8rem;
        padding: 1rem 1.5rem;
        backdrop-filter: blur(15px);
        flex: 1;
        justify-content: center;
        max-width: 48%;
    }

    .ms-hero-title-glow {
        font-size: clamp(2.8rem, 12vw, 5rem);
        white-space: normal;
        color: rgba(140, 90, 220, 1);
        text-shadow:
            0 0 20px rgba(130, 70, 210, 0.5),
            0 0 50px rgba(120, 50, 200, 0.25);
    }
    .ms-hero-label {
        font-size: 1rem;
        letter-spacing: 5px;
        color: rgba(140, 90, 220, 1);
        text-shadow: 0 0 12px rgba(130, 70, 210, 0.4);
    }
    .ms-intro { padding: 4rem 6% 2.5rem; }
    .ms-intro-headline { font-size: clamp(1.6rem, 5.5vw, 2.2rem); }
    .ms-intro-text { font-size: 1.15rem; line-height: 1.7; }
    .ms-applications-label { font-size: 0.92rem; }
    .ms-app-item { font-size: 1rem; }
    .ms-project { padding: 1.5rem 0.8rem; }
    .ms-project + .ms-project { margin-top: 3.5rem; }
    .ms-cta { padding: 5rem 6% 6rem; }
    .ms-cta-headline { font-size: clamp(1.5rem, 5.5vw, 2.2rem); }

    .bento-grid, .bento-grid-alt {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    /* Stack everything on mobile */
    .bento-grid > .bento-info,
    .bento-grid > .bento-wide,
    .bento-grid > .bento-card:nth-child(3),
    .bento-grid > .bento-card:nth-child(4),
    .bento-grid > .bento-card:nth-child(5),
    .bento-grid-alt > .bento-info,
    .bento-grid-alt > .bento-wide,
    .bento-grid-alt > .bento-card:nth-child(3),
    .bento-grid-alt > .bento-card:nth-child(4),
    .bento-grid-alt > .bento-card:nth-child(5) {
        grid-column: 1;
        grid-row: auto;
    }
    .bento-grid-alt > .bento-card:nth-child(n+6) {
        grid-column: 1;
        grid-row: auto;
    }

    /* Info card always first on mobile */
    .bento-grid-alt > .bento-info { order: -1; }
    .bento-grid-row > .bento-info { order: -1; }
    .bento-grid-large > .bento-info { order: -1; }

    /* Stack all grid variants on mobile */
    .bento-grid-large,
    .bento-grid-compact,
    .bento-grid-row,
    .bento-grid-6 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bento-grid-large > .bento-card,
    .bento-grid-compact > .bento-card,
    .bento-grid-row > .bento-card,
    .bento-grid-6 > .bento-card {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .bento-card { min-height: 220px; }
    .bento-wide, .bento-wide-left, .bento-wide-right { min-height: 260px; }
    .bento-info { min-height: auto; padding: 1.8rem 1.5rem; }
    .bento-project-title { font-size: 2.5rem; }
    .bento-project-desc { font-size: 1.1rem; line-height: 1.7; }
    .bento-tag { font-size: 0.9rem; }

    .ms-other-lines { padding: 3rem 4% 1rem; }
    .ms-line-card { padding: 0.85rem 1.8rem; font-size: 1rem; }

    .ms-cta { padding: 5rem 6% 6rem; }

    .lightbox-arrow { width: 40px; height: 40px; }
    .lightbox-prev { left: 0.8rem; }
    .lightbox-next { right: 0.8rem; }
    .lightbox-arrow svg { width: 20px; height: 20px; }

    #footer { padding: 3rem 1.5rem 6rem; }
    .footer-tagline { font-size: 1rem; }
    .footer-copy { font-size: 0.85rem; }
    .footer-logo { width: clamp(160px, 45vw, 220px); }

    .popup-modal { width: 90vw; max-height: 90vh; overflow-y: auto; padding: 20px 20px; }
}

@media (max-width: 480px) {
    .ms-hero-subtitle { font-size: 1rem; }
    .bento-card { min-height: 200px; }
    .bento-wide { min-height: 220px; }
    .ms-cta-button { font-size: 0.78rem; padding: 0.85rem 2rem; }
}

.popup-success {
    text-align: center;
    padding: 3rem 0;
}
.popup-success p {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    color: rgba(200, 170, 255, 0.6);
    margin-top: 0.5rem;
}
