/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0d0d1a;
    color: #e8e0f0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* === SCROLL TO TOP PILL === */
.scroll-top-pill {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background: #22223a;
    box-shadow: 6px 6px 12px rgba(0,0,0,0.5), -6px -6px 12px rgba(80,50,120,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #c77dff;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.scroll-top-pill:hover {
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5), -4px -4px 8px rgba(80,50,120,0.12), 0 0 20px rgba(199,125,255,0.2);
    transform: translateY(-2px);
}

/* === TIMELINE === */
.timeline-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-1px);
    width: 2px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.timeline-spine {
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, #ff00ff, #00e5ff 50%, #c77dff);
    animation: pulse-opacity 4s ease-in-out infinite;
    will-change: height;
}

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

/* === ORB FIELD === */
#orb-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.neon-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
    animation: orb-float linear infinite;
}

.neon-orb.magenta {
    background: radial-gradient(circle, #ff00ff 0%, transparent 70%);
    box-shadow: 0 0 12px rgba(255,0,255,0.5), 0 0 30px rgba(255,0,255,0.2);
}

.neon-orb.cyan {
    background: radial-gradient(circle, #00e5ff 0%, transparent 70%);
    box-shadow: 0 0 12px rgba(0,229,255,0.5), 0 0 30px rgba(0,229,255,0.2);
}

.neon-orb.violet {
    background: radial-gradient(circle, #c77dff 0%, transparent 70%);
    box-shadow: 0 0 12px rgba(199,125,255,0.5), 0 0 30px rgba(199,125,255,0.2);
}

@keyframes orb-float {
    0% { transform: translateY(0); opacity: 0.3; }
    25% { opacity: 0.8; }
    50% { transform: translateY(-30px); opacity: 0.5; }
    75% { opacity: 0.7; }
    100% { transform: translateY(0); opacity: 0.3; }
}

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.hero-inner {
    text-align: center;
    position: relative;
}

.infinity-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    opacity: 0.04;
}

.infinity-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: draw-infinity 6s ease forwards 0.5s;
}

@keyframes draw-infinity {
    to { stroke-dashoffset: 0; }
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(4rem, 12vw, 9rem);
    color: #e8e0f0;
    position: relative;
    z-index: 2;
    line-height: 1.1;
}

.hero-char {
    display: inline-block;
    opacity: 0;
    text-shadow: 0 0 0 transparent;
    animation: char-glow 0.8s ease forwards;
}

.hero-char.cyan-glow {
    animation: char-glow-cyan 0.8s ease forwards;
}

@keyframes char-glow {
    to {
        opacity: 1;
        text-shadow: 0 0 20px rgba(255,0,255,0.6), 0 0 40px rgba(255,0,255,0.3), 0 0 80px rgba(255,0,255,0.1);
    }
}

@keyframes char-glow-cyan {
    to {
        opacity: 1;
        text-shadow: 0 0 20px rgba(0,229,255,0.6), 0 0 40px rgba(0,229,255,0.3), 0 0 80px rgba(0,229,255,0.1);
    }
}

.hero-subtitle {
    font-family: 'Noto Serif KR', serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #ffb347;
    margin-top: 0.5rem;
    position: relative;
    z-index: 2;
}

.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: #9a8fb0;
    margin-top: 0.3rem;
    position: relative;
    z-index: 2;
}

/* === TIMELINE SECTIONS === */
.timeline-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1rem;
    position: relative;
    z-index: 10;
}

/* === TIMELINE NODES === */
.timeline-node {
    position: relative;
    width: 45%;
    margin-bottom: 4rem;
}

.timeline-node.node-left {
    margin-right: auto;
    margin-left: 0;
    text-align: right;
}

.timeline-node.node-right {
    margin-left: auto;
    margin-right: 0;
    text-align: left;
}

/* Bridges */
.node-bridge {
    position: absolute;
    top: 2rem;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, #ff00ff, #00e5ff);
}

.node-left .node-bridge {
    right: -40px;
}

.node-right .node-bridge {
    left: -40px;
}

/* Node Markers */
.node-marker {
    position: absolute;
    top: calc(2rem - 3px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff00ff;
    box-shadow: 0 0 10px rgba(255,0,255,0.6);
    transition: box-shadow 0.5s ease;
}

.node-left .node-marker {
    right: -44px;
}

.node-right .node-marker {
    left: -44px;
}

.node-marker.active {
    box-shadow: 0 0 20px rgba(255,0,255,0.8), 0 0 40px rgba(255,0,255,0.4);
}

/* === NEOMORPHIC CARDS === */
.neo-card {
    background: #22223a;
    border-radius: 16px;
    box-shadow: 6px 6px 12px rgba(0,0,0,0.5), -6px -6px 12px rgba(80,50,120,0.12);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
    text-align: left;
}

.neo-card:hover {
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5), -4px -4px 8px rgba(80,50,120,0.12), 0 0 20px rgba(0,229,255,0.1);
    transform: translateY(-2px);
}

.neo-card h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    margin-bottom: 1rem;
    color: #e8e0f0;
}

.neo-card p {
    color: #e8e0f0;
    font-weight: 300;
}

