/* rootshell.cx — dark terminal aesthetic, same palette as the rest of the estate */

:root {
    --primary-color: #58a6ff;
    --accent-color: #3fb950;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --bg-primary: #0d1117;
    --bg-card: #161b22;
    --border-color: #30363d;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
    --glow-green: 0 0 18px rgba(63, 185, 80, 0.18);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font-mono);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow-x: hidden;
}

/* Animated dot grid, lifted from hofstede.it's hero */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, var(--border-color) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.45;
    animation: gridShift 22s linear infinite;
    z-index: 0;
    pointer-events: none;
}

/* Soft green glow bleeding up from the bottom */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(60% 50% at 50% 115%, rgba(63, 185, 80, 0.10), transparent 70%);
    z-index: 0;
    pointer-events: none;
}

@keyframes gridShift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

/* ===== Layout ===== */
.stage {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vh, 5rem) 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== Terminal window ===== */
.terminal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg), var(--glow-green);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: rgba(13, 17, 23, 0.7);
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.dot-red   { background: #ff5f56; }
.dot-amber { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
    margin-left: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.terminal-body {
    padding: 1.1rem 1.15rem 1.3rem;
    font-size: 0.9rem;
    min-height: 340px;
    max-height: 60vh;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    outline: none;
}

.terminal-body::-webkit-scrollbar { width: 10px; }
.terminal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
}

/* ===== Shell lines ===== */
.line { display: block; }
.line + .line { margin-top: 0.05rem; }

.prompt   { color: var(--accent-color); font-weight: 700; }
.prompt .user { color: var(--accent-color); }
.prompt .host { color: var(--primary-color); }
.prompt .path { color: var(--text-secondary); }
.prompt .sigil { color: var(--text-primary); }

.cmd      { color: var(--text-primary); }
.out      { color: var(--text-secondary); }
.out-key  { color: var(--primary-color); }
.out-ok   { color: var(--accent-color); }
.out-warn { color: #d29922; }
.out-err  { color: #f85149; }
.dim      { color: #6e7681; }

a, a:visited { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* The blinking caret, same shape/feel as the hofstede.it hero cursor */
.caret {
    display: inline-block;
    width: 0.55ch;
    height: 1.05em;
    background: var(--accent-color);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1.05s steps(1) infinite;
}

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

/* Live input line */
.input-line { display: flex; flex-wrap: wrap; align-items: baseline; }
.input-line .typed { color: var(--text-primary); white-space: pre-wrap; }

/* ===== Sub-line under the terminal ===== */
.subline {
    margin: 1.25rem 0.25rem 0;
    font-size: 0.82rem;
    color: var(--text-primary);
}
.subline .muted { color: var(--text-secondary); }
.subline .hint {
    color: var(--text-secondary);
    margin-left: 0.35rem;
}
.subline code,
.page-footer code {
    color: var(--accent-color);
    background: rgba(63, 185, 80, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
}

/* ===== Footer ===== */
.page-footer {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    padding: 1.25rem 1.45rem 1.6rem;
    font-size: 0.72rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}
.page-footer .muted { color: var(--text-secondary); }

/* ===== noscript fallback ===== */
.noscript {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 1rem auto;
    padding: 0 1.45rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.prompt-noscript { color: var(--accent-color); font-weight: 700; }

@media (max-width: 520px) {
    .terminal-body { font-size: 0.8rem; min-height: 300px; }
    .terminal-title { display: none; }
}

/* Respect reduced-motion: kill the moving grid and caret blink */
@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
    .caret { animation: none; opacity: 1; }
}
