:root {
    --primary-background: #0b0f19;
    --primary-text: #f9fafb;
    --surface-background: #111827;
    --surface-border: #1f2937;
    --surface-text: #f3f4f6;
    --card-background: #161f30;
    --card-text: #e5e7eb;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --muted-text: #6b7280;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--primary-background);
    color: var(--primary-text);
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    word-break: keep-all;
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: 'Orbitron', 'Noto Sans KR', sans-serif;
    font-weight: 700;
    line-height: 1.25;
}

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;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

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

    a,
    p,
    span {
        word-break: break-word;
    }
}

/* ===== header ===== */
header {
    overflow: hidden;
}

html {
    scroll-behavior: smooth;
}

.js-mobile-menu.active {
    display: flex !important;
}

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

#hero * {
    box-sizing: border-box;
}

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

#main-article h1,
#main-article h2,
#main-article h3 {
    hyphens: auto;
    word-break: keep-all;
}

/* ===== categories ===== */
#categories {
    overflow: hidden;
}

#categories .js-category-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

#categories .js-category-card:hover {
    transform: translateY(-4px);
}

/* ===== timeline ===== */
#timeline {
    overflow: hidden;
    width: 100%;
    hyphens: auto
}

.js-timeline-card {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5)
}

/* ===== popular_topics ===== */
#popular-topics {
    overflow: hidden;
    hyphens: auto;
}

.popular-topics-section {
    width: 100%;
}

.js-modal:not(.hidden) {
    display: flex;
}

/* ===== memorable_elements ===== */
#memorable-elements {
    overflow: hidden;
    hyphens: auto;
}

#memorable-elements .js-feature-card {
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

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

#about img {
    width: 100%;
    object-fit: cover;
}

/* ===== contact ===== */
#contact {
    overflow: hidden;
}

#contact input::placeholder,
#contact textarea::placeholder {
    color: #6b7280;
    opacity: 1;
}

#contact input:focus,
#contact textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* ===== footer ===== */
#footer {
    overflow: hidden;
    width: 100%;
    hyphens: auto
}

#footer a {
    transition: color .2s ease-in-out
}