/* glennwatson.net brand layer over the NuStreamDocs Material 3 theme. Flat, bordered and GitHub-like. */

/* ----- Brand tokens: GitHub's Primer colours, matching the GitHub profile README. -----
   The theme always renders the body as data-md-color-scheme="default" and switches late, so the colours key on
   data-gw-scheme, which an inline head script sets before the first paint. Dark is the default, including when
   scripts are off. The body selectors outrank the theme's own [data-md-color-scheme] token rules. */
:root,
html[data-gw-scheme="default"] body {
    color-scheme: light;
    --gw-blue: #0969da;
    --gw-blue-strong: #0969da;
    --gw-orange: #bc4c00;
    --gw-bg: #f6f8fa;
    --gw-panel: #ffffff;
    --gw-panel-muted: #f6f8fa;
    --gw-line: #d0d7de;
    --gw-line-strong: #8c959f;
    --gw-grid: rgb(31 35 40 / 4%);
    --gw-wash: rgb(9 105 218 / 7%);
    --md-sys-color-primary: #0969da;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #ddf4ff;
    --md-sys-color-on-primary-container: #0a3069;
    --md-sys-color-secondary-container: #ddf4ff;
    --md-sys-color-on-secondary-container: #0a3069;
    --md-sys-color-tertiary: #bc4c00;
    --md-sys-color-surface: #f6f8fa;
    --md-sys-color-surface-container-lowest: #ffffff;
    --md-sys-color-surface-container-low: #ffffff;
    --md-sys-color-surface-container: #ffffff;
    --md-sys-color-surface-container-high: #eaeef2;
    --md-sys-color-surface-container-highest: #d0d7de;
    --md-sys-color-on-surface: #1f2328;
    --md-sys-color-on-surface-variant: #59636e;
    --md-sys-color-outline: #8c959f;
    --md-sys-color-outline-variant: #d0d7de;
}

html:not([data-gw-scheme="default"]),
html:not([data-gw-scheme="default"]) body {
    color-scheme: dark;
    --gw-blue: #58a6ff;
    --gw-blue-strong: #1f6feb;
    --gw-orange: #ffa657;
    --gw-bg: #0d1117;
    --gw-panel: #0d1117;
    --gw-panel-muted: #161b22;
    --gw-line: #30363d;
    --gw-line-strong: #6e7681;
    --gw-grid: rgb(240 246 252 / 3%);
    --gw-wash: rgb(88 166 255 / 6%);
    --md-sys-color-primary: #58a6ff;
    --md-sys-color-on-primary: #0d1117;
    --md-sys-color-primary-container: #0c2d6b;
    --md-sys-color-on-primary-container: #cae8ff;
    --md-sys-color-secondary-container: #12263f;
    --md-sys-color-on-secondary-container: #cae8ff;
    --md-sys-color-tertiary: #ffa657;
    --md-sys-color-surface: #0d1117;
    --md-sys-color-surface-dim: #0d1117;
    --md-sys-color-surface-bright: #21262d;
    --md-sys-color-surface-container-lowest: #010409;
    --md-sys-color-surface-container-low: #161b22;
    --md-sys-color-surface-container: #161b22;
    --md-sys-color-surface-container-high: #21262d;
    --md-sys-color-surface-container-highest: #30363d;
    --md-sys-color-on-surface: #e6edf3;
    --md-sys-color-on-surface-variant: #9198a1;
    --md-sys-color-outline: #6e7681;
    --md-sys-color-outline-variant: #30363d;
}

