/* hangul.dev - Tokyo Night Theme */
/* Palette: #1a1b26 bg, #24283b surface, #9ece6a green, #7aa2f7 blue,
   #bb9af7 purple, #a9b1d6 text, #565f89 comment, #3b4261 border,
   #ff5f56 red, #ffbd2e yellow, #27c93f dot-green */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #1a1b26;
    color: #a9b1d6;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ---- Green top border ---- */
.green-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #9ece6a;
    z-index: 100;
}

/* ---- HERO (0-100vh) ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.hero-inner {
    text-align: center;
    max-width: 700px;
}

.brand {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 4rem);
    color: #a9b1d6;
    letter-spacing: -0.02em;
}

.brand-dot {
    color: #9ece6a;
}

.tagline {
    font-size: 1rem;
    color: #565f89;
    margin-top: 0.75rem;
    letter-spacing: 0.02em;
}

.terminal-prompt {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.prompt-line {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.prompt-dollar {
    color: #9ece6a;
    margin-right: 0.6rem;
    user-select: none;
}

.prompt-text {
    color: #a9b1d6;
}

.cursor {
    display: inline-block;
    width: 9px;
    height: 1.1em;
    background: #9ece6a;
    margin-left: 1px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

.hero-badges {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.03em;
}

.badge-green {
    background: rgba(158, 206, 106, 0.12);
    color: #9ece6a;
    border: 1px solid rgba(158, 206, 106, 0.25);
}

.badge-blue {
    background: rgba(122, 162, 247, 0.12);
    color: #7aa2f7;
    border: 1px solid rgba(122, 162, 247, 0.25);
}

.badge-purple {
    background: rgba(187, 154, 247, 0.12);
    color: #bb9af7;
    border: 1px solid rgba(187, 154, 247, 0.25);
}

/* ---- API SECTION ---- */
.api {
    padding: 4rem 1.5rem 6rem;
}

.api-inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: #7aa2f7;
    margin-top: 1.5rem;
}

.section-title:first-child {
    margin-top: 0;
}

.section-desc {
    font-size: 0.85rem;
    color: #565f89;
    line-height: 1.6;
}

/* ---- Code Blocks ---- */
.code-block {
    background: #24283b;
    border: 1px solid #3b4261;
    border-radius: 8px;
    overflow: hidden;
}

.chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #1a1b26;
    border-bottom: 1px solid #3b4261;
}

.chrome-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: #565f89;
    margin-left: auto;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-content {
    padding: 16px 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    line-height: 1.85;
    overflow-x: auto;
}

.code-line {
    white-space: pre;
}

.line-num {
    color: #3b4261;
    margin-right: 1.2rem;
    user-select: none;
    display: inline-block;
    width: 2ch;
    text-align: right;
}

.kw { color: #7aa2f7; }
.str { color: #9ece6a; }
.fn { color: #bb9af7; }
.cmt { color: #565f89; }
.param { color: #7aa2f7; }

.output-line {
    color: #565f89;
}

/* ---- TABLE SECTION ---- */
.table-section {
    padding: 4rem 1.5rem 6rem;
}

.table-inner {
    max-width: 680px;
    margin: 0 auto;
}

.subsection-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    color: #a9b1d6;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.subsection-label {
    font-weight: 400;
    font-size: 0.7rem;
    color: #565f89;
    margin-left: 0.5rem;
}

.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 8px;
}

.char-cell {
    background: #24283b;
    border: 1px solid #3b4261;
    border-radius: 6px;
    padding: 12px 8px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.char-cell:hover {
    border-color: #7aa2f7;
    background: #292e42;
}

.char {
    font-size: 1.6rem;
    color: #a9b1d6;
    display: block;
    line-height: 1.3;
}

.romanized {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #bb9af7;
    display: block;
    margin-top: 4px;
}

.hex {
    font-family: 'Fira Code', monospace;
    font-size: 0.55rem;
    color: #3b4261;
    display: block;
    margin-top: 2px;
}

/* ---- INSTALL SECTION ---- */
.install {
    padding: 6rem 1.5rem 4rem;
}

.install-inner {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.install-block {
    text-align: left;
}

.install-meta {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.version-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    background: #7aa2f7;
    color: #1a1b26;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.size-badge,
.license-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    background: #24283b;
    color: #565f89;
    padding: 3px 10px;
    border-radius: 10px;
    border: 1px solid #3b4261;
}

.install-alt {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.alt-cmd {
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: #565f89;
}

.alt-cmd .prompt-dollar {
    font-size: 0.72rem;
}

.ready {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #9ece6a;
    margin-top: 3rem;
    letter-spacing: 0.05em;
}

/* ---- FOOTER ---- */
.site-footer {
    padding: 2rem 1.5rem;
    border-top: 1px solid #24283b;
}

.footer-inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.75rem;
    color: #565f89;
}

.footer-sep {
    color: #3b4261;
    font-size: 0.6rem;
}

.footer-link {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #565f89;
    cursor: pointer;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #7aa2f7;
}

/* ---- Fade-in animations ---- */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .char-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }

    .code-content {
        font-size: 0.68rem;
        padding: 12px 14px;
    }

    .hero-badges {
        gap: 0.5rem;
    }
}
