/* =========================================================
   COSMIC CORE CSS — Obsidian Emerald & Champagne Amber Theme
   Ragu Ram P Portfolio
========================================================= */

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

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

::selection {
    background: rgba(16, 232, 159, 0.28);
    color: #ffffff;
}

body {
    min-height: 100vh;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f8fafc;
    background:
        radial-gradient(circle at 50% 8%, rgba(16, 232, 159, 0.15), transparent 36%),
        radial-gradient(circle at 10% 86%, rgba(245, 176, 65, 0.10), transparent 34%),
        radial-gradient(circle at 90% 82%, rgba(34, 211, 238, 0.11), transparent 34%),
        #05080a;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #05080a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(#10e89f, #22d3ee, #f5b041);
    border-radius: 20px;
}

/* AMBIENT BACKGROUND LAYERS */
.cursor-glow {
    position: fixed;
    width: 660px;
    height: 660px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 232, 159, 0.12), rgba(245, 176, 65, 0.04) 44%, transparent 68%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    transition: left 0.05s linear, top 0.05s linear;
}

.grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(16, 232, 159, 0.14) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 48px 48px, 48px 48px, 48px 48px;
    -webkit-mask-image: radial-gradient(circle at center, black 20%, transparent 90%);
    mask-image: radial-gradient(circle at center, black 20%, transparent 90%);
    animation: gridMove 18s linear infinite;
}

@keyframes gridMove {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(48px);
    }
}

.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(135px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.20;
    animation: blobFloat 13s ease-in-out infinite alternate;
}

.blob-one {
    width: 680px;
    height: 680px;
    left: -300px;
    top: -320px;
    background: #0d9488;
}

.blob-two {
    width: 660px;
    height: 660px;
    right: -300px;
    bottom: -330px;
    background: #d97706;
    opacity: 0.16;
    animation-delay: -4s;
}

.blob-three {
    width: 520px;
    height: 520px;
    left: 50%;
    top: 34%;
    transform: translate(-50%, -50%);
    background: #10b981;
    opacity: 0.10;
}

@keyframes blobFloat {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(70px, 48px) scale(1.12);
    }
}

.noise {
    position: fixed;
    inset: 0;
    opacity: 0.022;
    pointer-events: none;
    z-index: 2;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.6'/%3E%3C/svg%3E");
}

#particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(209, 250, 229, 0.85);
    box-shadow: 0 0 12px rgba(16, 232, 159, 0.9);
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    from {
        transform: translateY(110vh);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    to {
        transform: translateY(-20vh);
        opacity: 0;
    }
}

/* PAGE TRANSITION CURTAIN */
.transition-overlay,
.page-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(circle at center, #0c2620, #05080a 66%);
    transform: scaleY(0);
    transform-origin: bottom;
    pointer-events: none;
}

.transition-overlay.active,
.page-transition.active {
    animation: pageTransitionCurtain 0.72s cubic-bezier(.76, 0, .24, 1) forwards;
}

@keyframes pageTransitionCurtain {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

/* COMMON ANIMATIONS & STATUS DOT */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textShine {
    to {
        background-position: 220% center;
    }
}

.status-dot-green {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #10e89f;
    box-shadow: 0 0 14px #10e89f, 0 0 28px rgba(16, 232, 159, 0.55);
    animation: pulseGreenDot 1.7s infinite;
}

@keyframes pulseGreenDot {
    50% {
        opacity: 0.45;
        transform: scale(0.75);
    }
}

.status-dot-cyan {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #f5b041;
    box-shadow: 0 0 15px #f5b041;
    animation: pulseCyanDot 2s infinite;
}

@keyframes pulseCyanDot {
    50% {
        transform: scale(1.55);
    }
}

/* SHARED GLASS PILL BUTTON */
.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1px solid rgba(110, 231, 183, 0.16);
    border-radius: 100px;
    background: rgba(12, 20, 22, 0.58);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: rgba(240, 253, 250, 0.84);
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.32s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.pill-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    border-color: rgba(16, 232, 159, 0.65);
    background: rgba(16, 232, 159, 0.14);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.38), 0 0 28px rgba(16, 232, 159, 0.22);
}

.pill-btn--back:hover {
    transform: translateX(-5px);
}

.pill-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 700px) {
    .cursor-glow {
        display: none;
    }
}

/* GLOBAL LIGHTBOX ZOOM MODAL */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox-modal.open {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 9, 0.92);
    backdrop-filter: blur(14px);
}

.lightbox-dialog {
    position: relative;
    z-index: 2;
    max-width: min(92vw, 1320px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lightbox-dialog img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 16px;
    border: 1px solid rgba(110, 231, 183, 0.24);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.85);
    background: #080d0f;
}

.lightbox-caption {
    font-size: 13px;
    color: rgba(236, 253, 245, 0.84);
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -16px;
    right: -12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(110, 231, 183, 0.32);
    background: #0d191b;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    border-color: #10e89f;
    background: #132b29;
}
