:root {
    --primary-bg: #0d0f12;
    --secondary-bg: #161a22;
    --surface-card: #1e232d;
    --surface-border: #2d3748;
    --primary-text: #f3f4f6;
    --secondary-text: #9ca3af;
    --accent-start: #ec4899;
    --accent-end: #d946ef;
    --accent-text: #ffffff;
    --muted-dark: #4b5563;
    --font-primary: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    animation: none !important;
    transition: none !important;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
}

a,
a:hover,
a:focus {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

code,
kbd,
samp,
pre {
    font-family: var(--font-mono);
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

:focus-visible {
    outline: 2px solid var(--accent-start);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
        word-break: keep-all;
    }

    h2 {
        font-size: clamp(1.4rem, 5vw, 1.85rem);
        word-break: keep-all;
    }

    h3 {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
    }

    h4 {
        font-size: 1.15rem;
    }

    h5 {
        font-size: 1rem;
    }

    .text-break-mobile {
        word-break: break-all;
        font-size: 0.9rem;
    }
}

/* ===== header ===== */
#site-header {
    overflow: hidden;
}

#site-header .nav-item-link:hover {
    color: var(--accent-start) !important;
}

#site-header .cta-btn:hover {
    opacity: 0.92;
}

#site-header .mobile-nav-link:hover {
    background-color: var(--surface-card);
    color: var(--accent-start) !important;
}

#site-header .mobile-menu-wrapper {
    display: none;
}

#site-header .mobile-menu-wrapper.is-open {
    display: block;
}

@media (max-width: 767.98px) {
    #site-header .brand-title {
        font-size: 1.125rem;
        hyphens: auto;
        line-height: 1.2;
    }
}

/* ===== hero_section ===== */
#hero {
    overflow: hidden;
    background-color: var(--primary-bg);
    min-height: 90vh;
    padding-top: 4rem;
    padding-bottom: 4rem
}

#hero .hero-ambient-glow {
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.18) 0%, rgba(217, 70, 239, 0.06) 45%, transparent 70%);
    filter: blur(50px);
    z-index: 1;
    pointer-events: none
}

#hero .hero-badge {
    background-color: var(--surface-card);
    border: 1px solid var(--surface-border)
}

#hero .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-start);
    box-shadow: 0 0 8px var(--accent-start)
}

#hero .badge-text {
    color: var(--primary-text);
    font-size: 0.875rem;
    font-weight: 500
}

#hero .hero-title {
    color: var(--primary-text);
    font-size: clamp(1.125rem, 4vw, 2.75rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    hyphens: auto
}

#hero .hero-subtitle {
    color: var(--secondary-text);
    font-size: 1.0625rem;
    line-height: 1.6;
    letter-spacing: -0.01em;
    hyphens: auto
}

#hero .hero-btn-primary {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: var(--accent-text);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease
}

#hero .hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(236, 72, 153, 0.45);
    color: var(--accent-text)
}

#hero .hero-icon {
    stroke: var(--accent-text)
}

#hero .stat-num {
    color: var(--primary-text);
    font-size: 1.375rem;
    line-height: 1.2
}

#hero .stat-desc {
    color: var(--secondary-text);
    font-size: 0.8125rem
}

#hero .border-secondary-subtle {
    border-color: var(--surface-border) !important
}

#hero .hero-visual-card {
    background: linear-gradient(180deg, rgba(30, 35, 45, 0.8) 0%, rgba(22, 26, 34, 0.9) 100%);
    border: 1px solid var(--surface-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5)
}

#hero .visual-frame {
    height: 420px;
    background-color: var(--secondary-bg)
}

#hero .floating-status-pill {
    background-color: rgba(13, 15, 18, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--surface-border);
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4)
}

#hero .status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 6px #22c55e
}

#hero .status-text {
    color: var(--primary-text);
    font-size: 0.75rem;
    font-weight: 500
}

@media(max-width:767.98px) {
    #hero .hero-title {
        font-size: 1.125rem;
        line-height: 1.2
    }

    #hero .hero-subtitle {
        font-size: 0.875rem;
        line-height: 1.4
    }

    #hero .stat-num {
        font-size: 1rem
    }

    #hero .stat-desc {
        font-size: 0.75rem
    }

    #hero .visual-frame {
        height: 280px
    }
}

/* ===== about_project ===== */
#about {
    overflow: hidden;
}

.about-section h2,
.about-section h3 {
    hyphens: auto;
}

@media (max-width: 767.98px) {
    .about-section h2 {
        font-size: 1rem !important;
        line-height: 1.25 !important;
    }

    .about-section h3 {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
    }
}

/* ===== core_mechanics_article ===== */
#core-mechanics {
    overflow: hidden;
    background-color: var(--primary-bg);
    color: var(--primary-text);
}

.core-mechanics-section {
    width: 100%;
}

