/* CSS Variables & Reset */
:root {
    --font-main: 'Galmuri11', sans-serif;

    /* Light Mode */
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #555555;
    --primary-color: #5c6bc0;
    --accent-color: #3949ab;

    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(92, 107, 192, 0.1);

    /* Badge Colors */
    --badge-active-bg: #e8f5e9;
    --badge-active-text: #2e7d32;
    --badge-soon-bg: #fff8e1;
    --badge-soon-text: #f57f17;
    --badge-dev-bg: #e3f2fd;
    --badge-dev-text: #1565c0;
    --badge-plan-bg: #f5f5f5;
    --badge-plan-text: #616161;

    --blob-1: #c5cae9;
    --blob-2: #f8bbd0;
    --blob-3: #fff9c4;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-color: #0a0a0c;
    --text-color: #f0f0f5;
    --text-muted: #a0a0bc;
    --primary-color: #7986cb;
    --accent-color: #81d4fa;

    --glass-bg: rgba(15, 15, 20, 0.7);
    --glass-border: rgba(121, 134, 203, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8), 0 0 15px rgba(121, 134, 203, 0.1);

    /* Badge Colors Dark */
    --badge-active-bg: #1b5e20;
    --badge-active-text: #a5d6a7;
    --badge-soon-bg: #f57f17;
    --badge-soon-text: #fff59d;
    --badge-dev-bg: #0d47a1;
    --badge-dev-text: #90caf9;
    --badge-plan-bg: #424242;
    --badge-plan-text: #bdbdbd;

    --blob-1: #1a237e;
    --blob-2: #4a148c;
    --blob-3: #004d40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    /* Increased for better readability of text blocks */
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: floating 10s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--blob-1);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--blob-2);
    animation-delay: -2s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: var(--blob-3);
    animation-delay: -5s;
}

@keyframes floating {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* Layout Utilities */
.container {
    max-width: 1100px;
    /* Slightly tighter for text readability */
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Glassmorphism Classes */
.glass-header,
.glass-footer,
.glass-card,
.glass-btn,
.glass-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}

.glass-card:hover {
    box-shadow: 0 12px 48px 0 rgba(121, 134, 203, 0.3), 0 0 20px rgba(121, 134, 203, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--text-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.theme-btn,
.mobile-menu-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    font-family: inherit;
}

.mobile-menu-btn {
    display: none;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero-title {
    font-size: 3.5rem;
    /* Adjusted for Galmuri */
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
}

.highlight {
    opacity: 0.7;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    word-break: keep-all;
    /* Korean word break */
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.glass-btn {
    padding: 14px 34px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-color) !important;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px var(--primary-color);
    background: var(--primary-color);
    opacity: 0.9;
}

.glass-btn:not(.btn-primary):hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .glass-btn:not(.btn-primary):hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Common Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    word-break: keep-all;
}

/* About Section & Problem/Solution */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.text-block {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.text-block h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.text-block p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.info-card {
    padding: 40px;
    border-radius: 20px;
    height: 100%;
}

.info-card h4 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--text-muted);
    padding-bottom: 15px;
    display: inline-block;
}

.info-card ul {
    text-align: left;
    padding-left: 20px;
}

.info-card li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 15px;
}

.info-card li::before {
    content: '•';
    position: absolute;
    left: -10px;
    color: var(--text-color);
}

/* Support Section */
.support-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2x2 grid */
    gap: 30px;
}

.support-card {
    padding: 30px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.support-card h3 {
    font-size: 1.3rem;
    margin: 15px 0 10px 0;
}

.support-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.support-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns for projects */
    gap: 30px;
}

.project-card {
    padding: 40px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.project-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.project-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.project-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge.active {
    background-color: var(--badge-active-bg);
    color: var(--badge-active-text);
}

.badge.soon {
    background-color: var(--badge-soon-bg);
    color: var(--badge-soon-text);
}

.badge.dev {
    background-color: var(--badge-dev-bg);
    color: var(--badge-dev-text);
}

.badge.plan {
    background-color: var(--badge-plan-bg);
    color: var(--badge-plan-text);
}

/* Dynamic Sub-sites Section */
.subsite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.subsite-btn {
    padding: 30px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.subsite-icon {
    font-size: 1.8rem;
    opacity: 0.8;
}

.subsite-name {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.subsite-btn:hover {
    background: rgba(121, 134, 203, 0.2);
    box-shadow: 0 0 30px rgba(121, 134, 203, 0.3);
}

/* Footer */
.glass-footer {
    padding: 40px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    flex-direction: column;
    gap: 20px;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Responsive */
@media (max-width: 900px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 30px;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
        margin-left: 15px;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 25px;
    }
}