/* ============================================================
   NEBULA THEME — screen.css
   우주 감성 IT 블로그 테마
   ============================================================ */

/* ── 0. CSS Variables ── */
:root {
    /* Color Palette */
    --space-void:      #03050a;
    --space-deep:      #080d18;
    --space-mid:       #0d1526;
    --space-surface:   #111d35;
    --space-elevated:  #162240;
    --space-border:    rgba(100, 160, 255, 0.12);
    --space-border-bright: rgba(100, 160, 255, 0.28);

    /* Accent Colors */
    --nebula-blue:     #4a9eff;
    --nebula-cyan:     #00d4ff;
    --nebula-purple:   #9b5de5;
    --nebula-pink:     #f72585;
    --nebula-gold:     #ffd700;
    --nebula-green:    #06ffa5;

    /* Text */
    --text-primary:    #e8f0ff;
    --text-secondary:  #8ba5cc;
    --text-muted:      #4a6080;
    --text-code:       #00d4ff;

    /* Glow Effects */
    --glow-blue:   0 0 20px rgba(74, 158, 255, 0.4);
    --glow-cyan:   0 0 20px rgba(0, 212, 255, 0.4);
    --glow-purple: 0 0 20px rgba(155, 93, 229, 0.35);

    /* Typography */
    --font-display: 'Syne', 'Noto Sans KR', sans-serif;
    --font-body:    'Noto Sans KR', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    /* Spacing */
    --container-width: 1100px;
    --nav-height: 64px;

    /* Transitions */
    --transition-fast:   150ms ease;
    --transition-base:   280ms ease;
    --transition-slow:   500ms ease;
}

/* ── 1. Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--space-void);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--nebula-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--nebula-cyan); }

img { max-width: 100%; height: auto; display: block; }

/* ── 2. Starfield Canvas ── */
#starfield {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

/* ── 3. Navigation ── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    z-index: 100;
    background: rgba(3, 5, 10, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--space-border);
    transition: background var(--transition-base), border-color var(--transition-base);
}

.site-header.scrolled {
    background: rgba(3, 5, 10, 0.85);
    border-bottom-color: var(--space-border-bright);
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    height: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    transition: opacity var(--transition-fast);
}
.site-logo:hover { color: var(--text-primary); opacity: 0.8; }

.logo-dot {
    width: 8px; height: 8px;
    background: var(--nebula-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-cyan), 0 0 4px var(--nebula-cyan);
    animation: pulse-dot 2.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.4rem 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: color var(--transition-fast), background var(--transition-fast);
    position: relative;
}
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 1px;
    background: var(--nebula-cyan);
    transition: left var(--transition-base), right var(--transition-base);
}
.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(74, 158, 255, 0.08);
}
.nav-link:hover::before,
.nav-link.active::before {
    left: 0.8rem; right: 0.8rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.nav-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 1rem 1.5rem;
    background: rgba(3, 5, 10, 0.95);
    border-top: 1px solid var(--space-border);
}
.mobile-nav-link {
    padding: 0.75rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--space-border);
}
.mobile-nav-link:hover { color: var(--nebula-cyan); }

/* ── 4. Main Wrapper ── */
#site-main {
    position: relative;
    z-index: 1;
    padding-top: var(--nav-height);
}

/* ── 5. Hero Section ── */
.hero {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4rem 1.5rem;
}

/* 네불라 글로우 배경 */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: glow-drift 8s ease-in-out infinite;
}
.hero-glow--1 {
    width: 500px; height: 500px;
    background: radial-gradient(ellipse, rgba(74, 158, 255, 0.18) 0%, transparent 70%);
    top: -100px; left: -100px;
    animation-delay: 0s;
}
.hero-glow--2 {
    width: 400px; height: 400px;
    background: radial-gradient(ellipse, rgba(155, 93, 229, 0.15) 0%, transparent 70%);
    bottom: -80px; right: -80px;
    animation-delay: -3s;
}
.hero-glow--3 {
    width: 300px; height: 300px;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.12) 0%, transparent 70%);
    top: 50%; left: 55%;
    transform: translate(-50%, -50%);
    animation-delay: -6s;
}

