/* Shared minimal terminal theme for / and /content/. */
:root {
    --bg: #1f2125;
    --fg: #dcdcdc;
    --dim: #9a9ea6;
    --rule: #3a3d44;
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
        monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: break-word;
}
h1,
h2,
h3,
p,
ul {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: normal;
}
ul {
    list-style: none;
}
img {
    display: block;
    max-width: 100%;
}
a {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 3px;
}
a:hover,
a:focus-visible {
    background: var(--fg);
    color: var(--bg);
}
.wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 16px;
}

/* header */
.site-header,
.site-footer {
    border-color: var(--rule);
    border-style: dashed;
    border-width: 0;
}
.site-header {
    border-bottom-width: 1px;
    padding: 12px 0;
}
.bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.brand {
    font-weight: bold;
    white-space: nowrap;
}
.brand a {
    text-decoration: none;
}
.brand a::before {
    content: "$ ";
    color: var(--dim);
}
.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}
.nav-list a::before,
.social a::before {
    content: "[ ";
}
.nav-list a::after,
.social a::after {
    content: " ]";
}
.nav-list a,
.social a {
    text-decoration: none;
}
a.active {
    font-weight: bold;
    text-decoration: none;
}
.site-header .nav-home {
    display: none;
}
@media (min-width: 768px) {
    .site-header .nav-home {
        display: list-item;
    }
}

/* sections */
.section {
    padding: 40px 0;
    border-bottom: 1px dashed var(--rule);
}
.section h1,
.section h2 {
    font-weight: bold;
    margin-bottom: 24px;
}
.section h2::before,
.section h1::before {
    content: "# ";
    color: var(--dim);
}
.hero h1 {
    margin-bottom: 8px;
}
.hero h1::before {
    content: none;
}
.name {
    font-weight: bold;
}
.subtitle,
.lead,
.meta {
    color: var(--dim);
}
.lead {
    margin-bottom: 16px;
}
.hero-row {
    display: flex;
    flex-direction: column-reverse;
    gap: 24px;
    margin-bottom: 40px;
}
.hero-text p {
    margin-bottom: 8px;
}
.profile {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border: 1px solid var(--rule);
}
@media (min-width: 768px) {
    .hero-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}
.connect h2 {
    font-weight: bold;
    margin-bottom: 16px;
}
.connect h2::before {
    content: "# ";
    color: var(--dim);
}
.connect-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}
.connect-list h3 {
    display: inline;
}

/* links styled as [ buttons ] */
.btn {
    text-decoration: none;
    display: inline-block;
}
.btn::before {
    content: "[ ";
}
.btn::after {
    content: " ]";
}

/* cards: no chrome, plain blocks */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 32px 24px;
}
.grid-books {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.card h2::before {
    content: none;
}
.card h3,
.card h2 {
    font-weight: bold;
    margin-bottom: 4px;
}
.card .meta {
    margin-bottom: 8px;
}
.card-body {
    padding-top: 8px;
}
.card .desc {
    margin-bottom: 8px;
}
.thumb {
    display: block;
}
.thumb img,
.cover img {
    width: 100%;
    border: 1px solid var(--rule);
}
.thumb img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.cover img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}
.card > a {
    text-decoration: none;
}
.card > a:hover {
    background: none;
    color: inherit;
}
.card > a:hover h3 {
    text-decoration: underline;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0 12px;
    margin-bottom: 8px;
    color: var(--dim);
}
.tag::before {
    content: "[";
}
.tag::after {
    content: "]";
}
.links {
    display: flex;
    gap: 16px;
}
.more {
    margin-top: 32px;
}

/* content page list */
.list {
    display: flex;
    flex-direction: column;
}
.item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px dashed var(--rule);
}
.item:first-child {
    border-top: 0;
    padding-top: 0;
}
.item .thumb {
    order: -1;
}
.item .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 0;
    min-width: 0;
}
.item .btn {
    margin-top: auto;
    align-self: flex-start;
}
@media (min-width: 768px) {
    .item {
        flex-direction: row;
        gap: 24px;
    }
    .item .thumb {
        order: 0;
        width: 280px;
        flex-shrink: 0;
    }
}

/* footer */
.site-footer {
    border-top-width: 1px;
    padding: 24px 0;
}
.footer-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}
.social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}
.copyright {
    color: var(--dim);
}
@media (min-width: 768px) {
    .footer-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
