/* ---------- Fonts ---------- */
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        url(assets/fonts/inter-latin-400-normal-C38fXH4l.woff2) format("woff2"),
        url(assets/fonts/inter-latin-400-normal-CyCys3Eg.woff) format("woff");
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src:
        url(assets/fonts/inter-latin-500-normal-Cerq10X2.woff2) format("woff2"),
        url(assets/fonts/inter-latin-500-normal-BL9OpVg8.woff) format("woff");
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src:
        url(assets/fonts/inter-latin-700-normal-Yt3aPRUw.woff2) format("woff2"),
        url(assets/fonts/inter-latin-700-normal-BLAVimhd.woff) format("woff");
}

/* ---------- Theme tokens ---------- */
:root {
    --bg: #ffffff;
    --fg: #2a2a2a;
    --fg-strong: #000000;
    --muted: #888888;
    --ascii: rgba(0, 0, 0, 0.6);
    --card-bg: rgba(255, 255, 255, 0.4);
    --card-border: rgba(0, 0, 0, 0.08);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e0e0e;
        --fg: #d6d6d6;
        --fg-strong: #ffffff;
        --muted: #777777;
        --ascii: rgba(255, 255, 255, 0.7);
        --card-bg: rgba(20, 20, 20, 0.4);
        --card-border: rgba(255, 255, 255, 0.08);
    }
}

/* ---------- Reset & base ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    background: var(--bg);
    color: var(--fg);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}
a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
a:hover {
    color: var(--fg-strong);
}

/* ---------- ASCII background pane ---------- */
.ascii-pane {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.ascii-pane pre {
    margin: 0;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 9px;
    line-height: 9px;
    letter-spacing: 0;
    color: var(--ascii);
    white-space: pre;
    user-select: none;
}

/* ---------- Page layout ---------- */
.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}
.container {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 22px 24px 18px;
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    position: relative;
}

/* ---------- Time row ---------- */
.time {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

/* ---------- Name ---------- */
.name {
    font-size: 15px;
    line-height: 15px;
    font-weight: 700;
    color: var(--fg-strong);
    margin-bottom: 14px;
}

/* ---------- Content block ---------- */
.block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.text {
    font-size: 13px;
    line-height: 18.2px;
    font-weight: 500;
    color: var(--fg);
}

/* ---------- Writings sub-list ---------- */
.writings {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0 2px;
}
.writings .text {
    line-height: 18px;
}

/* ---------- Social nav ---------- */
.social-links {
    display: flex;
    gap: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.social-links .link {
    font-size: 13px;
    font-weight: 500;
}

/* ---------- Footer ---------- */
.footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--card-border);
    font-size: 11px;
    color: var(--muted);
}

/* ---------- Animation picker tabs ---------- */
.anim-tabs {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 2px;
    padding: 4px;
    max-width: calc(100vw - 32px);
    overflow-x: auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    scrollbar-width: none;
}
.anim-tabs::-webkit-scrollbar {
    display: none;
}
.anim-tabs button {
    background: transparent;
    border: 0;
    color: var(--fg);
    padding: 5px 11px;
    border-radius: 999px;
    cursor: pointer;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: background 0.12s ease;
}
.anim-tabs button:hover {
    background: rgba(127, 127, 127, 0.15);
}
.anim-tabs button.active {
    background: var(--fg-strong);
    color: var(--bg);
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    .page {
        /* No tab bar on mobile, so trim bottom padding to just the safe area. */
        padding: 16px 12px calc(16px + env(safe-area-inset-bottom)) 12px;
    }
    .container {
        padding: 20px 20px 18px;
        border-radius: 20px;
        backdrop-filter: blur(6px) saturate(140%);
        -webkit-backdrop-filter: blur(6px) saturate(140%);
    }
    .name {
        font-size: 16px;
        line-height: 16px;
    }
    .text {
        font-size: 14px;
        line-height: 20px;
    }
    .social-links {
        gap: 18px;
        margin-top: 18px;
    }
    .social-links .link {
        font-size: 14px;
        padding: 4px 0;
    }
    .ascii-pane pre {
        font-size: 9px;
        line-height: 9px;
    }
    /* Hide the animation picker on phones — pick is random on load. */
    .anim-tabs {
        display: none;
    }
}

/* Slightly less aggressive blur on very small screens — backdrop-filter
   is expensive on lower-end mobile GPUs. */
@media (max-width: 360px) {
    .container {
        backdrop-filter: blur(4px) saturate(130%);
        -webkit-backdrop-filter: blur(4px) saturate(130%);
    }
}

/* Honor reduced-motion preference: pause the ASCII animation. */
@media (prefers-reduced-motion: reduce) {
    .ascii-pane {
        display: none;
    }
}
