/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Fira+Code:wght@400;500&display=swap');

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --bg-main: #ffffff;
    --bg-side: #f8fafc;
    --text-main: #334155;
    --text-head: #0f172a;
    --border: #e2e8f0;
    --code-bg: #1e293b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg-main); color: var(--text-main); line-height: 1.8; }

.layout { display: flex; min-height: 100vh; }

/* 사이드바 */
.sidebar { width: 300px; background: var(--bg-side); border-right: 1px solid var(--border); padding: 40px 20px; position: fixed; height: 100vh; overflow-y: auto; }
.sidebar h2 { font-weight: 800; font-size: 1.2rem; margin-bottom: 30px; color: var(--primary); letter-spacing: -0.5px; }
.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 8px; }
.sidebar a { text-decoration: none; color: #64748b; font-size: 0.95rem; display: block; padding: 10px 15px; border-radius: 8px; transition: 0.2s; }
.sidebar a:hover, .sidebar a.active { background: #f1f5f9; color: var(--primary); font-weight: 600; }

/* 본문 영역 */
.content { margin-left: 300px; padding: 60px 80px; width: 100%; max-width: 1200px; }
.container { max-width: 850px; }

h1 { font-size: 2.8rem; font-weight: 800; color: var(--text-head); margin-bottom: 20px; letter-spacing: -1.5px; }
h2 { font-size: 1.8rem; font-weight: 700; color: var(--text-head); margin-top: 50px; margin-bottom: 20px; border-bottom: 2px solid #f1f5f9; padding-bottom: 10px; }
h3 { font-size: 1.4rem; font-weight: 600; margin-top: 30px; color: var(--text-head); }

p { margin-bottom: 20px; font-size: 1.1rem; }
strong { color: var(--text-head); font-weight: 600; }

/* 코드 및 박스 */
pre { background: var(--code-bg); color: #f8fafc; padding: 25px; border-radius: 12px; font-family: 'Fira Code', monospace; font-size: 0.95rem; overflow-x: auto; margin: 25px 0; border: 1px solid #334155; }
code { background: #f1f5f9; color: #e11d48; padding: 2px 6px; border-radius: 4px; font-family: 'Fira Code', monospace; font-size: 0.9rem; }
pre code { background: none; color: inherit; padding: 0; }

.img-placeholder { width: 100%; background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 60px 20px; margin: 30px 0; color: #94a3b8; }
.img-placeholder i { font-size: 3rem; margin-bottom: 10px; }

.callout { background: #f0fdf4; border-left: 5px solid #22c55e; padding: 25px; border-radius: 4px 12px 12px 4px; margin: 30px 0; }
.callout.info { background: #eff6ff; border-left-color: #3b82f6; }
.callout.warn { background: #fff7ed; border-left-color: #f97316; }
.callout h4 { margin-bottom: 10px; color: var(--text-head); font-size: 1.1rem; }

.nav-btns { display: flex; justify-content: space-between; margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border); }
.btn { padding: 12px 25px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: 0.2s; }
.btn-prev { background: #f1f5f9; color: #475569; }
.btn-next { background: var(--primary); color: white; }
.btn:hover { opacity: 0.8; transform: translateY(-2px); }

@media (max-width: 1024px) {
    .sidebar { display: none; }
    .content { margin-left: 0; padding: 40px 20px; }
}