/* luminescence.dev — ethereal blue calm portfolio */

:root {
    --void: #060818;
    --glow-primary: #4a90ff;
    --glow-secondary: #80c0ff;
    --glow-tertiary: #a0d0ff;
    --panel-bg: rgba(10, 20, 40, 0.4);
    --panel-border: rgba(74, 144, 255, 0.08);
    --text: #8098b8;
    --bright-text: #c8d8f0;
    --display: 'Jost', sans-serif;
    --code: 'Inconsolata', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void);
    color: var(--text);
    font-family: var(--display);
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Subtle starfield gradient */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(74, 144, 255, 0.03), transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(128, 192, 255, 0.02), transparent 60%),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 0;
}

/* ---------- Particles ---------- */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(74, 144, 255, 0.1);
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px rgba(74, 144, 255, 0.3);
    will-change: transform, opacity;
}

@keyframes drift-a {
    0%   { transform: translate(0, 0); opacity: 0.0; }
    20%  { opacity: 0.9; }
    100% { transform: translate(80px, -120px); opacity: 0.0; }
}
@keyframes drift-b {
    0%   { transform: translate(0, 0); opacity: 0.0; }
    25%  { opacity: 0.8; }
    100% { transform: translate(-100px, 90px); opacity: 0.0; }
}
@keyframes drift-c {
    0%   { transform: translate(0, 0); opacity: 0.0; }
    30%  { opacity: 0.7; }
    100% { transform: translate(140px, 60px); opacity: 0.0; }
}
@keyframes drift-d {
    0%   { transform: translate(0, 0); opacity: 0.0; }
    25%  { opacity: 0.6; }
    100% { transform: translate(-70px, -150px); opacity: 0.0; }
}

/* ---------- Scroll Trail ---------- */
.scroll-trail {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 0;
    background: linear-gradient(
        180deg,
        rgba(74, 144, 255, 0.18) 0%,
        rgba(74, 144, 255, 0.08) 60%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
    transition: height 0.2s ease-out;
}

/* ---------- Chamber ---------- */
.chamber {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    width: 720px;
    height: 720px;
    max-width: 90vw;
    max-height: 90vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 144, 255, 0.05) 0%, transparent 70%);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

.hero-glow--inner {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(128, 192, 255, 0.06) 0%, transparent 65%);
    animation: pulse-inner 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.05; }
    50%      { transform: translate(-50%, -50%) scale(1.1); opacity: 0.08; }
}

@keyframes pulse-inner {
    0%, 100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.06; }
    50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 0.10; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.eyebrow {
    font-family: var(--code);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: lowercase;
    color: rgba(160, 208, 255, 0.45);
    margin-bottom: 1.6rem;
}

.domain {
    font-family: var(--display);
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 3rem);
    letter-spacing: 0.1em;
    color: var(--bright-text);
    text-shadow: 0 0 30px rgba(74, 144, 255, 0.2);
    margin-bottom: 1.8rem;
    animation: faint-flicker 11s ease-in-out infinite;
}

@keyframes faint-flicker {
    0%, 100% { text-shadow: 0 0 30px rgba(74, 144, 255, 0.20); }
    50%      { text-shadow: 0 0 48px rgba(74, 144, 255, 0.35), 0 0 80px rgba(128, 192, 255, 0.10); }
}

.tagline {
    max-width: 38rem;
    margin: 0 auto;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.85;
}

.depth-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    opacity: 0.55;
}

.depth-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, transparent, rgba(74, 144, 255, 0.3), transparent);
    animation: trickle 3.2s ease-in-out infinite;
}

@keyframes trickle {
    0%, 100% { opacity: 0.2; transform: scaleY(0.6); transform-origin: top; }
    50%      { opacity: 0.9; transform: scaleY(1); }
}

.depth-label {
    font-family: var(--code);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: rgba(160, 208, 255, 0.4);
    text-transform: lowercase;
}

/* ---------- Organisms ---------- */
.organisms {
    padding: 8rem 0 6rem;
    display: flex;
    flex-direction: column;
    gap: 4.5rem;
    position: relative;
}