:root {
    --gw-radius: 6px;
    --gw-radius-lg: 12px;
    --md-text-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    --md-code-font: "Cascadia Code", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ----- Page background: one faint wash at the top over a quiet grid. No animation. ----- */
body {
    background: var(--gw-bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60rem 28rem at 50% -12rem, var(--gw-wash), transparent 70%),
        linear-gradient(var(--gw-grid) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, var(--gw-grid) 1px, transparent 1px) 0 0 / 48px 48px;
}

.md-container,
.md-main {
    background: transparent;
}

/* ----- Header and tabs: solid, with a single hairline. ----- */
.md-header {
    background: var(--gw-panel-muted);
    box-shadow: none;
    border-bottom: 1px solid var(--gw-line);
}

/* Header mark: the avatar with a thin accent ring, then "Glenn Watson / Page" like a GitHub breadcrumb. */
.md-logo img {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px var(--gw-panel-muted), 0 0 0 3px color-mix(in srgb, var(--gw-blue) 70%, transparent);
}

.md-header__topic .gw-brand {
    color: var(--md-sys-color-on-surface);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.md-header__topic .gw-crumb {
    margin-left: 0.4rem;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 400;
}

/* The site has no search index, so the theme's search trigger would open an empty dialog. */
.md-search {
    display: none;
}

.md-header__title {
    font-weight: 600;
}

.md-tabs {
    background: var(--gw-panel-muted);
    border-bottom: 1px solid var(--gw-line);
}

.md-tabs__list {
    padding: 0.4rem 0.5rem;
    gap: 0.25rem;
}

.md-tabs__link {
    min-height: 2.1rem;
    padding: 0.35rem 0.9rem;
    border-radius: var(--gw-radius);
    transition: background 0.15s ease;
}

.md-tabs__link:hover {
    background: var(--md-sys-color-surface-container-high);
}

/* The active tab gets GitHub's orange underline instead of a filled pill. */
.md-tabs__item--active > .md-tabs__link {
    color: var(--md-sys-color-on-surface);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 #fd8c73;
}

/* ----- Typography. ----- */
.md-typeset h1 {
    font-weight: 600;
}

.md-typeset h2 {
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--gw-line);
    font-weight: 600;
}

.md-typeset a {
    color: var(--gw-blue);
    text-underline-offset: 0.18em;
}

/* ----- Buttons: GitHub's flat buttons. ----- */
.md-typeset .md-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--gw-line);
    border-radius: var(--gw-radius);
    background: var(--gw-panel-muted);
    color: var(--md-sys-color-on-surface);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.md-typeset .md-button:hover {
    border-color: var(--gw-line-strong);
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
}

.md-typeset .md-button--primary {
    border-color: transparent;
    background: var(--gw-blue-strong);
    color: #fff;
}

.md-typeset .md-button--primary:hover {
    border-color: transparent;
    background: color-mix(in srgb, var(--gw-blue-strong) 85%, #fff);
    color: #fff;
}

/* ----- Pill badges, drawn like the badges on the GitHub profile README. ----- */
.md-typeset .gw-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.6rem;
    padding: 0;
    list-style: none;
}

.md-typeset .gw-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.28rem 0.65rem;
    border: 1px solid var(--gw-line-strong);
    border-radius: var(--gw-radius);
    background: var(--gw-panel);
    color: var(--md-sys-color-on-surface);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;
}

.md-typeset a.gw-pill:hover {
    border-color: var(--gw-blue);
    text-decoration: none;
}

.md-typeset .gw-pill b {
    padding-left: 0.45rem;
    border-left: 1px solid var(--gw-line);
    color: var(--gw-blue);
    font-weight: 600;
}

.md-typeset .gw-pill i,
.md-typeset .gw-pill svg {
    width: 1em;
    font-size: 1rem;
    text-align: center;
}

.md-typeset .gw-pill--quiet {
    border-color: var(--gw-line);
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
}

.md-typeset .gw-pill--icon {
    padding: 0.28rem 0.45rem;
}

.md-typeset .gw-pill svg {
    height: 0.85em;
    border-radius: 2px;
}

.gw-c-microsoft { color: #4cc2ff; }
.gw-c-aws { color: #ff9900; }
.gw-c-linkedin { color: #0a66c2; }
.gw-c-github { color: var(--md-sys-color-on-surface); }
.gw-c-nuget { color: #57a2e4; }
.gw-c-star { color: #e3b341; }
.gw-c-rx { color: #d63aa5; }

/* ----- Landing page. ----- */
.gw-landing {
    max-width: 72rem;
    margin: 0 auto;
}

.md-typeset .gw-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    padding: 3rem 0 2.5rem;
}

@media screen and (min-width: 60em) {
    .md-typeset .gw-hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        padding: 4.5rem 0 3rem;
    }
}

.md-typeset .gw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.1rem;
    padding: 0.3rem 0.8rem 0.3rem 0.35rem;
    border: 1px solid var(--gw-line);
    border-radius: 999px;
    background: var(--gw-panel);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.85rem;
}

.md-typeset .gw-eyebrow strong {
    padding: 0.1rem 0.55rem;
    border: 1px solid color-mix(in srgb, var(--gw-blue) 45%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--gw-blue) 12%, transparent);
    color: var(--gw-blue);
    font-weight: 600;
}

.md-typeset .gw-hero h1 {
    margin: 0 0 0.9rem;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.md-typeset .gw-hero .gw-lede {
    max-width: 38rem;
    margin: 0 0 1.25rem;
    color: var(--md-sys-color-on-surface-variant);
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    line-height: 1.6;
}

.md-typeset .gw-hero .gw-lede strong {
    color: var(--md-sys-color-on-surface);
}

.md-typeset .gw-hero .gw-pills {
    margin-bottom: 1.5rem;
}

.md-typeset .gw-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.md-typeset .gw-portrait {
    justify-self: center;
    width: min(18rem, 70vw);
    text-align: center;
}

.md-typeset .gw-portrait img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border: 1px solid var(--gw-line);
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
}

.md-typeset .gw-portrait .gw-pills {
    justify-content: center;
    margin-top: 1rem;
}

/* ----- Stats: plain numbers in bordered boxes. ----- */
.md-typeset .gw-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 0.75rem;
    margin: 0 0 3.5rem;
}

.md-typeset .gw-stat {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--gw-line);
    border-radius: var(--gw-radius-lg);
    background: var(--gw-panel);
}

