﻿/*
Theme Name: K-Blog
Theme URI: https://example.com/k-blog
Author: K-Blog Team
Description: ?쒓뎅 ?ъ슜?먮? ?꾪븳 源붾걫???붿씠?????뚮뱶?꾨젅??釉붾줈洹??뚮쭏.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: k-blog
Tags: blog, korean, white, minimal, responsive, seo, cards
*/

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
    --color-bg: #FFFFFF;
    --color-bg-secondary: #F8F9FA;
    --color-bg-tertiary: #F1F3F5;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #495057;
    --color-text-tertiary: #868E96;
    --color-text-muted: #ADB5BD;
    --color-accent: #2563EB;
    --color-accent-hover: #1D4ED8;
    --color-accent-light: #EFF6FF;
    --color-border: #E9ECEF;
    --color-border-light: #F1F3F5;
    --color-shadow: rgba(0,0,0,0.06);
    --color-shadow-hover: rgba(0,0,0,0.12);
    --color-white: #FFFFFF;
    --color-kakao: #FEE500;
    --color-naver: #03C75A;
    --color-facebook: #1877F2;
    --color-twitter: #1DA1F2;
    --font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    --fs-xs: 0.75rem; --fs-sm: 0.875rem; --fs-base: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.25rem; --fs-2xl: 1.5rem; --fs-3xl: 1.875rem;
    --sp-xs: 0.25rem; --sp-sm: 0.5rem; --sp-md: 1rem; --sp-lg: 1.5rem; --sp-xl: 2rem; --sp-2xl: 3rem; --sp-3xl: 4rem;
    --max-width: 1200px; --sidebar-width: 320px; --card-radius: 12px; --radius-sm: 6px; --radius-full: 9999px;
    --tr-fast: 0.15s ease; --tr-normal: 0.25s ease; --tr-slow: 0.35s cubic-bezier(0.4,0,0.2,1);
}

*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{font-size:16px;scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:var(--font-family);font-size:var(--fs-base);line-height:1.7;color:var(--color-text-primary);background:var(--color-bg);-webkit-font-smoothing:antialiased;word-break:keep-all;overflow-wrap:break-word}
a{color:var(--color-accent);text-decoration:none;transition:color var(--tr-fast)}
a:hover{color:var(--color-accent-hover)}
img{max-width:100%;height:auto;display:block}
h1,h2,h3,h4,h5,h6{line-height:1.3;font-weight:700;color:var(--color-text-primary)}
h1{font-size:var(--fs-3xl)} h2{font-size:var(--fs-2xl)} h3{font-size:var(--fs-xl)} h4{font-size:var(--fs-lg)}
ul,ol{list-style:none}

/* Header */
.site-header{border-bottom:1px solid var(--color-border);position:sticky;top:0;z-index:1000;backdrop-filter:blur(10px);background:rgba(255,255,255,0.95)}
.header-inner{max-width:var(--max-width);margin:0 auto;padding:0 var(--sp-xl);display:flex;align-items:center;justify-content:space-between;height:64px}
.site-logo{font-size:var(--fs-xl);font-weight:800;color:var(--color-text-primary);letter-spacing:-0.02em;transition:color var(--tr-fast)}
.site-logo:hover{color:var(--color-accent)}
.site-logo span{color:var(--color-accent)}
.header-actions{display:flex;align-items:center;gap:var(--sp-md)}

.main-navigation ul{display:flex;gap:var(--sp-lg)}
.main-navigation a{color:var(--color-text-secondary);font-size:var(--fs-sm);font-weight:500;padding:var(--sp-sm) 0;position:relative;transition:color var(--tr-fast)}
.main-navigation a::after{content:'';position:absolute;bottom:0;left:0;width:0;height:2px;background:var(--color-accent);transition:width var(--tr-normal)}
.main-navigation a:hover{color:var(--color-accent)}
.main-navigation a:hover::after{width:100%}
.main-navigation .current-menu-item a,.main-navigation .current_page_item a{color:var(--color-accent)}
.main-navigation .current-menu-item a::after,.main-navigation .current_page_item a::after{width:100%}

