@font-face {
    font-family: "Fira Code";
    src: url("/fonts/fira-code.woff2") format("woff2");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Hanken Grotesk";
    src: url("/fonts/hanken-grotesk.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "VT323";
    src: url("/fonts/vt323.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --shell: #0f1115;
    --shell-2: #151923;
    --console: #f7f8fa;
    --console-2: #eef1f4;
    --ink: #17191d;
    --muted: #5d6470;
    --line: #cfd5dd;
    --line-strong: #8f98a6;
    --seal: #ad1216;
    --ansi-green: #00875f;
    --ansi-cyan: #0087af;
    --ansi-yellow: #b7791f;
    --ansi-red: #c01c28;
    --ansi-blue: #005fbd;
    --ansi-bright-black: #58616d;
    --green: #22c55e;
    --green-soft: #b5f2c9;
    --blue: #1557b8;
    --blue-bar: #1d4ed8;
    --amber: #d97706;
    --sidebar-width: 18rem;
    --bottom-bar-height: 2.75rem;
    --mono: "Fira Code", ui-monospace, "SFMono-Regular", Consolas, monospace;
    --console-mono: "VT323", Monaco, "Lucida Console", Consolas, monospace;
    --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    color-scheme: light;
    height: 100%;
}

body {
    margin: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    min-height: 100dvh;
    overflow: hidden;
    background: var(--console);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.95rem;
    line-height: 1.52;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

a:hover {
    color: #123e9e;
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 20;
    transform: translateY(-140%);
    background: var(--console);
    color: var(--ink);
    border: 2px solid var(--blue);
    padding: 0.5rem 0.75rem;
}

.skip-link:focus {
    transform: translateY(0);
}

.nav-toggle {
    display: none;
    place-items: center;
    gap: 0.22rem;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid #3a3f4a;
    background: var(--shell);
    color: #fff;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1.15rem;
    height: 2px;
    background: var(--green-soft);
}

.nav-scrim {
    display: none;
}

.nav-scrim[hidden] {
    display: none !important;
}

body.nav-open .site-sidebar {
    transform: translateX(0);
}

.site-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.site-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100%;
    overflow: auto;
    background: var(--shell);
    color: #f4f7fb;
    border-right: 1px solid #3a3f4a;
    padding: 1.35rem 1.15rem;
}

.sidebar-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--seal);
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
}

.sidebar-wordmark:hover {
    color: var(--seal);
}

.sidebar-wordmark img {
    width: 1.65rem;
    height: 1.65rem;
    transform: rotate(-6deg);
}

.sidebar-section {
    margin-top: 1.65rem;
    padding-top: 0.9rem;
    border-top: 1px dashed #717987;
}

