/* ============================================================
   hanun.ai -- Sci-Fi AI Research Observatory
   Color Palette:
     Deep Space:      #080C14
     Panel Dark:      #101820
     Neon Blue:       #00B8FF
     Neon Violet:     #8040E0
     Star White:      #C8D0E0
     Data Green:      #00E878
     Warning Amber:   #FFB020
     Text Primary:    #D8DCE4
     Text Dim:        #5A6878
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #D8DCE4;
    background: #080C14;
    overflow-x: hidden;
}

/* --- Star Field (Fixed Background) --- */
#star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
    box-shadow:
        /* 100 pseudo-random stars, 1-2px, #C8D0E0 at 10-30% opacity */
        12vw 8vh 0 1px rgba(200,208,224,0.15),
        45vw 3vh 0 0.5px rgba(200,208,224,0.12),
        78vw 15vh 0 1px rgba(200,208,224,0.20),
        23vw 22vh 0 0.5px rgba(200,208,224,0.10),
        91vw 35vh 0 1px rgba(200,208,224,0.25),
        5vw 41vh 0 0.5px rgba(200,208,224,0.18),
        67vw 52vh 0 1px rgba(200,208,224,0.22),
        34vw 67vh 0 0.5px rgba(200,208,224,0.14),
        88vw 73vh 0 1px rgba(200,208,224,0.30),
        15vw 81vh 0 0.5px rgba(200,208,224,0.11),
        52vw 91vh 0 1px rgba(200,208,224,0.19),
        3vw 12vh 0 1px rgba(200,208,224,0.26),
        72vw 28vh 0 0.5px rgba(200,208,224,0.13),
        41vw 44vh 0 1px rgba(200,208,224,0.21),
        96vw 58vh 0 0.5px rgba(200,208,224,0.17),
        28vw 76vh 0 1px rgba(200,208,224,0.24),
        59vw 85vh 0 0.5px rgba(200,208,224,0.10),
        83vw 6vh 0 1px rgba(200,208,224,0.28),
        8vw 33vh 0 0.5px rgba(200,208,224,0.16),
        47vw 48vh 0 1px rgba(200,208,224,0.20),
        19vw 62vh 0 0.5px rgba(200,208,224,0.12),
        75vw 79vh 0 1px rgba(200,208,224,0.23),
        36vw 94vh 0 0.5px rgba(200,208,224,0.15),
        62vw 11vh 0 1px rgba(200,208,224,0.27),
        94vw 24vh 0 0.5px rgba(200,208,224,0.11),
        14vw 39vh 0 1px rgba(200,208,224,0.22),
        55vw 55vh 0 0.5px rgba(200,208,224,0.18),
        81vw 68vh 0 1px rgba(200,208,224,0.25),
        26vw 83vh 0 0.5px rgba(200,208,224,0.14),
        69vw 96vh 0 1px rgba(200,208,224,0.20),
        7vw 5vh 0 0.5px rgba(200,208,224,0.29),
        38vw 18vh 0 1px rgba(200,208,224,0.13),
        85vw 31vh 0 0.5px rgba(200,208,224,0.21),
        50vw 46vh 0 1px rgba(200,208,224,0.17),
        16vw 59vh 0 0.5px rgba(200,208,224,0.24),
        73vw 72vh 0 1px rgba(200,208,224,0.10),
        31vw 88vh 0 0.5px rgba(200,208,224,0.19),
        89vw 2vh 0 1px rgba(200,208,224,0.26),
        44vw 16vh 0 0.5px rgba(200,208,224,0.12),
        2vw 29vh 0 1px rgba(200,208,224,0.22),
        63vw 42vh 0 0.5px rgba(200,208,224,0.15),
        95vw 56vh 0 1px rgba(200,208,224,0.28),
        22vw 69vh 0 0.5px rgba(200,208,224,0.11),
        57vw 82vh 0 1px rgba(200,208,224,0.20),
        79vw 95vh 0 0.5px rgba(200,208,224,0.17),
        10vw 14vh 0 1px rgba(200,208,224,0.23),
        48vw 27vh 0 0.5px rgba(200,208,224,0.13),
        86vw 40vh 0 1px rgba(200,208,224,0.21),
        33vw 53vh 0 0.5px rgba(200,208,224,0.19),
        66vw 66vh 0 1px rgba(200,208,224,0.25),
        4vw 78vh 0 0.5px rgba(200,208,224,0.14),
        42vw 90vh 0 1px rgba(200,208,224,0.22),
        76vw 4vh 0 0.5px rgba(200,208,224,0.18),
        18vw 20vh 0 1px rgba(200,208,224,0.27),
        58vw 34vh 0 0.5px rgba(200,208,224,0.10),
        92vw 47vh 0 1px rgba(200,208,224,0.24),
        25vw 60vh 0 0.5px rgba(200,208,224,0.16),
        70vw 74vh 0 1px rgba(200,208,224,0.20),
        37vw 87vh 0 0.5px rgba(200,208,224,0.12),
        82vw 98vh 0 1px rgba(200,208,224,0.21),
        1vw 9vh 0 0.5px rgba(200,208,224,0.15),
        53vw 23vh 0 1px rgba(200,208,224,0.28),
        87vw 37vh 0 0.5px rgba(200,208,224,0.11),
        20vw 50vh 0 1px rgba(200,208,224,0.23),
        64vw 63vh 0 0.5px rgba(200,208,224,0.19),
        97vw 76vh 0 1px rgba(200,208,224,0.25),
        29vw 89vh 0 0.5px rgba(200,208,224,0.13),
        56vw 1vh 0 1px rgba(200,208,224,0.22),
        11vw 17vh 0 0.5px rgba(200,208,224,0.17),
        74vw 30vh 0 1px rgba(200,208,224,0.26),
        39vw 43vh 0 0.5px rgba(200,208,224,0.14),
        93vw 57vh 0 1px rgba(200,208,224,0.20),
        6vw 70vh 0 0.5px rgba(200,208,224,0.24),
        46vw 84vh 0 1px rgba(200,208,224,0.11),
        77vw 97vh 0 0.5px rgba(200,208,224,0.18),
        21vw 7vh 0 1px rgba(200,208,224,0.21),
        61vw 19vh 0 0.5px rgba(200,208,224,0.15),
        90vw 32vh 0 1px rgba(200,208,224,0.27),
        30vw 45vh 0 0.5px rgba(200,208,224,0.12),
        68vw 58vh 0 1px rgba(200,208,224,0.23),
        9vw 71vh 0 0.5px rgba(200,208,224,0.19),
        51vw 86vh 0 1px rgba(200,208,224,0.25),
        84vw 99vh 0 0.5px rgba(200,208,224,0.10),
        13vw 26vh 0 1px rgba(200,208,224,0.22),
        54vw 38vh 0 0.5px rgba(200,208,224,0.16),
        98vw 51vh 0 1px rgba(200,208,224,0.20),
        27vw 64vh 0 0.5px rgba(200,208,224,0.24),
        71vw 77vh 0 1px rgba(200,208,224,0.13),
        40vw 92vh 0 0.5px rgba(200,208,224,0.21),
        80vw 10vh 0 1px rgba(200,208,224,0.18),
        17vw 36vh 0 0.5px rgba(200,208,224,0.26),
        60vw 49vh 0 1px rgba(200,208,224,0.11),
        99vw 61vh 0 0.5px rgba(200,208,224,0.22),
        35vw 75vh 0 1px rgba(200,208,224,0.15),
        65vw 88vh 0 0.5px rgba(200,208,224,0.20),
        24vw 2vh 0 1px rgba(200,208,224,0.28),
        43vw 13vh 0 0.5px rgba(200,208,224,0.14),
        32vw 25vh 0 1px rgba(200,208,224,0.23);
}