.header-search-toggle{background:none;border:none;cursor:pointer;color:var(--color-text-secondary);padding:var(--sp-sm);border-radius:var(--radius-sm);transition:all var(--tr-fast);display:flex;align-items:center;justify-content:center}
.header-search-toggle:hover{color:var(--color-accent);background:var(--color-accent-light)}
.header-search-toggle svg{width:20px;height:20px}

.menu-toggle{display:none;background:none;border:none;cursor:pointer;padding:var(--sp-sm);color:var(--color-text-primary)}
.menu-toggle .hamburger{display:flex;flex-direction:column;gap:5px;width:22px}
.menu-toggle .hamburger span{display:block;height:2px;background:currentColor;border-radius:2px;transition:all var(--tr-normal)}
/* Layout, Cards, Sidebar, Single Post, Share, Related, Pagination, Footer, Responsive */

/* Layout */
.site-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--sp-2xl) var(--sp-xl);
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--sp-2xl)
}

.site-content.full-width {
    grid-template-columns: 1fr
}

.content-area {
    min-width: 0
}

/* Card Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg)
}

.post-card {
    background: var(--color-white);
    border-radius: var(--card-radius);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all var(--tr-slow);
    display: flex;
    flex-direction: column
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--color-shadow-hover);
    border-color: transparent
}

.post-card__thumbnail {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-bg-tertiary);
    position: relative
}

.post-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--tr-slow)
}

.post-card:hover .post-card__thumbnail img {
    transform: scale(1.05)
}

.post-card__thumbnail .no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: var(--fs-3xl)
}

.post-card__body {
    padding: var(--sp-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1
}

.post-card__category {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-accent-light);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    margin-bottom: var(--sp-sm);
    align-self: flex-start
}

.post-card__title {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: var(--sp-sm);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.post-card__title a {
    color: var(--color-text-primary);
    transition: color var(--tr-fast)
}

.post-card__title a:hover {
    color: var(--color-accent)
}

.post-card__excerpt {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--sp-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    font-size: var(--fs-xs);
    color: var(--color-text-tertiary);
    padding-top: var(--sp-md);
    border-top: 1px solid var(--color-border-light)
}

.post-card__meta svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: -2px
}

.post-card__meta-item {
    display: flex;
    align-items: center
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 88px;
    height: fit-content
}

.sidebar-widget {
    background: var(--color-white);
    border-radius: var(--card-radius);
    border: 1px solid var(--color-border);
    padding: var(--sp-lg);
    margin-bottom: var(--sp-lg)
}

.sidebar-widget__title {
    font-size: var(--fs-base);
    font-weight: 700;
    margin-bottom: var(--sp-lg);
    padding-bottom: var(--sp-sm);
    border-bottom: 2px solid var(--color-accent);
    color: var(--color-text-primary)
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-sm) var(--sp-md);
    color: var(--color-text-secondary);
    font-size: var(--fs-sm);
    border-radius: var(--radius-sm);
    transition: all var(--tr-fast)
}

.category-list a:hover {
    background: var(--color-accent-light);
    color: var(--color-accent)
}

.category-list .count {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    background: var(--color-bg-secondary);
    padding: 1px 8px;
    border-radius: var(--radius-full);
    font-weight: 500
}

.category-list li {
    margin-bottom: var(--sp-xs)
}

.popular-posts-list li {
    margin-bottom: var(--sp-md)
}

.popular-posts-list li:last-child {
    margin-bottom: 0
}

.popular-post-item {
    display: flex;
    gap: var(--sp-md);
    align-items: flex-start
}

.popular-post-item__rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: var(--color-white);
    font-size: var(--fs-xs);
    font-weight: 700;
    border-radius: var(--radius-sm)
}

.popular-post-item__rank:not(.top-3) {
    background: var(--color-text-muted)
}

.popular-post-item__content {
    flex: 1;
    min-width: 0
}

.popular-post-item__title {
    font-size: var(--fs-sm);
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.popular-post-item__title a {
    color: var(--color-text-primary);
    transition: color var(--tr-fast)
}

.popular-post-item__title a:hover {
    color: var(--color-accent)
}

.popular-post-item__views {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-top: 2px
}

.search-form {
    display: flex;
    gap: var(--sp-sm)
}

.search-form .search-field {
    flex: 1;
    padding: var(--sp-sm) var(--sp-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    outline: none;
    transition: border-color var(--tr-fast);
    background: var(--color-bg-secondary)
}

.search-form .search-field:focus {
    border-color: var(--color-accent);
    background: var(--color-white)
}

.search-form .search-submit {
    padding: var(--sp-sm) var(--sp-md);
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--tr-fast)
}

.search-form .search-submit:hover {
    background: var(--color-accent-hover)
}

/* Single Post */
.single-post-header {
    margin-bottom: var(--sp-2xl);
    padding-bottom: var(--sp-xl);
    border-bottom: 1px solid var(--color-border)
}

