/* ============================================================
   yongjoon.net - Translucent Frost HUD Design
   ============================================================ */

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

:root {
    --bg-deep: #0D1117;
    --bg-panel: rgba(20, 30, 42, 0.72);
    --text-primary: #D4DDE8;
    --text-secondary: #8BA4B8;
    --accent-teal: #5EEAD4;
    --accent-amber: #E8A44A;
    --border-steel: #2D3F50;
    --highlight-hover: rgba(212, 221, 232, 0.12);
    --alert-coral: #E85D75;
    --ease-mechanical: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- SVG Filters (hidden) --- */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Noise Overlay --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    filter: url(#noise-filter);
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.015) 2px,
        rgba(255, 255, 255, 0.015) 4px
    );
    mix-blend-mode: overlay;
}

.noise-overlay::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: 1;
}

/* --- Scanline Overlay --- */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* --- Scroll Progress Indicator --- */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    width: 2px;
    height: 100vh;
    z-index: 1001;
    background: var(--border-steel);
}

.scroll-progress-bar {
    width: 100%;
    height: 0%;
    background: var(--accent-teal);
    box-shadow: 0 0 6px rgba(94, 234, 212, 0.3);
    transition: height 0.1s linear;
}

.scroll-progress-bar.pulse-amber {
    background: var(--accent-amber);
    box-shadow: 0 0 10px rgba(232, 164, 74, 0.5);
}

/* --- Sections Base --- */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 20px;
}

/* --- Boot Sequence Section --- */
.section-boot {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.boot-content {
    text-align: center;
    opacity: 0;
    transform: translateY(0);
}

.boot-content.visible {
    opacity: 1;
}

.boot-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 24px;
    opacity: 0;
    transition: opacity 600ms var(--ease-mechanical);
}

.boot-title.fade-in {
    opacity: 1;
}

.boot-status {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.boot-status.online .boot-label {
    color: var(--accent-teal);
}

.boot-cursor {
    animation: blink-cursor 0.8s step-end infinite;
}

.boot-status.online .boot-cursor {
    display: none;
}

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

/* HUD Corners for Boot */
.hud-corners {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 500ms var(--ease-mechanical);
}

.hud-corners.visible {
    opacity: 1;
}

.corner {
    position: absolute;
    width: 40px;
    height: 40px;
}

.corner-tl {
    top: 24px;
    left: 24px;
    border-top: 1px solid var(--accent-teal);
    border-left: 1px solid var(--accent-teal);
}

.corner-br {
    bottom: 24px;
    right: 24px;
    border-bottom: 1px solid var(--accent-teal);
    border-right: 1px solid var(--accent-teal);
}

/* --- Content Panels (Frosted Glass) --- */
.content-panel {
    position: relative;
    width: 60%;
    max-width: 800px;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-steel);
    border-radius: 2px;
    padding: 48px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 400ms var(--ease-mechanical), transform 400ms var(--ease-mechanical);
    z-index: 2;
}

.content-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Panel Brackets */
.panel-bracket {
    position: absolute;
    width: 8px;
    height: 8px;
}

.panel-bracket.bracket-tl {
    top: -1px;
    left: -1px;
    border-top: 1px solid var(--accent-teal);
    border-left: 1px solid var(--accent-teal);
}

.panel-bracket.bracket-br {
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid var(--accent-teal);
    border-right: 1px solid var(--accent-teal);
}

/* Ghost Numbers */
.ghost-number {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 4rem;
    color: var(--text-primary);
    opacity: 0.08;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* Section Headings */
.section-heading {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Panel Divider - Oscilloscope trace style */
.panel-divider {
    width: 100%;
    height: 1px;
    background: var(--accent-teal);
    box-shadow: 0 0 6px rgba(94, 234, 212, 0.3);
    margin-bottom: 24px;
}

/* Body Text */
.body-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.65;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.body-text:last-of-type {
    margin-bottom: 24px;
}

/* Panel Meta Tags */
.panel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.meta-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    padding: 4px 8px;
    border: 1px solid var(--border-steel);
    border-radius: 1px;
}

/* --- Telemetry Strips --- */
.telemetry-strip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
    opacity: 0;
    transition: opacity 400ms var(--ease-mechanical);
}

.telemetry-strip.visible {
    opacity: 1;
}

.telemetry-left {
    left: 5%;
}

.telemetry-right {
    right: 5%;
}

.telemetry-readout {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.telemetry-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    opacity: 0.7;
}

.telemetry-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--text-primary);
}

.telemetry-value.status-active {
    color: var(--accent-teal);
}

.telemetry-value.signal-strength {
    color: var(--accent-teal);
}

/* --- Crosshair Markers --- */
.crosshair-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    opacity: 0.4;
    animation: crosshair-pulse 3s ease-in-out infinite;
}

.crosshair-marker::before,
.crosshair-marker::after {
    content: '';
    position: absolute;
    background: var(--text-secondary);
}

