/* ============================================
   quietjoon.net - Digital Observatory
   Isometric stacked-sections with PCB circuit traces
   Design: Inter" (Google Fonts), Space Grotesk" (Google Fonts)
   Tone: Dark-neon premium atmosphere.
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-black: #0D0D1A;
    --neon-cyan: #00F5FF;
    --electric-purple: #8B5CF6;
    --soft-white: #E8E8F0;
    --dark-slate: #1A1A2E;
    --neon-pink: #FF1493;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-black);
    color: var(--soft-white);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* --- Circuit Background SVG --- */
.circuit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}

.trace {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: traceDraw 4s ease-out forwards;
}

.trace-1 { animation-delay: 0s; }
.trace-2 { animation-delay: 0.5s; }
.trace-3 { animation-delay: 1s; }
.trace-4 { animation-delay: 1.5s; }
.trace-5 { animation-delay: 2s; }

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

/* --- Sections Base --- */
.section {
    position: relative;
    z-index: 1;
    padding: 10vh 0;
    width: 100%;
}

.section-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* --- Section Markers (Geometric Icons) --- */
.section-marker {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.icon-hexagon {
    width: 48px;
    height: 48px;
    background-color: var(--neon-cyan);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: transform 0.4s ease, background-color 0.4s ease;
}

.icon-hexagon:hover {
    transform: scale(1.2) rotate(30deg);
}

.icon-hexagon.hex-purple {
    background-color: var(--electric-purple);
}

.icon-hexagon.hex-pink {
    background-color: var(--neon-pink);
}

.icon-diamond {
    width: 36px;
    height: 36px;
    background-color: var(--neon-cyan);
    transform: rotate(45deg);
    transition: transform 0.4s ease, background-color 0.4s ease;
}

.icon-diamond:hover {
    transform: rotate(45deg) scale(1.2);
}

.icon-diamond.diamond-pink {
    background-color: var(--neon-pink);
}

.icon-diamond.diamond-sm {
    width: 20px;
    height: 20px;
}

/* --- Circuit Connector Lines Between Sections --- */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 40px;
    background: var(--neon-cyan);
    opacity: 0.3;
}

.section::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    width: 60px;
    height: 1px;
    background: var(--neon-cyan);
    opacity: 0.3;
}

.section-hero::before,
.section-hero::after {
    display: none;
}

/* --- Section Headings --- */
.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--soft-white);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    position: relative;
}

.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--neon-cyan);
    margin-top: 0.75rem;
}

/* --- Hero Section --- */
.section-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10vh 0;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    color: var(--soft-white);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.accent-dot {
    color: var(--neon-cyan);
}

.hero-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    color: var(--electric-purple);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 4rem;
}

.hero-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cell {
    background-color: var(--dark-slate);
    border: 1px solid rgba(0, 245, 255, 0.2);
    padding: 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.hero-cell:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-4px);
}

.cell-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.cell-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--soft-white);
}

/* --- About Section --- */
.card-surface {
    background-color: var(--dark-slate);
    border: 1px solid rgba(0, 245, 255, 0.15);
    padding: 2.5rem;
    position: relative;
}

.card-surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--neon-cyan), var(--electric-purple));
}

.card-surface p {
    color: rgba(232, 232, 240, 0.85);
}

/* --- Hover Reveal --- */
.hover-reveal {
    margin-top: 1.5rem;
}

.reveal-trigger {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.reveal-trigger::after {
    content: '+';
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.reveal-trigger:hover {
    color: var(--soft-white);
}

.reveal-trigger:hover::after {
    transform: rotate(45deg);
}

.reveal-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin-top 0.4s ease;
    margin-top: 0;
}

.hover-reveal:hover .reveal-content {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
}

.reveal-content p {
    font-size: 0.9rem;
    color: rgba(232, 232, 240, 0.7);
    border-left: 2px solid var(--electric-purple);
    padding-left: 1rem;
}

/* --- Systems Grid --- */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.system-card {
    background-color: var(--dark-slate);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 2rem;
    position: relative;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.system-card:hover {
    border-color: var(--electric-purple);
    transform: translateY(-4px);
}

.system-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--electric-purple), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.system-card:hover::after {
    opacity: 1;
}

.card-icon {
    margin-bottom: 1.25rem;
}

.system-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--soft-white);
    margin-bottom: 0.75rem;
}

