/* 기본 */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 헤더 */

.header {
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    max-width: 1100px;
    padding: 18px 20px;
    display: flex;
    margin: auto;
    justify-content: space-between;
    align-items: center;
    text-decoration: none
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    color: #111;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #444;
    font-weight: 500;
}

nav a:hover {
    color: #12b886;
}

/* 메인 레이아웃 */

.layout {
    max-width: 1100px;
    margin: auto;
    padding: 40px 20px;

    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
}

/* 글 목록 */

#posts {
    width: 100%;
}

/* 포스트 카드 */

.post {
    background: white;
    padding: 28px;
    border-radius: 14px;
    margin-bottom: 24px;
    border: 1px solid #eee;
    transition: all 0.15s ease;
}

.post:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.title {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: #111;
}

.title:hover {
    color: #12b886;
}

.summary {
    margin-top: 12px;
    color: #555;
    line-height: 1.6;
}

.meta {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #888;
}

.tag {
    margin-left: 10px;
    color: #12b886;
    cursor: pointer;
}

/* 사이드바 */

.sidebar .card {
    background: white;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

.sidebar h3 {
    margin-top: 0;
}

/* 검색 */

#search {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
}

/* 프로필 */

.profile {
    text-align: center;
}

.profile img {
    width: 80px;
    border-radius: 50%;
}

/* 페이지네이션 */

.pagination {
    margin-top: 30px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
}

/* 푸터 */

.footer {
    text-align: center;
    padding: 40px;
    color: #888;
}

.container {
    animation: fadein .4s ease;
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
    }
}

/* 글 페이지 */

.post-container {
    max-width: 1100px;
    margin: auto;
    padding: 40px 20px;
}

.post-view {
    background: white;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #eee;
}

.post-view h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.post-meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

#post-tag {
    margin-left: 10px;
    color: #12b886;
}

#content img {
    display: block;
    margin: 20px auto;
}

/* 돌아가기 */

.back {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #555;
}

.back:hover {
    color: #12b886;
}

/* 마크다운 본문 */

#content {
    line-height: 1.7;
    color: #333;
}

#content h2 {
    margin-top: 40px;
}

#content p {
    margin: 16px 0;
}

#content img {
    max-width: 100%;
    border-radius: 10px;
}

#content pre {
    background: #282c34;
    color: white;
    padding: 16px;
    border-radius: 10px;
    overflow: auto;
}