:root {
    --bg-color: #0f1115;
    --card-bg: #1a1d24;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --gradient-main: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --font-main: 'Inter', 'Noto Sans KR', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, rgba(15, 17, 21, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('_files_/ai4bm.jpg');
    background-size: cover;
    background-position: center;
    z-index: -2;
    opacity: 0.4;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 90%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 90%);
}

#brain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0.6;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Challenge Banner */
.challenge-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 16px;
    margin: 3rem auto;
    max-width: 1200px;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.challenge-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.challenge-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.challenge-badge {
    display: inline-block;
    background: var(--gradient-main);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.challenge-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.challenge-banner p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.challenge-banner p strong {
    color: var(--text-primary);
}

.btn-challenge {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    margin-top: 1.5rem;
    background: var(--gradient-main);
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

.btn-challenge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.6);
}

/* Intro Section */
.intro {
    padding: 4rem 0;
    text-align: center;
}

.intro h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.intro p {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.intro .lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Series Grid */
.series-list {
    padding: 4rem 0 6rem;
}

.series-list h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

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

.card-header {
    margin-bottom: 1.5rem;
}

.part-number {
    display: block;
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card h3 {
    font-size: 1.5rem;
    line-height: 1.3;
}

.card-body {
    flex: 1;
}

.question {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent-secondary);
}

.card ul {
    list-style: none;
    margin-bottom: 2rem;
}

.card ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.card-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
.footer {
    background: #0a0b0e;
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: var(--accent-primary);
}

.copyright {
    text-align: center;
    color: #525252;
    font-size: 0.875rem;
}

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

    .subtitle {
        font-size: 1.125rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Language Toggle */
.lang-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.2s ease;
    z-index: 10;
}

.lang-toggle:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.lang-toggle-nav {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.lang-toggle-nav:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

/* Navigation */
.main-nav {
    background: rgba(10, 11, 14, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

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

.nav-link.active {
    color: var(--accent-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-main);
}

/* Page Header */
.page-header {
    padding: 4rem 0 3rem;
    text-align: center;
}

.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--accent-primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Content Section */
.content {
    padding: 2rem 0 4rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    color: var(--text-primary);
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.article-content h4 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.article-content p strong {
    color: var(--text-primary);
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.article-content blockquote {
    border-left: 3px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.article-content th {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.article-content td {
    color: var(--text-secondary);
}

.article-content code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* Article Navigation */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-nav-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    max-width: 45%;
}

.article-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

.article-nav-link.prev {
    align-items: flex-start;
}

.article-nav-link.next {
    align-items: flex-end;
}

.article-nav-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.article-nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Recommended Box */
.recommended {
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid var(--accent-primary);
    padding: 1rem;
    margin-top: 1.5rem;
}

.recommended strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.recommended p {
    margin: 0;
    font-size: 0.95rem;
}

/* Series Grid - add spacing for buttons */
.series-grid .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.series-grid .card-footer .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav .nav-links {
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .article-nav-link {
        max-width: 100%;
    }
}

/* Team Page */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.team-member:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.team-member h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.team-role {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.team-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.team-link:hover {
    opacity: 0.8;
}