/*
Theme Name: Irene Theme
Theme URI: https://blog.hello-irene.com
Description: Bootstrap 5 기반 미니멀 블로그 테마 - Amber 디자인
Author: Irene
Version: 2.0.0
Text Domain: irene-theme
*/

/* ===== Design Tokens ===== */
:root {
    --primary:          #e58e26;
    --primary-hover:    #c97715;
    --primary-50:       #fff4e3;
    --primary-06:       rgba(229,142,38,0.06);
    --primary-08:       rgba(229,142,38,0.10);
    --primary-10:       rgba(229,142,38,0.14);
    --primary-04:       rgba(229,142,38,0.05);
    --primary-gradient: linear-gradient(135deg, #e58e26, #f5b96a);

    --accent-coral: #d2472e;
    --accent-green: #7a8c3b;

    --fg-1:     #3a2f24;
    --fg-2:     #6b5e4d;
    --fg-3:     #a89680;

    --bg-page:  #fbf8f3;
    --bg-card:  #ffffff;
    --bg-soft:  #f7f1e6;
    --bg-tint:  #fdf6e9;

    --border:        #efe6d4;
    --border-strong: #3a2f24;
    --border-soft:   #e8ddc7;
    --border-input:  #dccfb6;

    --r-pill: 20px;
    --r-lg:   16px;
    --r-md:   12px;
    --r-sm:   10px;
    --r-xs:   8px;

    --shadow-card-hover: 0 4px 20px rgba(0,0,0,0.04);
    --shadow-image:      0 2px 12px rgba(0,0,0,0.10);
    --shadow-table:      0 2px 8px rgba(0,0,0,0.06);

    --t-fast: all 0.15s;
    --t-base: all 0.2s ease;

    --max-content: 720px;
}

/* ===== Base ===== */
body {
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--fg-1);
    background: var(--bg-page);
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

/* ===== Layout ===== */
.site-layout {
    display: flex;
    min-height: 100vh;
}

.site-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-page);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-inner {
    padding: 20px 24px 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.sidebar-sketch,
.sidebar-reading-girl {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    pointer-events: none;
    opacity: 0.45;
}
.sidebar-sketch img,
.sidebar-reading-girl img {
    width: 100%;
    height: auto;
    display: block;
}

.sidebar-cross-banner {
    display: block;
    margin-top: 16px;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: opacity 0.2s;
}
.sidebar-cross-banner:hover { opacity: 0.88; }
.sidebar-cross-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.site-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--fg-1);
    text-decoration: none;
    display: block;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.site-logo:hover { color: var(--primary); }

.site-desc {
    font-size: 13px;
    color: var(--fg-3);
    margin: 6px 0 0;
}

.sidebar-nav { margin-top: 32px; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li + li { margin-top: 2px; }
.sidebar-nav li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-2);
    text-decoration: none;
    transition: var(--t-fast);
}
.sidebar-nav li a:hover {
    background: var(--primary-06);
    color: var(--primary);
}
.sidebar-nav li a.active {
    background: var(--primary-10);
    color: var(--primary);
    font-weight: 600;
}
.cat-count {
    font-size: 12px;
    color: var(--fg-3);
    font-weight: 400;
}
.sidebar-nav li a.active .cat-count { color: var(--primary); }

.site-content {
    flex: 1;
    margin-left: 240px;
}

/* 모바일 헤더 */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    z-index: 99;
    align-items: center;
    justify-content: space-between;
}
.mobile-menu-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--fg-1);
}

/* ===== Main ===== */
.site-main {
    min-height: calc(100vh - 80px);
    padding: 20px 0;
}

/* ===== Single Layout ===== */
.single-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    padding: 0 40px;
}

.single-content {
    flex: 1;
    min-width: 0;
    max-width: 760px;
}

.single-sidebar {
    width: 390px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== Post Cards (목록) ===== */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    transition: var(--t-base);
    align-items: center;
}
.post-card--no-thumb {
    grid-template-columns: 1fr;
}
.post-card:hover {
    border-color: var(--border-input);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.post-thumb {
    width: 180px;
    height: 130px;
    border-radius: var(--r-md);
    overflow: hidden;
    display: block;
    position: relative;
    flex-shrink: 0;
    text-decoration: none;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-card__content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.post-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.5px;
    margin: 0;
}
.post-title a {
    color: var(--fg-1);
    text-decoration: none;
}
.post-card:hover .post-title a { color: var(--primary); }

.post-excerpt {
    font-size: 14px;
    color: var(--fg-2);
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--fg-3);
    margin-top: 4px;
    flex-wrap: wrap;
}
.post-meta span + span::before {
    content: '·';
    margin-right: 8px;
}

