@font-face {
    font-family: Geist;
    src: url("../fonts/geist.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Fira Code";
    src: url("../fonts/fira-code-400.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Fira Code";
    src: url("../fonts/fira-code-500.ttf") format("truetype");
    font-weight: 500;
    font-display: swap;
}

/* Tokens from portfolio-astro/src/styles/global.css. */
:root.has-light-text {
    --color-bg: #1c1e23;
    --color-surface: #30343a;
    --color-line: #60666b;
    /* Borders that identify a control: 3:1 on bg and surface (the decorative line is not). */
    --color-control: #80868b;
    --color-ink: #f4f1e7;
    --color-muted: #c5c8c6;
    --color-accent: #d99fff;
    --color-accent-2: #e0b6ff;
    --background-color: var(--brand-background, var(--color-bg));
    --color-darker-gray: var(--color-ink);
    --color-secondary-text: var(--color-muted);
    --color-border: var(--color-line);
    --color-dark-border: var(--color-accent);
    --color-light-gray: var(--color-surface);
    --color-mid-gray: var(--color-muted);
    --font-sans: Geist, ui-sans-serif, system-ui, sans-serif;
    --font-mono: "Fira Code", ui-monospace, monospace;
    --container-width: 1088px;
    --container-gap: 20px;
    --grid-gap: 20px;
    color-scheme: dark;
    scroll-padding-top: 80px;
}

.brand-site {
    --gh-font-body: var(--font-sans);
    --gh-font-heading: var(--font-sans);
}

.brand-site .gh-viewport {
    isolation: isolate;
    min-height: 100svh;
}

.brand-wrap {
    width: 100%;
    max-width: calc(var(--container-width) + 2 * var(--container-gap));
    margin-inline: auto;
    padding-inline: var(--container-gap);
}

.brand-site .gh-outer {
    padding-inline: var(--container-gap);
}

.brand-site .gh-outer .gh-outer {
    padding-inline: 0;
}

.brand-site a:hover {
    opacity: 1;
}

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

.brand-skip,
.brand-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.brand-site .brand-skip:focus {
    position: fixed;
    z-index: 50;
    inset: 12px auto auto max(20px, calc((100% - 1088px) / 2));
    width: auto;
    height: auto;
    clip-path: none;
}

.brand-aurora {
    position: fixed;
    z-index: -1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.brand-aurora i {
    position: absolute;
    inset: -45vmax auto auto -45vmax;
    width: 90vmax;
    height: 90vmax;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--blob), transparent);
}

/* The portfolio's blob colours: each one keeps AA text on its own. */
.brand-aurora i:nth-child(1) {
    --blob: rgb(43 38 47);
    transform: translate3d(8vw, 8vh, 0);
}

.brand-aurora i:nth-child(2) {
    --blob: rgb(41 42 45);
    transform: translate3d(95vw, 20vh, 0) scale(0.9);
    opacity: 0.9;
}

.brand-aurora i:nth-child(3) {
    --blob: rgb(48 43 36);
    transform: translate3d(75vw, 95vh, 0);
    opacity: 0.8;
}

.brand-aurora i:nth-child(4) {
    --blob: rgb(45 41 48);
    transform: translate3d(5vw, 100vh, 0) scale(0.9);
    opacity: 0.7;
}

@keyframes brand-drift {
    to { translate: 6vmax 4vmax; }
}

@media (prefers-reduced-motion: no-preference) {
    .brand-aurora i:nth-child(1) { animation: brand-drift 26s ease-in-out infinite alternate; }
    .brand-aurora i:nth-child(2) { animation: brand-drift 21s ease-in-out -6s infinite alternate-reverse; }
    .brand-aurora i:nth-child(3) { animation: brand-drift 32s ease-in-out -9s infinite alternate-reverse; }
    .brand-aurora i:nth-child(4) { animation: brand-drift 38s ease-in-out -4s infinite alternate; }
}

.brand-header {
    position: sticky;
    z-index: 30;
    top: 0;
    height: auto;
    border-bottom: 1px solid var(--color-line);
    background-color: var(--background-color);
    font-size: 1.4rem;
    font-weight: 400;
}

.brand-header-inner,
.brand-desktop-navigation,
.brand-header-tools,
.brand-members,
.brand-links,
.brand-links a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-header-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 64px auto;
    min-height: 64px;
    justify-content: space-between;
    gap: 0;
}

.brand-header .brand-wordmark {
    font: 500 1.8rem/1 var(--font-mono);
    color: var(--color-ink);
}

.brand-wordmark span,
.brand-primary a[aria-current="page"] {
    color: var(--color-accent);
}