.mechanics-article {
    max-width: 860px;
    hyphens: auto;
}

.article-badge {
    background-color: var(--secondary-bg);
    border: 1px solid var(--surface-border);
    color: var(--accent-start);
}

.article-badge-icon {
    stroke: var(--accent-start);
    flex-shrink: 0;
}

.article-badge-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-text);
}

.article-main-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary-text);
    letter-spacing: -0.02em;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.meta-item {
    color: var(--secondary-text);
}

.meta-divider {
    color: var(--muted-dark);
}

.article-intro {
    background-color: var(--secondary-bg);
    border-left: 4px solid var(--accent-start);
    border-top: 1px solid var(--surface-border);
    border-right: 1px solid var(--surface-border);
    border-bottom: 1px solid var(--surface-border);
}

.lead-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--primary-text);
    font-weight: 400;
}

.section-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary-text);
    position: relative;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--surface-border);
}

.content-paragraph {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--secondary-text);
    margin-bottom: 1rem;
}

.article-media-wrapper {
    background-color: var(--surface-card);
    padding: 0.75rem;
    border: 1px solid var(--surface-border);
    border-radius: 0.5rem;
}

.article-image {
    height: 380px;
    object-fit: cover;
    display: block;
}

.media-caption {
    font-size: 0.85rem;
    color: var(--secondary-text);
    text-align: center;
}

@media (max-width: 767.98px) {
    .article-main-title {
        font-size: 1.125rem;
        line-height: 1.2;
    }

    .section-title {
        font-size: 1rem;
        line-height: 1.25;
    }

    .lead-text {
        font-size: 0.925rem;
        line-height: 1.5;
    }

    .content-paragraph {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .article-image {
        height: 220px;
    }

    .article-intro {
        padding: 1rem !important;
    }
}

/* ===== systems_analysis ===== */
#systems-breakdown {
    overflow: hidden;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    hyphens: auto
}

.sys-badge {
    color: var(--accent-start);
    font-size: 0.875rem;
    letter-spacing: 0.08em
}

.sys-heading {
    color: var(--primary-text);
    line-height: 1.2
}

.sys-subheading {
    color: var(--secondary-text);
    line-height: 1.6
}

.sys-card {
    background-color: var(--surface-card);
    border: 1px solid var(--surface-border);
    transition: border-color 0.25s ease
}

.sys-card:hover {
    border-color: var(--accent-start)
}

.sys-thumb-wrap {
    height: 180px;
    background-color: var(--secondary-bg);
    position: relative
}

.sys-img {
    height: 100%;
    object-fit: cover;
    display: block
}

.sys-num {
    color: var(--accent-end);
    font-size: 1.125rem
}

.sys-card-title {
    color: var(--primary-text)
}

.sys-card-desc {
    color: var(--secondary-text);
    font-size: 0.925rem;
    line-height: 1.55
}

@media(max-width:767.98px) {
    .sys-heading {
        font-size: 1.125rem;
        line-height: 1.2
    }

    .sys-card-title {
        font-size: 0.875rem
    }

    .sys-card-desc {
        font-size: 0.8125rem
    }
}

/* ===== player_retention_flow ===== */
#player-journey {
    hyphens: auto;
}

#player-journey .js-journey-card {
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#player-journey .js-journey-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-start) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

@media (max-width: 767.98px) {
    #player-journey h2 {
        font-size: 1rem !important;
        line-height: 1.25 !important;
    }

    #player-journey h3 {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
    }
}

/* ===== interactivity_concepts ===== */
#interactivity {
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    overflow: hidden;
    width: 100%;
}

#interactivity .badge-concept {
    background: rgba(236, 72, 153, 0.12);
    color: var(--accent-start);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

#interactivity .section-title {
    color: var(--primary-text);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    hyphens: auto;
}

#interactivity .section-subtitle {
    color: var(--secondary-text);
    font-size: 1rem;
    line-height: 1.6;
}

#interactivity .concept-card {
    background-color: var(--surface-card);
    border: 1px solid var(--surface-border);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#interactivity .concept-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-start);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

#interactivity .icon-wrapper {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(217, 70, 239, 0.15));
    border: 1px solid rgba(236, 72, 153, 0.35);
}

#interactivity .concept-icon {
    color: var(--accent-start);
}

#interactivity .card-index {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-end);
}

#interactivity .card-title {
    color: var(--primary-text);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    hyphens: auto;
}

#interactivity .card-description {
    color: var(--secondary-text);
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 767.98px) {
    #interactivity .section-title {
        font-size: 1rem;
        line-height: 1.2;
    }

    #interactivity .card-title {
        font-size: 0.875rem;
        line-height: 1.25;
    }

    #interactivity .section-subtitle {
        font-size: 0.875rem;
        line-height: 1.4;
    }

    #interactivity .card-description {
        font-size: 0.8125rem;
        line-height: 1.5;
    }
}