.single-post-header__category {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-accent-light);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    margin-bottom: var(--sp-md)
}

.single-post-header__title {
    font-size: var(--fs-3xl);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: var(--sp-lg);
    letter-spacing: -0.02em
}

.single-post-header__meta {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    font-size: var(--fs-sm);
    color: var(--color-text-tertiary)
}

.single-post-header__meta-item {
    display: flex;
    align-items: center;
    gap: var(--sp-xs)
}

.single-post-header__meta svg {
    width: 16px;
    height: 16px
}

.single-post-content {
    font-size: var(--fs-base);
    line-height: 1.8;
    color: var(--color-text-primary)
}

.single-post-content p {
    margin-bottom: var(--sp-lg)
}

.single-post-content h2 {
    margin-top: var(--sp-2xl);
    margin-bottom: var(--sp-md);
    padding-bottom: var(--sp-sm);
    border-bottom: 1px solid var(--color-border-light)
}

.single-post-content h3 {
    margin-top: var(--sp-xl);
    margin-bottom: var(--sp-md)
}

.single-post-content img {
    border-radius: var(--card-radius);
    margin: var(--sp-xl) 0
}

.single-post-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding: var(--sp-md) var(--sp-lg);
    margin: var(--sp-xl) 0;
    background: var(--color-accent-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--color-text-secondary)
}

.single-post-content ul,
.single-post-content ol {
    margin: var(--sp-md) 0;
    padding-left: var(--sp-xl)
}

.single-post-content ul {
    list-style: disc
}

.single-post-content ol {
    list-style: decimal
}

.single-post-content li {
    margin-bottom: var(--sp-sm)
}

.single-post-content pre {
    background: var(--color-text-primary);
    color: #E9ECEF;
    padding: var(--sp-lg);
    border-radius: var(--card-radius);
    overflow-x: auto;
    margin: var(--sp-xl) 0;
    font-size: var(--fs-sm)
}

.single-post-content code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    background: var(--color-bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px
}

.single-post-content pre code {
    background: none;
    padding: 0
}

/* Share Buttons */
.share-buttons {
    padding: var(--sp-xl) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--sp-2xl)
}

.share-buttons__title {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--sp-md)
}

.share-buttons__list {
    display: flex;
    gap: var(--sp-sm);
    flex-wrap: wrap
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) var(--sp-lg);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-white);
    border: none;
    cursor: pointer;
    transition: all var(--tr-fast);
    text-decoration: none;
    font-family: var(--font-family)
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-shadow-hover);
    color: var(--color-white)
}

.share-btn svg {
    width: 18px;
    height: 18px
}

.share-btn--kakao {
    background: var(--color-kakao);
    color: #3C1E1E
}

.share-btn--kakao:hover {
    color: #3C1E1E
}

.share-btn--naver {
    background: var(--color-naver)
}

.share-btn--facebook {
    background: var(--color-facebook)
}

.share-btn--twitter {
    background: var(--color-twitter)
}

.share-btn--copy {
    background: var(--color-text-tertiary)
}

/* Related Posts */
.related-posts {
    margin-top: var(--sp-2xl);
    padding-top: var(--sp-2xl);
    border-top: 1px solid var(--color-border)
}

.related-posts__title {
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-bottom: var(--sp-lg);
    position: relative;
    padding-left: var(--sp-md)
}