.system-card p {
    font-size: 0.9rem;
    color: rgba(232, 232, 240, 0.7);
    line-height: 1.6;
}

/* --- Transmissions --- */
.transmission-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.transmission-item {
    background-color: var(--dark-slate);
    border: 1px solid rgba(0, 245, 255, 0.1);
    padding: 2rem;
    position: relative;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.transmission-item:hover {
    border-color: var(--neon-cyan);
    transform: translateX(8px);
}

.transmission-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    background: var(--neon-cyan);
    transition: height 0.4s ease;
}

.transmission-item:hover::before {
    height: 100%;
}

.transmission-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.transmission-date {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(232, 232, 240, 0.5);
    letter-spacing: 0.05em;
}

.transmission-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.6rem;
    border: 1px solid;
}

.tag-cyan {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.tag-purple {
    color: var(--electric-purple);
    border-color: var(--electric-purple);
}

.tag-pink {
    color: var(--neon-pink);
    border-color: var(--neon-pink);
}

.transmission-item h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--soft-white);
    margin-bottom: 0.5rem;
}

.transmission-item p {
    font-size: 0.9rem;
    color: rgba(232, 232, 240, 0.7);
    line-height: 1.6;
}

/* --- Contact / Terminal --- */
.terminal-card {
    background-color: var(--dark-slate);
    border: 1px solid rgba(0, 245, 255, 0.2);
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: rgba(0, 245, 255, 0.05);
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-pink { background-color: var(--neon-pink); }
.dot-purple { background-color: var(--electric-purple); }
.dot-cyan { background-color: var(--neon-cyan); }

.terminal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(232, 232, 240, 0.5);
    margin-left: 0.5rem;
    letter-spacing: 0.05em;
}

.terminal-body {
    padding: 2rem 1.5rem;
}

.terminal-line {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--neon-cyan);
    margin-bottom: 0.75rem;
}

.terminal-line:last-child {
    margin-bottom: 0;
}

.terminal-prompt {
    color: var(--electric-purple);
    margin-right: 0.5rem;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--neon-cyan);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* --- Footer --- */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
    text-align: center;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-circuit {
    width: 60px;
    height: 1px;
    background: var(--neon-cyan);
    margin: 0 auto 1.5rem;
    opacity: 0.4;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(232, 232, 240, 0.4);
    letter-spacing: 0.1em;
}

.footer-sep {
    color: var(--neon-cyan);
    margin: 0 0.25rem;
}

/* --- Scroll-triggered Icon Pulse --- */
.icon-hexagon.pulse,
.icon-diamond.pulse {
    animation: iconPulse 0.8s ease-out;
}

@keyframes iconPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 245, 255, 0.6); }
    50% { transform: scale(1.15); box-shadow: 0 0 20px 4px rgba(0, 245, 255, 0.3); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 245, 255, 0); }
}

.icon-diamond.pulse {
    animation-name: diamondPulse;
}

@keyframes diamondPulse {
    0% { transform: rotate(45deg) scale(1); box-shadow: 0 0 0 0 rgba(0, 245, 255, 0.6); }
    50% { transform: rotate(45deg) scale(1.15); box-shadow: 0 0 20px 4px rgba(0, 245, 255, 0.3); }
    100% { transform: rotate(45deg) scale(1); box-shadow: 0 0 0 0 rgba(0, 245, 255, 0); }
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .hero-grid {
        flex-direction: column;
        align-items: center;
    }

    .hero-cell {
        width: 100%;
        max-width: 280px;
    }

    .systems-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 8vh 0;
    }
}
