/* Shared by the homepage and the thoughts pages. */

:root {
    --bg: #fafaf9;
    --fg: #111;
    --muted: #6b6b6b;
    --line: #e4e4e2;
    --ease: cubic-bezier(.19, 1, .22, 1);
}
@media (prefers-color-scheme: dark) {
    :root { --bg: #0c0c0c; --fg: #ededed; --muted: #8a8a8a; --line: #262626; }
}

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

body {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--bg);
    color: var(--fg);
    font-family: "Inter Tight", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

/* ---------- }I{ logo ----------
   Spacing is in em, measured from JetBrains Mono 300 glyph ink so the
   I sits exactly midway between the braces (gap 0, I 80% of brace ink,
   serif 0.18em, stroke 0.05em). */
.logo {
    --m1: -0.0844em;  /* gap 0 - right side-bearing of } (0.6 - 0.5156) */
    --m2: -0.0781em;  /* gap 0 - left side-bearing of { */
    --h: 0.75em;      /* 80% of brace ink height (0.828 + 0.109) */
    --dy: 0.0156em;   /* h/2 - (0.828 - 0.109)/2: centers the I on the brace ink */
    display: inline-flex;
    align-items: baseline;
    font: 300 clamp(1.75rem, 6.5vw, 4.5rem)/1 "JetBrains Mono", ui-monospace, monospace;
    white-space: pre;
}
.logo .b1 { margin-right: var(--m1); }
.logo .b2 { margin-left: var(--m2); }
.logo .txt:not(:empty) { margin: 0 .1em 0 .2em; }
.logo .cur {
    display: inline-block;
    width: .18em;
    height: var(--h);
    transform: translateY(var(--dy));
    background:
        linear-gradient(currentColor, currentColor) center / .05em 100% no-repeat,
        linear-gradient(currentColor, currentColor) top / 100% .05em no-repeat,
        linear-gradient(currentColor, currentColor) bottom / 100% .05em no-repeat;
    animation: blink 1.05s steps(1) infinite;
    transition: opacity .4s ease, width .5s var(--ease) .3s;
}
.logo.typing .cur { animation: none; }
/* name fully written: the cursor fades out and closes its gap */
.logo.done .cur { animation: none; opacity: 0; width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; }
.top .ln { font: 400 11px "JetBrains Mono", monospace; letter-spacing: .04em; }
header .logo { font-size: 22px; color: inherit; text-decoration: none; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- footer + quiet links ---------- */
/* padding-right keeps the links clear of HubSpot's chat launcher (100x96 in the bottom-right corner) */
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; padding-right: 5.5rem; font: 400 11px "JetBrains Mono", monospace; letter-spacing: .04em; color: var(--muted); }
footer .more { display: flex; gap: 1.5rem; }

nav a, nav button, footer a, .ln {
    font: inherit;
    color: var(--muted);
    background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
    border: 0;
    padding: 0 0 2px;
    cursor: pointer;
    text-decoration: none;
    transition: color .3s, background-size .5s var(--ease);
}
nav a:hover, nav button:hover, footer a:hover, .ln:hover { color: var(--fg); background-size: 100% 1px; }

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