.related-posts__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--color-accent);
    border-radius: 2px
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg)
}

.related-post-card {
    background: var(--color-white);
    border-radius: var(--card-radius);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all var(--tr-slow)
}

.related-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--color-shadow-hover)
}

.related-post-card__thumbnail {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-bg-tertiary)
}

.related-post-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--tr-slow)
}

.related-post-card:hover .related-post-card__thumbnail img {
    transform: scale(1.05)
}

.related-post-card__body {
    padding: var(--sp-md)
}

.related-post-card__title {
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.related-post-card__title a {
    color: var(--color-text-primary);
    transition: color var(--tr-fast)
}

.related-post-card__title a:hover {
    color: var(--color-accent)
}

.related-post-card__date {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-top: var(--sp-xs)
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--sp-sm);
    margin-top: var(--sp-2xl);
    padding-top: var(--sp-xl);
    border-top: 1px solid var(--color-border-light)
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--sp-md);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--tr-fast)
}

.pagination .page-numbers:hover {
    background: var(--color-accent-light);
    color: var(--color-accent)
}

.pagination .page-numbers.current {
    background: var(--color-accent);
    color: var(--color-white)
}

/* Comments */
.comments-area {
    margin-top: var(--sp-2xl);
    padding-top: var(--sp-2xl);
    border-top: 1px solid var(--color-border)
}

.comments-area .comments-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-bottom: var(--sp-xl)
}

.comment-list .comment {
    padding: var(--sp-lg);
    margin-bottom: var(--sp-md);
    background: var(--color-bg-secondary);
    border-radius: var(--card-radius)
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond textarea {
    width: 100%;
    padding: var(--sp-sm) var(--sp-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    outline: none;
    transition: border-color var(--tr-fast);
    background: var(--color-bg-secondary)
}

.comment-respond input:focus,
.comment-respond textarea:focus {
    border-color: var(--color-accent);
    background: var(--color-white)
}

.comment-respond .form-submit input {
    padding: var(--sp-sm) var(--sp-xl);
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer
}

/* Footer */
.site-footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    margin-top: var(--sp-3xl)
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--sp-2xl) var(--sp-xl)
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-2xl);
    margin-bottom: var(--sp-2xl)
}

.footer-widget__title {
    font-size: var(--fs-sm);
    font-weight: 700;
    margin-bottom: var(--sp-md);
    color: var(--color-text-primary)
}

.footer-widget a {
    color: var(--color-text-secondary);
    font-size: var(--fs-sm);
    transition: color var(--tr-fast)
}

.footer-widget a:hover {
    color: var(--color-accent)
}

.footer-widget ul li {
    margin-bottom: var(--sp-xs)
}

.footer-bottom {
    text-align: center;
    padding-top: var(--sp-xl);
    border-top: 1px solid var(--color-border);
    font-size: var(--fs-xs);
    color: var(--color-text-muted)
}

/* Scroll to top */
.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--tr-normal);
    z-index: 999
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.scroll-to-top:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px)
}

.scroll-to-top svg {
    width: 20px;
    height: 20px
}

/* Archive & Search */
.archive-header,
.search-header {
    margin-bottom: var(--sp-2xl);
    padding-bottom: var(--sp-xl);
    border-bottom: 1px solid var(--color-border)
}

.archive-header__title,
.search-header__title {
    font-size: var(--fs-2xl);
    font-weight: 800
}

.archive-header__description {
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    margin-top: var(--sp-sm)
}

.search-header__title span {
    color: var(--color-accent)
}

/* 404 */
.error-404 {
    text-align: center;
    padding: var(--sp-3xl) 0
}

.error-404__code {
    font-size: 120px;
    font-weight: 900;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--sp-md);
    opacity: 0.15
}

.error-404__title {
    font-size: var(--fs-2xl);
    font-weight: 700;
    margin-bottom: var(--sp-md)
}

.error-404__desc {
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--sp-xl)
}

.error-404 .search-form {
    max-width: 400px;
    margin: 0 auto
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--sp-3xl) 0
}

.no-results__title {
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-bottom: var(--sp-md)
}