.post-cat-chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    line-height: 1.6;
}

/* ===== Right Sidebar Widgets ===== */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 24px 22px;
}

.sidebar-widget-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--fg-1);
    padding-bottom: 12px;
    margin: 0 0 14px;
    border-bottom: 2px solid var(--border-strong);
    letter-spacing: -0.5px;
}

.sidebar-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-post-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
    line-height: 1.5;
    color: var(--fg-2);
}
.sidebar-post-list li:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post-list li:first-child { padding-top: 0; }
.sidebar-post-list a {
    color: var(--fg-2);
    text-decoration: none;
    display: block;
    transition: var(--t-fast);
}
.sidebar-post-list a:hover { color: var(--primary); }

.sidebar-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sidebar-tag-cloud a {
    display: inline-block;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    background: var(--primary-50);
    color: var(--primary-hover);
    font-weight: 500;
    text-decoration: none;
    transition: var(--t-fast);
}
.sidebar-tag-cloud a:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== Single Post ===== */
.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--fg-3);
    text-decoration: none;
    margin-bottom: 20px;
    transition: var(--t-fast);
}
.back-to-list:hover { color: var(--primary); }
.back-to-list svg { display: block; }

.single-header {
    text-align: center;
    padding: 0 0 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.single-header .post-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-hover);
    background: var(--primary-08);
    padding: 6px 14px;
    border-radius: var(--r-pill);
    margin-bottom: 16px;
    text-decoration: none;
}

.single-header .entry-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--fg-1);
    margin: 0 0 18px;
    letter-spacing: -0.5px;
}

.single-header .post-meta {
    font-size: 13px;
    color: var(--fg-3);
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}
.single-header .post-meta span + span::before {
    content: '·';
    margin-right: 6px;
}
.single-header .post-meta .post-updated {
    color: var(--fg-3);
    font-size: 12px;
}

/* 본문 */
.entry-content {
    max-width: var(--max-content);
    margin: 0 auto;
    padding-bottom: 60px;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin-bottom: 1.6em; letter-spacing: -0.01em; }
.entry-content h2 {
    margin-top: 2.8em;
    margin-bottom: 0.8em;
    font-size: 24px;
    font-weight: 700;
    color: var(--fg-1);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    letter-spacing: -0.5px;
}
.entry-content h3 {
    margin-top: 2em;
    margin-bottom: 0.6em;
    font-size: 20px;
    font-weight: 600;
    color: var(--fg-1);
}
.entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.entry-content a:hover { color: var(--primary-hover); }
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-md);
    margin: 24px 0;
    box-shadow: var(--shadow-image);
}
.entry-content blockquote {
    margin: 0;
    padding: 16px 22px;
    border-left: 4px solid var(--primary);
    background: var(--primary-04);
    color: var(--fg-1);
    border-radius: 0 var(--r-xs) var(--r-xs) 0;
    font-size: 15.5px;
}
.entry-content ul, .entry-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.6em;
}
.entry-content li { margin-bottom: 0.5em; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
    border-radius: var(--r-xs);
    overflow: hidden;
    box-shadow: var(--shadow-table);
}
.entry-content table thead { background: var(--primary-gradient); }
.entry-content table thead th {
    padding: 12px 14px;
    color: #fff;
    text-align: left;
    font-weight: 600;
}
.entry-content table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-soft);
}
.entry-content table tbody tr:nth-child(even) { background: var(--bg-tint); }
.entry-content table tbody tr:last-child td { border-bottom: none; }

.entry-content .highlight {
    color: var(--primary);
    font-weight: 700;
    background: var(--primary-50);
    padding: 0 3px;
    border-radius: 3px;
}

