/* 🚀 Consistency Force Refresh: 2026-02-08 16:50 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@800&family=Poppins:wght@400;600&display=swap');

/* Friday's Index Update: 2026-02-07 17:15 */
.layout-wrapper {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    width: 100%;
}
.main-content {
    flex: 1;
    min-width: 0;
}
.side-panel {
    width: 180px;
    position: sticky;
    top: 100px;
    display: none;
}
.side-panel .toc-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-left: 16px;
}
@media (min-width: 1100px) {
    .container { max-width: 1024px; }
    .side-panel { display: block; }
}
.toc {
    list-style: none;
    padding: 0;
    border-left: 1px solid #eee;
}
.toc li { margin-bottom: 4px; }
.toc a {
    display: block;
    padding: 4px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}
.toc a:hover {
    color: var(--text-primary);
    border-left: 2px solid var(--text-primary);
    margin-left: -1px;
}
/* Global Nav - shared across all content pages */
/* Global Nav — freeconvert style */
.global-nav {
    width: 100%;
    background: var(--bg-color);
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 0;
}
.global-nav-inner {
    max-width: 100%;
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 52px;
    gap: 0;
}
.global-nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    margin-right: 20px;
    flex-shrink: 0;
}
/* All nav items RIGHT */
.global-nav-center {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}
.gnav-item { position: relative; }
.gnav-item > a,
.gnav-item > button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 13px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    height: 38px;
}
.gnav-item > a:hover,
.gnav-item > button:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text-primary);
}
.gnav-item > a.active {
    color: var(--text-primary);
    font-weight: 700;
    background: rgba(0,0,0,0.04);
}
.gnav-chevron { font-size: 0.7rem; opacity: 0.55; transition: transform 0.2s; }
.gnav-item:hover .gnav-chevron { transform: rotate(180deg); }

/* Dropdown — continuous hover bridge */
.gnav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 220px;
    background: var(--bg-color);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    padding: 6px;
    padding-top: 10px;
    margin-top: -4px;
    z-index: 2000;
}
.gnav-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0; right: 0;
    height: 10px;
}
.gnav-item:hover .gnav-dropdown { display: block; }
.gnav-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.12s;
}
.gnav-dropdown a:hover { background: rgba(0,0,0,0.05); }
.gnav-dd-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.6; display: flex; align-items: center; }
.gnav-dd-icon svg { width: 16px; height: 16px; stroke: currentColor; }
.global-nav-cta svg { width: 15px; height: 15px; stroke: white; flex-shrink: 0; }
.gnav-dropdown-divider { height: 1px; background: #ebebeb; margin: 5px 6px; }

/* Right CTA */
.global-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 6px;
}
.global-nav-cta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: #3b82f6;
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 6px rgba(59,130,246,0.3);
}
.global-nav-cta:hover { background: #2563eb; }
/* Legacy: hide old links style if still used */
.global-nav-links { display: none; }

/* ── Mobile Nav ── */
.gnav-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    color: var(--text-primary);
    border-radius: 6px;
    transition: background 0.15s;
}
.gnav-hamburger:hover { background: rgba(0,0,0,0.06); }
.gnav-hamburger svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.gnav-mobile-menu {
    display: none;
    position: absolute;
    top: 52px;
    left: 0; right: 0;
    background: var(--bg-color, #fff);
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    z-index: 999;
    padding: 8px 12px 14px;
}
.gnav-mobile-menu.open { display: block; }
.gnav-mobile-section {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 8px 2px;
}
.gnav-mobile-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-primary, #111);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.12s;
}
.gnav-mobile-menu a:hover { background: rgba(0,0,0,0.05); }
.gnav-mobile-menu a.active { font-weight: 700; }
.gnav-mobile-divider { height: 1px; background: #ebebeb; margin: 6px 4px; }
.gnav-mobile-menu .gnav-dd-icon { width: 18px; height: 18px; opacity: 0.6; display: flex; align-items: center; flex-shrink: 0; }
.gnav-mobile-menu .gnav-dd-icon svg { width: 16px; height: 16px; stroke: currentColor; }
.gnav-mobile-cta {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding: 10px 16px !important;
    background: #3b82f6 !important;
    color: white !important;
    border-radius: 8px;
    font-weight: 600 !important;
}
@media (max-width: 768px) {
    .global-nav { position: relative; }
    .global-nav-center { display: none; }
    .global-nav-right { display: none; }
    .gnav-hamburger { display: flex; }
    .global-nav-inner { padding: 0 14px; }
}
/* 다크 테마 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0f0f0f;
        --text-primary: #f0f0f0;
        --text-secondary: #999999;
    }
    body { background: var(--bg-color); color: var(--text-primary); }
    .global-nav { border-bottom-color: #2a2a2a; box-shadow: 0 1px 4px rgba(0,0,0,0.25); }
    .gnav-item > a:hover, .gnav-item > button:hover { background: rgba(255,255,255,0.07); }
    .gnav-mobile-menu { background: var(--bg-color, #0f0f0f); border-bottom-color: #2a2a2a; }
    .gnav-mobile-divider { background: #2a2a2a; }
    .gnav-hamburger:hover { background: rgba(255,255,255,0.08); }
    .gnav-item > a.active { background: rgba(255,255,255,0.06); }
    .gnav-dropdown { background: #1a1a1a; border-color: #333; }
    .gnav-dropdown a:hover { background: rgba(255,255,255,0.07); }
    .gnav-dropdown-divider { background: #333; }
    .version-tag { background: #2a2a2a; color: var(--text-primary); }
}
/* 기존 .nav-links 하위 호환 — global-nav로 대체됐으므로 숨김 */
.nav-links { display: none; }

:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --font-heading: 'Syne', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 60px 24px;
}

