/* Terminal Aesthetic for judah.io */

/* CSS Custom Properties (Dark theme - default) */
:root {
    --bg-body: #0d1117;
    --bg-terminal: #161b22;
    --bg-titlebar: #21262d;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-heading: #f0f6fc;
    --accent-green: #3fb950;
    --accent-link: #58a6ff;
    --accent-link-hover: #79c0ff;
    --btn-close: #f85149;
    --btn-minimize: #d29922;
    --cursor-color: #c9d1d9;
}

/* Light theme */
@media (prefers-color-scheme: light) {
    :root {
        --bg-body: #f6f8fa;
        --bg-terminal: #ffffff;
        --bg-titlebar: #f6f8fa;
        --border-color: #d0d7de;
        --text-primary: #24292f;
        --text-secondary: #57606a;
        --text-heading: #1f2328;
        --accent-green: #1a7f37;
        --accent-link: #0969da;
        --accent-link-hover: #0550ae;
        --btn-close: #cf222e;
        --btn-minimize: #9a6700;
        --cursor-color: #24292f;
    }
}

/* Reset and base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Terminal window frame */
.terminal {
    max-width: 600px;
    width: 100%;
    background-color: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Terminal title bar */
.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--bg-titlebar);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: opacity 0.15s ease;
}

.terminal-button:hover {
    opacity: 0.8;
}

.terminal-button.close {
    background-color: var(--btn-close);
}

.terminal-button.minimize {
    background-color: var(--btn-minimize);
}

.terminal-button.maximize {
    background-color: var(--accent-green);
}

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-right: 2.5rem; /* offset for centering */
}

/* Terminal content area */
.terminal-content {
    padding: 1.5rem;
}

/* Command prompt styling */
.prompt {
    margin-bottom: 1.5rem;
}

.prompt-line {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.prompt-symbol {
    color: var(--accent-green);
    user-select: none;
}

.prompt-command {
    color: var(--text-primary);
}

/* Output styling */
.output {
    padding-left: 1.25rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hidden state for animation */
.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Typing cursor (follows text during animation) */
.typing-cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    background-color: var(--cursor-color);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

.output-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

.output-title {
    color: var(--text-secondary);
}

/* Links section */
.links-section {
    margin-top: 2rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.links {
    display: flex;
    gap: 1.5rem;
    padding-left: 1.25rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.links a {
    color: var(--accent-link);
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.links a:hover {
    color: var(--accent-link-hover);
    transform: scale(1.1);
}

.links a:focus {
    outline: 2px solid var(--accent-link);
    outline-offset: 2px;
}

/* New prompt line with cursor (shows command completed) */
.new-prompt {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 1.5rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Blinking cursor */
.cursor {
    display: inline-block;
    width: 0.6em;
    height: 1em;
    background-color: var(--cursor-color);
    align-self: flex-end;
    margin-bottom: 0.3em;
    animation: blink 1s step-end infinite;
}

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

/* Mobile responsive styles (320px+) */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    .terminal {
        min-width: 0; /* Prevent overflow */
    }

    .terminal-titlebar {
        padding: 0.5rem 0.75rem;
    }

    .terminal-content {
        padding: 1rem;
    }

    .output-name {
        font-size: 1.1rem;
    }

    .output,
    .links {
        padding-left: 1rem;
    }

    .links {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 1rem;
    }
}
