/* Fonts */
:root {
    --font-primary: 'Orbitron', sans-serif;
    --font-secondary: 'Chakra Petch', sans-serif;
    --font-body: 'Inter', sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    /* Theme Colors */
    --color-primary-green: #78c2ad;
    /* A nice pastel mint */
    --color-primary-hover: #5aa892;
}

body {
    font-family: var(--font-body);
    overflow-x: hidden;
    background-color: #f0f2f5;
    /* Match Morph body bg */
    background-image:
        linear-gradient(rgba(120, 194, 173, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 194, 173, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    /* Technical Grid */
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.orbital-title {
    font-family: var(--font-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn,
.badge,
.skill-pill,
.nav-link {
    font-family: var(--font-secondary);
    letter-spacing: 0.02em;
}

/* Color Overrides for Pastel Green Theme */
.text-primary {
    color: var(--color-primary-green) !important;
}

.bg-primary {
    background-color: var(--color-primary-green) !important;
}

.border-primary {
    border-color: var(--color-primary-green) !important;
}

.btn-primary {
    background-color: var(--color-primary-green) !important;
    border-color: var(--color-primary-green) !important;
    background-image: none !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--color-primary-hover) !important;
    border-color: var(--color-primary-hover) !important;
    background-image: none !important;
}

.btn-outline-primary {
    color: var(--color-primary-green) !important;
    border-color: var(--color-primary-green) !important;
    background-image: none !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: var(--color-primary-green) !important;
    border-color: var(--color-primary-green) !important;
    color: white !important;
    background-image: none !important;
}

.badge.bg-primary {
    background-color: var(--color-primary-green) !important;
}

/* Navbar Blur */
.blurred-nav {
    backdrop-filter: blur(10px);
    background-color: rgba(240, 242, 245, 0.8) !important;
}

/* Glassmorphism & Deep Shadows */
.shadow-soft {
    box-shadow:
        10px 10px 20px rgba(0, 0, 0, 0.05),
        -10px -10px 20px rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.glass-card {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    position: relative;
    overflow: hidden;
}

/* Neon Glows */
.btn-primary:hover,
.btn-primary:focus {
    box-shadow: 0 0 25px rgba(120, 194, 173, 0.7) !important;
    transform: translateY(-2px);
}

.skill-pill:hover {
    background: var(--color-primary-green) !important;
    color: white !important;
    box-shadow: 0 0 20px rgba(120, 194, 173, 0.8) !important;
    transform: scale(1.1);
}

.badge.bg-primary:hover {
    box-shadow: 0 0 15px rgba(120, 194, 173, 0.6) !important;
}

.btn-primary.shadow-soft {
    position: relative;
    overflow: hidden;
    box-shadow: 5px 5px 10px #b8b9be, -5px -5px 10px #ffffff !important;
    border: none;
    transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s;
}

.btn-primary.shadow-soft::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(45deg);
    animation: glint 5s infinite;
}

@keyframes glint {
    0% {
        left: -100%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.btn-primary.shadow-soft:hover {
    transform: translateY(-2px);
    box-shadow: 8px 8px 16px #b8b9be, -8px -8px 16px #ffffff !important;
}

/* Hero Space Theme */
#starfield {
    background: radial-gradient(circle at center, #1a1a2e 0%, #0f0f1a 100%);
    z-index: 0;
}

.blueprint-grid {
    background-image:
        linear-gradient(rgba(120, 194, 173, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 194, 173, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
    animation: twinkle var(--duration) ease-in-out infinite;
}

.dust-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    pointer-events: none;
    animation: dust-float var(--duration) linear infinite;
}

@keyframes dust-float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) translateX(20px);
        opacity: 0;
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Hero Shapes Overrides */
.shape {
    position: absolute;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
    /* Slightly dimmer for contrast */
    animation: float 10s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--color-primary-green);
    /* Morph Primaryish color */
    top: -100px;
    left: -100px;
    border-radius: 50%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #f3969a;
    /* Secondary/Accent */
    bottom: -50px;
    right: -50px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation-delay: -5s;
}

/* Nebula & Deep Space Effects */
.nebula {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: drift 30s ease-in-out infinite;
}

.nebula-1 {
    background: radial-gradient(circle, #4831d4, transparent);
    top: -10%;
    left: -5%;
}

.nebula-2 {
    background: radial-gradient(circle, #9d50bb, transparent);
    bottom: 10%;
    right: -5%;
    animation-delay: -10s;
}

.nebula-3 {
    background: radial-gradient(circle, #240b36, transparent);
    top: 40%;
    left: 50%;
    animation-delay: -20s;
}

@keyframes drift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

/* Celestial Bodies */
.celestial-body {
    position: absolute;
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.1);
}

.planet-saturn {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
}

.planet-mars {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #ff4500, #8b0000);
}

/* Terminology Enhancements */
.mission-heading {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--color-primary-green);
    margin-bottom: 1rem;
    display: block;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(30px, 20px) rotate(10deg);
    }
}

/* Animation Utility Classes */
.reveal-text {
    animation: slideUpFade 1s var(--ease-out-expo) forwards;
}

.opacity-0 {
    opacity: 0;
}

.reveal-delay-1 {
    animation: slideUpFade 1s var(--ease-out-expo) 0.2s forwards;
    opacity: 0;
    /* Init hidden */
    animation-fill-mode: forwards;
}

.reveal-delay-2 {
    animation: slideUpFade 1s var(--ease-out-expo) 0.4s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal States (Handled by JS IntersectionObserver) */
.scroll-reveal {
    opacity: 0;
    transition:
        opacity 1.2s cubic-bezier(0.23, 1, 0.32, 1),
        transform 1.2s cubic-bezier(0.23, 1, 0.32, 1),
        filter 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    filter: blur(10px);
}

.scroll-reveal.active {
    opacity: 1;
    filter: blur(0);
}

.scroll-reveal.blur-in {
    filter: blur(20px);
    transform: scale(0.95);
}

.scroll-reveal.blur-in.active {
    filter: blur(0);
    transform: scale(1);
}

/* Transform types */
.slide-right.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-right {
    transform: translateX(-50px);
}

.slide-left.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-left {
    transform: translateX(50px);
}

.scale-up.active {
    opacity: 1;
    transform: scale(1);
}

.scale-up {
    transform: scale(0.9);
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-up {
    transform: translateY(50px);
}

.blur-in.active {
    opacity: 1;
    filter: blur(0);
}

.blur-in {
    filter: blur(10px);
}

/* Stagger Children */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--ease-out-expo);
}

.stagger-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Skills Pills */
.skill-pill {
    display: inline-block;
    padding: 12px 24px;
    background: #eef0f3;
    border-radius: 50px;
    font-weight: 600;
    color: #555;
    margin: 5px;
}

/* Project Cards */
.project-card {
    transition: transform 0.4s var(--ease-out-expo);
}

/* Science Background Decorations */
.science-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    /* Increased from -1 to be on top of background but below text (z-2/z-3) */
    overflow: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.sci-icon {
    position: absolute;
    color: var(--color-primary-green);
    opacity: 0.15;
    font-size: 2.5rem;
    filter: blur(1px);
    animation: float-around 20s ease-in-out infinite;
}

.sci-icon.dna {
    animation-duration: 25s;
}

.sci-icon.atom {
    animation-duration: 15s;
}

.sci-icon.micro {
    animation-duration: 30s;
}

@keyframes float-around {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 30px) rotate(-10deg);
    }
}

.project-card:hover {
    transform: translateY(-5px) scale(1.01);
    z-index: 10;
}

/* Compact Certificate Display */
.certificate-frame {
    background: white !important;
    padding: 0.4rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 1.5rem !important;
    position: relative !important;
    max-width: 450px !important;
    /* Increased from 350px */
    border-radius: 2px !important;
    display: inline-block !important;
}

.certificate-inner {
    border: 2px solid #ccd1d9 !important;
    padding: 1px !important;
    height: 100% !important;
}

.certificate-inner img {
    max-height: 400px !important;
    width: auto !important;
    object-fit: contain !important;
}

.certificate-pin {
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
    z-index: 5 !important;
}

/* Archive Override */
.certificate-frame.archive {
    max-width: 600px !important;
}

.certificate-frame.archive .certificate-inner img {
    max-height: 500px !important;
}

/* Voyage Floating Element */
.voyage-element {
    animation: voyage-drift 60s ease-in-out infinite !important;
    z-index: 1 !important;
    /* Above starfield (0/1) but behind text (z-2) */
    opacity: 1 !important;
    /* Full visibility */
}

.voyage-element img {
    width: 120px !important;
    /* Larger */
    height: auto !important;
    filter: brightness(1.2) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4)) !important;
}

@keyframes voyage-drift {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    33% {
        transform: translate(-100px, 50px) rotate(10deg) scale(1.05);
    }

    66% {
        transform: translate(50px, -30px) rotate(-5deg) scale(0.95);
    }
}