/* ============================================================
   ppuzzle.dev — Developer Dashboard Styles
   Palette:
     #0d1117  Terminal Dark (primary background)
     #161b22  Panel Dark (content panels)
     #30363d  Border Gray
     #c9d1d9  Text Light
     #4ade80  Terminal Green
     #3b82f6  Data Blue
     #f59e0b  Docs Amber
     #8b949e  Muted Gray
     #ff5f57  Dot Red
     #febc2e  Dot Yellow
     #28c840  Dot Green
   Fonts: Inter (display/body), Fira Code (monospace)
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0d1117;
    color: #c9d1d9;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.65;
    min-height: 100vh;
}

a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    color: #60a5fa;
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.85em;
    color: #c9d1d9;
}

/* ============================================================
   Header
   ============================================================ */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.92);
    border-bottom: 1px solid #30363d;
    backdrop-filter: blur(8px);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    font-weight: 500;
    color: #c9d1d9;
    letter-spacing: 0.02em;
}

.logo-bracket {
    color: #30363d;
}

.logo-dot {
    color: #4ade80;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: #8b949e;
    padding: 6px 12px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
    color: #c9d1d9;
    background: #161b22;
}

.nav-link--github {
    color: #4ade80;
    border: 1px solid #30363d;
    margin-left: 8px;
}

.nav-link--github:hover {
    color: #4ade80;
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
}

/* ============================================================
   Hero: Data Terminal
   ============================================================ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 60px;
    background: #0d1117;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 80% 60%, rgba(74, 222, 128, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 760px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

/* Terminal Window */
.terminal-window {
    width: 100%;
    background: #161b22;
    border-radius: 8px 8px 0 0;
    border: 1px solid #30363d;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(48, 54, 61, 0.5);
    overflow: hidden;
}

.terminal-titlebar {
    padding: 12px 16px;
    border-bottom: 1px solid #30363d;
    background: #1c2128;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }

.terminal-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    color: #8b949e;
    flex: 1;
    text-align: center;
    margin-right: 60px; /* optical balance with dots */
}

.terminal-body {
    padding: 20px 24px 28px;
    font-family: 'Fira Code', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    min-height: 220px;
}