/* 태그 */
.post-tags {
    max-width: var(--max-content);
    margin: 36px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.post-tags a {
    padding: 6px 14px;
    background: var(--primary-50);
    color: var(--primary-hover);
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--t-fast);
}
.post-tags a:hover { background: var(--primary); color: #fff; }

/* 이전/다음 글 */
.post-navigation {
    max-width: var(--max-content);
    margin: 36px auto 0;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.post-navigation .row {
    display: flex;
    gap: 16px;
}
.post-navigation .col-6 {
    flex: 1;
    background: var(--bg-soft);
    padding: 16px 20px;
    border-radius: var(--r-xs);
    transition: var(--t-fast);
}
.post-navigation .col-6:hover { background: var(--primary-06); }
.post-navigation .col-6.text-end {
    text-align: right;
    margin-left: auto;
}
.nav-label {
    font-size: 13px;
    color: var(--fg-3);
    margin-bottom: 4px;
}
.post-navigation a {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg-1);
    text-decoration: none;
}
.post-navigation .col-6:hover a { color: var(--primary); }

/* FAQ */
.faq-wrap {
    max-width: var(--max-content);
    margin: 48px auto 0;
    padding: 32px 0 0;
    border-top: 2px solid var(--border-strong);
}
.faq-wrap-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    letter-spacing: -0.5px;
}
.faq-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
    font-size: var(--fs-body);
    font-weight: 600;
    color: var(--fg-1);
    margin-bottom: 8px;
}
.faq-a {
    font-size: var(--fs-body);
    color: var(--fg-2);
    line-height: var(--lh-body);
    margin: 0;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}
.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--r-xs);
    font-size: 14px;
    color: var(--fg-2);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--t-fast);
    font-weight: 500;
    text-decoration: none;
}
.page-item .page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-item.active .page-link {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== Footer ===== */
.site-footer {
    padding: 24px 40px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--fg-3);
}
.site-footer .container {
    max-width: 760px;
    margin-left: 0;
    margin-right: auto;
    text-align: center;
}
.footer-links {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 10px;
}
.footer-links a { color: var(--fg-3); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-sep { color: var(--border); }

/* ===== Tip Box ===== */
.entry-content .tip-box {
    background: #f2faf5;
    border-left: 3px solid #52b788;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin: 18px 0;
    font-size: 14.5px;
    line-height: 1.7;
    color: #3a2f24;
}
.entry-content .tip-box > strong:first-child {
    font-weight: 700;
    color: #2d8a5e;
}
.entry-content .tip-box ul,
.entry-content .tip-box ol {
    margin: 4px 0 0;
    padding-left: 1.2em;
}
.entry-content .tip-box li {
    margin-bottom: 3px;
}

/* ===== 좋아요 버튼 ===== */
.like-section {
    max-width: var(--max-content);
    margin: 48px auto 0;
    padding-top: 36px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.like-label {
    font-size: 14px;
    color: var(--fg-3);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}
.like-btn {
    background: none;
    border: 2px solid var(--border);
    border-radius: var(--r-pill);
    padding: 12px 28px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--fg-2);
    transition: var(--t-base);
    line-height: 1;
}
.like-btn:hover {
    border-color: #e57373;
    color: #e57373;
    transform: scale(1.04);
}
.like-btn .heart-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: var(--t-base);
    display: block;
}
.like-btn.liked {
    border-color: #e57373;
    color: #e57373;
}
.like-btn.liked .heart-icon {
    fill: #e57373;
    stroke: #e57373;
    animation: heart-pop 0.3s ease;
}
@keyframes heart-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* ===== 이미지 캡션 ===== */
.entry-content figure.post-image {
    margin: 28px auto;
    text-align: center;
    max-width: 720px;
}
.entry-content figure.post-image img {
    width: 100%;
    height: auto;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-image);
    display: block;
}
.entry-content figure.post-image figcaption.img-caption {
    margin-top: 3px;
    font-size: 11px;
    color: #8a9099;
    line-height: 1.4;
    text-align: right;
    font-weight: 400;
    letter-spacing: -.01em;
    opacity: 0.75;
}
.entry-content figure.post-image figcaption.img-credit {
    margin-top: 3px;
    font-size: 10.5px;
    color: #c4c9d0;
    line-height: 1.4;
    text-align: right;
    padding-right: 4px;
    letter-spacing: -.01em;
    opacity: 0.7;
}
.entry-content figure.post-image figcaption.img-credit a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .single-sidebar { display: none; }
    .single-layout { padding: 0 24px; }
}
@media (max-width: 880px) {
    .site-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .site-sidebar.show { transform: translateX(0); }
    .site-content { margin-left: 0; }
    .mobile-header { display: flex; }
    .single-layout { padding: 0 20px; }
    .post-card { grid-template-columns: 120px 1fr; padding: 16px; gap: 16px; }
    .post-card--no-thumb { grid-template-columns: 1fr; }
    .post-thumb { width: 120px; height: 90px; }
    .post-title { font-size: 17px; }
    .single-header .entry-title { font-size: 24px; }
}
