/* ============================================
   yongjoon.dev - Blobitecture Portfolio
   ============================================ */

/* CSS Custom Properties */
:root {
    --deep-void: #0b0e18;
    --blob-green: #00e5a0;
    --warm-amber: #f5a623;
    --mist-gray: #8b95a8;
    --panel-frost: #141828;
    --signal-cyan: #00c2d1;
    --bone-white: #e8e4dc;
    --dark-edge: #050710;
    --panel-hover: #1a2038;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--deep-void);
    color: var(--bone-white);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    background: radial-gradient(ellipse at center, var(--deep-void) 0%, var(--dark-edge) 100%);
}

/* ============================================
   HUD Overlay
   ============================================ */
#hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 500ms ease;
}

#hud-overlay.visible {
    opacity: 1;
}

.hud-element {
    position: absolute;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--blob-green);
    letter-spacing: 0.05em;
    animation: hudPulse 4s ease-in-out infinite;
}

.hud-top-left {
    top: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hud-top-right {
    top: 24px;
    right: 24px;
}

.hud-bottom-left {
    bottom: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hud-bottom-right {
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.hud-label {
    opacity: 0.5;
    font-size: 9px;
    letter-spacing: 0.1em;
}

.hud-value {
    opacity: 0.7;
}

.hud-dots {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.hud-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--blob-green);
    opacity: 0.4;
    transition: all 400ms ease;
}

.hud-dot.active {
    background: var(--blob-green);
    opacity: 0.8;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

@keyframes hudPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ============================================
   Ambient Background Blobs
   ============================================ */
#ambient-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.ambient-blob {
    position: absolute;
    filter: blur(40px);
}

.blob-1 {
    width: 80vw;
    height: 80vw;
    top: -20vh;
    left: -20vw;
}

.blob-2 {
    width: 60vw;
    height: 60vw;
    top: 40vh;
    right: -15vw;
}

.blob-3 {
    width: 50vw;
    height: 50vw;
    bottom: -10vh;
    left: 20vw;
}

/* ============================================
   Section Base
   ============================================ */
.section {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 40px;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 800ms ease, transform 800ms ease;
}

.section.visible {
    opacity: 1;
    transform: scale(1);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mist-gray);
    margin-bottom: 16px;
}

.section-divider {
    display: flex;
    justify-content: center;
}

.divider-line {
    width: 200px;
    height: 2px;
}

/* ============================================
   Section 1: Orbital Entry
   ============================================ */
#orbital-entry {
    height: 100vh;
    padding: 0;
}

.orbital-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#main-blob {
    position: absolute;
    width: 60vw;
    max-width: 700px;
    height: auto;
    will-change: transform;
}

.orbital-text {
    position: relative;
    z-index: 2;
    text-align: center;
}

.orbital-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 10vw, 120px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bone-white);
    line-height: 1;
}

.orbital-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(24px, 5vw, 48px);
    color: var(--blob-green);
    margin-top: -8px;
    letter-spacing: 0.15em;
}

.orbital-tagline {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--mist-gray);
    letter-spacing: 0.1em;
    margin-top: 24px;
    opacity: 0.7;
}

.decorative-reticle {
    position: absolute;
    width: 120px;
    height: 120px;
    bottom: 15%;
    right: 10%;
    opacity: 0.4;
    animation: slowRotate 30s linear infinite;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orbital-metadata {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 32px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--mist-gray);
    opacity: 0.5;
    letter-spacing: 0.08em;
}

/* ============================================
   Section 2: Research Panels
   ============================================ */
#research-panels {
    position: relative;
}

.panels-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

.research-panel {
    background: rgba(20, 24, 40, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 229, 160, 0.4);
    border-radius: 24px;
    padding: 32px;
    transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 229, 160, 0.05);
}

.research-panel:hover {
    background: rgba(26, 32, 56, 0.9);
    border-color: rgba(0, 229, 160, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 229, 160, 0.08);
}

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

.panel-id {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--blob-green);
    opacity: 0.6;
}

.panel-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--warm-amber);
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 4px;
}

.panel-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--bone-white);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.panel-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--mist-gray);
    margin-bottom: 20px;
}

.panel-meta {
    display: flex;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--mist-gray);
    opacity: 0.6;
    border-top: 1px solid rgba(139, 149, 168, 0.15);
    padding-top: 12px;
}

.panel-status.active-status {
    color: var(--blob-green);
}

.panel-connectors {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.connector-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2.5s ease-in-out;
}

.connector-path.drawn {
    stroke-dashoffset: 0;
}

/* ============================================
   Section 3: Data Stream Corridor
   ============================================ */
#data-stream {
    padding-bottom: 60px;
}

.corridor-scroll {
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 20px 0;
    cursor: grab;
}

.corridor-scroll::-webkit-scrollbar {
    display: none;
}

