/* ---------------------------------- */
/* 버전 B: 미니멀 테크 & clean 스타일  */
/* ---------------------------------- */
:root {
    --main-dark: #0f172a;
    --accent: #0284c7;
    --bg-body: #ffffff;
    --bg-sub: #f8fafc;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

*, *::before, *::after { 
    box-sizing: border-box; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

header, main, footer {
    max-width: 840px;
    margin: 0 auto;
    padding: 20px;
    background: transparent;
}

/* ---------------------------------- */
/* Header & Navigation                */
/* ---------------------------------- */
header {
    border-bottom: 2px solid var(--main-dark);
    margin-bottom: 30px;
    padding-bottom: 16px;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.8em;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.2;
}

.header-title a {
    text-decoration: none;
    color: var(--main-dark);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

#menu-toggle {
    padding: 7px 16px;
    cursor: pointer;
    background-color: #ffffff;
    border: 1px solid var(--main-dark);
    border-radius: 0;
    color: var(--main-dark);
    font-weight: 700;
    font-size: 0.9em;
    transition: all 0.15s ease;
}

#menu-toggle:hover {
    background-color: var(--main-dark);
    color: #ffffff;
}

.write-btn, .edit-btn {
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 0;
    font-size: 0.85em;
    font-weight: bold;
    display: inline-block;
}

.write-btn {
    border: 1px solid var(--accent);
    background-color: var(--accent);
    color: #ffffff;
}

.edit-btn {
    border: 1px solid #f90;
    background-color: #f90;
    color: #ffffff;
}

.category-nav {
    background-color: var(--bg-sub);
    border: 1px solid var(--border);
    padding: 16px;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-nav a {
    text-decoration: none;
    color: var(--text-primary);
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.15s ease;
}

.category-nav a.active, .category-nav a:hover {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

/* ---------------------------------- */
/* Search Form                        */
/* ---------------------------------- */
.search-container {
    margin: 20px 0;
}

.search-form {
    display: flex;
}

.search-form input[type="search"] {
    flex-grow: 1;
    padding: 10px 12px;
    border: 1px solid var(--main-dark);
    border-right: none;
    border-radius: 0;
    outline: none;
    font-size: 0.95em;
}

.search-form button {
    padding: 10px 18px;
    background-color: var(--main-dark);
    color: #ffffff;
    border: 1px solid var(--main-dark);
    border-radius: 0;
    cursor: pointer;
    font-weight: bold;
}

.search-feedback {
    margin: 10px 0;
    padding: 10px 14px;
    background-color: var(--bg-sub);
    border-left: 4px solid var(--accent);
    font-size: 0.95em;
}

/* ---------------------------------- */
/* Main Gateway (Index)               */
/* ---------------------------------- */
.main-gateway {
    padding: 10px 0;
}

.hero-section {
    padding: 20px 0 30px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

.hero-section h1 {
    font-size: 2.2em;
    font-weight: 900;
    margin: 0 0 10px 0;
    color: var(--main-dark);
    letter-spacing: -1px;
}

.hero-section p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.1em;
    line-height: 1.6;
}

.gateway-section h2 {
    font-size: 1.3em;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--main-dark);
}

.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: var(--bg-sub);
    border: 1px solid var(--border);
    border-left: 4px solid var(--main-dark);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.menu-item:hover {
    border-left-color: var(--accent);
    background: #ffffff;
    transform: translateX(4px);
}

.menu-item .icon-box {
    width: 36px;
    height: 36px;
    background: var(--main-dark);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    flex-shrink: 0;
}

.menu-item .text-box {
    display: flex;
    flex-direction: column;
}

.menu-item span {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--text-primary);
}

.menu-item small {
    font-size: 0.88em;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---------------------------------- */
/* Article & Article View Content     */
/* ---------------------------------- */
article {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

article h2, article h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

article h3 a {
    text-decoration: none;
    color: var(--main-dark);
    font-weight: 700;
}

article h3 a:hover {
    color: var(--accent);
}

.content {
    font-size: 1.08em;
    line-height: 1.8;
    color: var(--text-primary);
    margin-top: 15px;
}

.content p {
    margin: 1.2em 0;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.content th, .content td {
    border: 1px solid var(--border);
    padding: 10px 14px;
    text-align: left;
}

.content th {
    background-color: var(--bg-sub);
    font-weight: bold;
    color: var(--main-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 16px 0;
}

/* ---------------------------------- */
/* Footer                             */
/* ---------------------------------- */
footer {
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85em;
}

footer a {
    color: var(--main-dark);
    text-decoration: underline;
}

/* 모바일 대응 */
@media (max-width: 640px) {
    header, main, footer {
        padding: 15px;
    }
    .hero-section h1 {
        font-size: 1.8em;
    }
    .menu-item {
        padding: 14px 18px;
    }
}