.sidebar-title {
    margin: 0 0 0.7rem;
    color: var(--green-soft);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.sidebar-title::before {
    content: "> ";
    color: var(--green);
}

.nav-list,
.stat-list,
.link-list,
.project-list,
.note-list,
.action-list,
.inline-list,
.who-list,
.connection-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a,
.link-list a {
    display: block;
    color: #eef2f7;
    text-decoration: none;
    padding: 0.3rem 0.45rem;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
    background: var(--blue-bar);
    color: #fff;
}

.stat-list {
    display: grid;
    gap: 0.42rem;
    color: #dce3ed;
}

.stat-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.stat-list strong,
.terminal-info strong {
    color: var(--green-soft);
    font-weight: 600;
}

.terminal-info {
    margin: 0;
    color: var(--green-soft);
    white-space: pre-line;
}

.side-tagline {
    margin-top: 0.8rem;
    color: #dce3ed;
}

.sidebar-prompt {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    color: var(--green-soft);
    border-top: 1px solid #3a3f4a;
    margin-top: 1rem;
    padding-top: 1rem;
}

.cursor {
    display: inline-block;
    width: 0.55rem;
    height: 1rem;
    background: var(--green);
}

.site-main {
    background:
        linear-gradient(90deg, rgba(15, 17, 21, 0.055), transparent 2rem),
        var(--console);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.console-wrap {
    width: min(100%, 74rem);
    height: 100%;
    margin-inline: auto;
    padding: 0.55rem 1rem 0.45rem;
    display: block;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    font-family: var(--console-mono);
    font-size: 16px;
    line-height: 1.18;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: none;
}

.console-wrap * {
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    font-weight: inherit;
}

.masthead {
    display: none;
    align-items: center;
    justify-content: space-between;
    min-height: 3.25rem;
}

.brand-line {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.brand-wordmark {
    color: var(--seal);
    font-family: var(--sans);
    font-size: clamp(1.75rem, 4.2vw, 3.25rem);
    line-height: 0.96;
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
}

.brand-wordmark:hover {
    color: var(--seal);
}

.seal-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: help;
}

.seal-button img {
    width: clamp(2.25rem, 5vw, 3.15rem);
    height: clamp(2.25rem, 5vw, 3.15rem);
    transform: rotate(-7deg);
    filter: saturate(1.06) contrast(1.04);
}

.seal-reveal {
    position: absolute;
    left: calc(100% + 0.35rem);
    top: 50%;
    display: grid;
    gap: 0.1rem;
    min-width: max-content;
    opacity: 0;
    transform: translate(-0.4rem, -50%);
    pointer-events: none;
    transition:
        opacity 0.16s ease,
        transform 0.16s ease;
    color: var(--seal);
    border-left: 2px solid var(--seal);
    padding-left: 0.45rem;
    font-size: 0.72rem;
    line-height: 1.25;
    z-index: 4;
}

.seal-button:hover .seal-reveal,
.seal-button:focus .seal-reveal,
.seal-button:focus-visible .seal-reveal {
    opacity: 1;
    transform: translate(0, -50%);
}

.command-output {
    display: block;
    min-height: 0;
    overflow: visible;
    background: var(--console);
    border: 0;
    padding: 0.22rem 0.35rem 0.06rem;
}

.reconnect-log,
.command-block {
    border: 0;
    background: transparent;
}

.reconnect-log {
    margin: 0;
    padding: 0 0 0.32rem;
    color: var(--muted);
}

.reconnect-log p {
    margin: 0;
}

.command-block + .command-block::before {
    content: "- - - - - - - - - - - - - - - -";
    display: block;
    color: var(--ansi-bright-black);
    margin: 0.14rem 0 0.12rem;
}

.timestamp,
.prompt,
.ok {
    color: var(--ansi-green);
    font-weight: 600;
}

.command-echo {
    margin: 0.08rem 0;
    padding: 0;
    border-bottom: 0;
    color: var(--muted);
    background: transparent;
}

.block-body {
    padding: 0;
}

.block-body p {
    margin: 0 0 0.08rem;
}

.block-body p:last-child {
    margin-bottom: 0;
}

.lead-copy {
    max-width: 72ch;
}

.section-label {
    color: var(--ansi-green);
    font-weight: 700;
}

.blue-line {
    color: var(--ansi-blue);
    font-weight: 600;
}

.terminal-scene,
.terminal-file,
.terminal-log,
.terminal-connections,
.terminal-help,
.terminal-who,
.terminal-listing {
    display: block;
}

.terminal-scene,
.terminal-file,
.terminal-log {
    max-width: 78ch;
}

.terminal-command {
    margin: 0 0 0.08rem;
    color: var(--muted);
}

.term-command {
    color: var(--ansi-green);
    font-weight: 700;
}

.term-key {
    display: inline-block;
    min-width: 5.9rem;
    color: var(--ansi-green);
    font-weight: 800;
}

.term-hint,
.term-muted {
    color: var(--muted);
}

.term-heading {
    color: var(--ansi-green);
    font-weight: 700;
    margin-top: 0.1rem;
}

.term-heading span {
    color: var(--ink);
    font-weight: 600;
}

.terminal-section,
.terminal-log-entry {
    border-top: 0;
    padding-top: 0.06rem;
    margin-top: 0.06rem;
}

.terminal-row {
    display: block;
    align-items: baseline;
    border-top: 0;
    padding: 0;
}

.terminal-row-head {
    color: var(--muted);
    text-transform: uppercase;
}

.project-directory .terminal-row .term-muted {
    display: inline-block;
    width: 6.8rem;
}

.project-directory .terminal-row .status-label {
    display: inline-block;
    width: 7.2rem;
    text-align: left;
    font-weight: 400;
}

.project-directory .terminal-row .term-name {
    display: inline-block;
    width: 11rem;
}

.terminal-help .terminal-row .prompt {
    display: inline-block;
    width: 12rem;
}

.terminal-connections .connection-command {
    display: inline-block;
    width: 9.4rem;
}

.terminal-connections .terminal-row a {
    display: inline-block;
    width: 15rem;
}

.terminal-who .terminal-row > span:first-child {
    display: inline-block;
    width: 12rem;
}

.terminal-who .terminal-row a {
    display: inline-block;
    width: 16rem;
}

.terminal-who .terminal-row strong {
    display: inline-block;
    width: 6rem;
    text-align: left;
}

.term-name,
.connection-command {
    color: var(--ansi-blue);
    font-weight: 700;
}

.project-summary {
    color: var(--ink);
    font-weight: 600;
}

.console-section {
    border-top: 1px dashed var(--line);
    padding-top: 0.65rem;
    margin-top: 0.65rem;
}

.console-section h2 {
    margin: 0 0 0.4rem;
    color: var(--ansi-green);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.project-list {
    display: grid;
    gap: 0;
}

.project-list li,
.note-list li,
.action-list li,
.who-list li {
    border-bottom: 1px dashed var(--line);
    padding: 0.55rem 0;
}

.project-list li {
    display: grid;
    grid-template-columns: minmax(10rem, 0.45fr) minmax(0, 1fr) 5.5rem;
    gap: 1rem;
    align-items: baseline;
}

.project-name {
    color: var(--blue);
    font-weight: 700;
}

.status-online,
.status-develop,
.status-maint,
.status-design,
.status-archive {
    text-align: left;
}

.status-online {
    color: var(--ansi-green);
}

.status-develop {
    color: var(--ansi-cyan);
}

.status-maint,
.status-design {
    color: var(--ansi-yellow);
}

.status-archive {
    color: var(--ansi-bright-black);
}

.terminal-file [class^="status-"],
.terminal-who [class^="status-"] {
    font-weight: 700;
}

.inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.inline-list li {
    border: 1px solid var(--line);
    padding: 0.2rem 0.45rem;
    background: #fff;
}

.note-list li:first-child,
.action-list li:first-child {
    padding-top: 0;
}

.note-meta {
    color: var(--muted);
}

.note-meta strong {
    color: var(--ink);
    font-weight: 700;
}

.tweet-drawer {
    margin: 0.22rem 0 0.45rem 5.9rem;
    padding: 0.34rem 0 0.34rem 0.7rem;
    border-left: 1px dashed var(--line-strong);
    max-width: 36rem;
}

.tweet-drawer[hidden] {
    display: none;
}

.tweet-drawer .twitter-tweet {
    margin: 0 !important;
}

.command-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 1rem;
}

.command-list div {
    display: grid;
    grid-template-columns: 10.5rem 1fr;
    gap: 1rem;
    border-bottom: 1px dashed var(--line);
    padding-bottom: 0.42rem;
}

.connection-list {
    display: grid;
    gap: 0;
}

.connection-list li {
    border-bottom: 1px dashed var(--line);
}

.connection-list a {
    display: grid;
    grid-template-columns: minmax(9rem, 0.35fr) minmax(12rem, 0.45fr) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.55rem 0;
    color: var(--ink);
    text-decoration: none;
}

.connection-list a:hover,
.connection-list a:focus-visible {
    color: var(--ink);
    background: linear-gradient(90deg, rgba(173, 18, 22, 0.08), transparent);
}

.connection-command {
    color: var(--ansi-green);
    font-weight: 700;
}

.connection-list strong {
    color: var(--blue);
    font-weight: 600;
}

.connection-list span:last-child {
    color: var(--muted);
}

.who-list li {
    display: grid;
    grid-template-columns: 12rem 1fr 6rem;
    gap: 1rem;
    align-items: baseline;
}

.command-form {
    display: grid;
    gap: 0;
    margin-top: 0;
    background: var(--console);
    border: 0;
    border-top: 0;
    padding: 0.03rem 0.35rem 0.02rem;
}

.command-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.command-input-row {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    border: 0;
    background: transparent;
    padding: 0;
}

.command-input-row .command-prompt {
    color: var(--ansi-green);
    font-weight: 700;
    white-space: nowrap;
}

.command-input-row .command-prompt::after {
    content: " >";
    color: var(--ansi-green);
    font-weight: 700;
}

.command-cursor {
    display: inline-block;
    width: 0.24rem;
    height: 1.1rem;
    background: var(--ansi-green);
    animation: blink 1s steps(1, end) infinite;
    opacity: 0.95;
    transform: translateY(0.06rem);
}

.command-form:focus-within .command-cursor {
    display: none;
}

.command-input-row input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    outline: 0;
    margin: 0;
}

.command-submit {
    position: absolute;
    width: 1px;
    height: 1px;
    border: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    background: transparent;
    color: inherit;
    font: inherit;
}

.command-submit:hover {
    color: var(--ansi-blue);
}

.bottom-bar {
    display: grid;
    place-items: center;
    min-height: 2.05rem;
    background: var(--shell);
    color: #f3f6fb;
    border-top: 1px solid #3a3f4a;
    padding: 0.08rem 0.8rem;
    font-size: 0.62rem;
    line-height: 1.1;
    text-align: center;
}

.bottom-bar p {
    margin: 0;
}

.bottom-state {
    color: var(--green-soft);
}

.heart {
    color: var(--seal);
    font-weight: 700;
}

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

    51%,
    100% {
        opacity: 0;
    }
}