/* === NEO SHELF === */
.neo-shelf {
    background: #1a1a2e;
    border-radius: 20px;
    box-shadow: inset 8px 8px 16px rgba(0,0,0,0.4), inset -8px -8px 16px rgba(60,40,80,0.15);
    padding: clamp(2rem, 4vw, 3.5rem);
}

.neo-shelf h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    margin-bottom: 1.2rem;
    color: #e8e0f0;
}

.neo-shelf p {
    font-weight: 300;
    line-height: 1.8;
}

/* === NEON KEYWORDS === */
.neon-keyword {
    font-weight: 400;
    position: relative;
}

.neon-keyword.magenta {
    color: #ff00ff;
    text-shadow: 0 0 8px rgba(255,0,255,0.4);
}

.neon-keyword.cyan {
    color: #00e5ff;
    text-shadow: 0 0 8px rgba(0,229,255,0.4);
}

.neon-keyword.violet {
    color: #c77dff;
    text-shadow: 0 0 8px rgba(199,125,255,0.4);
}

.neon-keyword.amber {
    color: #ffb347;
    text-shadow: 0 0 8px rgba(255,179,71,0.4);
}

/* === SECTION DIVIDER === */
.section-divider {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: #9a8fb0;
    opacity: 0.3;
    margin: 2rem 0;
}

/* === PROCESS SECTION === */
.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    text-align: center;
    margin-bottom: 3rem;
}

.process-nodes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.process-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.process-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #22223a;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5), -4px -4px 8px rgba(80,50,120,0.12), 0 0 10px rgba(199,125,255,0.3);
    transition: box-shadow 0.4s ease, transform 0.3s ease;
}

.process-node:hover .process-circle {
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5), -4px -4px 8px rgba(80,50,120,0.12), 0 0 25px rgba(0,229,255,0.5);
    transform: scale(1.3);
}

.process-word {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #9a8fb0;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.process-node:hover .process-word {
    color: #00e5ff;
}

/* Process tooltip */
.process-tooltip {
    position: absolute;
    left: calc(100% + 16px);
    top: 50%;
    transform: translateY(-50%);
    background: #22223a;
    border-radius: 12px;
    box-shadow: 6px 6px 12px rgba(0,0,0,0.5), -6px -6px 12px rgba(80,50,120,0.12), 0 0 15px rgba(0,229,255,0.1);
    padding: 1rem 1.2rem;
    width: 260px;
    font-size: 0.9rem;
    color: #e8e0f0;
    font-weight: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.process-node:hover .process-tooltip {
    opacity: 1;
}

/* === KOREAN GHOST === */
.korean-ghost {
    position: absolute;
    font-family: 'Noto Serif KR', serif;
    font-size: 15rem;
    color: #c77dff;
    opacity: 0.02;
    transform: rotate(10deg);
    pointer-events: none;
    z-index: 0;
    left: 10%;
    bottom: 25%;
    user-select: none;
}

/* === CONTACT SECTION === */
.contact-section {
    padding-bottom: 8rem;
}

.contact-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.contact-subtitle {
    font-family: 'Noto Serif KR', serif;
    color: #ffb347;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.contact-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.neo-input {
    flex: 1;
    min-width: 200px;
    background: #1a1a2e;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: inset 4px 4px 8px rgba(0,0,0,0.4), inset -4px -4px 8px rgba(80,50,120,0.1);
    padding: 0.8rem 1.2rem;
    color: #e8e0f0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    outline: none;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.neo-input::placeholder {
    color: #9a8fb0;
}

.neo-input:focus {
    box-shadow: inset 4px 4px 8px rgba(0,0,0,0.4), inset -4px -4px 8px rgba(80,50,120,0.1), 0 0 15px rgba(0,229,255,0.2);
    border: 1px solid rgba(0,229,255,0.3);
}

.neo-button {
    background: #22223a;
    border: none;
    border-radius: 12px;
    box-shadow: 6px 6px 12px rgba(0,0,0,0.5), -6px -6px 12px rgba(80,50,120,0.12);
    padding: 0.8rem 2rem;
    color: #00e5ff;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.neo-button:hover {
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5), -4px -4px 8px rgba(80,50,120,0.12), 0 0 20px rgba(0,229,255,0.2);
    transform: translateY(-2px);
}

/* === TIMELINE FADE === */
.timeline-fade {
    height: 200px;
    background: linear-gradient(to bottom, transparent, #0d0d1a);
    position: relative;
    z-index: 10;
}

/* === MOBILE === */
@media (max-width: 768px) {
    .timeline-container {
        left: 24px;
        transform: none;
    }

    .timeline-node {
        width: calc(100% - 60px);
        margin-left: 50px !important;
        margin-right: 0 !important;
        text-align: left;
    }

    .node-bridge {
        left: -40px !important;
        right: auto !important;
    }

    .node-marker {
        left: -44px !important;
        right: auto !important;
    }

    .process-tooltip {
        left: auto;
        right: auto;
        top: calc(100% + 8px);
        transform: none;
        width: 220px;
    }

    .korean-ghost {
        font-size: 8rem;
    }
}