.crosshair-marker::before {
    width: 12px;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.crosshair-marker::after {
    width: 1px;
    height: 12px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.crosshair-top {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.crosshair-center {
    position: relative;
    margin-bottom: 24px;
}

@keyframes crosshair-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* --- Projects Section --- */
.section-work .content-panel {
    width: 80%;
    max-width: 1000px;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 8px;
}

.project-item {
    position: relative;
    background: rgba(20, 30, 42, 0.5);
    border: 1px solid var(--border-steel);
    border-radius: 2px;
    padding: 24px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 400ms var(--ease-mechanical), transform 400ms var(--ease-mechanical), border-color 200ms var(--ease-mechanical);
}

.project-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-item:hover {
    border-color: var(--accent-teal);
    background: var(--highlight-hover);
}

.project-item:hover .project-bracket {
    border-color: var(--accent-teal);
}

.project-bracket {
    position: absolute;
    width: 6px;
    height: 6px;
    transition: border-color 200ms var(--ease-mechanical);
}

.project-bracket.bracket-tl {
    top: -1px;
    left: -1px;
    border-top: 1px solid var(--border-steel);
    border-left: 1px solid var(--border-steel);
}

.project-bracket.bracket-br {
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid var(--border-steel);
    border-right: 1px solid var(--border-steel);
}

.project-index {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    opacity: 0.6;
    display: block;
    margin-bottom: 8px;
}

.project-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.project-desc {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--accent-teal);
    padding: 2px 6px;
    border: 1px solid rgba(94, 234, 212, 0.25);
    border-radius: 1px;
}

/* --- Signal / Contact Section --- */
.oscilloscope-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-teal), transparent);
    opacity: 0.6;
    animation: oscilloscope-sweep 4s linear infinite;
}

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

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.contact-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-steel);
    flex-shrink: 0;
}

.contact-indicator.active {
    background: var(--accent-teal);
    box-shadow: 0 0 6px rgba(94, 234, 212, 0.4);
}

.contact-label {
    color: var(--text-secondary);
    width: 80px;
    flex-shrink: 0;
}

.contact-value {
    color: var(--text-primary);
}

.signal-cta {
    margin-top: 16px;
}

.cta-button {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--bg-deep);
    background: var(--accent-amber);
    border: none;
    padding: 10px 24px;
    border-radius: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: background 200ms var(--ease-mechanical), box-shadow 200ms var(--ease-mechanical);
}

.cta-button:hover {
    background: #f0b05e;
    box-shadow: 0 0 12px rgba(232, 164, 74, 0.4);
}

/* --- End Transmission Section --- */
.section-end {
    min-height: 50vh;
    padding: 96px 20px;
}

.end-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.end-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity 600ms var(--ease-mechanical);
}

.end-title.visible {
    opacity: 0.4;
}

.end-static {
    width: 80px;
    height: 2px;
    background: var(--text-secondary);
    opacity: 0.3;
    margin-top: 24px;
}

/* --- Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1002;
    background: rgba(13, 17, 23, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-steel);
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 500ms var(--ease-mechanical), transform 500ms var(--ease-mechanical);
}

.bottom-nav.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 16px;
    height: 48px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    text-decoration: none;
    position: relative;
}

.nav-indicator {
    width: 16px;
    height: 2px;
    background: var(--border-steel);
    transition: background 200ms var(--ease-mechanical);
}

.nav-item.active .nav-indicator {
    background: var(--accent-teal);
    box-shadow: 0 0 4px rgba(94, 234, 212, 0.3);
    animation: nav-pulse 3s ease-in-out infinite;
}

@keyframes nav-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.nav-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    transition: color 200ms var(--ease-mechanical);
}

.nav-item.active .nav-label {
    color: var(--accent-teal);
}

.nav-item:hover .nav-label {
    color: var(--text-primary);
}

.nav-item:hover .nav-indicator {
    background: var(--text-secondary);
}

/* --- Dot Grid Pattern (on specific panels) --- */
.panel-work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--border-steel) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.3;
    pointer-events: none;
    border-radius: 2px;
}

/* --- Parallax Depth (handled via JS transform, base styles) --- */
.section-identity,
.section-work,
.section-signal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Noise intensification for end section */
.section-end .noise-intensify {
    opacity: 0.06;
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    .telemetry-strip {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 0;
    }

    .telemetry-left {
        order: -1;
        margin-bottom: 16px;
    }

    .telemetry-right {
        order: 1;
        margin-top: 16px;
    }

    .section-identity,
    .section-work,
    .section-signal {
        flex-direction: column;
        padding: 48px 16px;
    }

    .content-panel {
        width: 100%;
        padding: 32px 24px;
    }

    .section-work .content-panel {
        width: 100%;
    }

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

    .nav-item {
        padding: 8px 12px;
    }

    .contact-item {
        font-size: 0.7rem;
    }

    .contact-label {
        width: 60px;
    }

    .panel-meta {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .boot-title {
        letter-spacing: 0.08em;
    }

    .content-panel {
        padding: 24px 16px;
    }

    .ghost-number {
        font-size: 3rem;
    }

    .contact-item {
        flex-wrap: wrap;
    }

    .contact-value {
        width: 100%;
        padding-left: 18px;
    }
}

/* Body padding for fixed bottom nav */
body {
    padding-bottom: 48px;
}