.no-results__desc {
    font-size: var(--fs-base);
    color: var(--color-text-secondary)
}

/* Screen reader */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important
}

/* Responsive: Tablet */
@media(max-width:768px) {
    :root {
        --fs-3xl: 1.5rem;
        --fs-2xl: 1.25rem
    }

    .site-content {
        grid-template-columns: 1fr;
        padding: var(--sp-lg) var(--sp-md);
        gap: var(--sp-xl)
    }

    .posts-grid {
        grid-template-columns: 1fr
    }

    .related-posts__grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: var(--sp-xl)
    }

    .menu-toggle {
        display: flex;
        align-items: center
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 8px 24px var(--color-shadow);
        padding: var(--sp-md)
    }

    .main-navigation.toggled {
        display: block
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0
    }

    .main-navigation a {
        display: block;
        padding: var(--sp-md);
        border-radius: var(--radius-sm)
    }

    .main-navigation a:hover {
        background: var(--color-accent-light)
    }

    .main-navigation a::after {
        display: none
    }

    .sidebar {
        position: static
    }

    .single-post-header__meta {
        flex-wrap: wrap;
        gap: var(--sp-sm)
    }

    .share-buttons__list {
        flex-direction: column
    }

    .share-btn {
        justify-content: center
    }
}

/* Responsive: Mobile */
@media(max-width:480px) {
    .header-inner {
        padding: 0 var(--sp-md)
    }

    .site-content {
        padding: var(--sp-md)
    }

    .related-posts__grid {
        grid-template-columns: 1fr
    }

    .error-404__code {
        font-size: 80px
    }

    .post-card__body {
        padding: var(--sp-md)
    }
}

/* Print */
@media print {

    .site-header,
    .sidebar,
    .site-footer,
    .share-buttons,
    .related-posts,
    .scroll-to-top,
    .pagination,
    .menu-toggle {
        display: none !important
    }

    .site-content {
        grid-template-columns: 1fr
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff
    }
}

/* =============================================
   Hero Sliding Banner
   ============================================= */
.hero-banner{max-width:var(--max-width);margin:0 auto;padding:var(--sp-xl) var(--sp-xl) 0;position:relative}
.hero-banner__slider{position:relative;border-radius:var(--card-radius);overflow:hidden;aspect-ratio:21/7;background:var(--color-bg-tertiary)}
.hero-banner__track{display:flex;transition:transform 0.5s cubic-bezier(0.4,0,0.2,1);height:100%}
.hero-banner__slide{min-width:100%;position:relative;overflow:hidden}
.hero-banner__slide-bg{width:100%;height:100%;object-fit:cover;display:block}
.hero-banner__slide-gradient{position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,0.55) 0%,rgba(0,0,0,0.1) 60%,transparent 100%)}
.hero-banner__slide-content{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;padding:var(--sp-2xl) var(--sp-3xl);color:var(--color-white);max-width:55%}
.hero-banner__slide-badge{display:inline-block;font-size:var(--fs-xs);font-weight:700;background:var(--color-accent);color:var(--color-white);padding:4px 14px;border-radius:var(--radius-full);margin-bottom:var(--sp-md);align-self:flex-start;letter-spacing:0.02em}
.hero-banner__slide-title{font-size:var(--fs-2xl);font-weight:800;line-height:1.3;margin-bottom:var(--sp-sm);color:var(--color-white);letter-spacing:-0.02em;text-shadow:0 1px 4px rgba(0,0,0,0.2)}
.hero-banner__slide-desc{font-size:var(--fs-sm);line-height:1.6;opacity:0.9;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hero-banner__nav{position:absolute;bottom:var(--sp-lg);right:var(--sp-lg);display:flex;gap:var(--sp-sm);z-index:10}
.hero-banner__nav-btn{width:36px;height:36px;border-radius:50%;border:none;background:rgba(255,255,255,0.25);backdrop-filter:blur(4px);color:var(--color-white);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--tr-fast)}
.hero-banner__nav-btn:hover{background:rgba(255,255,255,0.5)}
.hero-banner__nav-btn svg{width:18px;height:18px}
.hero-banner__dots{position:absolute;bottom:var(--sp-lg);left:50%;transform:translateX(-50%);display:flex;gap:var(--sp-sm);z-index:10}
.hero-banner__dot{width:8px;height:8px;border-radius:50%;border:none;background:rgba(255,255,255,0.4);cursor:pointer;transition:all var(--tr-fast);padding:0}
.hero-banner__dot.active{background:var(--color-white);width:24px;border-radius:4px}
@media(max-width:768px){
    .hero-banner{padding:var(--sp-md) var(--sp-md) 0}
    .hero-banner__slider{aspect-ratio:16/9;border-radius:var(--radius-sm)}
    .hero-banner__slide-content{max-width:80%;padding:var(--sp-lg)}
    .hero-banner__slide-title{font-size:var(--fs-lg)}
    .hero-banner__slide-desc{display:none}
    .hero-banner__nav{bottom:var(--sp-sm);right:var(--sp-sm)}
    .hero-banner__nav-btn{width:30px;height:30px}
}
@media(max-width:480px){
    .hero-banner__slider{aspect-ratio:16/10}
    .hero-banner__slide-content{max-width:90%;padding:var(--sp-md)}
    .hero-banner__slide-title{font-size:var(--fs-base)}
    .hero-banner__slide-badge{font-size:10px;padding:2px 10px}
}

