/* rodesia.org "Card" theme: a visiting card. Plain CSS, no build. */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("fonts/source-serif-4-latin-ext-opsz-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --bg: #f6f5f2;
    --glow-1: rgb(52 194 111 / 0.13);
    --glow-2: rgb(20 160 170 / 0.10);
    --text: #16161d;
    --muted: #5f6170;
    --faint: #8b8d99;
    --card: rgb(255 255 255 / 0.78);
    --card-border: rgb(22 22 29 / 0.08);
    --card-hover-border: rgb(26 127 75 / 0.38);
    --shadow: 0 1px 2px rgb(22 22 29 / 0.04), 0 8px 24px -12px rgb(22 22 29 / 0.12);
    --shadow-hover: 0 2px 4px rgb(22 22 29 / 0.05), 0 22px 40px -18px rgb(26 127 75 / 0.32);
    --accent: #1a7f4b;
    --accent-2: #0e7490;
    --cursor: #34c26f;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --tile: #ffffff;
    --serif: "Source Serif 4", Georgia, serif;
    --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: light;
}

:root.dark {
    --bg: #0d0e13;
    --glow-1: rgb(52 194 111 / 0.16);
    --glow-2: rgb(20 160 170 / 0.13);
    --text: #ececf1;
    --muted: #a3a5b3;
    --faint: #75778a;
    --card: rgb(24 25 33 / 0.72);
    --card-border: rgb(255 255 255 / 0.08);
    --card-hover-border: rgb(94 224 138 / 0.42);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px -14px rgb(0 0 0 / 0.6);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / 0.3), 0 24px 48px -20px rgb(52 194 111 / 0.35);
    --accent: #5ee08a;
    --accent-2: #5eead4;
    --tile: #f4f4f7;
    color-scheme: dark;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(42rem 28rem at 15% -8%, var(--glow-1), transparent 70%),
        radial-gradient(36rem 26rem at 95% 8%, var(--glow-2), transparent 70%);
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* --- The top bar: the site's name, the dark/light toggle ---------------- */

.top-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 48rem;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1.25rem;
}
/* The logo: the r_ mark and the name with a softly fading cursor. */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text);
    text-decoration: none;
}
.brand-mark {
    width: 2rem;
    height: 2rem;
    flex: none;
    border-radius: 0.45rem;
    box-shadow: 0 0 0 1px var(--card-border);
}
.brand-name {
    font-family: var(--mono);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.brand-cursor {
    display: inline-block;
    width: 0.62em;
    height: 0.13em;
    margin-left: 0.12em;
    border-radius: 1px;
    background: var(--cursor);
    vertical-align: baseline;
    animation: cursor-fade 2.4s ease-in-out infinite;
}
@keyframes cursor-fade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.18; }
}
.brand:hover .brand-name {
    color: var(--accent);
}

.mode-toggle {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.mode-toggle:hover {
    color: var(--text);
    border-color: var(--card-hover-border);
}
.mode-toggle svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mode-toggle .icon-sun,
.dark .mode-toggle .icon-moon {
    display: none;
}
.dark .mode-toggle .icon-sun {
    display: block;
}

/* --- The page --------------------------------------------------------------- */

.card-page {
    flex: 1;
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    padding: clamp(2.5rem, 11vh, 6.5rem) 1.25rem 3rem;
}

.hero {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: rise 0.6s ease both;
}


.name {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2.4rem, 7vw, 3.4rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.tagline {
    margin: 0.75rem auto 0;
    max-width: 30rem;
    color: var(--muted);
    font-size: 1.15rem;
}

.hero-small .name {
    font-size: clamp(1.9rem, 5vw, 2.5rem);
}

.error-code {
    margin: 0 0 0.5rem;
    font-family: var(--serif);
    font-size: 4rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- The page content: intro, projects, social -------------------------- */

.card-content {
    display: grid;
    gap: 0;
    animation: rise 0.6s ease both;
}

/* The opening statement: the intro, large, as the page's headline. */
.intro {
    margin: 0 0 3.5rem;
    font-family: var(--serif);
    font-size: clamp(1.9rem, 5vw, 2.85rem);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: var(--text);
}
.intro p {
    margin: 0;
}
.intro strong {
    font-weight: 600;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.card-content > p {
    color: var(--muted);
    margin: 0 0 1.5rem;
}

.section-label,
.card-content > h2 {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0 0 1.1rem;
    color: var(--faint);
    font-family: var(--sans);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.section-label::after,
.card-content > h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--card-border);
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
    margin-bottom: 2.75rem;
}

.project {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 1.25rem;
    padding-top: 5.25rem;
    border: 1px solid var(--card-border);
    border-radius: 1.25rem;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.project:hover,
.project:focus-within {
    transform: translateY(-3px);
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-hover);
}

/* The product's icon, in a tile (the class `.project-<name>`). */
.project::before {
    content: "";
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.8rem;
    background: var(--tile) center / 62% no-repeat;
    border: 1px solid var(--card-border);
    box-shadow: 0 6px 14px -8px rgb(22 22 29 / 0.35);
}
.project-foliopress::before {
    background-image: url("icons/foliopress.svg");
    background-size: 70%;
}
.project-pickadate::before {
    background-image: url("icons/pickadate.svg");
}

.project h3 {
    margin: 0 0 0.4rem;
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.project h3 a {
    color: var(--text);
    text-decoration: none;
}
/* The whole card is its heading's link. */
.project h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}
.project h3 a:focus-visible {
    outline: none;
}
.project:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.project p {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.6;
}
.project p:last-child {
    margin: auto 0 0;
}

.project-url {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 600;
}
.project-url::after {
    content: "↗";
    transition: transform 0.2s ease;
}
.project:hover .project-url::after {
    transform: translate(2px, -2px);
}

.social {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.social p {
    margin: 0;
}
.x-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.25rem 0.7rem 1.05rem;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.x-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
/* X's logo, drawn with a mask so it follows the text colour. */
.x-link::before {
    content: "";
    width: 1rem;
    height: 1rem;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Plain pages (anything but the card). */
.prose {
    max-width: 38rem;
    margin: 0 auto;
}
.prose h2,
.prose h3 {
    font-family: var(--serif);
}
.post-list {
    max-width: 38rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}
.post-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--card-border);
}

.site-footer {
    padding: 2rem 1.25rem 2.5rem;
    color: var(--faint);
    font-size: 0.85rem;
    text-align: center;
}
.site-footer p {
    margin: 0;
}
.site-footer a {
    color: inherit;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