@keyframes glow-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(20px, -15px) scale(1.05); }
    66%  { transform: translate(-15px, 20px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
    animation: hero-enter 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-enter {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.25);
    border-radius: 100px;
    padding: 0.35rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--nebula-cyan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
}
.hero-badge-dot {
    width: 6px; height: 6px;
    background: var(--nebula-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--nebula-green);
    animation: pulse-dot 2s infinite;
}

.hero-heading {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        var(--nebula-cyan) 35%,
        var(--nebula-blue) 65%,
        var(--nebula-purple) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 560px;
    margin: 0 auto 2.5rem;
    word-break: keep-all;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.75rem;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}
.btn--primary {
    background: linear-gradient(135deg, var(--nebula-blue), var(--nebula-purple));
    color: #fff;
    box-shadow: 0 4px 24px rgba(74, 158, 255, 0.3);
}
.btn--primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(74, 158, 255, 0.45);
}
.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--space-border-bright);
}
.btn--ghost:hover {
    color: var(--nebula-cyan);
    border-color: var(--nebula-cyan);
    background: rgba(0, 212, 255, 0.06);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.hero-stat { text-align: center; }
.hero-stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--nebula-cyan);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.hero-stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.hero-stat-divider {
    width: 1px; height: 40px;
    background: var(--space-border-bright);
}

/* 떠다니는 코드 파편 */
.hero-code-fragments {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.code-frag {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: rgba(74, 158, 255, 0.2);
    animation: float-frag 6s ease-in-out infinite;
    animation-delay: var(--delay);
    white-space: nowrap;
}
@keyframes float-frag {
    0%, 100% { transform: translateY(0) rotate(-2deg); opacity: 0.2; }
    50%       { transform: translateY(-12px) rotate(2deg); opacity: 0.5; }
}

/* ── 6. Posts Section ── */
.posts-section {
    padding: 5rem 1.5rem 6rem;
}
.section-inner {
    max-width: var(--container-width);
    margin: 0 auto;
}
.section-header { margin-bottom: 2.5rem; }
.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}
.section-title-accent {
    color: var(--nebula-cyan);
    font-family: var(--font-mono);
    margin-right: 0.5rem;
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Post Card */
.post-card {
    background: var(--space-surface);
    border: 1px solid var(--space-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 158, 255, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(74, 158, 255, 0.1);
}

.post-card-image-link { display: block; overflow: hidden; }
.post-card-image {
    width: 100%; height: 200px;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-slow);
}
.post-card:hover .post-card-image { transform: scale(1.04); }

.post-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.post-card-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--nebula-cyan);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.post-card-tag:hover {
    color: var(--nebula-cyan);
    background: rgba(0, 212, 255, 0.18);
    border-color: rgba(0, 212, 255, 0.4);
}
.post-card-reading-time {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: auto;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}
.post-card-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}
.post-card-title a:hover { color: var(--nebula-cyan); }

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--space-border);
}
.post-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.post-card-author-img {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 1px solid var(--space-border-bright);
    object-fit: cover;
}
.post-card-author-initial {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nebula-blue), var(--nebula-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}
.post-card-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── 7. Post Full (단독 포스트) ── */
.post-full,
.page-full {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.post-full-header {
    margin-bottom: 2.5rem;
    text-align: center;
}
.post-full-header-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 0 2rem;
    position: relative;
}
.post-full-header-inner::after {
    content: '';
    display: block;
    width: 60px; height: 2px;
    background: linear-gradient(90deg, var(--nebula-cyan), transparent);
    margin: 2rem auto 0;
}

.post-full-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.post-full-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nebula-cyan);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.post-full-reading-time {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.post-full-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-full-excerpt {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    word-break: keep-all;
    margin-bottom: 1.5rem;
}

.post-full-byline {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.byline-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.byline-author-img {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--space-border-bright);
    object-fit: cover;
}
.byline-author-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.byline-author-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}
.byline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-full-image {
    max-width: 1000px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
    border-radius: 12px;
    overflow: hidden;
}
.post-full-image img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--space-border);
}

/* ── 8. Post Content (gh-content) ── */
.gh-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-primary);
}

.gh-content > * + * { margin-top: 1.5em; }

