/* minimal, left-justified, white. */

@font-face {
    font-family: "Remark";
    src: url("fonts/LTRemark-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: "Remark";
    src: url("fonts/LTRemark-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: "Remark";
    src: url("fonts/LTRemark-Italic.otf") format("opentype");
    font-weight: 400;
    font-style: italic;
}

* { box-sizing: border-box; }

:root {
    --ink: #111;
    --muted: #666;
    --line: #e5e5e5;
    --w: 700px;
    --side: clamp(24px, 6vw, 64px);
}

html, body {
    margin: 0;
    height: 100%;
    background: #fff;
    color: var(--ink);
}

body {
    font-family: "Remark", system-ui, -apple-system, sans-serif;
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    display: flex;
    justify-content: flex-start;
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 3px;
    transition: text-decoration-color .15s ease;
}
a:hover { text-decoration-color: var(--ink); }
a:visited { color: var(--ink); }

.page {
    width: min(calc(100% - 96px), var(--w));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: var(--side);
    padding: 72px 0 40px;
    text-align: left;
}

.content { flex: 1 0 auto; }

/* ── top row: heading on the left ── */
.top-row {
    margin-bottom: 40px;
}
.intro-block { min-width: 0; }

/* ── home ── */
.name {
    margin: 0 0 20px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.bio {
    max-width: 56ch;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
}
.bio li {
    margin: 0 0 6px;
}
.bio li::before {
    content: "- ";
}

/* ── ascii swimmer ── */
.ascii-swim {
    margin-top: 8px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.ascii-swim canvas {
    display: block;
    width: 100%;
}

/* ── tab nav (shared across pages, pinned to the right wall) ── */
nav.tabs {
    position: fixed;
    top: 40px;
    right: var(--side);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95rem;
}
nav.tabs.align-with-bio { top: 113px; }
nav.tabs a { text-decoration: none; }
nav.tabs a:hover { text-decoration: underline; text-decoration-color: var(--ink); }
nav.tabs a.is-current { font-weight: 700; }

/* ── page title (projects / reading) ── */
h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

/* ── projects ── */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.project {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}
.project:last-child { border-bottom: none; padding-bottom: 0; }

.project h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 700;
}
.project h2 a { text-decoration: none; }
.project h2 a:hover { text-decoration: underline; text-decoration-color: var(--ink); }

.project p {
    margin: 0;
    color: var(--muted);
}

/* ── reading ── */
.reading-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.reading-item {
    display: flex;
    flex-direction: column;
}
.reading-item .title { font-weight: 700; }
.reading-item .by { color: var(--muted); font-size: 0.95rem; }
.reading-item .desc { margin: 6px 0 0; max-width: 56ch; color: var(--muted); }

/* ── footer (contact) ── */
footer {
    flex-shrink: 0;
    margin-top: 64px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
}
footer .contact-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .page { width: calc(100% - 32px); padding: 48px 0 32px; }
    nav.tabs {
        position: static;
        margin-bottom: 40px;
    }
    nav.tabs.align-with-bio { top: auto; }
}