.panel {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 560px;
    box-shadow:
        0 0 40px rgba(74, 144, 255, 0.05),
        inset 0 0 20px rgba(74, 144, 255, 0.02);
    position: relative;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 1.2s ease,
                box-shadow 0.8s ease,
                border-color 0.8s ease;
}

.panel.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.panel:hover {
    border-color: rgba(74, 144, 255, 0.18);
    box-shadow:
        0 0 60px rgba(74, 144, 255, 0.12),
        inset 0 0 30px rgba(74, 144, 255, 0.04);
}

.panel--a {
    margin-left: 10vw;
}

.panel--b {
    margin-left: auto;
    margin-right: 8vw;
}

@media (max-width: 760px) {
    .panel--a, .panel--b {
        margin-left: 0;
        margin-right: 0;
    }
}

.panel--dim {
    opacity: 0.85;
    background: rgba(10, 20, 40, 0.32);
}

.panel--dim.is-visible { opacity: 0.85; }

.panel--dimmer {
    opacity: 0.7;
    background: rgba(10, 20, 40, 0.26);
    border-color: rgba(74, 144, 255, 0.05);
    box-shadow: 0 0 25px rgba(74, 144, 255, 0.03);
}

.panel--dimmer.is-visible { opacity: 0.7; }

.panel-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.panel-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glow-primary);
    box-shadow: 0 0 12px rgba(74, 144, 255, 0.6);
    animation: marker-pulse 4s ease-in-out infinite;
}

.panel-marker--faint {
    background: rgba(74, 144, 255, 0.4);
    box-shadow: 0 0 8px rgba(74, 144, 255, 0.25);
}

@keyframes marker-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1.0; transform: scale(1.3); }
}

.panel-title {
    font-family: var(--display);
    font-weight: 300;
    font-size: 1.35rem;
    letter-spacing: 0.06em;
    color: var(--bright-text);
}

.panel-body {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.85;
}

.panel-code {
    margin-top: 1.4rem;
    padding: 1rem 1.1rem;
    background: rgba(6, 8, 24, 0.55);
    border: 1px solid rgba(74, 144, 255, 0.06);
    border-radius: 8px;
    font-family: var(--code);
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--glow-tertiary);
    overflow-x: auto;
    white-space: pre;
    line-height: 1.6;
}

.panel-code--quiet {
    color: rgba(160, 208, 255, 0.55);
    border-color: rgba(74, 144, 255, 0.04);
}

.panel-list {
    list-style: none;
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.panel-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--code);
    font-size: 0.85rem;
    color: rgba(160, 208, 255, 0.7);
}

.bullet {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--glow-secondary);
    box-shadow: 0 0 6px rgba(128, 192, 255, 0.5);
}

.state-row {
    margin-top: 1.4rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.state-chip {
    background: rgba(6, 8, 24, 0.6);
    border: 1px solid rgba(74, 144, 255, 0.1);
    color: var(--text);
    font-family: var(--code);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.6s ease,
                border-color 0.6s ease,
                box-shadow 0.6s ease,
                background 0.6s ease;
}

.state-chip:hover {
    color: var(--bright-text);
    border-color: rgba(128, 192, 255, 0.35);
    box-shadow: 0 0 20px rgba(74, 144, 255, 0.18);
    background: rgba(20, 32, 60, 0.6);
}

.state-chip.is-active {
    color: var(--glow-tertiary);
    border-color: rgba(160, 208, 255, 0.5);
    box-shadow: 0 0 28px rgba(74, 144, 255, 0.28),
                inset 0 0 12px rgba(74, 144, 255, 0.1);
}

/* ---------- Abyss / Footer ---------- */
.abyss {
    padding: 12rem 2rem 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    text-align: center;
}

.abyss-text {
    font-family: var(--code);
    font-size: 0.78rem;
    letter-spacing: 0.4em;
    color: rgba(128, 152, 184, 0.35);
    text-transform: lowercase;
}

.last-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(74, 144, 255, 0.2);
    box-shadow: 0 0 24px rgba(74, 144, 255, 0.25),
                0 0 60px rgba(74, 144, 255, 0.08);
    animation: last-breath 6s ease-in-out infinite;
}

@keyframes last-breath {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1.0; transform: scale(1.4); }
}

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