/* ==========================================================================
   ASTROFOX · Core design system
   Dark theme · bluey-purple palette · Poppins · generous whitespace
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* ---- Palette ---- */
    --blue:          #77adff;   /* glow */
    --blue-light:    #96c7ff;
    --purple:        #e0a2ee;   /* accent */
    --purple-light:  #f0c9f7;
    --periwinkle:    #6893ec;   /* core brand */
    --magenta:       #ce42f5;

    /* ---- Surfaces ---- */
    --bg-primary:    #0a0a14;
    --bg-secondary:  #10101f;
    --bg-card:       rgba(22, 22, 40, 0.55);
    --bg-card-solid: #14142a;
    --bg-elevated:   rgba(30, 30, 54, 0.65);

    /* ---- Glass (Callisto-style panels) ---- */
    --glass-bg:      rgba(30, 30, 54, 0.40);
    --glass-border:  rgba(255, 255, 255, 0.14);
    --glass-shadow:  0 8px 32px rgba(0, 0, 0, 0.30);

    /* ---- Text ---- */
    --text-primary:   #f4f4fb;
    --text-secondary: #a6a8c4;
    --text-muted:     #6f7196;

    /* ---- Lines & radius ---- */
    --border-color:        rgba(255, 255, 255, 0.08);
    --border-color-hover:  rgba(151, 173, 255, 0.45);
    --border-width:        1px;
    --radius:      20px;
    --radius-sm:   14px;
    --radius-lg:   28px;

    /* ---- Gradients ---- */
    --gradient-primary: linear-gradient(135deg, #77adff 0%, #a89bf5 45%, #e0a2ee 100%);
    --gradient-soft:    linear-gradient(135deg, rgba(119,173,255,0.14), rgba(224,162,238,0.14));
    --gradient-text:    linear-gradient(120deg, #96c7ff 0%, #c9b3ff 50%, #f0c9f7 100%);

    /* ---- Shadows / glow ---- */
    --shadow-card:       0 10px 40px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 20px 60px rgba(80, 90, 190, 0.28);
    --glow-blue:   0 0 40px rgba(119, 173, 255, 0.35);
    --glow-purple: 0 0 40px rgba(224, 162, 238, 0.30);

    /* ---- Accent for archived (warm) ---- */
    --accent-warm: #f5b25e;

    /* ---- Motion ---- */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* ---- Rhythm ---- */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  7rem;
    --header-height: 74px;
    --container: 1200px;

    --font-body: 'Poppins', system-ui, sans-serif;

    /* Alias tokens reused by the ported blog stylesheet */
    --primary: var(--periwinkle);
    --primary-light: var(--blue-light);
    --border-radius: var(--radius);
    --border-radius-sm: var(--radius-sm);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1rem); }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Ambient nebula wash behind everything */
body::before {
    content: "";
    position: fixed;
    inset: -25%;
    z-index: -2;
    background:
        radial-gradient(circle at 15% 12%, rgba(119, 173, 255, 0.10), transparent 42%),
        radial-gradient(circle at 85% 25%, rgba(224, 162, 238, 0.10), transparent 45%),
        radial-gradient(circle at 50% 95%, rgba(104, 147, 236, 0.08), transparent 50%);
    animation: drift 26s ease-in-out infinite;
    pointer-events: none;
}
@keyframes drift {
    50% { transform: translate(4%, -3%) scale(1.05); }
}

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

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

h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }

::selection { background: rgba(168, 155, 245, 0.4); color: #fff; }

/* ---- Layout helpers ---- */

.section-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

section { padding: var(--space-xl) 0; }

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--blue-light);
    margin-bottom: 1rem;
}

.section-head { max-width: 640px; margin-bottom: var(--space-lg); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 1rem;
    font-weight: 400;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Buttons (adapted from Callisto: shine sweep + glass) ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
/* Diagonal shine that sweeps across on hover */
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
    z-index: -1;
}
.btn:hover::before { transform: translateX(100%) rotate(45deg); }

.btn-primary {
    background: var(--gradient-primary);
    background-size: 150%;
    background-position-x: center;
    color: #0a0a14;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 26px rgba(120, 140, 240, 0.4);
}
.btn-primary:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 14px 38px rgba(140, 150, 245, 0.55);
}

.btn-outline {
    background: rgba(151, 173, 255, 0.06);
    border: 1px solid rgba(151, 173, 255, 0.3);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn-outline:hover {
    border-color: var(--border-color-hover);
    background: rgba(151, 173, 255, 0.14);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(120, 140, 240, 0.25);
}

/* Glass pill (Callisto nav-action style) */
.btn-glass {
    background: rgba(248, 250, 252, 0.08);
    backdrop-filter: blur(12px) contrast(1.1);
    -webkit-backdrop-filter: blur(12px) contrast(1.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}
.btn-glass:hover {
    background: rgba(248, 250, 252, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 16px rgba(0, 0, 0, 0.14);
}

.btn-ghost { background: transparent; color: var(--text-secondary); padding-left: 0; }
.btn-ghost::before { display: none; }
.btn-ghost:hover { color: var(--blue-light); gap: 0.85rem; }

.btn-lg { padding: 1.05rem 2.2rem; font-size: 1.02rem; }

/* ---- Status badges ---- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
}
.badge::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.badge-live {
    color: #7ee0b4;
    background: rgba(78, 205, 150, 0.12);
    border-color: rgba(78, 205, 150, 0.28);
}
.badge-live::before { box-shadow: 0 0 8px currentColor; animation: pulse 2s infinite; }
.badge-development {
    color: var(--blue-light);
    background: rgba(119, 173, 255, 0.12);
    border-color: rgba(119, 173, 255, 0.28);
}
.badge-archived {
    color: var(--accent-warm);
    background: rgba(245, 178, 94, 0.10);
    border-color: rgba(245, 178, 94, 0.25);
}
@keyframes pulse { 50% { opacity: 0.4; } }

/* ---- Generic card surface ---- */

.surface {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-card);
}

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .older-collapse { transition: none; }
    body::before { animation: none; }
    html { scroll-behavior: auto; }
}
