:root {
    --bg: #0b0e14;
    --bg-soft: #11151f;
    --card: #161b28;
    --line: #232a3b;
    --text: #e6e9f0;
    --text-dim: #9aa3b5;
    --accent: #6ee7b7;
    --accent-2: #818cf8;
    --accent-grad: linear-gradient(120deg, #6ee7b7, #818cf8 60%, #e879f9);
    --radius: 14px;
    --max-w: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-2); color: #fff; }

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

/* ── 내비게이션 ─────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 18px 24px;
    backdrop-filter: blur(12px);
    background: rgba(11, 14, 20, 0.75);
    border-bottom: 1px solid var(--line);
}

.nav-logo {
    font-weight: 800;
    letter-spacing: 0.04em;
    font-size: 1.05rem;
}

.nav-logo span { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 26px;
    list-style: none;
}

.nav-links a {
    color: var(--text-dim);
    font-size: 0.92rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

/* ── 히어로 ─────────────────────────────── */
.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 24px;
    max-width: 820px;
}

.hero-eyebrow {
    font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.accent {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    margin-top: 22px;
    color: var(--text-dim);
    font-size: 1.08rem;
    min-height: 1.8em;
}

.cursor {
    color: var(--accent);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-cta {
    margin-top: 34px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 13px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.btn-primary {
    background: var(--accent-grad);
    color: #0b0e14;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(110, 231, 183, 0.25); }

.btn-ghost {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover { border-color: var(--accent-2); transform: translateY(-2px); }

.hero-scroll {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-dim);
    animation: bob 1.6s ease-in-out infinite;
    font-size: 1.2rem;
}

@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ── 공통 섹션 ──────────────────────────── */
.section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 90px 24px 30px;
}

.section-title {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.section-title::after {
    content: "";
    display: block;
    width: 52px;
    height: 4px;
    margin-top: 10px;
    border-radius: 2px;
    background: var(--accent-grad);
}

.section-lead {
    color: var(--text-dim);
    max-width: 640px;
    margin-bottom: 36px;
}

/* 스크롤 등장 애니메이션 */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* ── 소개 카드 ──────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.about-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    transition: transform 0.2s, border-color 0.2s;
}

.about-card:hover { transform: translateY(-4px); border-color: var(--accent-2); }

.about-icon { font-size: 1.7rem; margin-bottom: 12px; }

.about-card h3 { font-size: 1.05rem; margin-bottom: 8px; }

.about-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ── 기술 스택 ──────────────────────────── */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.stack-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 0.2s, transform 0.2s;
}

.stack-item:hover { border-color: var(--accent); transform: translateY(-3px); }

.stack-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(129, 140, 248, 0.12);
    color: var(--accent);
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── 프로젝트 / 게임 카드 ────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

a.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.card-muted { opacity: 0.55; }

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text-dim);
}

.badge-live {
    color: var(--accent);
    border-color: rgba(110, 231, 183, 0.4);
    background: rgba(110, 231, 183, 0.08);
}

.card-arrow { color: var(--accent); transition: transform 0.2s; }

a.card:hover .card-arrow { transform: translateX(5px); }

.card h3 { font-size: 1.15rem; margin-bottom: 8px; }

.card p { color: var(--text-dim); font-size: 0.92rem; flex: 1; }

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.card-tags span {
    font-size: 0.75rem;
    font-family: ui-monospace, monospace;
    color: var(--accent-2);
    background: rgba(129, 140, 248, 0.1);
    padding: 3px 9px;
    border-radius: 6px;
}

/* ── 푸터 ───────────────────────────────── */
.footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    padding: 34px 24px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.88rem;
}

.footer a { color: var(--accent); }

.footer a:hover { text-decoration: underline; }

/* ── 반응형 ─────────────────────────────── */
@media (max-width: 640px) {
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 0.85rem; }
    .section { padding: 64px 20px 20px; }
}
