/* tanaki design system — teenage engineering × japan × sweden × derp */

@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap');

:root {
    --bg: #e6e4df;
    --panel: #f5f3ef;
    --ink: #161616;
    --muted: #8a8a84;
    --orange: #ff4b00;
    --blue: #0044ff;
    --mono: 'Comic Sans MS', 'Comic Neue', 'Chalkboard SE', cursive, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    font-family: var(--mono);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding: 1.5rem;
}

.container {
    max-width: 920px;
    margin: 0 auto;
    border: 1px solid var(--ink);
    background: var(--panel);
}

/* ---- micro label ---- */
.label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

/* ---- header bar ---- */
.masthead {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--ink);
}

.masthead-cell {
    padding: 0.75rem 1rem;
    border-right: 1px solid var(--ink);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.masthead-cell:last-child {
    border-right: none;
    margin-left: auto;
    text-align: right;
}

.masthead-logo img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    display: block;
}

.masthead-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

.masthead-title .jp {
    color: var(--muted);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.2em;
    display: block;
}

/* ---- nav ---- */
.nav {
    display: flex;
    border-bottom: 1px solid var(--ink);
    align-items: stretch;
}

.nav a {
    padding: 0.5rem 1.25rem;
    border-right: 1px solid var(--ink);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink);
    text-decoration: none;
}

.nav a:hover {
    background: var(--ink);
    color: var(--panel);
}

.nav a.active {
    background: var(--orange);
    color: #fff;
}

.nav .nav-social {
    margin-left: auto;
    display: flex;
    align-items: stretch;
    border-left: 1px solid var(--ink);
}

.nav .nav-social a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-right: none;
    border-left: 1px solid var(--ink);
}

.nav .nav-social a:first-child {
    border-left: none;
}

.nav .nav-social svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    display: block;
}

/* ---- body sections ---- */
.section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--ink);
}

.section:last-child {
    border-bottom: none;
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--orange);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--orange);
}

/* ---- posts / log ---- */
.post {
    padding: 1.5rem;
    border-bottom: 1px solid var(--ink);
    scroll-margin-top: 2rem;
}

.post:last-child {
    border-bottom: none;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.post-meta .timestamp {
    color: var(--orange);
}

.post-meta .permalink {
    margin-left: auto;
    text-decoration: none;
    color: var(--muted);
}

.post-meta .permalink:hover {
    color: var(--orange);
}

.post-content p {
    margin-bottom: 1rem;
    max-width: 62ch;
}

.post-content p:last-child {
    margin-bottom: 0;
}

/* ---- changelog ---- */
.commit {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--ink);
}

.commit:last-child {
    border-bottom: none;
}

.commit-meta {
    display: flex;
    gap: 1.25rem;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.commit-meta .hash {
    color: var(--orange);
}

.commit-message {
    font-size: 13px;
}

/* ---- footer ---- */
.footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.footer a {
    color: var(--muted);
    text-decoration: none;
}

.footer a:hover {
    color: var(--orange);
}

.footer .lingon img {
    width: 18px;
    height: 18px;
    display: block;
    transition: transform 0.3s ease;
}

.footer .lingon:hover img {
    transform: rotate(180deg);
}

.footer .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
    display: inline-block;
}

.footer .right {
    margin-left: auto;
}

@media (max-width: 640px) {
    body {
        padding: 0.75rem;
    }

    .nav a {
        padding: 0.5rem 0.8rem;
    }

    .masthead-cell.masthead-clock {
        display: none;
    }
}