header {
    text-align: left;
    margin-bottom: 60px;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 15px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.post-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.post-card {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    transition: opacity 0.2s ease;
}

.post-card:hover {
    opacity: 0.6;
}

.post-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 12px;
    display: block;
    font-family: 'Poppins', sans-serif;
}

.post-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 400;
}

.tag {
    display: inline-block;
    padding: 2px 0;
    color: var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

footer {
    text-align: center; 
    margin-top: 120px; 
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-bottom: 80px;
    border-top: 1px solid #eeeeee;
    padding-top: 40px;
}

@media (max-width: 640px) {
    .container {
        padding: 60px 24px;
    }
    header h1 {
        font-size: 2.75rem;
    }
    .post-title {
        font-size: 1.5rem;
    }
}

/* Article Styles */
.back-link {
    display: none;
}

.back-link:hover {
    color: var(--text-primary);
}

article {
    width: 100%;
    max-width: none;
    margin: 0;
}

article h1 {
    font-family: var(--font-main);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.035em;
    color: var(--text-primary);
}

article h2 {
    font-size: 1.8rem;
    margin: 60px 0 25px 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

article p, article li {
    font-size: 1.15rem;
    color: #222222;
}

article p {
    margin-bottom: 1.8rem;
    line-height: 1.8;
}

article blockquote p {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* Fix for list alignment inside text box */
article ul, article ol {
    margin-bottom: 1.8rem;
    padding-left: 0;
    list-style-position: inside;
}

article li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

article li p {
    display: inline;
}

/* Table of Contents (TOC) */
.layout-with-toc {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.toc-sidebar {
    position: fixed;
    top: 200px;
    left: calc(50% + 440px);
    width: 200px;
    display: none;
}

@media (min-width: 1300px) {
    .toc-sidebar {
        display: block;
    }
}

.toc {
    list-style: none;
    padding: 0;
    border-left: 1px solid #eeeeee;
    padding-left: 20px;
}

.toc-item {
    margin-bottom: 12px;
}

.toc-link {
    text-decoration: none !important;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    display: block;
}

.toc-link:hover {
    color: var(--text-primary);
}

.toc-link.active {
    color: var(--text-primary);
    font-weight: 700;
}

/* Post Navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #eeeeee;
    gap: 20px;
}

.post-nav div {
    flex: 1;
}

.post-nav a {
    text-decoration: none !important;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.2s;
    display: block; /* Change to block for ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-nav a:hover {
    opacity: 0.6;
}

.post-nav span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-next {
    text-align: right;
}
