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

:root {
    --void-black: #0e1014;
    --observatory-dark: #16181c;
    --grid-line: #2e333b;
    --hover-border: #3a3f47;
    --elevation-rule: #4a5060;
    --muted-tag: #6a7280;
    --scholar-gray: #8a9298;
    --phosphor-silver: #a0aab8;
    --bright-prose: #b0b8c2;
    --high-signal: #c8d0dc;
    --peak-white: #e2e8f0;
    --contour-stroke: #1e2228;
    --hover-active: #5a6370;
}

body {
    background: var(--void-black);
    color: var(--phosphor-silver);
    font-family: 'Space Mono', monospace;
    overflow-x: hidden;
}

/* Navigation */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--observatory-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    border-bottom: 1px solid var(--grid-line);
}

.nav-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    color: var(--high-signal);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 16px;
}

.nav-token {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.65rem, 1vw, 0.75rem);
    color: var(--muted-tag);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 200ms ease-out, text-shadow 200ms ease-out;
}

.nav-token:hover,
.nav-token.active {
    color: var(--phosphor-silver);
    text-shadow: 0 0 8px rgba(160, 170, 185, 0.4);
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--peak-white);
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 48px;
}

.hero-ridgeline {
    width: 100%;
    max-width: 1440px;
    height: 200px;
}

.ridgeline-path {
    stroke-dasharray: 2800;
    stroke-dashoffset: 2800;
    opacity: 0;
}

.ridgeline-path.animate {
    opacity: 1;
    animation: drawRidgeline 4s ease-in-out forwards;
}

.ridgeline-fill {
    opacity: 0;
    transition: opacity 2s ease;
}

.ridgeline-fill.visible {
    opacity: 0.6;
}

@keyframes drawRidgeline {
    to { stroke-dashoffset: 0; }
}

.hero-text {
    text-align: center;
    margin-top: 32px;
}

.hero-title {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.5rem, 4vw + 0.3rem, 3.5rem);
    color: var(--phosphor-silver);
    letter-spacing: 0.05em;
    min-height: 1.2em;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    color: var(--scholar-gray);
    margin-top: 16px;
    opacity: 0;
    transition: opacity 1200ms ease;
}

.hero-subtitle.visible {
    opacity: 1;
}

/* Section Dividers */
.section-divider {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 0;
}

.section-divider svg {
    width: 100%;
    height: 60px;
}

/* Observations Section */
.observations-section {
    position: relative;
    padding: 40px 24px;
}

.observation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--hover-border);
}

.obs-card {
    background: var(--observatory-dark);
    border: 1px solid var(--grid-line);
    padding: 20px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition: opacity 600ms cubic-bezier(0.175, 0.885, 0.32, 1.275),
                transform 600ms cubic-bezier(0.175, 0.885, 0.32, 1.275),
                border-color 200ms ease-out,
                background-color 50ms ease-out;
}

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

.obs-card:hover {
    border-color: var(--hover-active);
    background: #1a1e24;
}

.obs-card:hover .obs-id {
    text-shadow: 0 0 6px rgba(160, 170, 185, 0.3);
}

.obs-card:hover .card-ridgeline path {
    stroke: var(--elevation-rule);
    transition: stroke 300ms ease-out;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.obs-id {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.875rem);
    color: var(--phosphor-silver);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.obs-date {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.65rem, 1vw, 0.75rem);
    color: var(--muted-tag);
}

.card-divider {
    border-top: 1px dashed var(--grid-line);
    margin-bottom: 12px;
}

.card-body {
    flex: 1;
    margin-bottom: 16px;
}

.card-body p {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    line-height: 1.65;
    color: var(--scholar-gray);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.elevation {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.8rem);
    color: var(--high-signal);
}

.classification {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.65rem, 1vw, 0.75rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-tag);
}

.obs-card:hover .classification {
    color: #8090a0;
}

.card-ridgeline {
    width: 100%;
    height: 40px;
    margin-top: auto;
}

.card-ridgeline path {
    transition: stroke 300ms ease-out;
}

/* Contour Decorations */
.contour-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    opacity: 0.5;
}

.contour-left {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    animation: contourRotate 120s linear infinite;
}

.contour-right {
    right: 20px;
    top: 30%;
    animation: contourRotate 120s linear infinite reverse;
}

@keyframes contourRotate {
    to { transform: rotate(360deg); }
}

/* Field Log */
.field-log-section {
    padding: 60px 24px;
}

.field-log-container {
    max-width: 640px;
    margin: 0 auto;
}

.log-entry {
    margin-bottom: 48px;
}

.log-entry.fade-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.log-entry.fade-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.log-date {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.875rem);
    color: var(--phosphor-silver);
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    display: block;
}

.log-entry p {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.65;
    color: var(--scholar-gray);
}

.log-entry p em {
    font-style: italic;
    color: var(--bright-prose);
}

/* Spectral Section */
.spectral-section {
    padding: 60px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.spectral-title {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.8rem);
    color: var(--phosphor-silver);
    letter-spacing: 0.05em;
    margin-bottom: 32px;
}

.spectral-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spectral-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spectral-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--muted-tag);
    width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.spectral-bar-container {
    flex: 1;
    height: 3px;
    background: var(--grid-line);
    position: relative;
}

.spectral-bar {
    height: 100%;
    background: var(--elevation-rule);
    width: 0%;
    transition: width 800ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spectral-bar.animate {
    width: var(--target-width);
}

.spectral-value {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--muted-tag);
    width: 100px;
    flex-shrink: 0;
}

/* Footer */
.site-footer {
    padding: 40px 24px;
    text-align: center;
    border-top: 1px solid var(--grid-line);
    margin-top: 60px;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.65rem, 1vw, 0.75rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-tag);
}

.footer-cursor {
    animation: blink 1s step-end infinite;
    color: var(--peak-white);
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 1023px) {
    .observation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contour-decoration {
        display: none;
    }
}

@media (max-width: 767px) {
    .observation-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        background: transparent;
    }
    .nav-links {
        gap: 8px;
    }
    .nav-token {
        font-size: 0.6rem;
    }
}