.md-typeset .gw-stat b {
    display: block;
    color: var(--md-sys-color-on-surface);
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.md-typeset .gw-stat span {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.88rem;
}

/* ----- Sections. ----- */
.md-typeset .gw-section {
    margin: 0 0 4rem;
}

.md-typeset .gw-kicker {
    margin: 0 0 0.3rem;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.md-typeset .gw-section > h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 600;
}

.md-typeset .gw-section > h3.gw-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0 0.9rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.md-typeset .gw-section > p.gw-intro {
    max-width: 44rem;
    margin: 0 0 1.5rem;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 1.02rem;
}

/* ----- Cards: GitHub's repository cards. ----- */
.md-typeset .gw-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
    gap: 0.9rem;
}

/* Project grids hold up to three cards a row, so six projects make two even rows. */
.md-typeset .gw-cards--three {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.md-typeset .gw-pills + .gw-stats {
    margin-top: 1.25rem;
}

.md-typeset .gw-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--gw-line);
    border-radius: var(--gw-radius-lg);
    background: var(--gw-panel);
    color: var(--md-sys-color-on-surface);
    transition: border-color 0.15s ease;
}

.md-typeset a.gw-card {
    text-decoration: none;
}

.md-typeset a.gw-card:hover {
    border-color: var(--gw-line-strong);
}

.md-typeset a.gw-card:hover h3 {
    color: var(--gw-blue);
    text-decoration: underline;
}

.md-typeset .gw-card h3 {
    margin: 0.6rem 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.md-typeset .gw-card p {
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.92rem;
    line-height: 1.55;
}

.md-typeset .gw-card .gw-pills {
    margin: auto 0 0;
    padding-top: 0.9rem;
}

.md-typeset .gw-card .gw-meta {
    display: block;
    margin-top: auto;
    padding-top: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.82rem;
}

.md-typeset .gw-icon {
    display: inline-grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border: 1px solid var(--gw-line);
    border-radius: var(--gw-radius);
    background: var(--gw-panel-muted);
    color: var(--gw-blue);
    font-size: 0.95rem;
    font-weight: 700;
}

/* Each project's own logo, taken from its NuGet package icon or its repository. */
.md-typeset img.gw-project-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    object-fit: contain;
}

.md-typeset .gw-icon i {
    font-size: 1.15rem;
}

.md-typeset .gw-card--feature {
    grid-column: 1 / -1;
    padding: 1.75rem;
    border-left: 3px solid var(--gw-orange);
}

.md-typeset .gw-card--feature h3 {
    font-size: clamp(1.25rem, 2.4vw, 1.55rem);
}

.md-typeset .gw-card--feature p {
    max-width: 46rem;
    font-size: 1rem;
}

/* ----- Tags and chips. ----- */
.md-typeset .gw-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.md-typeset .gw-chips li {
    margin: 0;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gw-blue) 12%, transparent);
    color: var(--gw-blue);
    font-size: 0.78rem;
    font-weight: 500;
}

/* ----- Career timeline: a plain line with dots, and an optional company logo. ----- */
.md-typeset .gw-timeline {
    position: relative;
    margin: 0;
    padding: 0 0 0 1.75rem;
    list-style: none;
}

