/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #1a1a2e;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    min-height: 100vh;
}

/* ===== TERMINAL WINDOW ===== */
#terminal-window {
    max-width: 900px;
    margin: 40px auto;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px #0d0d1a,
        0 32px 80px rgba(0, 0, 0, 0.8),
        0 0 120px rgba(249, 115, 22, 0.06);
}

/* ===== TERMINAL TITLE BAR ===== */
#terminal-titlebar {
    background: #0d0d1e;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #2a2a4a;
    user-select: none;
}

.terminal-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.dot-red    { background: #ef4444; }
.dot-yellow { background: #fbbf24; }
.dot-green  { background: #22c55e; }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #64748b;
    flex: 1;
    text-align: center;
    margin-right: 60px; /* visual balance for dots */
}

/* ===== HERO SECTION ===== */
#hero {
    background: #1a1a2e;
    padding: 56px 48px 40px;
    border-bottom: 1px solid #16213e;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.hero-title-row {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: 700;
    color: #e2e8f0;
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.02em;
}

#caret {
    color: #f97316;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.hero-subtitle {
    margin-bottom: 28px;
}

.comment-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #64748b;
    font-style: normal;
}

/* ===== BUILD LINES ===== */
.build-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    opacity: 0;
    animation: fadeInLine 0.4s ease forwards;
}

.build-line:nth-child(1) { animation-delay: 0.1s; }
.build-line:nth-child(2) { animation-delay: 0.3s; }
.build-line:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeInLine {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.build-output-lines .build-line:nth-child(1) { animation-delay: 1.2s; }
.build-output-lines .build-line:nth-child(2) { animation-delay: 1.6s; }

.build-icon { font-size: 0.9rem; }
.build-check { color: #22c55e; }
.build-run   { color: #f97316; font-weight: 700; }

.build-label {
    color: #22c55e;
    font-weight: 700;
    min-width: 80px;
}

.build-compiling .build-label { color: #fbbf24; }

.build-pkg    { color: #e2e8f0; }
.build-path   { color: #64748b; }
.build-release { color: #f97316; }
.build-time   { color: #64748b; }

/* ===== MAIN CONTENT ===== */
#main-content {
    padding: 0;
}

/* ===== TOML SECTIONS ===== */
.toml-section {
    border-bottom: 1px solid #16213e;
    padding: 36px 48px;
    transition: background 0.2s ease;
}

.toml-section:hover {
    background: rgba(22, 33, 62, 0.4);
}

.toml-section:last-child {
    border-bottom: none;
}

.section-header {
    margin-bottom: 24px;
}

.toml-bracket {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f97316;
    letter-spacing: 0.02em;
}

.section-body {
    padding-left: 24px;
    max-width: 720px;
    margin: 0 auto 0 0;
}

/* ===== TOML FIELDS ===== */
.toml-field {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.toml-key {
    color: #e2e8f0;
    font-weight: 400;
    min-width: 120px;
}

.toml-eq {
    color: #64748b;
}

.toml-value.string { color: #22c55e; }
.toml-value.number { color: #fbbf24; }
.toml-value.bool   { color: #f97316; }

.toml-comment {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #64748b;
}

/* ===== FEATURE GRID ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.feature-card {
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.feature-card:hover {
    border-color: #f97316;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.12);
}

.feature-icon {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.feature-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f97316;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
}

/* ===== DEPENDENCIES TABLE ===== */
.deps-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}

.dep-row {
    display: grid;
    grid-template-columns: 140px 100px 1fr;
    gap: 16px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.15s ease;
    align-items: center;
}

.dep-row:not(.dep-row-header):hover {
    background: rgba(249, 115, 22, 0.06);
}

.dep-row-header {
    color: #64748b;
    font-size: 0.75rem;
    border-bottom: 1px solid #2a2a4a;
    margin-bottom: 4px;
    padding-bottom: 8px;
}

.dep-name {
    color: #e2e8f0;
    font-weight: 700;
}

.dep-row-header .dep-name,
.dep-row-header .dep-version,
.dep-row-header .dep-desc {
    color: #64748b;
    font-weight: 400;
}

.dep-version {
    color: #22c55e;
}

.dep-desc {
    color: #64748b;
}

/* ===== PROFILE SECTION ===== */
.profile-block {
    margin-bottom: 20px;
}

.profile-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
    border-left: 2px solid #f97316;
    padding-left: 12px;
    margin-top: 16px;
}

/* ===== CTA SECTION ===== */
.cta-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cta-prompt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
}

.prompt-dollar {
    color: #22c55e;
    font-weight: 700;
}

.prompt-cursor {
    color: #f97316;
    animation: blink 0.8s step-end infinite;
    font-weight: 700;
}

.cta-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-block;
}

.cta-primary {
    background: #f97316;
    color: #1a1a2e;
    border: 1px solid #f97316;
}

.cta-primary:hover {
    background: #ea6a08;
    border-color: #ea6a08;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
    transform: translateY(-1px);
}

.cta-secondary {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid #2a2a4a;
}

.cta-secondary:hover {
    border-color: #f97316;
    color: #f97316;
    transform: translateY(-1px);
}

.cta-note {
    margin-top: 4px;
}

/* ===== FOOTER ===== */
#site-footer {
    background: #0d0d1e;
    border-top: 1px solid #2a2a4a;
    padding: 24px 48px;
}

.footer-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-build-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.build-check-icon {
    color: #22c55e;
    font-size: 1rem;
}

.footer-text {
    color: #e2e8f0;
    font-weight: 400;
}

.footer-time {
    color: #22c55e;
    margin-left: auto;
}

.footer-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-sep { color: #2a2a4a; }
.footer-domain { color: #f97316; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #2a2a4a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f97316;
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(249, 115, 22, 0.3);
    color: #e2e8f0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #terminal-window {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    #hero,
    .toml-section {
        padding: 28px 20px;
    }

    .section-body {
        padding-left: 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .dep-row {
        grid-template-columns: 110px 80px 1fr;
        gap: 8px;
        font-size: 0.75rem;
    }

    .cta-actions {
        flex-direction: column;
    }

    .footer-time {
        display: none;
    }

    #site-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .dep-row {
        grid-template-columns: 90px 70px 1fr;
    }

    .terminal-title {
        display: none;
    }
}
