@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    /* Default Dark Mode Variables */
    --bg-color: #121212;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent: #ffffff;
    --focus-ring: rgba(255, 255, 255, 0.2);
    --radius-sm: 4px;
    --radius-md: 8px;
    --btn-primary-bg: #ffffff;
    --btn-primary-text: #000000;
    --btn-sec-border: rgba(255, 255, 255, 0.2);
    --bg-gradient: radial-gradient(circle at 10% 20%, rgba(50, 50, 50, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(30, 30, 30, 0.4) 0%, transparent 40%);
    --input-placeholder: rgba(255, 255, 255, 0.3);
    --title-gradient: linear-gradient(to right, #ffffff, #999999);
    --selection-bg: #ffffff;
    --selection-text: #000000;
}

/* Light Mode Overrides (System Preference) */
@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #ffffff;
        --glass-bg: rgba(255, 255, 255, 0.7);
        /* More transparency for sleekness */
        --glass-border: rgba(0, 0, 0, 0.05);
        --text-main: #2d3436;
        --text-muted: #636e72;
        --accent: #0984e3;
        --focus-ring: rgba(9, 132, 227, 0.3);
        --btn-primary-bg: #2d3436;
        --btn-primary-text: #ffffff;
        --btn-sec-border: rgba(0, 0, 0, 0.1);
        --bg-gradient: radial-gradient(circle at 15% 15%, rgba(179, 212, 255, 0.4) 0%, transparent 50%),
            radial-gradient(circle at 85% 85%, rgba(255, 199, 219, 0.4) 0%, transparent 50%);
        --input-placeholder: rgba(0, 0, 0, 0.4);
        --title-gradient: linear-gradient(to right, #2d3436, #636e72);
        --selection-bg: #000000;
        --selection-text: #ffffff;
    }
}