.corridor-scroll.dragging {
    cursor: grabbing;
}

.corridor-track {
    display: flex;
    gap: 32px;
    padding: 0 calc(50vw - 160px);
    width: max-content;
}

.project-card {
    flex: 0 0 320px;
    scroll-snap-align: center;
    background: rgba(20, 24, 40, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 229, 160, 0.25);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color 300ms ease, transform 200ms ease, background 300ms ease;
}

.project-card:hover {
    border-color: rgba(0, 229, 160, 0.6);
    transform: translateY(-4px);
    background: rgba(26, 32, 56, 0.85);
}

.card-illustration {
    width: 100%;
    max-width: 280px;
    margin-bottom: 20px;
    opacity: 0.7;
    transition: opacity 400ms ease;
}

.project-card:hover .card-illustration {
    opacity: 1;
}

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

.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--bone-white);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.card-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--mist-gray);
    margin-bottom: 16px;
}

.card-tech {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--signal-cyan);
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.corridor-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--mist-gray);
}

.corridor-arrow {
    cursor: pointer;
    color: var(--blob-green);
    opacity: 0.6;
    transition: opacity 200ms ease;
    font-size: 18px;
    user-select: none;
}

.corridor-arrow:hover {
    opacity: 1;
}

.corridor-count {
    opacity: 0.5;
}

/* ============================================
   Section 4: Terminal Archive
   ============================================ */
#terminal-archive {
    padding: 80px 40px 120px;
}

.archive-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
}

.archive-log {
    position: relative;
}

.archive-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mist-gray);
    margin-bottom: 32px;
}

.log-entries {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-left: 40px;
}

.log-entry {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(139, 149, 168, 0.1);
    transition: border-color 200ms ease;
}

.log-entry:hover {
    border-color: rgba(0, 229, 160, 0.3);
}

.log-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--warm-amber);
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.log-title {
    font-size: 14px;
    color: var(--bone-white);
    line-height: 1.5;
}

.log-venue {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--signal-cyan);
    opacity: 0.6;
    letter-spacing: 0.06em;
}

.log-connectors {
    position: absolute;
    left: 0;
    top: 60px;
    width: 40px;
    height: calc(100% - 60px);
}

.log-connector {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s ease-in-out;
}

.log-connector.drawn {
    stroke-dashoffset: 0;
}

/* Archive Detail */
.archive-detail {
    display: flex;
    align-items: flex-start;
    padding-top: 20px;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.pull-quote {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 28px;
    line-height: 1.5;
    color: var(--bone-white);
    border-left: 2px solid var(--warm-amber);
    padding-left: 24px;
    opacity: 0.9;
}

.bio-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mist-gray);
    margin-bottom: 16px;
}

.bio-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--mist-gray);
    margin-bottom: 16px;
}

.bio-text:last-child {
    margin-bottom: 0;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--blob-green);
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.info-value {
    font-size: 14px;
    color: var(--bone-white);
    opacity: 0.8;
}

/* ============================================
   Section 5: Signal Close
   ============================================ */
#signal-close {
    min-height: 80vh;
    position: relative;
}

.close-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 60vh;
}

#wireframe-blob {
    position: absolute;
    width: 50vw;
    max-width: 500px;
    height: auto;
    animation: slowRotate 40s linear infinite;
    opacity: 0.5;
}

.close-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.close-tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 4vw, 40px);
    color: var(--bone-white);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.close-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.contact-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    color: var(--blob-green);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 200ms ease;
}

.contact-link:hover {
    color: var(--warm-amber);
}

.contact-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.contact-link-small {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--mist-gray);
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: color 200ms ease;
}

.contact-link-small:hover {
    color: var(--blob-green);
}

.contact-sep {
    color: var(--mist-gray);
    opacity: 0.3;
    font-size: 12px;
}

.close-meta {
    display: flex;
    gap: 24px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--mist-gray);
    opacity: 0.4;
    letter-spacing: 0.06em;
}

.close-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    bottom: 10%;
    left: 5%;
    animation: slowRotate 60s linear infinite reverse;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .section {
        padding: 60px 20px;
    }

    .panels-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .archive-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .corridor-track {
        padding: 0 calc(50vw - 140px);
    }

    .project-card {
        flex: 0 0 280px;
    }

    .hud-top-left, .hud-bottom-left {
        left: 16px;
    }

    .hud-top-right, .hud-bottom-right {
        right: 16px;
    }

    .orbital-metadata {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .pull-quote {
        font-size: 22px;
    }

    .log-entries {
        padding-left: 0;
    }

    .log-connectors {
        display: none;
    }
}

@media (max-width: 480px) {
    .orbital-name {
        font-size: 36px;
    }

    .research-panel {
        padding: 24px;
        border-radius: 16px;
    }

    .project-card {
        flex: 0 0 260px;
        padding: 28px 20px;
    }
}