#star-field.visible {
    opacity: 1;
}

/* --- Scan Line --- */
#scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #00B8FF;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transform: translateY(-1px);
}

#scan-line.active {
    opacity: 0.1;
    animation: scanVertical 15s linear infinite;
}

@keyframes scanVertical {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    z-index: 2;
    overflow: hidden;
}

.hero-content {
    padding: 15vh 0 0 8vw;
}

#site-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #D8DCE4;
    position: relative;
}

#site-title.title-hidden {
    opacity: 0;
}

#site-title .char {
    display: inline-block;
    opacity: 0;
    text-shadow: 0 0 20px rgba(0,184,255,0.8);
    transition: text-shadow 0.6s ease;
}

#site-title .char.revealed {
    opacity: 1;
}

#site-title .char.glow-fade {
    text-shadow: 0 0 0px rgba(0,184,255,0);
}

#hero-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    color: #5A6878;
    margin-top: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#hero-subtitle.subtitle-hidden {
    opacity: 0;
}

#hero-subtitle.visible {
    opacity: 1;
    transition: opacity 1s ease;
}

.korean-accent {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    color: #00B8FF;
}

.hero-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #00B8FF 50%, transparent 100%);
    opacity: 0.1;
    animation: heroScanHorizontal 15s linear infinite;
}

@keyframes heroScanHorizontal {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Main Content --- */
#main-content {
    position: relative;
    z-index: 2;
    padding: 40px 0;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    position: relative;
    padding: 0 20px;
}