@media (max-width: 58rem) {
    body.nav-open {
        overflow: hidden;
    }

    .nav-toggle {
        position: fixed;
        z-index: 31;
        top: 0.8rem;
        left: 0.8rem;
        display: inline-grid;
    }

    .nav-scrim {
        position: fixed;
        inset: 0;
        z-index: 29;
        display: block;
        background: rgba(15, 17, 21, 0.46);
    }

    .site-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-sidebar {
        position: fixed;
        z-index: 30;
        inset: 0 auto 0 0;
        width: min(86vw, var(--sidebar-width));
        height: 100dvh;
        padding-top: 5rem;
        transform: translateX(-105%);
        transition: transform 0.18s ease;
    }

    .console-wrap {
        width: 100%;
        padding: 4.5rem 0.85rem 0.85rem;
    }

    .masthead {
        display: flex;
    }

    .project-list li,
    .who-list li,
    .connection-list a {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .project-directory .terminal-row .term-muted,
        .project-directory .terminal-row .status-label,
        .project-directory .terminal-row .term-name,
    .terminal-help .terminal-row .prompt,
    .terminal-connections .connection-command,
    .terminal-connections .terminal-row a,
    .terminal-who .terminal-row > span:first-child,
    .terminal-who .terminal-row a,
    .terminal-who .terminal-row strong {
        display: block;
        width: auto;
    }

        .status-online,
        .status-develop,
        .status-maint,
        .status-design,
        .status-archive {
            text-align: left;
        }
}

@media (max-width: 34rem) {
    body {
        font-size: 0.86rem;
    }

    .reconnect-log {
        padding: 0.4rem 0.55rem;
        font-size: inherit;
        line-height: inherit;
    }

    .reconnect-log p {
        margin: 0;
    }

    .command-list {
        grid-template-columns: 1fr;
    }

    .command-list div {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .seal-reveal {
        left: auto;
        right: 0;
        top: calc(100% + 0.3rem);
        transform: translateY(-0.25rem);
        border-left: 0;
        border-top: 2px solid var(--seal);
        padding: 0.25rem 0 0;
        text-align: right;
    }

    .seal-button:hover .seal-reveal,
    .seal-button:focus .seal-reveal,
    .seal-button:focus-visible .seal-reveal {
        transform: translateY(0);
    }
}
