*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #09090b; --bg-card: rgba(255, 255, 255, 0.02); --green: #4ade80;
    --green-dim: #22c55e; --green-bright: #86efac; --cyan: #22d3ee; --yellow: #fbbf24;
    --white: #fafafa; --text: #d4d4d8; --text-muted: #a1a1aa; --gray: #a1a1aa;
    --gray-dark: #27272a; --gray-darker: #18181b; --accent: #a78bfa;
    --glow: 0 0 20px rgba(74, 222, 128, 0.15);
    --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
    --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --radius: 12px; --radius-sm: 8px;
    --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
    --border-light: 1px solid rgba(255, 255, 255, 0.04);
}
html { scroll-behavior: smooth; }
body {
    font-family: var(--mono); background: var(--bg); color: var(--text);
    background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(74, 222, 128, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(34, 211, 238, 0.05), transparent);
    line-height: 1.6; font-size: 14px; min-height: 100vh; overflow-x: hidden;
}
::selection { background: var(--green); color: var(--bg); }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.skip-link {
    position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
    background: var(--bg); color: var(--cyan); padding: 12px 24px;
    border: 1px solid var(--cyan); border-radius: var(--radius-sm);
    z-index: 9999; font-family: var(--mono); font-size: 13px; transition: top 0.2s;
}
.skip-link:focus { top: 16px; outline: 2px solid var(--cyan); outline-offset: 2px; }
.crt {
    position: fixed; inset: 0; pointer-events: none; z-index: 1000;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.35) 100%);
}
.terminal { max-width: 1200px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }
.ssh-header {
    background: rgba(12, 12, 14, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: var(--border-subtle); padding: 12px 24px; display: flex;
    align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; font-size: 13px;
}
.ssh-header-left, .ssh-header-right, .modal-header-left { display: flex; align-items: center; gap: 16px; }
.ssh-header-right { color: var(--gray); }
.modal-header-left { gap: 12px; }
.window-controls { display: flex; gap: 8px; }
.window-dot { width: 12px; height: 12px; border-radius: 50%; opacity: 0.9; }
.window-dot.close { background: #ff5f57; }
.window-dot.minimize { background: #febc2e; }
.window-dot.maximize { background: #28c840; }
.ssh-title, .modal-title { color: var(--gray); font-size: 13px; }
.ssh-title span, .modal-title span, .gpu-title span { color: var(--green); font-weight: 500; }
.modal-title { font-size: 12px; }
.status-indicator {
    display: flex; align-items: center; gap: 8px; background: rgba(74, 222, 128, 0.1);
    padding: 6px 12px; border-radius: 20px; border: 1px solid rgba(74, 222, 128, 0.2);
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 8px var(--green); animation: pulse 2s ease-in-out infinite;
    will-change: opacity; contain: strict;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.terminal-body { background: transparent; min-height: calc(100vh - 52px); padding: 40px 24px; }
.boot-sequence { margin-bottom: 40px; opacity: 0.6; font-size: 12px; }
.boot-line { color: var(--gray); margin-bottom: 4px; font-family: var(--mono); }
.boot-line.ok { color: var(--green-dim); }
.ascii-header {
    margin: 32px 0 48px; color: var(--green); font-size: 9px; line-height: 1.15;
    text-shadow: 0 0 30px rgba(74, 222, 128, 0.3); white-space: pre; overflow-x: auto; opacity: 0.9;
}
.system-info, .gpu-panel, .service-card, .vector-item, .form-section {
    background: var(--bg-card); border: var(--border-subtle); border-radius: var(--radius);
}
.system-info { padding: 24px; margin: 32px 0; font-size: 13px; }
.system-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.info-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: var(--border-light); }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--gray); min-width: 140px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.info-value { color: var(--white); font-weight: 500; }
.info-value.highlight { color: var(--green); }
.prompt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin: 48px 0 12px; font-size: 13px; }
.prompt-user { color: var(--accent); font-weight: 500; }
.prompt-at { color: var(--gray); }
.prompt-host { color: var(--cyan); font-weight: 500; }
.prompt-path { color: var(--yellow); }
.prompt-symbol { color: var(--green); margin-left: 4px; }
.prompt-cmd { color: var(--white); margin-left: 8px; opacity: 0.9; }
.output { margin: 16px 0 48px; padding-left: 0; }
.output-header {
    color: var(--gray); padding-bottom: 12px; margin-bottom: 20px; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.15em; font-weight: 500; border-bottom: var(--border-subtle);
}
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin: 20px 0; }
.service-card { padding: 24px; transition: border-color 0.2s, background 0.2s; }
.service-card:hover { border-color: rgba(74, 222, 128, 0.3); background: rgba(255, 255, 255, 0.04); }
.service-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.service-name { color: var(--white); font-weight: 600; font-size: 14px; }
.service-status { font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: 500; }
.service-status.active { background: rgba(74, 222, 128, 0.15); color: var(--green); border: 1px solid rgba(74, 222, 128, 0.3); }
.service-desc, .vector-content p, .modal-section p { color: var(--text); font-family: var(--sans); line-height: 1.7; }
.service-desc { font-size: 13px; }
.service-meta {
    margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--gray-dark);
    font-size: 11px; color: var(--gray); display: flex; gap: 16px;
}
.service-meta span { display: flex; align-items: center; gap: 4px; }
.service-meta .value { color: var(--yellow); }
.process-table {
    width: 100%; border-collapse: collapse; font-size: 13px; margin: 20px 0;
    background: var(--bg-card); border-radius: var(--radius); overflow: hidden; border: var(--border-subtle);
}
.process-table th {
    text-align: left; color: var(--gray); font-weight: 500; padding: 16px 20px;
    background: var(--bg-card); text-transform: uppercase; font-size: 11px; letter-spacing: 0.08em;
}
.process-table td { padding: 16px 20px; border-top: var(--border-light); color: var(--text); font-family: var(--sans); }
.process-table td:first-child { font-family: var(--mono); color: var(--cyan); font-weight: 500; }
.process-table tr:hover td { background: var(--bg-card); }
.vector-list { margin: 20px 0; display: grid; gap: 16px; }
.vector-item { padding: 24px; display: grid; grid-template-columns: 120px 1fr; gap: 20px; transition: border-color 0.2s, background 0.2s; }
.vector-item:hover { border-color: rgba(167, 139, 250, 0.3); background: rgba(255, 255, 255, 0.03); }
.vector-id { color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; padding-top: 4px; }
.vector-content h3 { color: var(--white); font-size: 15px; margin-bottom: 8px; font-weight: 600; }
.vector-content p { font-size: 14px; }
.form-section { padding: 32px; margin: 24px 0; }
.form-grid { display: grid; gap: 20px; max-width: 500px; }
.form-field label {
    display: block; color: var(--gray); font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: 8px; font-weight: 500;
}
.form-field input, .form-field textarea {
    width: 100%; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm); color: var(--white); padding: 14px 16px;
    font-family: var(--mono); font-size: 14px; transition: border-color 0.15s;
}
.form-field input:focus, .form-field textarea:focus {
    outline: none; border-color: var(--cyan); background: rgba(255, 255, 255, 0.05);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--gray); opacity: 0.5; }