/* =============================================
   Layout Fix: 諛곕꼫媛 site-content 洹몃━???덉뿉 ?덉쓣 ??   ============================================= */
.site-content{display:block}
.site-content .hero-banner{margin-left:calc(var(--sp-xl) * -1);margin-right:calc(var(--sp-xl) * -1);padding:var(--sp-xl) var(--sp-xl) 0}
.content-wrapper{display:grid;grid-template-columns:1fr var(--sidebar-width);gap:var(--sp-2xl)}
.site-content>.content-area{order:1}
.site-content>.sidebar{order:2}

/* 移대뱶 洹몃━???섏젙 */
.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--sp-xl)}

@media(max-width:768px){
    .content-wrapper{grid-template-columns:1fr}
    .site-content .hero-banner{margin-left:calc(var(--sp-md) * -1);margin-right:calc(var(--sp-md) * -1);padding:var(--sp-md) var(--sp-md) 0}
    .posts-grid{grid-template-columns:1fr}
}

/* =============================================
   ?듭떖 ?덉씠?꾩썐 override (WP ?명솚)
   ============================================= */
.site-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--sp-2xl) var(--sp-xl);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2xl);
}
.site-content > .content-area {
    flex: 1;
    min-width: 0;
}
.site-content > .sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}
.site-content > .hero-banner {
    flex-basis: 100%;
    margin: 0 0 var(--sp-lg) 0;
    padding: 0;
}
.hero-banner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--sp-lg) var(--sp-xl) 0;
}

@media(max-width:768px){
    .site-content{padding:var(--sp-lg) var(--sp-md)}
    .site-content > .sidebar{width:100%}
    .hero-banner{padding:var(--sp-md) var(--sp-md) 0}
}

/* =============================================
   寃?????ㅻ쾭?뚮줈???섏젙
   ============================================= */
.sidebar-widget .search-form {
    display: flex;
    gap: 8px;
    max-width: 100%;
    box-sizing: border-box;
}
.sidebar-widget .search-field {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}
.sidebar-widget .search-submit {
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
}

/* =============================================
   Dark Mode
   ============================================= */
.dark-mode-toggle{background:none;border:none;cursor:pointer;padding:6px;display:flex;align-items:center}
.dark-mode-toggle svg{width:20px;height:20px;stroke:var(--color-text-primary);transition:stroke .3s}
.dark-mode-toggle:hover svg{stroke:var(--color-accent)}

