:root {
    --primary-bg: #0b0f19;
    --primary-text: #f8fafc;
    --secondary-bg: #111827;
    --secondary-text: #e2e8f0;
    --card-surface: #1e293b;
    --card-surface-text: #f1f5f9;
    --accent-primary: #06b6d4;
    --accent-secondary: #10b981;
    --border-color: #334155;
    --text-muted: #94a3b8;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--primary-bg);
    color: var(--primary-text);
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

code,
kbd,
samp,
pre {
    font-family: 'JetBrains Mono', monospace;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

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

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    transition: all 0.3s ease-in-out;
}

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

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

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

    h2 {
        font-size: clamp(1.5rem, 4vw, 1.875rem);
        word-break: keep-all;
    }

    h3 {
        font-size: clamp(1.25rem, 3.5vw, 1.5rem);
        word-break: keep-all;
    }

    h4,
    h5,
    h6 {
        font-size: clamp(1.1rem, 3vw, 1.25rem);
        word-break: keep-all;
    }

    a[href^="mailto:"],
    a[href^="tel:"],
    .break-words-mobile {
        font-size: 0.875rem;
        word-break: break-all;
    }
}

/* ===== header_section ===== */
#header {
    overflow: visible;
}

.js-mobile-dropdown.open {
    max-height: 400px;
}

/* ===== hero_section ===== */
#hero {
    overflow: hidden;
}

.js-hero-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ===== main_article_section ===== */
#main-article {
    overflow: hidden;
}

#main-article pre,
#main-article code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ===== mechanics_section ===== */
#mechanics {
    overflow: hidden;
}

#mechanics article {
    transition: transform 0.25s ease, border-color 0.25s ease;
}

#mechanics article:hover {
    transform: translateY(-3px);
    border-color: #06b6d4;
}

/* ===== scenario_section ===== */
#scenarios {
    width: 100%;
}

.js-scenario-tab.active {
    border-color: #06b6d4;
    background-color: #1e293b;
    color: #f8fafc;
}

/* ===== glossary_section ===== */
#glossary {
    overflow: hidden;
}

#glossary .js-glossary-toggle {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#glossary .js-glossary-toggle:hover {
    background-color: #111827;
}

/* ===== insights_section ===== */
#insights {
    overflow: hidden;
}

/* ===== faq_section ===== */
#faq {
    hyphens: auto;
}

#faq .js-faq-item.active {
    border-color: #06b6d4;
}

#faq .js-faq-item.active .js-faq-icon {
    transform: rotate(180deg);
    color: #06b6d4;
}

/* ===== about_section ===== */
.about-section {
    word-break: keep-all;
    hyphens: auto;
}

.about-section a {
    color: inherit;
    transition: color 0.2s ease;
}

.about-section a[href^="tel:"]:hover,
.about-section a[href^="mailto:"]:not(.js-cta-email):hover {
    color: #06b6d4;
}

/* ===== footer_section ===== */
#footer {
    overflow: hidden;
}

#footer a {
    word-break: break-word;
}