.form-field textarea { min-height: 100px; resize: vertical; }
.btn-submit {
    background: linear-gradient(135deg, var(--green-dim), var(--green)); border: none;
    color: var(--bg); padding: 14px 32px; font-family: var(--mono); font-size: 13px;
    font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: 0.08em;
    border-radius: var(--radius-sm); transition: opacity 0.15s;
}
.btn-submit:hover { opacity: 0.9; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.gpu-panel { padding: 28px; margin: 32px 0; }
.gpu-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.gpu-title { color: var(--white); font-weight: 600; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.gpu-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gpu-stat { text-align: center; padding: 20px; background: var(--bg-card); border-radius: var(--radius-sm); border: var(--border-light); }
.gpu-stat-value { font-size: 18px; color: var(--green-bright); font-weight: 600; text-shadow: var(--glow); }
.gpu-stat-label { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.05em; }
.terminal-footer {
    margin-top: 80px; padding: 32px 0; border-top: var(--border-subtle);
    color: var(--gray); font-size: 12px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--gray); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--white); }
.btn-submit:focus, .footer-links a:focus, .modal-close:focus, .modal-body a:focus, .skip-link:focus {
    outline: 2px solid var(--cyan); outline-offset: 2px;
}
.form-field input:focus-visible, .form-field textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.form-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; pointer-events: none; }
.toast {
    position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--gray-darker); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm); color: var(--white); padding: 16px 28px;
    font-size: 14px; font-family: var(--mono); z-index: 10000; opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.4s ease-out, transform 0.4s ease-out; will-change: opacity, transform; }
.reveal.visible { opacity: 1; transform: none; will-change: auto; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 9000;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-terminal {
    background: var(--bg); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius);
    width: 100%; max-width: 600px; max-height: 80vh; display: flex; flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); transform: scale(0.95); transition: transform 0.2s;
}
.modal-overlay.open .modal-terminal { transform: scale(1); }
.modal-header {
    display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
    background: rgba(12, 12, 14, 0.95); border-bottom: var(--border-subtle);
    border-radius: var(--radius) var(--radius) 0 0;
}
.modal-close {
    background: transparent; border: none; color: var(--gray); font-size: 18px;
    cursor: pointer; padding: 4px 8px; line-height: 1; transition: color 0.15s;
}
.modal-close:hover { color: var(--white); }
.modal-body { padding: 24px; overflow-y: auto; font-size: 13px; }
.modal-section { margin-bottom: 24px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section h3 { color: var(--cyan); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; font-weight: 500; }
.modal-section p { margin-bottom: 8px; }
.modal-section p:last-child { margin-bottom: 0; }
.modal-row { display: grid; grid-template-columns: 130px 1fr; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.modal-row dt { color: var(--text-muted); }
.modal-row dd { color: var(--text); font-family: var(--sans); }
@media (max-width: 768px) {
    .ascii-header { font-size: 5px; }
    .ssh-header { flex-direction: column; gap: 12px; text-align: center; padding: 16px; }
    .ssh-header-left, .ssh-header-right { width: 100%; justify-content: center; }
    .terminal-body { padding: 24px 16px; }
    .system-info-grid, .gpu-stats, .service-grid { grid-template-columns: 1fr; }
    .vector-item { grid-template-columns: 1fr; gap: 12px; }
    .process-table { font-size: 12px; }
    .process-table th, .process-table td { padding: 12px 10px; }
    .prompt { margin-top: 32px; }
    .modal-terminal { max-height: 90vh; }
    .modal-row { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
/* Utility classes to avoid inline styles (CSP compliance) */
.mb-16 { margin-bottom: 16px; }
.fs-16 { font-size: 16px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.text-gray { color: var(--gray); }
.text-gray-dark { color: var(--gray-dark); }
.text-green { color: var(--green); }
.text-cyan { color: var(--cyan); }
.text-muted { color: var(--text-muted); }
.font-sans { font-family: var(--sans); }
.form-description { margin-bottom: 16px; color: var(--text-muted); font-size: 13px; font-family: var(--sans); }