.md-typeset .gw-timeline::before {
    content: "";
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.45rem;
    width: 2px;
    background: var(--gw-line);
}

.md-typeset .gw-timeline > li {
    position: relative;
    margin: 0 0 0.9rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--gw-line);
    border-radius: var(--gw-radius-lg);
    background: var(--gw-panel);
}

.md-typeset .gw-timeline > li::before {
    content: "";
    position: absolute;
    top: 1.35rem;
    left: -1.68rem;
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid var(--gw-bg);
    border-radius: 50%;
    background: var(--gw-line-strong);
}

.md-typeset .gw-timeline > li.gw-now::before {
    background: var(--gw-orange);
}

.md-typeset .gw-timeline .gw-role {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.md-typeset .gw-timeline .gw-logo {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--gw-line);
    border-radius: var(--gw-radius);
    background: var(--gw-panel-muted);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 1.3rem;
    font-weight: 700;
}

.md-typeset .gw-timeline .gw-logo--text {
    font-size: 0.8rem;
}

.md-typeset .gw-timeline .gw-logo.gw-c-microsoft { color: #4cc2ff; }
.md-typeset .gw-timeline .gw-logo.gw-c-aws { color: #ff9900; }

.md-typeset .gw-timeline h3 {
    margin: 0;
    font-size: 1.05rem;
}

.md-typeset .gw-timeline .gw-when {
    display: block;
    margin: 0.1rem 0 0.45rem;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.85rem;
    font-weight: 600;
}

.md-typeset .gw-timeline p,
.md-typeset .gw-timeline ul {
    margin: 0.35rem 0 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.93rem;
}

/* ----- Closing call to action. ----- */
.md-typeset .gw-cta {
    margin: 0 0 3rem;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    border: 1px solid var(--gw-line);
    border-radius: var(--gw-radius-lg);
    background: var(--gw-panel-muted);
    text-align: center;
}

.md-typeset .gw-cta h2 {
    margin: 0 0 0.6rem;
    padding: 0;
    border: 0;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    font-weight: 600;
}

.md-typeset .gw-cta p {
    max-width: 38rem;
    margin: 0 auto 1.4rem;
    color: var(--md-sys-color-on-surface-variant);
}

.md-typeset .gw-cta .gw-actions {
    justify-content: center;
}

/* ----- Article pages. ----- */
.md-content__inner {
    padding-bottom: 3rem;
}

.md-typeset .gw-update {
    margin: 0 0 1.75rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--gw-line);
    border-left: 3px solid var(--gw-orange);
    border-radius: var(--gw-radius);
    background: var(--gw-panel-muted);
}

.md-typeset .gw-update p {
    margin: 0.25rem 0;
}

.md-typeset pre,
.md-typeset .highlight {
    border-radius: var(--gw-radius);
}

.md-typeset img {
    border-radius: var(--gw-radius);
}

/* ----- Footer. ----- */
.md-footer {
    background: var(--gw-panel-muted);
    border-top: 1px solid var(--gw-line);
}

.md-typeset .gw-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.md-typeset .gw-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.md-typeset .gw-footer a {
    color: var(--md-sys-color-on-surface-variant);
}

.md-typeset .gw-footer a:hover {
    color: var(--gw-blue);
}

@media (prefers-reduced-motion: reduce) {
    .md-typeset .md-button,
    .md-typeset .gw-card,
    .md-tabs__link {
        transition: none;
    }
}

/* Phones: smaller headings that wrap long words, and two stats per row. */
@media screen and (max-width: 44.9375em) {
    .md-typeset .gw-eyebrow { border-radius: var(--gw-radius-lg); }

    .md-typeset h1 {
        font-size: 2rem;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .md-typeset h2 {
        font-size: 1.45rem;
    }

    .md-typeset .gw-hero {
        gap: 1.5rem;
        padding-top: 1.5rem;
    }

    .md-typeset .gw-hero h1 {
        font-size: 2.4rem;
    }

    /* On a phone the portrait comes first, smaller, so visitors see who this is before the text. */
    .md-typeset .gw-portrait {
        order: -1;
        width: 11rem;
    }

    .md-typeset .gw-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .md-typeset .gw-stat {
        padding: 0.9rem 1rem;
    }

    .md-typeset .gw-stat b {
        font-size: 1.5rem;
    }

    .md-typeset .gw-stat span {
        font-size: 0.8rem;
    }
}