.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin-top: 2.5em;
}
.gh-content h2 {
    font-size: 1.6rem;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--space-border);
    position: relative;
}
.gh-content h2::before {
    content: '## ';
    color: var(--nebula-cyan);
    font-family: var(--font-mono);
    font-size: 0.85em;
    opacity: 0.7;
}
.gh-content h3 { font-size: 1.25rem; color: var(--nebula-blue); }
.gh-content h4 { font-size: 1.05rem; color: var(--text-secondary); }

.gh-content p { word-break: keep-all; }

.gh-content a {
    color: var(--nebula-cyan);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    transition: border-color var(--transition-fast), color var(--transition-fast);
}
.gh-content a:hover {
    color: var(--nebula-blue);
    border-bottom-color: var(--nebula-blue);
}

/* 인라인 코드 */
.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--nebula-cyan);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 4px;
    padding: 0.15em 0.45em;
}

/* 코드 블록 */
.gh-content pre {
    background: var(--space-deep) !important;
    border: 1px solid var(--space-border-bright);
    border-radius: 10px;
    padding: 1.5rem;
    overflow-x: auto;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.gh-content pre::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--nebula-cyan), var(--nebula-purple), transparent);
    border-radius: 10px 10px 0 0;
}
.gh-content pre code {
    color: var(--text-primary);
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* 인용문 */
.gh-content blockquote {
    border-left: 3px solid var(--nebula-purple);
    padding: 1rem 1.5rem;
    background: rgba(155, 93, 229, 0.06);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-style: italic;
}
.gh-content blockquote strong { color: var(--text-primary); }

/* 테이블 */
.gh-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.gh-content th {
    background: var(--space-surface);
    color: var(--nebula-cyan);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--space-border);
}
.gh-content td {
    padding: 0.65rem 1rem;
    border: 1px solid var(--space-border);
    color: var(--text-secondary);
}
.gh-content tr:hover td { background: rgba(74, 158, 255, 0.04); }

/* 리스트 */
.gh-content ul, .gh-content ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}
.gh-content ul li::marker { color: var(--nebula-cyan); }
.gh-content ol li::marker { color: var(--nebula-purple); font-family: var(--font-mono); }
.gh-content li { margin-bottom: 0.35em; }

/* 이미지 */
.gh-content figure { margin: 2em 0; }
.gh-content figure img {
    border-radius: 8px;
    border: 1px solid var(--space-border);
}
.gh-content figcaption {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* hr */
.gh-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--space-border-bright), transparent);
    margin: 3em 0;
}

/* ── 9. Post Footer / Tags ── */
.post-full-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--space-border);
}
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.post-tag-pill {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--space-surface);
    border: 1px solid var(--space-border);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.post-tag-pill:hover {
    color: var(--nebula-cyan);
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.06);
}

/* ── 10. Post Navigation ── */
.post-navigation {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.post-nav-item {
    background: var(--space-surface);
    border: 1px solid var(--space-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    transition: border-color var(--transition-base), background var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.post-nav-item:hover {
    border-color: var(--space-border-bright);
    background: var(--space-elevated);
}
.post-nav-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.post-nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-nav-next { text-align: right; }

/* ── 11. Tag Archive ── */
.tag-archive { padding: 4rem 1.5rem 6rem; }
.tag-header {
    text-align: center;
    margin-bottom: 3rem;
}
.tag-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--nebula-cyan);
    margin-bottom: 0.75rem;
}
.tag-description {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 0.75rem;
}
.tag-count {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── 12. Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    text-align: center;
}
.pagination .pagination-location,
.pagination .page-number {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0 0.5rem;
}
.pagination a,
.pagination .newer-posts,
.pagination .older-posts {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; height: 40px;
    padding: 0 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--space-border);
    color: var(--text-secondary);
    background: var(--space-surface);
    transition: all var(--transition-fast);
}
.pagination a:hover {
    color: var(--nebula-cyan);
    border-color: rgba(0, 212, 255, 0.35);
    background: rgba(0, 212, 255, 0.06);
}
.pagination .page-number {
    color: var(--text-muted);
    border-color: transparent;
    background: transparent;
    cursor: default;
}

