:root {
    --obsidian: #0C0C1C;
    --specimen-glass: rgba(18, 18, 28, 0.85);
    --boreal-mint: #7FE5C4;
    --ionosphere: #B48EF0;
    --magnetosphere: #F0A8C4;
    --lunar-white: #E8E4F0;
    --frost-gray: #9A96A8;
    --solar-flare: #F4D47C;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--obsidian);
    color: var(--lunar-white);
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Aurora Background */
.aurora {
    position: fixed;
    inset: 0;
    background: conic-gradient(
        from 0deg,
        #0C0C1C, #1A3A2F, #2A1A3E, #0C0C1C, #1E2A1E, #1A1A3E, #0C0C1C
    );
    filter: blur(80px);
    opacity: 0.6;
    z-index: -1;
    animation: aurora-shift 45s linear infinite;
}

@keyframes aurora-shift {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Nav Dots */
.dot-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
}

.dot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    cursor: pointer;
    padding: 6px;
}

.nav-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--boreal-mint);
}

.nav-overlay {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--specimen-glass);
    backdrop-filter: blur(12px);
    margin-top: 0.5rem;
    border-radius: 4px;
}

.dot-nav:hover .nav-overlay,
.dot-nav.open .nav-overlay {
    display: flex;
}

.nav-overlay a {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lunar-white);
    text-decoration: none;
    transition: color 200ms ease;
}

.nav-overlay a:hover {
    color: var(--boreal-mint);
}

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

.mote {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--boreal-mint);
    opacity: 0.2;
    animation: drift-up 20s linear infinite;
}

@keyframes drift-up {
    0% { transform: translateY(0); opacity: 0.15; }
    50% { opacity: 0.25; }
    100% { transform: translateY(-100vh); opacity: 0.1; }
}

/* Observatory */
.observatory {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    position: relative;
    z-index: 2;
}

.site-identity {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--frost-gray);
}

/* Lens Flare */
.lens-flare {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
}

.flare-hero {
    top: 15%;
    right: 10%;
    background:
        radial-gradient(ellipse at center, rgba(127, 229, 196, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(180, 142, 240, 0.06) 0%, transparent 70%);
    animation: flare-breathe 8s ease-in-out infinite;
}

.flare-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background:
        radial-gradient(ellipse at center, rgba(127, 229, 196, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at center, rgba(180, 142, 240, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at center, rgba(240, 168, 196, 0.04) 0%, transparent 80%);
    animation: flare-breathe 12s ease-in-out infinite;
}

@keyframes flare-breathe {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

.flare-center {
    animation: flare-center-breathe 12s ease-in-out infinite;
}

@keyframes flare-center-breathe {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* Specimens Grid */
.specimens {
    position: relative;
    z-index: 2;
    padding: clamp(4rem, 10vh, 8rem) clamp(1rem, 3vw, 3rem);
}

.ma-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(16px, 3vw, 48px);
    max-width: 1200px;
    margin: 0 auto;
}

.specimen-card {
    background: var(--specimen-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: clamp(20px, 3vw, 40px);
    border-bottom: 1px solid rgba(127, 229, 196, 0.2);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease, transform 600ms ease, border-color 400ms ease;
    transition-delay: calc(var(--delay, 0) * 100ms);
}

.specimen-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.specimen-card:hover {
    border-bottom-color: rgba(127, 229, 196, 0.6);
}

/* Card sizing */
.card-wide { grid-column: span 7; }
.card-narrow { grid-column: span 5; }
.card-tall { grid-column: span 4; min-height: 320px; }
.card-short { grid-column: span 4; min-height: 200px; }
.card-medium { grid-column: span 4; min-height: 260px; }

.card-anim {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 64px;
    height: 64px;
}

.card-anim svg {
    width: 100%;
    height: 100%;
    animation: spin-slow 20s linear infinite;
}

@keyframes spin-slow {
    to { transform: rotate(360deg); }
}

.card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    letter-spacing: 0.02em;
    color: var(--lunar-white);
    margin-bottom: 0.75rem;
    text-rendering: geometricPrecision;
}

.card-body {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--lunar-white);
    max-width: 50ch;
    margin-bottom: 1rem;
}

.card-meta {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--frost-gray);
}

/* City-Urban Lines */
.specimens::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    width: 1px;
    height: 100%;
    background: rgba(127, 229, 196, 0.08);
}

.specimens::after {
    content: '';
    position: absolute;
    top: 0;
    left: 75%;
    width: 1px;
    height: 100%;
    background: rgba(127, 229, 196, 0.08);
}

/* Lens Room */
.lens-room {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 4rem 2rem;
}

.lens-quote {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: var(--lunar-white);
    text-align: center;
    max-width: 20ch;
    position: relative;
    z-index: 2;
    opacity: 0.8;
}

/* Logbook */
.logbook {
    padding: clamp(4rem, 10vh, 8rem) clamp(2rem, 4vw, 4rem);
    max-width: 500px;
    position: relative;
    z-index: 2;
}

.log-entry {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--frost-gray);
    margin-bottom: 1.5rem;
}

.log-date {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--frost-gray);
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .ma-grid {
        grid-template-columns: 1fr;
    }

    .card-wide, .card-narrow, .card-tall, .card-short, .card-medium {
        grid-column: span 1;
        min-height: auto;
    }

    .specimens::before, .specimens::after { display: none; }
    .dot-nav { top: 12px; right: 12px; }
    .particles { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .aurora { animation: none; }
    .mote { animation: none; display: none; }
    .lens-flare { animation: none; opacity: 0.7; }
    .card-anim svg { animation: none; }
    .specimen-card {
        opacity: 1;
        transform: none;
        transition: border-color 400ms ease;
    }
}