/* ===== technical_architecture ===== */
#architecture {
    width: 100%;
    position: relative;
}

#architecture .js-arch-card {
    transition: border-color 0.25s ease, transform 0.25s ease;
}

#architecture .js-arch-card:hover {
    border-color: var(--accent-start) !important;
    transform: translateY(-3px);
}

@media (max-width: 767.98px) {
    #architecture h2 {
        font-size: 1rem !important;
        line-height: 1.25;
        hyphens: auto;
    }

    #architecture h3 {
        font-size: 0.875rem !important;
        line-height: 1.2;
        hyphens: auto;
    }
}

/* ===== visual_design_language ===== */
#visual-thinking {
    overflow: hidden;
}

#visual-thinking .card {
    transition: transform 0.25s ease, border-color 0.25s ease;
    border-color: var(--surface-border);
}

#visual-thinking .card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-start) !important;
}

/* ===== development_lifecycle ===== */
.dev-pipeline-section {
    width: 100%;
    position: relative;
}

.dev-pipeline-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-start);
    display: inline-block;
}

.dev-step-btn {
    background-color: var(--secondary-bg);
    border: 1px solid var(--surface-border);
    transition: all 0.25s ease-in-out;
    cursor: pointer;
    outline: none;
}

.dev-step-btn:hover {
    border-color: var(--accent-start);
    transform: translateY(-2px);
}

.dev-step-btn.active {
    background-color: var(--surface-card);
    border-color: var(--accent-end);
    box-shadow: 0 0 16px rgba(217, 70, 239, 0.2);
}

.js-step-panel {
    display: none;
}

.js-step-panel.active {
    display: block;
}

@media (max-width: 767.98px) {
    #dev-pipeline h2 {
        font-size: 1rem !important;
        line-height: 1.25;
    }

    #dev-pipeline h3 {
        font-size: 0.875rem !important;
        line-height: 1.2;
    }

    #dev-pipeline h4 {
        font-size: 0.85rem !important;
    }
}

/* ===== emerging_game_tech ===== */
#future-tech {
    overflow: hidden;
    width: 100%;
    hyphens: auto;
}

#future-tech .js-tech-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-start) !important;
}

@media(max-width:767.98px) {
    #future-tech h2 {
        font-size: 1rem;
        line-height: 1.2;
    }

    #future-tech h3 {
        font-size: 0.875rem;
        line-height: 1.2;
    }
}

/* ===== mini_breakdowns_modals ===== */
#mini-breakdowns {
    overflow: hidden;
}

#mini-breakdowns .card {
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#mini-breakdowns .card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-start) !important;
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.15);
}

#mini-breakdowns .modal-content {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

/* ===== gamedev_quick_facts ===== */
#quick-facts .js-fact-card {
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#quick-facts .js-fact-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-start) !important;
    box-shadow: 0 10px 24px -6px rgba(236, 72, 153, 0.2);
}

/* ===== footer ===== */
#site-footer {
    background-color: var(--primary-bg, #0d0f12);
    border-top: 1px solid var(--surface-border, #2d3748);
    color: var(--primary-text, #f3f4f6);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
}

#site-footer .footer-border {
    border-color: var(--surface-border, #2d3748) !important;
}

#site-footer .footer-brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-text, #f3f4f6);
    letter-spacing: -0.02em;
}

#site-footer .brand-accent {
    color: var(--accent-start, #ec4899);
}

#site-footer .footer-slogan {
    font-size: 0.95rem;
    color: var(--secondary-text, #9ca3af);
    line-height: 1.5;
    hyphens: auto;
}

#site-footer .footer-nav-link {
    color: var(--primary-text, #f3f4f6);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

#site-footer .footer-nav-link:hover,
#site-footer .footer-nav-link:focus {
    color: var(--accent-start, #ec4899);
}

#site-footer .footer-copy {
    font-size: 0.85rem;
    color: var(--secondary-text, #9ca3af);
}

#site-footer .footer-legal-link {
    font-size: 0.85rem;
    color: var(--secondary-text, #9ca3af);
    transition: color 0.2s ease-in-out;
}

#site-footer .footer-legal-link:hover,
#site-footer .footer-legal-link:focus {
    color: var(--primary-text, #f3f4f6);
}

#site-footer .footer-divider {
    color: var(--surface-border, #2d3748);
    font-size: 0.85rem;
    user-select: none;
}

@media (max-width: 767.98px) {
    #site-footer .footer-brand-title {
        font-size: 1.125rem;
        line-height: 1.2;
    }

    #site-footer .footer-slogan {
        font-size: 0.85rem;
    }

    #site-footer .footer-nav-link {
        font-size: 0.875rem;
    }

    #site-footer .footer-copy,
    #site-footer .footer-legal-link {
        font-size: 0.8rem;
    }
}