/* ── 13. Footer ── */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--space-border);
    background: var(--space-deep);
    padding: 2.5rem 1.5rem;
}
.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}
.footer-copy {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.footer-copy a { color: var(--text-muted); }
.footer-copy a:hover { color: var(--nebula-cyan); }
.footer-social {
    display: flex;
    gap: 0.75rem;
}
.footer-social a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}
.footer-social a:hover { color: var(--nebula-cyan); }

/* ── 14. Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--space-void); }
::-webkit-scrollbar-thumb {
    background: var(--space-elevated);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--nebula-blue); }

/* ── 15. Selection ── */
::selection {
    background: rgba(74, 158, 255, 0.3);
    color: var(--text-primary);
}

/* ── 16. Responsive ── */
@media (max-width: 768px) {
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin: auto calc(50% - 50vw * 0.85);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Ghost 카드 기본 스타일 */
.kg-card { margin: 2em 0; }
.kg-image { max-width: 100%; border-radius: 8px; }
.kg-image-card img { border-radius: 8px; border: 1px solid var(--space-border); }

.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }

.kg-bookmark-card { background: var(--space-surface); border: 1px solid var(--space-border); border-radius: 10px; overflow: hidden; }
.kg-bookmark-container { display: flex; text-decoration: none; color: inherit; }
.kg-bookmark-content { padding: 1.25rem; flex: 1; }
.kg-bookmark-title { font-weight: 600; color: var(--text-primary); margin-bottom: 0.4rem; }
.kg-bookmark-description { font-size: 0.85rem; color: var(--text-secondary); }
.kg-bookmark-thumbnail { width: 160px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.75rem; color: var(--text-muted); }
.kg-bookmark-icon { width: 16px; height: 16px; }

.kg-callout-card { display: flex; gap: 1rem; padding: 1.25rem; border-radius: 10px; background: var(--space-surface); border: 1px solid var(--space-border); }
.kg-callout-emoji { font-size: 1.25rem; flex-shrink: 0; }
.kg-callout-text { flex: 1; }

.kg-toggle-card { background: var(--space-surface); border: 1px solid var(--space-border); border-radius: 10px; overflow: hidden; }
.kg-toggle-heading { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; cursor: pointer; }
.kg-toggle-heading-text { font-weight: 600; color: var(--text-primary); }
.kg-toggle-content { padding: 0 1.25rem 1rem; color: var(--text-secondary); }

.kg-video-card video { width: 100%; border-radius: 8px; }

.kg-audio-card { background: var(--space-surface); border: 1px solid var(--space-border); border-radius: 10px; padding: 1rem; }

.kg-product-card { background: var(--space-surface); border: 1px solid var(--space-border); border-radius: 10px; padding: 1.5rem; }
.kg-product-card-image { border-radius: 8px; margin-bottom: 1rem; }

.kg-header-card { padding: 4rem 2rem; text-align: center; background: var(--space-surface); border-radius: 12px; }
.kg-header-card h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--text-primary); }

.kg-divider { border: none; border-top: 1px solid var(--space-border); margin: 2em 0; }

.kg-button-card { text-align: center; }
.kg-button-card a { display: inline-flex; align-items: center; padding: 0.7rem 1.75rem; background: linear-gradient(135deg, var(--nebula-blue), var(--nebula-purple)); color: #fff; border-radius: 8px; font-weight: 600; text-decoration: none; }

.kg-file-card { background: var(--space-surface); border: 1px solid var(--space-border); border-radius: 10px; padding: 1rem 1.25rem; }
.kg-file-card a { display: flex; align-items: center; gap: 1rem; color: var(--text-primary); text-decoration: none; }

/* ── 18. Responsive ── */
@media (max-width: 768px) {
    .site-nav { display: none; }
    .nav-toggle { display: flex; }
    .mobile-nav { display: flex; }
    .mobile-nav[aria-hidden="false"] { display: flex; }

    .post-grid { grid-template-columns: 1fr; }
    .hero-code-fragments { display: none; }
    .post-navigation { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
    .hero-stats { gap: 1.25rem; }
    .post-full, .page-full { padding: 2rem 1rem 4rem; }
    .post-full-header-inner { padding: 2rem 0 1.5rem; }
}

@media (max-width: 480px) {
    .hero-heading { font-size: 2rem; }
    .post-full-title { font-size: 1.6rem; }
}