.brand-desktop-navigation {
    display: none;
}

.brand-links {
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.brand-links a {
    min-height: 44px;
    gap: 6px;
}

.brand-header :is(.brand-links, .brand-members) a:not(.brand-button-primary),
.brand-footer a:not(.gh-button) {
    color: var(--color-muted);
}

.brand-header .brand-primary a[aria-current="page"]:not(.brand-button-primary),
.brand-header :is(.brand-links, .brand-members) a:not(.brand-button-primary):hover,
.brand-footer a:not(.gh-button):hover {
    color: var(--color-accent);
}

.brand-site :is(.brand-links, .brand-button, .brand-icon-button, .brand-card-arrow) svg {
    flex: none;
    width: 16px;
    height: 16px;
}

.brand-header-tools {
    margin-right: 52px;
}

.brand-header .gh-search,
.brand-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.brand-icon-button {
    position: absolute;
    top: 10px;
    right: var(--container-gap);
    cursor: pointer;
    border: 1px solid var(--color-control);
    list-style: none;
}

.brand-icon-button::-webkit-details-marker {
    display: none;
}

.brand-header .brand-icon-button svg {
    width: 20px;
    height: 20px;
}

.brand-mobile-menu {
    grid-column: 1 / -1;
}

.brand-menu-panel {
    width: min(28rem, 100%);
    max-height: calc(100svh - 80px);
    margin: 0 0 12px auto;
    padding: 12px;
    overflow: auto;
    border: 1px solid var(--color-line);
    border-radius: 18px;
    background: var(--color-surface);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.35);
}

.brand-menu-panel .brand-links {
    display: grid;
    gap: 4px;
}

.brand-menu-panel .brand-links a:not(.brand-button) {
    padding-inline: 12px;
}

.brand-menu-panel .brand-members {
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 12px;
    padding: 12px 0 0 12px;
    border-top: 1px solid var(--color-line);
}

.brand-members > a:not(.brand-button) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.brand-site .brand-button,
.brand-site .gh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--color-control);
    border-radius: 100px;
    color: var(--color-ink);
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.brand-site .brand-button:not(.brand-button-primary):not(.brand-skip),
.brand-site .gh-button-share {
    background: transparent;
}

.brand-site .brand-skip:focus {
    background: var(--color-surface);
}

.brand-site .brand-button:not(.brand-button-primary):hover,
.brand-site .gh-button-share:hover {
    border-color: var(--color-accent);
}

.brand-site .brand-button.brand-button-primary,
.brand-site .gh-button:not(.gh-button-share) {
    border-color: transparent;
    background: var(--color-accent);
    color: var(--color-bg);
}

.brand-site .brand-button-primary:hover,
.brand-site .gh-button:not(.gh-button-share):hover {
    background: color-mix(in srgb, var(--color-accent) 75%, #fff);
    opacity: 1;
}

.brand-home {
    padding-block: clamp(56px, 7vw, 106px) clamp(60px, 8vw, 112px);
}

.brand-heading,
.brand-site .gh-article-title {
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 1.05;
    text-wrap: balance;
}

.brand-heading {
    font-size: clamp(4.8rem, 7vw, 7.2rem);
}

.brand-heading::after,
.brand-site .gh-article-title::after {
    content: "";
    display: block;
    width: 1em;
    height: 2px;
    margin-top: 0.2em;
    background: linear-gradient(105deg, var(--color-accent), var(--color-accent-2));
}

.brand-site .gh-article-title > a {
    color: inherit;
}

.brand-intro > p,
.brand-error > p:not(.brand-eyebrow) {
    max-width: 53ch;
    margin-top: 16px;
    color: var(--color-muted);
    font-size: 1.8rem;
    line-height: 1.55;
    text-wrap: pretty;
}

.brand-eyebrow,
.brand-site .gh-container-title,
.brand-site .gh-featured-title,
.brand-site .gh-article-tag,
.brand-site .gh-card-tag {
    color: var(--color-accent);
    font: 500 1.2rem/1.4 var(--font-mono);
    letter-spacing: 0.105em;
    text-transform: uppercase;
}

.brand-home .gh-container {
    margin-top: clamp(38px, 5vw, 70px);
}

.brand-site .gh-container:not(.has-sidebar) .gh-container-inner {
    display: block;
    overflow: visible;
}

.brand-site .gh-container .gh-container-title {
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: 0;
}

.brand-site .gh-container.is-grid .gh-feed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
    gap: var(--grid-gap);
    overflow: visible;
}

