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

:root {
    /* Dark Mode (Default) */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --success: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg-dark: #020617;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-nav: rgba(2, 6, 23, 0.8);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --primary: #f8fafc;
    --primary-light: #f1f5f9;
    --accent: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.2);
    --success: #059669;
    --text-main: #0f172a;
    --text-muted: #475569;
    --bg-dark: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(15, 23, 42, 0.1);
    --glass-nav: rgba(248, 250, 252, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.05;
    pointer-events: none;
    z-index: 9999;
}

/* Background Gradients */
.bg-blob {
    position: fixed;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(120px);
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
    transition: background 0.3s ease;
}

.blob-1 { top: -200px; left: -200px; animation: float 20s infinite alternate; }
.blob-2 { bottom: -200px; right: -200px; animation: float 25s infinite alternate-reverse; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(150px, 80px) scale(1.1); }
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 4rem 0; /* Reduced from 8rem */
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1.1rem;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 10px 20px -5px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px var(--accent-glow);
}

/* Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    transition: var(--transition);
}

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

/* Table Design */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th, td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-main);
}

th {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* Image Showcase */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.image-card {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 16/10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.image-card:hover img {
    transform: scale(1.08);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.95), transparent);
    color: white;
}

/* Stats/Impact Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.03);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--accent);
    color: white;
    transform: rotate(15deg);
}

/* Footer */
footer {
    padding: 4rem 0 4rem; /* Reduced from 8rem */
    border-top: 1px solid var(--glass-border);
    text-align: center;
    position: relative;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    cursor: zoom-out;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1.1rem; }
    section { padding: 3rem 0; }
    .glass-card { padding: 2rem; }
    nav .container { gap: 1rem; flex-wrap: wrap; justify-content: center !important; }
}

/* Print Optimization */
@media print {
    nav, .theme-toggle, .bg-blob, .btn, .modal, #themeToggle, #printToggle {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    section {
        padding: 1.5rem 0 !important;
        page-break-inside: avoid;
    }
    .glass-card {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        color: black !important;
        backdrop-filter: none !important;
    }
    .gradient-text {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
    h1, h2, h3, h4, p, td, th {
        color: black !important;
    }
    .image-card {
        box-shadow: none !important;
        border: 1px solid #eee !important;
    }
    .image-overlay {
        background: rgba(0,0,0,0.5) !important;
    }
}