/* --- Data Column (Left 60%) --- */
.data-column {
    width: 60%;
    flex-shrink: 0;
}

/* --- Connection SVG --- */
.connection-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.connection-svg line {
    stroke: #00B8FF;
    stroke-opacity: 0.3;
    stroke-width: 1;
}

.connection-svg circle {
    fill: #00B8FF;
}

/* --- Signal Column (Right 35%) --- */
.signal-column {
    width: 35%;
    margin-left: 5%;
    flex-shrink: 0;
}

/* --- Log Entries --- */
.log-entry {
    background: #101820;
    margin-bottom: 20px;
    padding: 0;
    position: relative;
    border-left: 2px solid #00B8FF;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.log-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.log-header:hover {
    background: rgba(0,184,255,0.04);
}

.section-code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: #00B8FF;
    white-space: nowrap;
}

.log-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.3rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #D8DCE4;
    flex: 1;
}

.expand-indicator {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #5A6878;
    transition: color 0.2s ease;
}

.log-header[data-expanded="true"] .expand-indicator {
    color: #00B8FF;
}

.log-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0 24px;
}

.log-header[data-expanded="true"] + .log-body {
    max-height: 600px;
    padding: 0 24px 24px;
}

.log-timestamp {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #5A6878;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.log-text {
    color: #D8DCE4;
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.75;
}

.log-data {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,184,255,0.1);
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #5A6878;
    letter-spacing: 0.05em;
}

.data-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #D8DCE4;
    letter-spacing: 0.03em;
}

.data-green {
    color: #00E878;
}

.data-amber {
    color: #FFB020;
}

.data-violet {
    color: #8040E0;
}

/* --- Constellation Containers --- */
.constellation-container {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(16,24,32,0.6);
    position: relative;
}

.constellation-svg {
    width: 100%;
    height: auto;
}

.const-line {
    stroke: #00B8FF;
    stroke-opacity: 0;
    stroke-width: 1;
    transition: stroke-opacity 0.4s ease;
}

.const-dot {
    fill: #00B8FF;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.constellation-container.active .const-dot {
    opacity: 1;
}

.constellation-container.active .const-line {
    stroke-opacity: 0.3;
}

.constellation-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #5A6878;
    text-align: center;
    margin-top: 12px;
}

/* --- Fluid Simulations --- */
.fluid-simulation {
    position: relative;
    height: 120px;
    margin-bottom: 30px;
    overflow: hidden;
}

.fluid-bubble {
    position: absolute;
    border-radius: 50%;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

.fluid-bubble.accelerated {
    animation-duration: 7s !important;
}

.bubble-1 {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(0,184,255,0.15) 0%, transparent 70%);
    top: 20px;
    left: 30%;
    animation: drift1 18s ease-in-out infinite alternate, pulse1 15s ease-in-out infinite alternate;
}

.bubble-2 {
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, rgba(128,64,224,0.12) 0%, transparent 70%);
    top: 50px;
    left: 55%;
    animation: drift2 22s ease-in-out infinite alternate, pulse2 20s ease-in-out infinite alternate;
}

.bubble-3 {
    width: 45px;
    height: 45px;
    background: radial-gradient(circle, rgba(0,184,255,0.10) 0%, transparent 70%);
    top: 10px;
    left: 70%;
    animation: drift3 25s ease-in-out infinite alternate, pulse3 18s ease-in-out infinite alternate;
}

.bubble-4 {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(128,64,224,0.15) 0%, transparent 70%);
    top: 30px;
    left: 20%;
    animation: drift1 20s ease-in-out infinite alternate, pulse2 16s ease-in-out infinite alternate;
}

.bubble-5 {
    width: 55px;
    height: 55px;
    background: radial-gradient(circle, rgba(0,184,255,0.12) 0%, transparent 70%);
    top: 15px;
    left: 50%;
    animation: drift2 17s ease-in-out infinite alternate, pulse1 22s ease-in-out infinite alternate;
}

.bubble-6 {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(128,64,224,0.10) 0%, transparent 70%);
    top: 60px;
    left: 75%;
    animation: drift3 23s ease-in-out infinite alternate, pulse3 19s ease-in-out infinite alternate;
}

.bubble-7 {
    width: 45px;
    height: 45px;
    background: radial-gradient(circle, rgba(0,184,255,0.14) 0%, transparent 70%);
    top: 25px;
    left: 25%;
    animation: drift2 19s ease-in-out infinite alternate, pulse1 17s ease-in-out infinite alternate;
}

.bubble-8 {
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, rgba(128,64,224,0.13) 0%, transparent 70%);
    top: 45px;
    left: 60%;
    animation: drift1 24s ease-in-out infinite alternate, pulse2 21s ease-in-out infinite alternate;
}

