@font-face {
    font-family: 'Departure Mono';
    src: url('fonts/DepartureMono-Regular.otf') format('opentype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --background: #090d09;
    --screen: #0b110c;
    --green: #a0ed82;
    --bright: #bbffa0;
    --text: #a8c59e;
    --muted: #799171;
    --line: #293b27;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 280px;
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 40%, #182517 0%, var(--background) 70%);
    color: var(--text);
    font-family: 'Departure Mono', monospace;
    font-size: 16.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::selection {
    color: var(--screen);
    background: var(--green);
    text-shadow: none;
}

.crt-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, #00000012 2px, #00000012 4px);
}

.desktop {
    width: min(100% - 96px, 1060px);
    min-height: 100svh;
    margin: 0 auto;
    padding: 48px 0 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.desktop-label,
.desktop-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
}

.desktop-label {
    margin-bottom: 14px;
}

.desktop-footer {
    margin-top: 19px;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.footer-symbol {
    font-size: 16.5px;
    color: var(--green);
}

.terminal {
    overflow: hidden;
    border: 1px solid #3d5435;
    border-radius: 8px;
    background: var(--screen);
    box-shadow: 0 28px 100px #00000066, 0 0 70px #78c74c06;
}

.titlebar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--line);
    background: #141d13;
    color: #91a589;
    font-size: 11px;
}

.window-lights {
    display: flex;
    gap: 7px;
}

.window-lights i {
    width: 9px;
    height: 9px;
    border: 1px solid #637656;
    border-radius: 50%;
}

.window-lights i:first-child {
    background: #637656;
}

.window-lights i:nth-child(2) {
    background: #3d4d34;
}

.connection {
    justify-self: end;
    color: var(--muted);
}

.connection > span {
    margin-right: 5px;
    color: var(--green);
    font-size: 10px;
}

.terminal-screen {
    padding: 28px 38px 32px;
    text-shadow: 0 0 10px #a0ed8215;
}

.boot-message {
    display: flex;
    flex-direction: column;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.command-line {
    display: flex;
    align-items: baseline;
    gap: 12px;
    color: var(--bright);
}

.prompt {
    flex: 0 0 auto;
    color: var(--green);
    white-space: nowrap;
}

.prompt-host {
    color: #81ba6b;
}

.prompt-path {
    color: var(--muted);
}

.about {
    margin: 27px 0 29px;
}

.brand {
    margin: 0 0 25px;
    container-type: inline-size;
    font-weight: normal;
}

.wordmark {
    --frame-padding: 20px;
    display: block;
    width: max-content;
    max-width: 100%;
    padding: 20px var(--frame-padding) 17px;
    border: 1px solid #5a7e48;
}

.ascii-art {
    display: block;
    color: var(--green);
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: min(12px, 1.55vw);
    font-size: min(12px, calc((100cqi - 2 * var(--frame-padding) - 2px) / 41));
    font-weight: normal;
    font-variant-ligatures: none;
    line-height: 1;
    letter-spacing: 0;
    white-space: pre;
    text-shadow: 0 0 8px #a0ed8215;
}

.tagline {
    display: block;
    margin-top: 13px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: 3px;
    text-align: center;
}

p {
    margin: 0;
}

.description {
    max-width: 77ch;
}

.description p + p {
    margin-top: 19px;
}

.contact {
    margin-top: 21px;
    color: var(--bright);
}

.contact > span {
    color: var(--muted);
}

.welcome-hint {
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 13px;
}

.highlight {
    color: var(--green);
}

.command-output:empty {
    display: none;
}

.command-entry {
    margin: 18px 0;
    overflow-wrap: anywhere;
}

.command-entry .command-line {
    flex-wrap: wrap;
    gap: 0 12px;
}

.response {
    margin-top: 5px;
    color: var(--text);
    white-space: pre-wrap;
}

.command-form {
    align-items: center;
    min-height: 36px;
    cursor: text;
}

.input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.command-input {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: var(--bright);
    font: inherit;
    line-height: 1.6;
    padding: 0;
    caret-color: var(--bright);
    text-shadow: inherit;
}

.command-input:placeholder-shown {
    caret-color: transparent;
}

.block-cursor {
    display: none;
    position: absolute;
    top: 0.3em;
    left: 0;
    width: 0.55em;
    height: 0.95em;
    background: var(--green);
    box-shadow: 0 0 9px #a0ed8226;
    pointer-events: none;
    animation: blink 1.2s step-end infinite;
}

.command-input:placeholder-shown + .block-cursor {
    display: block;
}

.command-form:focus-within .prompt {
    color: var(--bright);
}

.enter-button {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.enter-button:hover,
.enter-button:focus-visible {
    color: var(--bright);
    border-color: var(--green);
    outline: 1px solid var(--green);
    outline-offset: 3px;
}

.statusbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 20px;
    border-top: 1px solid var(--line);
    background: #111a10;
    color: var(--muted);
    font-size: 11px;
}

.status-dot {
    margin-right: 6px;
    color: var(--green);
    font-size: 9px;
}

.status-divider {
    margin: 0 9px;
    color: #526a49;
}

.mobile-hint {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@keyframes blink {
    50% { opacity: 0; }
}

@media (max-width: 640px) {
    .desktop {
        width: calc(100% - 28px);
        padding: 24px 0 20px;
    }

    .desktop-label {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .desktop-label > span:last-child {
        display: none;
    }

    .titlebar {
        padding: 12px 15px;
        grid-template-columns: auto 1fr;
        font-size: 11px;
    }

    .window-title {
        justify-self: end;
    }

    .connection {
        display: none;
    }

    .terminal-screen {
        padding: 23px 19px 25px;
    }

    .boot-message {
        font-size: 11px;
        margin-bottom: 22px;
    }

    .command-line {
        gap: 8px;
    }

    .initial-command {
        flex-wrap: wrap;
        gap: 0 8px;
    }

    .about {
        margin-top: 24px;
    }

    .wordmark {
        --frame-padding: 10px;
        padding-top: 15px;
        padding-bottom: 14px;
    }

    .tagline {
        letter-spacing: 2px;
    }

    .command-form .prompt-host {
        display: none;
    }

    .enter-button {
        flex-basis: 40px;
        height: 40px;
    }

    .statusbar {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 6px 12px;
    }

    .keyboard-hint {
        display: none;
    }

    .mobile-hint {
        display: inline;
    }

    .desktop-footer {
        margin-top: 14px;
        font-size: 11px;
        letter-spacing: 0.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
    }
}