.terminal-line {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.term-prompt {
    color: #4ade80;
    user-select: none;
}

.term-command {
    color: #c9d1d9;
}

.term-cursor {
    color: #4ade80;
    animation: blink 1s step-end infinite;
    margin-left: 1px;
}

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

.terminal-output {
    padding-top: 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.terminal-output.visible {
    opacity: 1;
}

.output-line {
    font-family: 'Fira Code', monospace;
    font-size: 0.84rem;
    line-height: 1.7;
    padding-left: 2px;
}

.output-comment { color: #8b949e; }
.output-key     { color: #c9d1d9; }
.output-colon   { color: #8b949e; margin: 0 6px; }
.output-green   { color: #4ade80; }
.output-amber   { color: #f59e0b; }
.output-blue    { color: #3b82f6; }

/* Hero Description */
.hero-description {
    text-align: center;
    max-width: 580px;
}

.hero-title {
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 600;
    color: #c9d1d9;
    line-height: 1.3;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.hero-sub {
    font-size: 0.95rem;
    color: #8b949e;
    line-height: 1.65;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn--primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.btn--primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.btn--ghost {
    background: transparent;
    color: #c9d1d9;
    border-color: #30363d;
}

.btn--ghost:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* ============================================================
   Analysis Panels
   ============================================================ */
.panels-section {
    padding: 60px 0 60px;
    background: #0d1117;
}

.panels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Panel Base */
.panel {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.panel:hover {
    border-color: #3b82f6;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #30363d;
    background: #1c2128;
}

.panel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.panel-dot--blue  { background: #3b82f6; }
.panel-dot--green { background: #4ade80; }
.panel-dot--amber { background: #f59e0b; }

.panel-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b949e;
}

.panel-version {
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: #30363d;
    margin-left: auto;
    border: 1px solid #30363d;
    padding: 1px 6px;
    border-radius: 3px;
}

.panel-body {
    padding: 20px;
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #c9d1d9;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.panel-desc {
    font-size: 0.875rem;
    color: #8b949e;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Code Block */
.code-block {
    background: #0d1117;
    color: #c9d1d9;
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid #30363d;
    overflow-x: auto;
    margin-bottom: 16px;
    line-height: 1.7;
}

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

.code-method {
    color: #3b82f6;
    display: inline-block;
    width: 44px;
}

.code-path {
    color: #4ade80;
}

.code-comment {
    color: #8b949e;
}

.code-prompt {
    color: #4ade80;
    user-select: none;
}

.code-cmd {
    color: #c9d1d9;
}

.code-indent {
    color: #8b949e;
    padding-left: 16px;
    display: block;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table th {
    text-align: left;
    padding: 6px 10px;
    color: #8b949e;
    font-weight: 500;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #30363d;
}

.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #1c2128;
    color: #c9d1d9;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table code {
    color: #4ade80;
}

.type-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.76rem;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Tool List */
.tool-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 5px;
    transition: border-color 0.15s;
}

.tool-item:hover {
    border-color: #4ade80;
}

.tool-name {
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    color: #4ade80;
    min-width: 110px;
}

.tool-desc {
    font-size: 0.8rem;
    color: #8b949e;
}

/* Dataset Grid */
.dataset-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dataset-item {
    padding: 10px 0;
}

.dataset-name {
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    color: #c9d1d9;
    margin-bottom: 4px;
}

.dataset-meta {
    font-size: 0.76rem;
    color: #8b949e;
    margin-bottom: 6px;
}

.meta-count {
    color: #3b82f6;
    font-weight: 500;
}

.dataset-bar {
    height: 4px;
    background: #30363d;
    border-radius: 2px;
    overflow: hidden;
}

.dataset-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

.dataset-fill--blue  { background: #3b82f6; }
.dataset-fill--green { background: #4ade80; }
.dataset-fill--amber { background: #f59e0b; }

/* Docs Sections */
.doc-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.doc-section {}

.doc-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.doc-icon {
    font-size: 0.65rem;
}

.doc-icon--amber { color: #f59e0b; }
.doc-icon--blue  { color: #3b82f6; }
.doc-icon--green { color: #4ade80; }

.doc-section-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #c9d1d9;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.doc-links {
    list-style: none;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.doc-link {
    font-size: 0.85rem;
    color: #8b949e;
    transition: color 0.15s;
}

.doc-link:hover {
    color: #3b82f6;
}

/* ============================================================
   Footer: File Tree
   ============================================================ */
#site-footer {
    background: #0d1117;
    border-top: 1px solid #30363d;
    padding: 50px 0 36px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.footer-tree-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    color: #4ade80;
    margin-bottom: 10px;
    font-weight: 500;
}

.footer-tree {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #8b949e;
    white-space: pre;
    line-height: 1.6;
    background: none;
    border: none;
    padding: 0;
}

.footer-logo {
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    color: #c9d1d9;
    margin-bottom: 10px;
}

.footer-tagline {
    font-size: 0.875rem;
    color: #8b949e;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 320px;
}

.footer-stats {
    display: flex;
    gap: 28px;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-family: 'Fira Code', monospace;
    font-size: 1.15rem;
    font-weight: 500;
    color: #c9d1d9;
}

.stat-label {
    font-size: 0.75rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-links {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.82rem;
    color: #8b949e;
    transition: color 0.15s;
}

.footer-link:hover {
    color: #c9d1d9;
}

.footer-copy {
    font-size: 0.78rem;
    color: #30363d;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .panels-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .header-nav .nav-link:not(.nav-link--github) {
        display: none;
    }

    .footer-stats {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0 16px;
    }

    .hero-content {
        gap: 28px;
    }

    .terminal-body {
        padding: 16px;
        font-size: 0.78rem;
    }
}