body.dark-mode{
    --color-bg-primary:#1a1a2e;
    --color-bg-secondary:#16213e;
    --color-bg-tertiary:#0f3460;
    --color-text-primary:#e4e4e7;
    --color-text-secondary:#a1a1aa;
    --color-text-tertiary:#71717a;
    --color-border:#2d2d44;
    --color-shadow:rgba(0,0,0,0.4);
    color:#e4e4e7;background:#1a1a2e
}
body.dark-mode .site-header{background:#16213e;border-color:#2d2d44}
body.dark-mode .post-card{background:#16213e;border-color:#2d2d44}
body.dark-mode .sidebar-widget{background:#16213e;border-color:#2d2d44}
body.dark-mode .site-footer{background:#0f3460;color:#a1a1aa}
body.dark-mode .post-card__title a{color:#e4e4e7}
body.dark-mode .post-card__excerpt{color:#a1a1aa}
body.dark-mode .single-post-content{color:#d4d4d8}
body.dark-mode .kblog-toc{background:#16213e;border-color:#2d2d44}
body.dark-mode .no-thumbnail{background:#0f3460}
body.dark-mode input,body.dark-mode textarea{background:#16213e;color:#e4e4e7;border-color:#2d2d44}

/* =============================================
   Reading Progress Bar
   ============================================= */
.reading-progress{position:fixed;top:0;left:0;width:100%;height:3px;z-index:9999;background:transparent}
.reading-progress__bar{height:100%;width:0;background:linear-gradient(90deg,var(--color-accent,#2563eb),#7c3aed);transition:width .1s linear;border-radius:0 2px 2px 0}

/* =============================================
   Scroll to Top (enhanced)
   ============================================= */
.scroll-to-top{position:fixed;bottom:30px;right:30px;width:44px;height:44px;border-radius:50%;background:var(--color-accent,#2563eb);color:#fff;border:none;cursor:pointer;opacity:0;visibility:hidden;transition:all .3s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(37,99,235,0.3);z-index:999}
.scroll-to-top.visible{opacity:1;visibility:visible}
.scroll-to-top:hover{transform:translateY(-3px);box-shadow:0 6px 20px rgba(37,99,235,0.4)}
.scroll-to-top svg{width:20px;height:20px}

/* =============================================
   TOC (Table of Contents)
   ============================================= */
.kblog-toc{background:var(--color-bg-secondary,#f8f9fa);border:1px solid var(--color-border,#e5e7eb);border-radius:var(--radius-lg,12px);padding:20px 24px;margin-bottom:var(--sp-2xl,32px)}
.kblog-toc__title{font-size:16px;margin:0 0 12px 0;font-weight:700}
.kblog-toc__list{list-style:none;padding:0;margin:0}
.kblog-toc__list li{padding:6px 0;border-bottom:1px solid var(--color-border,#e5e7eb)}
.kblog-toc__list li:last-child{border-bottom:none}
.kblog-toc__list li a{color:var(--color-text-secondary,#4b5563);text-decoration:none;font-size:14px;transition:color .2s}
.kblog-toc__list li a:hover{color:var(--color-accent,#2563eb)}
.kblog-toc__sub{padding-left:16px!important}

/* =============================================
   Card Hover Effects
   ============================================= */
.post-card{transition:transform .3s ease,box-shadow .3s ease}
.post-card:hover{transform:translateY(-4px);box-shadow:0 12px 24px rgba(0,0,0,0.08)}

/* =============================================
   Widget Dividers
   ============================================= */
.sidebar-widget+.sidebar-widget{border-top:1px solid var(--color-border,#e5e7eb);padding-top:24px}

/* =============================================
   Reading Time Badge
   ============================================= */
.post-card__reading-time{color:var(--color-accent,#2563eb)!important}

.edit-link a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}
.edit-link a:hover {
    text-decoration: underline;
}
.edit-link svg {
    stroke: var(--color-accent);
}

/* =============================================
   Header Action Links (Login/Admin)
   ============================================= */
.header-action-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-primary);
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: var(--radius-full);
}

.header-action-link:hover {
    color: var(--color-accent);
    background-color: var(--color-bg-tertiary);
}

.header-action-link svg {
    width: 20px;
    height: 20px;
}

body.dark-mode .header-action-link {
    color: var(--color-text-primary);
}

body.dark-mode .header-action-link:hover {
    color: var(--color-accent);
    background-color: var(--color-bg-tertiary);
}



/* Tablet Grid: 2 columns */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
