/* ===================================================
   게이노트 — 다크 터미널 대시보드
   검정 그린 / 모노스페이스 / 그리드 / 상태 라벨
   =================================================== */

:root {
    --bg: #0b0f0c;
    --bg-2: #101711;
    --panel: #0e140f;
    --panel-2: #121a13;
    --line: #1d2a1f;
    --line-2: #2b3d2f;
    --text: #d5e3d7;
    --text-soft: #93a696;
    --text-mute: #5f7263;
    --green: #a3ff6b;
    --green-dim: #74c949;
    --amber: #ffcc66;
    --red: #ff7a70;
    --cyan: #6ee7f0;

    --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
    --sans: 'IBM Plex Sans KR', -apple-system, sans-serif;

    --line-w: 1px;
    --side: 232px;
    --top: 42px;
    --wrap: 1120px;
    --gutter: clamp(1rem, 3vw, 2rem);
    --ease: 140ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: .95rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    background-image:
        linear-gradient(rgba(163,255,107,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(163,255,107,.035) 1px, transparent 1px);
    background-size: 44px 44px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--ease), background var(--ease); }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--green); color: #000; padding: .4rem .8rem; z-index: 300; }

/* 상단바 */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; height: var(--top); z-index: 200;
    display: flex; align-items: center; gap: 1rem; padding: 0 1rem;
    background: rgba(11,15,12,.94); border-bottom: var(--line-w) solid var(--line);
    backdrop-filter: blur(8px);
}
.logo-img { height: 26px; }
.topbar-status { margin-left: auto; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--text-mute); }
.topbar-status b { color: var(--green); }

.menu-toggle { display: none; flex-direction: column; gap: 3px; background: none; border: 1px solid var(--line-2); padding: .35rem; cursor: pointer; }
.menu-toggle span { width: 16px; height: 1.5px; background: var(--green); }

/* 셸 */
.shell { display: grid; grid-template-columns: var(--side) 1fr; padding-top: var(--top); min-height: 100vh; }

/* 사이드바 */
.sidebar {
    position: sticky; top: var(--top); height: calc(100vh - var(--top));
    border-right: var(--line-w) solid var(--line); background: var(--bg-2);
    padding: 1rem; display: flex; flex-direction: column; gap: 1rem;
}
.side-head { font-family: var(--mono); font-size: .74rem; line-height: 1.5; }
.prompt { color: var(--green); }
.cmd { color: var(--text-mute); display: block; }