/* Manual Overrides */
body.dark-theme {
    --bg-color: #121212;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent: #ffffff;
    --focus-ring: rgba(255, 255, 255, 0.2);
    --btn-primary-bg: #ffffff;
    --btn-primary-text: #000000;
    --btn-sec-border: rgba(255, 255, 255, 0.2);
    --bg-gradient: radial-gradient(circle at 10% 20%, rgba(50, 50, 50, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(30, 30, 30, 0.4) 0%, transparent 40%);
    --input-placeholder: rgba(255, 255, 255, 0.3);
    --title-gradient: linear-gradient(to right, #ffffff, #999999);
    --selection-bg: #ffffff;
    --selection-text: #000000;
}

body.light-theme {
    --bg-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --text-main: #2d3436;
    --text-muted: #636e72;
    --accent: #0984e3;
    --focus-ring: rgba(9, 132, 227, 0.3);
    --btn-primary-bg: #2d3436;
    --btn-primary-text: #ffffff;
    --btn-sec-border: rgba(0, 0, 0, 0.1);
    --bg-gradient: radial-gradient(circle at 15% 15%, rgba(179, 212, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(255, 199, 219, 0.4) 0%, transparent 50%);
    --input-placeholder: rgba(0, 0, 0, 0.4);
    --title-gradient: linear-gradient(to right, #2d3436, #636e72);
    --selection-bg: #000000;
    --selection-text: #ffffff;
}

/* Text Selection */
::selection {
    background: var(--selection-bg);
    color: var(--selection-text);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background-image: var(--bg-gradient);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.theme-toggle:hover {
    background: var(--focus-ring);
    transform: rotate(15deg);
}

/* Minimal Layout */
.wrapper {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    margin: 0 auto;
}

.title-area {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    background: var(--title-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Glass Input */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s;
}

.glass-panel:focus-within {
    border-color: var(--accent);
}

.input-row {
    display: flex;
    gap: 1rem;
}

input[type="text"] {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-bottom-color: var(--accent);
}

input[type="text"]::placeholder {
    color: var(--input-placeholder);
}

/* Buttons (Sharp, Minimal) */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(125, 125, 125, 0.1);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover:not(:disabled) {
    background: rgba(125, 125, 125, 0.2);
    border-color: var(--focus-ring);
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

/* Info Section */
.info-grid {
    display: none;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-grid.active {
    display: grid;
}

.thumb-box img {
    width: 100%;
    border-radius: var(--radius-sm);
    aspect-ratio: 16/9;
    object-fit: cover;
    border: 1px solid var(--glass-border);
}

.meta-box h3 {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-main);
}

.meta-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Select Box */
.select-wrapper {
    position: relative;
    margin-top: 1rem;
}

select {
    width: 100%;
    appearance: none;
    background: rgba(125, 125, 125, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
}

select:hover {
    border-color: var(--focus-ring);
}


.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Progress */
.progress-area {
    margin-top: 1.5rem;
    display: none;
}

.progress-area.active {
    display: block;
}

.bar-bg {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
    position: relative;
}

.bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.2s linear;
}

.status-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-msg {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-muted);
}

.status-msg.error {
    color: #ff6b6b;
}

.status-msg.success {
    color: #51cf66;
}

/* Action Buttons */
.status-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.btn-action {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-action:hover {
    color: var(--text-main);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile */
@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .wrapper {
        padding: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .thumb-box img {
        width: 100%;
        max-width: 200px;
    }

    .intro-content {
        grid-template-columns: 1fr;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: black;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn.loading .text {
    display: none;
}

.btn.loading .spinner {
    display: block;
}

.btn-secondary .spinner {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: white;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   Intro Page v3 High-End Styles
   ========================================= */

/* Ambient Glows */
.ambient-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(9, 132, 227, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    animation: flow 10s ease-in-out infinite alternate;
}

.glow-1 {
    top: -20%;
    left: -10%;
}

.glow-2 {
    bottom: -20%;
    right: -10%;
    background: radial-gradient(circle, rgba(255, 118, 117, 0.1) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes flow {
    from {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }

    to {
        transform: translate(30px, 30px) scale(1.1);
        opacity: 1;
    }
}

/* Nav */
.intro-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    margin-bottom: 4rem;
}

.intro-nav .brand {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.btn-nav {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.btn-nav:hover {
    color: var(--accent);
}

/* Hero v3 */
.intro-hero {
    text-align: center;
    padding: 4rem 0 6rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: center;
}

.btn-text {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.btn-text:hover {
    color: var(--text-main);
}

/* Manifesto */
.manifesto-section {
    padding: 6rem 0;
    border-top: 1px solid var(--glass-border);
}

.manifesto-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    background: var(--title-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.manifesto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.manifesto-item {
    padding: 0 1rem;
}

.manifesto-item .number {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-family: monospace;
    opacity: 0.7;
}

.manifesto-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.manifesto-item p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Terminal / Tech Showcase */
.tech-showcase {
    display: flex;
    gap: 3rem;
    align-items: center;
    padding: 6rem 0;
    border-top: 1px solid var(--glass-border);
}

.terminal-window {
    flex: 1;
    background: rgba(15, 15, 20, 0.95);
    /* Deep dark */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    padding: 0;
    overflow: hidden;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
}

.terminal-header .dots {
    display: flex;
    gap: 6px;
    margin-right: 1rem;
}

.terminal-header .dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.terminal-title {
    font-family: monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #a0a0a0;
}

.c-pink {
    color: #ff79c6;
}

.c-blue {
    color: #8be9fd;
}

.c-yellow {
    color: #f1fa8c;
}

.c-green {
    color: #50fa7b;
}

.c-comment {
    color: #6272a4;
}

.indent {
    margin-left: 1.5rem;
}

.indent-2 {
    margin-left: 3rem;
}

.cursor {
    animation: blink 1s infinite;
}

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

.tech-desc {
    flex: 1;
}

.tech-desc h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Features Mosaic */
.features-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 6rem 0;
}

.mosaic-card {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.mosaic-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.mosaic-icon {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.highlight-card {
    background: linear-gradient(135deg, var(--glass-bg) 0%, rgba(9, 132, 227, 0.05) 100%);
}

/* Footer CTA */
.intro-footer {
    text-align: center;
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--glass-border);
}

.footer-cta {
    font-size: 3rem;
    margin-bottom: 2rem;
    letter-spacing: -0.05em;
    background: var(--title-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.copyright {
    display: block;
    margin-top: 3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Mobile Adjustments for Intro */
@media (max-width: 900px) {
    .tech-showcase {
        flex-direction: column-reverse;
        text-align: center;
    }

    .features-mosaic {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .logo-large {
        font-size: 3rem;
    }

    .footer-cta {
        font-size: 2rem;
    }

    .features-mosaic {
        grid-template-columns: 1fr;
    }
}

/* Path Control */
.path-row {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.path-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 0.8rem;
}

#savePath {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

#savePath.editing {
    background: rgba(125, 125, 125, 0.1);
    color: var(--text-main);
    border: 1px solid var(--accent);
}

.btn-micro {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.4rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.btn-micro:hover {
    color: var(--text-main);
    background: rgba(125, 125, 125, 0.1);
}

/* Intro Page Special Selection (Glassy) */
.intro-wrapper ::selection {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

body.light-theme .intro-wrapper ::selection {
    background: rgba(0, 0, 0, 0.07);
    color: #000000;
}

/* Minimal Link (No Underline) */
.footer-area {
    margin-top: 1rem;
    text-align: center;
}

.link-minimal {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-bottom: none !important;
}

.link-minimal:hover {
    color: var(--text-main);
}

/* Evolution Roadmap (Added to Intro v3) */
.evolution-section {
    padding: 6rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.evolution-section h2 {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    background: var(--title-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.roadmap-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.roadmap-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    width: 280px;
    text-align: left;
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.roadmap-item.active {
    opacity: 1;
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.roadmap-item.done {
    opacity: 0.8;
}

.roadmap-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roadmap-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.roadmap-item.done .status-dot {
    background: #50fa7b;
}

.roadmap-item.active .status-dot {
    background: #ff79c6;
    box-shadow: 0 0 10px #ff79c6;
}

.roadmap-item.future .status-dot {
    background: var(--text-muted);
}