.brand-site .gh-card::before,
.brand-site .gh-card::after {
    display: none;
}

.brand-site :is(.gh-container, .gh-featured) .gh-card-link {
    position: relative;
    height: 100%;
    padding: clamp(20px, 3vw, 32px);
    color: var(--color-ink);
    border: 1px solid var(--color-line);
    border-radius: 24px;
    background-color: color-mix(in srgb, var(--color-surface) 84%, transparent);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.brand-site .gh-card-link:hover,
.brand-site .gh-card-link:focus-visible {
    border-color: var(--color-accent);
    box-shadow: 0 0 30px color-mix(in srgb, var(--color-accent) 18%, transparent);
}

.brand-site .gh-card-title {
    padding-right: 28px;
    font-size: clamp(2.4rem, 3vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.035em;
}

.brand-site .gh-card-link:hover .gh-card-title {
    opacity: 1;
}

.brand-site .gh-card-excerpt,
.brand-site .gh-article-excerpt {
    max-width: 70ch;
    color: var(--color-muted);
    font-size: 1.6rem;
    line-height: 1.55;
    text-wrap: pretty;
}

.brand-site .gh-card-meta,
.brand-site .gh-article-meta-content {
    font-family: var(--font-mono);
}

.brand-site .gh-card-meta {
    font-size: 1.2rem;
}

.brand-site .gh-card-image {
    overflow: hidden;
    border-radius: 14px;
}

.brand-site .gh-card-wrapper {
    min-width: 0;
}

.brand-home .gh-container.is-grid .gh-card:only-child .gh-card-wrapper {
    order: -1;
}

.brand-card-arrow {
    display: none;
}

.brand-site :is(.gh-container, .gh-featured) .brand-card-arrow {
    position: absolute;
    top: clamp(20px, 3vw, 32px);
    right: clamp(20px, 3vw, 32px);
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--color-accent);
}

.brand-site .gh-card-image ~ .brand-card-arrow {
    display: none;
}

.brand-site .gh-article {
    --content-width: 720px;
    padding-bottom: clamp(52px, 7vw, 96px);
}

.brand-site .gh-article-header {
    margin-block: clamp(52px, 7vw, 96px) 36px;
}

.brand-site .gh-article-title {
    font-size: clamp(3.8rem, 6vw, 6.4rem);
}

.brand-site .gh-article-excerpt {
    font-size: 1.8rem;
}

.brand-site .gh-feature-image {
    max-height: min(420px, 54vh);
    border-radius: 20px;
    object-fit: cover;
}

.brand-site .gh-content {
    font-size: clamp(1.7rem, 1.5vw, 1.9rem);
    line-height: 1.7;
}

.brand-site .gh-content :where(pre, code) {
    font-family: var(--font-mono);
}

.brand-site .gh-content a:not(.kg-btn) {
    text-underline-offset: 0.18em;
}

.brand-site .gh-meta-share {
    gap: 12px;
}

.brand-site .gh-article-author-image a {
    width: 48px;
    height: 48px;
}

.brand-error {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-block: 64px;
}

.brand-error .brand-heading {
    margin-top: 12px;
}

.brand-error .brand-button {
    margin-top: 28px;
}

.brand-site .brand-footer {
    margin-top: auto;
    border-top: 1px solid var(--color-line);
    background-color: var(--background-color);
    color: var(--color-muted);
    font-size: 1.4rem;
}

.brand-footer-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
    gap: 4px;
    padding-block: 16px;
}

.brand-footer a:not(.gh-button) {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.brand-footer .brand-links {
    gap: 12px 20px;
}

@media (min-width: 640px) {
    :root.has-light-text {
        --container-gap: 32px;
    }

    .brand-footer-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .brand-home .gh-container.is-grid .gh-card:only-child .gh-card-link {
        flex-direction: row;
        align-items: center;
        gap: 32px;
    }

    .brand-home .gh-container.is-grid .gh-card:only-child .gh-card-image {
        width: 36%;
    }
}

@media (min-width: 900px) {
    .brand-header-inner {
        display: flex;
        gap: 12px;
    }

    .brand-header-tools {
        margin-right: 0;
    }

    .brand-desktop-navigation {
        display: flex;
        gap: 24px;
        margin-left: auto;
    }

    .brand-desktop-navigation .brand-links {
        gap: 20px;
    }

    .brand-mobile-menu {
        display: none;
    }
}

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

@media (forced-colors: active) {
    .brand-heading,
    .brand-site .gh-article-title {
        color: CanvasText;
    }

    .brand-heading::after,
    .brand-site .gh-article-title::after {
        display: none;
    }
}