.side-nav ul { display: flex; flex-direction: column; gap: 1px; }
.nav-link {
    display: flex; gap: .5rem; align-items: center; padding: .42rem .5rem;
    font-family: var(--mono); font-size: .78rem; color: var(--text-soft);
    border-left: 2px solid transparent;
}
.nav-link .idx { color: var(--text-mute); font-size: .68rem; }
.nav-link:hover { background: var(--panel-2); color: var(--text); border-left-color: var(--line-2); }
.nav-link.active { background: var(--panel-2); color: var(--green); border-left-color: var(--green); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .35rem; }
.side-meta { font-family: var(--mono); font-size: .66rem; color: var(--text-mute); letter-spacing: .06em; }
.side-meta b { color: var(--text-soft); font-weight: 500; }
.side-cta {
    margin-top: .5rem; display: block; text-align: center; padding: .55rem;
    font-family: var(--mono); font-size: .74rem; border: 1px solid var(--green);
    color: var(--green); background: rgba(163,255,107,.06);
}
.side-cta:hover { background: var(--green); color: #071007; }

main { min-width: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 var(--gutter); }

/* 공용 */
.eyebrow {
    font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
    color: var(--green); text-transform: uppercase;
}
.eyebrow::before { content: '> '; }

h1, h2, h3 { font-family: var(--sans); }

.btn {
    display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1.1rem;
    font-family: var(--mono); font-size: .76rem; letter-spacing: .06em;
    border: 1px solid var(--line-2); color: var(--text); background: var(--panel);
    cursor: pointer; transition: all var(--ease);
}
.btn:hover { border-color: var(--green); color: var(--green); background: rgba(163,255,107,.06); }
.btn-green { border-color: var(--green); color: var(--green); background: rgba(163,255,107,.08); }
.btn-green:hover { background: var(--green); color: #071007; }
.btn-lg { padding: .85rem 1.5rem; font-size: .82rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* 히어로는 게동 바로가기 버튼 하나만 — 화면 중앙에 가장 크게 */
.hero.hero-solo {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: clamp(24rem, 62vh, 40rem);
    padding: clamp(3rem, 8vw, 6rem) var(--gutter);
}
.hero.hero-solo .btn-gedong {
    width: 100%; max-width: 56rem;
    padding: clamp(1.5rem, 3vw, 2.2rem) 2rem;
    font-size: clamp(1.3rem, 3.2vw, 2rem); letter-spacing: .1em; font-weight: 600;
    border-color: var(--green); background: var(--green); color: #071007;
    box-shadow: 0 0 0 1px var(--green), 0 0 40px rgba(163, 255, 107, .18);
}
.hero.hero-solo .btn-gedong:hover {
    background: rgba(163, 255, 107, .1); border-color: var(--green); color: var(--green);
    box-shadow: 0 0 0 1px var(--green), 0 0 60px rgba(163, 255, 107, .28);
}

.panel {
    border: var(--line-w) solid var(--line); background: var(--panel);
}
.panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
    padding: .55rem .8rem; border-bottom: var(--line-w) solid var(--line);
    font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
    color: var(--text-mute); text-transform: uppercase; background: var(--panel-2);
}
.panel-head .dot { color: var(--green); }
.panel-body { padding: 1rem; }

.section { padding: 1.8rem 0; border-bottom: var(--line-w) solid var(--line); }
.section:last-of-type { border-bottom: 0; }

/* 히어로 */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; border-bottom: var(--line-w) solid var(--line); }
.hero-main { padding: 2.2rem var(--gutter) 2rem; }
.hero h1 {
    font-family: var(--mono); font-size: clamp(1.7rem, 3.6vw, 2.9rem);
    line-height: 1.14; letter-spacing: -.02em; margin: .7rem 0 1.1rem; font-weight: 600;
    word-break: keep-all;
}
.hero h1 .g { color: var(--green); }
.hero-lede { color: var(--text-soft); max-width: 38rem; margin-bottom: 1.5rem; word-break: keep-all; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.hero-side { border-left: var(--line-w) solid var(--line); background: var(--panel); padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.stat { border-bottom: 1px dashed var(--line-2); padding-bottom: .6rem; }
.stat:last-child { border-bottom: 0; }
.stat .k { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; color: var(--text-mute); display: block; }
.stat .v { font-family: var(--mono); font-size: 1.4rem; color: var(--green); font-weight: 600; }
.stat .v small { font-size: .7rem; color: var(--text-mute); }

/* 인덱스 테이블 */
.table-wrap { overflow-x: auto; }
table.idx { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .78rem; }
table.idx th {
    text-align: left; padding: .5rem .6rem; border-bottom: var(--line-w) solid var(--line-2);
    font-size: .64rem; letter-spacing: .14em; color: var(--text-mute); text-transform: uppercase; font-weight: 500;
}
table.idx td { padding: .6rem; border-bottom: 1px solid var(--line); color: var(--text-soft); }
table.idx tr:hover td { background: var(--panel-2); color: var(--text); }
table.idx a:hover { color: var(--green); }
table.idx .num { color: var(--text-mute); }
.badge {
    font-family: var(--mono); font-size: .62rem; padding: .1rem .4rem;
    border: 1px solid currentColor; letter-spacing: .06em;
}
.lv-hi { color: var(--green); }
.lv-mid { color: var(--amber); }
.lv-low { color: var(--text-mute); }
.bar { position: relative; height: 5px; background: var(--line); width: 90px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--green); }
tr:hover .bar i { background: var(--green); }

/* 카드 그리드 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }

.tile {
    border: var(--line-w) solid var(--line); background: var(--panel); padding: .95rem;
    display: flex; flex-direction: column; gap: .35rem; transition: border-color var(--ease), background var(--ease);
}
.tile:hover { border-color: var(--green-dim); background: var(--panel-2); }
.tile .t-k { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; color: var(--green); }
.tile h3 { font-size: 1rem; font-weight: 500; line-height: 1.4; }
.tile p { font-family: var(--mono); font-size: .7rem; color: var(--text-mute); line-height: 1.6; }
.tile .t-link { margin-top: auto; font-family: var(--mono); font-size: .68rem; color: var(--text-soft); }
.tile .t-link::before { content: '$ '; color: var(--green); }
.tile .t-link:hover { color: var(--green); }

/* 로그 (블로그) */
.log-table { border: var(--line-w) solid var(--line); }
.log-row {
    display: grid; grid-template-columns: 6.6rem 3rem 1fr; gap: .8rem; align-items: baseline;
    padding: .75rem .85rem; border-bottom: 1px solid var(--line);
    font-family: var(--mono); font-size: .76rem; transition: background var(--ease);
}
.log-row:last-child { border-bottom: 0; }
.log-row:hover { background: var(--panel-2); }
.log-row .date { color: var(--text-mute); }
.log-row .tag { color: var(--amber); }
.log-row a:hover { color: var(--green); }

/* 페이지 헤드 */
.page-head { border-bottom: var(--line-w) solid var(--line); padding: 1.8rem 0 1.4rem; background: var(--panel); }
.page-head h1 { font-family: var(--mono); font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.16; margin: .5rem 0 .8rem; font-weight: 600; word-break: keep-all; }
.page-head .lede { color: var(--text-soft); max-width: 42rem; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .35rem; font-family: var(--mono); font-size: .66rem; color: var(--text-mute); margin-bottom: .8rem; }
.breadcrumb a:hover { color: var(--green); }

.content-body { padding: 1.8rem 0; }
.content-inner { max-width: 780px; margin: 0 auto; padding: 0 var(--gutter); }

.article-head { border-bottom: var(--line-w) solid var(--line-2); padding-bottom: 1rem; margin-bottom: 1.6rem; }
.article-head h1 { font-family: var(--mono); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.25; margin: .5rem 0 .8rem; font-weight: 600; word-break: keep-all; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-family: var(--mono); font-size: .68rem; color: var(--text-mute); }
.article-meta time { color: var(--amber); }

.prose { color: var(--text-soft); font-size: .98rem; line-height: 1.9; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 {
    font-family: var(--mono); color: var(--green); font-size: 1.12rem; font-weight: 600;
    margin-top: 2rem; padding-top: .8rem; border-top: var(--line-w) solid var(--line); word-break: keep-all;
}
.prose h2::before { content: '## '; color: var(--text-mute); }
.prose h3 { font-family: var(--mono); color: var(--text); font-size: .98rem; margin-top: 1.5rem; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--green); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose ul { list-style: '> '; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--text); }
.prose blockquote {
    border-left: 2px solid var(--green); background: var(--panel); padding: .8rem 1rem;
    font-family: var(--mono); font-size: .86rem; color: var(--text); margin-block: 1.6rem;
}
.prose img { border: var(--line-w) solid var(--line); margin-block: 1.6rem; }
.prose hr { border: 0; border-top: 1px dashed var(--line-2); margin-block: 1.8rem; }
.prose code { font-family: var(--mono); color: var(--amber); background: var(--panel-2); padding: .1em .35em; }

.article-foot { margin-top: 2rem; padding-top: 1.2rem; border-top: var(--line-w) solid var(--line-2); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.post-nav-link { border: 1px solid var(--line); padding: .7rem .85rem; font-family: var(--mono); font-size: .74rem; }
.post-nav-link:hover { border-color: var(--green); color: var(--green); }
.post-nav-label { display: block; color: var(--text-mute); font-size: .62rem; letter-spacing: .1em; margin-bottom: .3rem; }
.post-nav-link.next { text-align: right; }

.pagination { display: flex; justify-content: center; gap: .8rem; align-items: center; margin-top: 1.6rem; font-family: var(--mono); font-size: .74rem; }
.page-link { border: 1px solid var(--line-2); padding: .3rem .7rem; }
.page-link:hover { border-color: var(--green); color: var(--green); }

.notice { border: 1px solid var(--amber); border-left-width: 3px; background: rgba(255,204,102,.05); padding: .7rem .9rem; font-family: var(--mono); font-size: .76rem; color: var(--amber); margin-block: 1.4rem; }
.pullquote { border-block: var(--line-w) solid var(--line-2); padding-block: 1rem; font-family: var(--mono); font-size: 1rem; color: var(--text); text-align: center; margin-block: 1.6rem; }

/* CTA */
.cta { border-block: var(--line-w) solid var(--line-2); background: var(--panel-2); padding: 2rem 0; }
.cta-inner { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; font-family: var(--mono); }
.cta h2 { font-size: 1.3rem; color: var(--green); margin: 0 0 .6rem; }
.cta p { color: var(--text-mute); font-size: .8rem; margin-bottom: 1.2rem; }
.cta-note { margin-top: .9rem; font-size: .66rem; color: var(--text-mute); }

/* 푸터 */
.site-footer { border-top: var(--line-w) solid var(--line); background: var(--bg-2); padding: 1.6rem 0 1.2rem; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); font-family: var(--mono); font-size: .72rem; }
.footer-line { display: flex; gap: .6rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--text-mute); }
.footer-line .ok { color: var(--green); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1rem 0; }
.footer-grid .k { color: var(--text-mute); font-size: .64rem; letter-spacing: .12em; display: block; margin-bottom: .4rem; }
.footer-grid li { margin-bottom: .3rem; }
.footer-grid a { color: var(--text-soft); }
.footer-grid a:hover { color: var(--green); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: .9rem; color: var(--text-mute); font-size: .68rem; }
.cursor { display: inline-block; width: 7px; height: 13px; background: var(--green); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* 반응형 */
@media (max-width: 940px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; top: var(--top); left: 0; right: 0; bottom: 0; height: auto; z-index: 150;
        transform: translateX(-100%); transition: transform .2s ease; border-right: 0;
    }
    .sidebar.open { transform: none; }
    .menu-toggle { display: flex; margin-left: auto; }
    .topbar-status { margin-left: 0; }
    .hero { grid-template-columns: 1fr; }
    .hero-side { border-left: 0; border-top: var(--line-w) solid var(--line); }
}

@media (max-width: 700px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .log-row { grid-template-columns: 1fr; gap: .2rem; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav-link.next { text-align: left; }
}

/* 등장 */
.fade { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.fade.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade { opacity: 1; transform: none; } }
