
:root {
    --ground: #262220;
    --surface: #332D29;
    --surface-2: #433B36;
    --line: #5A4E47;
    --ink-soft: #D9CEC5;
    --ink: #F7F3EE;

    --accent: #D97746;
    --accent-ink: #191412;

    --lohe-258: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
    --lohe-89c: "Bitter", "Bitter Fallback", Georgia, serif;
    --lohe-ed6: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --lohe-738: 78rem;
    --lohe-738-narrow: 54rem;
    --lohe-f0e: clamp(1.25rem, 4vw, 3rem);

    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
    --text-sm: clamp(0.84rem, 0.8rem + 0.2vw, 0.9375rem);
    --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    --text-md: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
    --text-lg: clamp(1.28rem, 1.18rem + 0.5vw, 1.5rem);
    --text-xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
    --text-2xl: clamp(1.85rem, 1.6rem + 1.25vw, 2.375rem);
    --text-3xl: clamp(2.2rem, 1.85rem + 1.75vw, 3.125rem);
    --text-display: clamp(2.6rem, 2.1rem + 2.5vw, 4.25rem);

    --lh-tight: 1.15;
    --lh-snug: 1.25;
    --lh-reading: 1.6;
    --lh-loose: 1.75;

    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.04em;
    --tracking-caps: 0.08em;

    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-subtle: cubic-bezier(0.25, 1, 0.5, 1);

    --dur-fast: 140ms;
    --dur-base: 220ms;
    --dur-deliberate: 360ms;

    --frame-width: 8px;
    --dock-height: 64px;
    --top-strip-height: 6px;
}

@media (min-width: 1024px) {
    :root {
        --frame-width: 12px;
    }

}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;

    padding: 0;
}

html {
    font-size: 100%;
    background-color: var(--ground);
    color: var(--ink);
    font-family: var(--lohe-89c);
    line-height: var(--lh-reading);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--top-strip-height) + 1.5rem);
}

body {
    min-height: 100vh;
    background-color: var(--ground);
    color: var(--ink);
    overflow-x: hidden;
    padding-bottom: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
    }
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
optgroup,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: transparent;
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--lohe-258);
    font-weight: 600;
    line-height: var(--lh-tight);
    color: var(--ink);
    letter-spacing: var(--tracking-tight);
    text-wrap: balance;
    overflow-wrap: break-word;
}

h1 {
    font-size: var(--text-display);
    margin-bottom: 1.25rem;
}

h2 {
    font-size: var(--text-2xl);
    margin-bottom: 1rem;
}

h3 {
    font-size: var(--text-xl);
    margin-bottom: 0.75rem;
}

h4 {
    font-size: var(--text-lg);
    margin-bottom: 0.5rem;
}

p {
    max-width: 65ch;
    margin-bottom: 1.25rem;
    color: var(--ink);
    font-weight: 400;
    overflow-wrap: break-word;
}

p.lede {
    font-size: var(--text-md);
    line-height: var(--lh-snug);
    color: var(--ink);
    font-weight: 400;
    max-width: 58ch;
}

p.caption {
    font-size: var(--text-sm);
    line-height: 1.45;
    color: var(--ink-soft);
    max-width: 54ch;
}

small {
    font-size: var(--text-xs);
    color: var(--ink-soft);
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin-block: 2.5rem;
}

blockquote {
    border-left: 2px solid var(--accent);
    padding-left: 1.5rem;
    margin-block: 2rem;
    font-style: italic;
    color: var(--ink);
}

strong,
b {
    font-weight: 600;
    color: var(--ink);
}

em {
    font-style: italic;
}

address {
    font-style: normal;
}

.num,
.tabular {
    font-family: var(--lohe-ed6);
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: -0.01em;
}

.shell {
    width: 100%;
    max-width: var(--lohe-738);
    margin-inline: auto;
    padding-inline: var(--lohe-f0e);
}

.shell-narrow {
    width: 100%;
    max-width: var(--lohe-738-narrow);
    margin-inline: auto;
    padding-inline: var(--lohe-f0e);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-180%);
    transition: transform var(--dur-fast) var(--ease-out);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.skip-link:focus-visible {
    transform: translateY(0);
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.icon {
    width: 1.25em;
    height: 1.25em;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
    flex-shrink: 0;
}

.site-frame {
    position: relative;
    min-height: 100vh;
    background-color: var(--ground);
    border-left: var(--frame-width) solid var(--surface-2);
    border-right: var(--frame-width) solid var(--surface-2);
}

.site-top-strip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-strip-height);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    z-index: 500;
}

.scroll-spine {
    position: fixed;
    top: var(--top-strip-height);
    right: 0;
    bottom: 0;
    width: var(--frame-width);
    background: transparent;
    z-index: 490;
    pointer-events: none;
}

.scroll-spine-fill {
    width: 100%;
    height: 0%;
    background: var(--accent);
    transition: height 60ms linear;
}

@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }

    ::view-transition-old(root) {
        animation: 260ms var(--ease-out) both vt-fade-out;
    }

    ::view-transition-new(root) {
        animation: 320ms var(--ease-out) both vt-fade-in;
    }

    ::view-transition-old(hero),
    ::view-transition-new(hero) {
        animation-duration: 420ms;
        animation-timing-function: var(--ease-out);
    }
}

@keyframes vt-fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes vt-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

::selection {
    background: var(--surface-2);
    color: var(--ink);
}