.bubble-9 {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(0,184,255,0.11) 0%, transparent 70%);
    top: 10px;
    left: 40%;
    animation: drift3 21s ease-in-out infinite alternate, pulse3 16s ease-in-out infinite alternate;
}

@keyframes drift1 {
    0% { transform: translate(0, 0); }
    33% { transform: translate(15px, -10px); }
    66% { transform: translate(-10px, 15px); }
    100% { transform: translate(8px, -5px); }
}

@keyframes drift2 {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-12px, 8px); }
    66% { transform: translate(10px, -12px); }
    100% { transform: translate(-5px, 10px); }
}

@keyframes drift3 {
    0% { transform: translate(0, 0); }
    33% { transform: translate(8px, 12px); }
    66% { transform: translate(-15px, -8px); }
    100% { transform: translate(12px, 5px); }
}

@keyframes pulse1 {
    0% { transform: scale(0.9); }
    100% { transform: scale(1.1); }
}

@keyframes pulse2 {
    0% { transform: scale(1.1); }
    100% { transform: scale(0.9); }
}

@keyframes pulse3 {
    0% { transform: scale(0.95); }
    100% { transform: scale(1.05); }
}

/* --- Status Panel --- */
.status-panel {
    background: #101820;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(0,184,255,0.1);
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,184,255,0.05);
}

.status-row:last-child {
    border-bottom: none;
}

.status-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #5A6878;
}

.status-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #D8DCE4;
}

.status-active {
    color: #00E878;
}

/* --- Core Footer --- */
#core-footer {
    position: relative;
    z-index: 2;
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(8,12,20,0.9) 30%);
}

.core-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
}

.core-star {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
    background: #00B8FF;
    clip-path: polygon(
        50% 0%, 62% 30%, 100% 35%, 70% 58%,
        80% 100%, 50% 72%, 20% 100%, 30% 58%,
        0% 35%, 38% 30%
    );
    animation: corePulse 3s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0,184,255,0.2);
        filter: drop-shadow(0 0 15px rgba(0,184,255,0.3));
    }
    50% {
        box-shadow: 0 0 50px rgba(0,184,255,0.5);
        filter: drop-shadow(0 0 30px rgba(0,184,255,0.6));
    }
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px dashed rgba(0,184,255,0.2);
}

.orbit-ring-1 {
    width: 120px;
    height: 120px;
    margin-top: -60px;
    margin-left: -60px;
    animation: orbit 10s linear infinite;
    border-style: dotted;
    border-color: rgba(0,184,255,0.15);
}

.orbit-ring-2 {
    width: 160px;
    height: 160px;
    margin-top: -80px;
    margin-left: -80px;
    animation: orbit 15s linear infinite reverse;
    border-style: dotted;
    border-color: rgba(0,184,255,0.1);
}

.orbit-ring-3 {
    width: 196px;
    height: 196px;
    margin-top: -98px;
    margin-left: -98px;
    animation: orbit 20s linear infinite;
    border-style: dotted;
    border-color: rgba(0,184,255,0.08);
}

@keyframes orbit {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.core-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #D8DCE4;
    margin-bottom: 8px;
}

.core-sublabel {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.85rem;
    color: #5A6878;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.footer-data {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-datum {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: #5A6878;
}

/* --- Content Scan Line Effect --- */
.content-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, #00B8FF, transparent);
    opacity: 0.06;
    animation: contentScan 20s linear infinite;
    pointer-events: none;
}

@keyframes contentScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .content-wrapper {
        flex-direction: column;
    }

    .data-column {
        width: 100%;
    }

    .signal-column {
        width: 100%;
        margin-left: 0;
        margin-top: 40px;
    }

    .connection-svg {
        display: none;
    }

    .hero-content {
        padding: 12vh 0 0 6vw;
    }

    .footer-data {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .log-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 16px;
    }

    .log-body {
        padding: 0 16px;
    }

    .log-header[data-expanded="true"] + .log-body {
        padding: 0 16px 16px;
    }

    .log-data {
        gap: 6px 16px;
    }

    #site-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .core-container {
        width: 150px;
        height: 150px;
    }

    .core-star {
        width: 45px;
        height: 45px;
    }

    .orbit-ring-1 {
        width: 90px;
        height: 90px;
        margin-top: -45px;
        margin-left: -45px;
    }

    .orbit-ring-2 {
        width: 120px;
        height: 120px;
        margin-top: -60px;
        margin-left: -60px;
    }

    .orbit-ring-3 {
        width: 146px;
        height: 146px;
        margin-top: -73px;
        margin-left: -73px;
    }
}
