:root {
    color-scheme: light;
    --ink: #0b1220;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #dbe3ee;
    --surface: #ffffff;
    --surface-soft: #f4f7fb;
    --dark-panel: #0b1220;
    --header-bg: rgba(255, 255, 255, .94);
    --featured-bg: #edf3fa;
    --catalog-bg: #dfe8f2;
    --soft-fill: #f8fafc;
    --soft-hover: #f1f5f9;
    --divider-soft: #e8edf4;
    --focus-fill: #dbeafe;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --programming: #2563eb;
    --web-ui: #14b8a6;
    --data-config: #7c3aed;
    --systems-hardware: #ea580c;
    --visual-learning: #db2777;
    --esoteric: #ca8a04;
    --protocols: #0891b2;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .05);
    --shadow-md: 0 18px 50px rgba(15, 23, 42, .12);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f8fafc;
    --ink-soft: #cbd5e1;
    --muted: #94a3b8;
    --line: #334155;
    --surface: #111827;
    --surface-soft: #07101f;
    --dark-panel: #020617;
    --header-bg: rgba(7, 16, 31, .94);
    --featured-bg: #111c2d;
    --catalog-bg: #0b1626;
    --soft-fill: #182235;
    --soft-hover: #1e293b;
    --divider-soft: #263247;
    --focus-fill: rgba(59, 130, 246, .24);
    --blue: #60a5fa;
    --blue-dark: #93c5fd;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2), 0 10px 28px rgba(0, 0, 0, .16);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, .32);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface-soft);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

.site-shell {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

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

.category-programming { --category-color: var(--programming); }
.category-web-ui { --category-color: var(--web-ui); }
.category-data-config { --category-color: var(--data-config); }
.category-systems-hardware { --category-color: var(--systems-hardware); }
.category-visual-learning { --category-color: var(--visual-learning); }
.category-esoteric { --category-color: var(--esoteric); }
.category-protocols { --category-color: var(--protocols); }

/* Header */
.site-header {
    position: relative;
    z-index: 20;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(219, 227, 238, .9);
    backdrop-filter: blur(16px);
}

.site-nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.035em;
    text-decoration: none;
}

.brand > span:last-child > span,
.footer-brand > span:last-child {
    color: var(--blue);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #fff;
    background: var(--ink);
    font: 800 .85rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: -.08em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 4px 5px 4px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    color: var(--ink);
    border-color: #94a3b8;
}

.theme-toggle:focus-visible {
    outline: 3px solid var(--focus-fill);
    outline-offset: 2px;
}

.theme-toggle-label {
    font-size: .76rem;
    font-weight: 800;
}

.theme-toggle-track {
    position: relative;
    display: grid;
    width: 48px;
    height: 28px;
    grid-template-columns: 1fr 1fr;
    place-items: center;
    border-radius: 999px;
    color: #64748b;
    background: var(--soft-hover);
    font-size: .68rem;
    line-height: 1;
}

.theme-sun,
.theme-moon {
    position: relative;
    z-index: 1;
    transition: opacity .2s ease;
}

.theme-moon {
    opacity: .45;
}

.theme-toggle-thumb {
    position: absolute;
    z-index: 0;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(148, 163, 184, .3);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 2px 7px rgba(15, 23, 42, .2);
    transition: transform .22s ease;
}

:root[data-theme="dark"] .theme-toggle-track {
    color: #bfdbfe;
    background: #1e3a5f;
}

:root[data-theme="dark"] .theme-sun {
    opacity: .45;
}

:root[data-theme="dark"] .theme-moon {
    opacity: 1;
}

:root[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(20px);
}

:root[data-theme="dark"] .site-header .brand-mark {
    background: var(--blue);
}

.nav-links a {
    padding: 9px 13px;
    border-radius: 9px;
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--blue-dark);
    background: var(--soft-hover);
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 570px;
    color: #fff;
    background: var(--dark-panel);
}

.hero-grid {
    position: absolute;
    inset: 0 0 0 48%;
    opacity: .22;
    background-image:
        linear-gradient(rgba(148, 163, 184, .25) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .25) 1px, transparent 1px);
    background-size: 86px 86px;
    mask-image: linear-gradient(90deg, transparent, #000 25%);
}

.hero-grid::before,
.hero-grid::after {
    position: absolute;
    color: #60a5fa;
    font: 800 8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hero-grid::before {
    content: "{ }";
    top: 72px;
    left: 24%;
    color: #8b5cf6;
    transform: rotate(-5deg);
}

.hero-grid::after {
    content: "</>";
    right: 7%;
    bottom: 76px;
    color: #14b8a6;
    transform: rotate(5deg);
}

.hero-color-rail {
    position: absolute;
    inset: 0 auto 0 0;
    display: grid;
    width: 8px;
    grid-template-rows: repeat(7, 1fr);
}

.hero-color-rail span {
    background: var(--category-color);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-block: 80px 70px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 14px;
    color: var(--blue);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hero .eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #93c5fd;
}

.prompt-mark {
    color: #60a5fa;
    font: 800 .95rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: -.08em;
}

.hero h1 {
    max-width: 800px;
    margin: 0;
    font-size: clamp(3.2rem, 7vw, 6.4rem);
    line-height: .94;
    letter-spacing: -.07em;
}

.hero h1 span {
    color: #60a5fa;
}

.hero-copy {
    max-width: 660px;
    margin: 28px 0 0;
    color: #cbd5e1;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.65;
}

.hero-copy code {
    display: inline-block;
    margin-left: 4px;
    padding: 3px 7px;
    border: 1px solid #334155;
    border-radius: 7px;
    color: #93c5fd;
    background: rgba(255, 255, 255, .055);
    font: 750 .78em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    white-space: nowrap;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: .94rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: #fff;
    color: #0b1220;
}

.button-primary:hover {
    background: #dbeafe;
}

.button-quiet {
    color: #e2e8f0;
    border-color: #334155;
    background: rgba(255, 255, 255, .04);
}

.button-quiet:hover {
    border-color: #64748b;
    background: rgba(255, 255, 255, .08);
}

.button-dark {
    color: #fff;
    background: var(--dark-panel);
}

.button-dark:hover {
    background: #1e293b;
}

.hero-stats {
    display: flex;
    gap: 0;
    margin: 48px 0 0;
}

.hero-stats div {
    min-width: 130px;
    padding-right: 32px;
    margin-right: 32px;
    border-right: 1px solid #334155;
}

.hero-stats div:last-child {
    border-right: 0;
}

.hero-stats dt {
    font-size: 1.55rem;
    font-weight: 800;
}

.hero-stats dd {
    margin: 2px 0 0;
    color: #94a3b8;
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Shared section styles */
.featured-section,
.catalog-section {
    padding-block: 76px;
    clip-path: inset(0 -100vmax);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.section-heading > a {
    color: var(--blue-dark);
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
}

.section-heading > a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Featured */
.featured-section {
    padding-bottom: 38px;
    background: var(--featured-bg);
    box-shadow: 0 0 0 100vmax var(--featured-bg);
}

.starting-point {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 42px;
    align-items: center;
    margin-bottom: 72px;
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 78%, var(--featured-bg));
    box-shadow: var(--shadow-sm);
}

.starting-point-copy h2 {
    max-width: 680px;
    margin: 0;
    font-size: clamp(2rem, 4.5vw, 3.35rem);
    line-height: 1.02;
    letter-spacing: -.055em;
}

.starting-point-copy > p:not(.section-kicker) {
    max-width: 720px;
    margin: 20px 0 0;
    color: var(--ink-soft);
    font-size: .98rem;
    line-height: 1.75;
}

.starting-point-copy > p:last-child {
    margin-top: 14px;
}

.starting-point-copy strong {
    color: var(--blue-dark);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .92em;
}

.url-pattern {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 1px solid #263247;
    border-radius: 16px;
    color: #f8fafc;
    background: var(--dark-panel);
    box-shadow: var(--shadow-md);
}

.url-pattern::after {
    content: "{ }";
    position: absolute;
    right: -14px;
    bottom: -24px;
    color: rgba(96, 165, 250, .12);
    font: 800 6rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.url-pattern > p {
    position: relative;
    z-index: 1;
    margin: 0 0 24px;
    font: 750 clamp(1.15rem, 2.5vw, 1.65rem)/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: -.04em;
}

.url-pattern > p span {
    color: #94a3b8;
}

.url-pattern > p strong {
    color: #60a5fa;
}

.url-pattern > div {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.url-pattern a {
    padding: 10px 12px;
    border: 1px solid #263247;
    border-radius: 9px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, .035);
    font: 700 .78rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
    text-decoration: none;
}

.url-pattern a:hover,
.url-pattern a:focus-visible {
    color: #fff;
    border-color: #60a5fa;
    background: rgba(96, 165, 250, .12);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.featured-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 102px;
    overflow: hidden;
    padding: 20px 48px 20px 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.featured-card:hover,
.featured-card:focus-visible {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--category-color) 40%, var(--line));
    box-shadow: var(--shadow-md);
}

.card-color-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--category-color);
}

.language-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 13px;
    background: var(--soft-fill);
    border: 1px solid var(--divider-soft);
}

.language-icon img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.featured-card-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.featured-card-copy strong {
    font-size: 1.06rem;
}

.featured-card-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-url {
    overflow: hidden;
    color: var(--blue-dark);
    font: 750 .68rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-arrow {
    color: #94a3b8;
    font-size: 1.05rem;
    transition: color .18s ease, transform .18s ease;
}

.featured-card > .card-arrow {
    position: absolute;
    top: 18px;
    right: 18px;
}

.featured-card:hover .card-arrow,
.language-card:hover .card-arrow {
    color: var(--category-color);
    transform: translate(2px, -2px);
}

/* Catalog */
.catalog-section {
    padding-top: 48px;
    background: var(--catalog-bg);
    box-shadow: 0 0 0 100vmax var(--catalog-bg);
}

.catalog-heading {
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.catalog-heading > p {
    max-width: 370px;
    margin: 0;
    color: var(--muted);
}

.discovery-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: -2px 0 26px;
}

.discovery-filters > span {
    color: var(--muted);
    font-size: .69rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.discovery-filters > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.discovery-filter {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.discovery-filter:hover,
.discovery-filter:focus-visible {
    transform: translateY(-1px);
    border-color: #94a3b8;
}

.discovery-filter:focus-visible {
    outline: 3px solid var(--focus-fill);
    outline-offset: 1px;
}

.discovery-filter.is-active {
    color: #fff;
    border-color: var(--dark-panel);
    background: var(--dark-panel);
}

:root[data-theme="dark"] .discovery-filter.is-active {
    border-color: var(--blue);
    background: #1e3a5f;
}

.discovery-filter small {
    min-width: 20px;
    padding: 2px 5px;
    border-radius: 999px;
    color: inherit;
    background: rgba(148, 163, 184, .18);
    font-size: .66rem;
    font-variant-numeric: tabular-nums;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.category-panel {
    position: sticky;
    top: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.category-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--divider-soft);
}

.category-panel-heading h3 {
    margin: 0;
    font-size: .92rem;
}

.category-panel-heading > span {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.category-legend {
    display: grid;
    padding: 8px;
}

.legend-item {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 11px;
    min-height: 48px;
    padding: 7px 9px 7px 5px;
    border: 0;
    border-radius: 9px;
    color: var(--ink-soft);
    background: transparent;
    text-align: left;
}

.legend-item:hover,
.legend-item.is-active {
    color: var(--ink);
    background: var(--soft-hover);
}

.legend-item:focus-visible {
    outline: 3px solid #bfdbfe;
    outline-offset: 1px;
}

.legend-bar {
    width: 5px;
    flex: 0 0 auto;
    border-radius: 5px;
    background: var(--category-color);
}

.legend-all {
    background: linear-gradient(
        to bottom,
        var(--programming) 0 14.28%,
        var(--web-ui) 14.28% 28.56%,
        var(--data-config) 28.56% 42.84%,
        var(--systems-hardware) 42.84% 57.12%,
        var(--visual-learning) 57.12% 71.4%,
        var(--esoteric) 71.4% 85.68%,
        var(--protocols) 85.68% 100%
    );
}

.legend-copy {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.legend-copy strong {
    overflow: hidden;
    font-size: .78rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legend-copy small {
    color: var(--muted);
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field input,
.sort-field select {
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: var(--surface);
    outline: 0;
    box-shadow: var(--shadow-sm);
}

.search-field input {
    width: 100%;
    padding: 0 48px 0 46px;
}

.search-field input:focus,
.sort-field select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px var(--focus-fill);
}

.search-icon {
    position: absolute;
    left: 18px;
    z-index: 1;
    width: 15px;
    height: 15px;
    border: 2px solid #64748b;
    border-radius: 50%;
}

.search-icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 6px;
    height: 2px;
    background: #64748b;
    transform: rotate(45deg);
}

.search-field kbd {
    position: absolute;
    right: 14px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 6px;
    color: #64748b;
    background: var(--soft-fill);
    font: 700 .76rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sort-field {
    position: relative;
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 10px;
    padding: 5px 5px 5px 13px;
    border: 1px solid color-mix(in srgb, var(--blue) 55%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--blue) 7%, var(--surface));
    box-shadow: 0 4px 14px rgba(37, 99, 235, .09);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sort-field:hover {
    border-color: var(--blue);
    box-shadow: 0 6px 18px rgba(37, 99, 235, .14);
    transform: translateY(-1px);
}

.sort-field:focus-within {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px var(--focus-fill), 0 6px 18px rgba(37, 99, 235, .14);
}

.sort-field > span:not(.sort-icon) {
    color: var(--blue-dark);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sort-icon {
    display: grid;
    width: 20px;
    gap: 3px;
}

.sort-icon i {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: var(--blue);
}

.sort-icon i:nth-child(1) {
    width: 18px;
}

.sort-icon i:nth-child(2) {
    width: 13px;
}

.sort-icon i:nth-child(3) {
    width: 8px;
}

.sort-field select {
    min-width: 178px;
    min-height: 38px;
    padding: 0 34px 0 12px;
    border: 0;
    border-radius: 8px;
    font-weight: 750;
    box-shadow: inset 0 0 0 1px var(--line);
    cursor: pointer;
}

.sort-field select:focus {
    border-color: transparent;
    box-shadow: inset 0 0 0 1px #60a5fa;
}

.catalog-results-line {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 650;
}

.clear-filters {
    padding: 4px;
    border: 0;
    color: var(--blue-dark);
    background: transparent;
    font-size: .76rem;
    font-weight: 800;
}

.clear-filters:hover {
    text-decoration: underline;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.language-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 188px;
    overflow: hidden;
    flex-direction: column;
    padding: 20px 18px 16px 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.language-card:hover,
.language-card:focus-visible {
    z-index: 1;
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--category-color) 42%, var(--line));
    box-shadow: var(--shadow-md);
}

.language-card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--category-color) 30%, transparent);
    outline-offset: 2px;
}

.language-card[hidden] {
    display: none;
}

.language-card-topline {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.language-card-topline strong {
    font-size: 1.08rem;
    letter-spacing: -.02em;
}

.language-description {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 12px;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.language-card-url {
    display: block;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--divider-soft);
    font-size: .7rem;
}

.language-card-meta {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.language-card-meta span:first-child {
    color: var(--category-color);
}

.catalog-empty {
    padding: 70px 20px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    text-align: center;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.catalog-empty > span {
    color: #94a3b8;
    font: 800 2rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.catalog-empty h3 {
    margin: 16px 0 6px;
}

.catalog-empty p {
    margin: 0;
    color: var(--muted);
}

.catalog-empty button {
    margin-top: 18px;
    padding: 9px 13px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--blue);
    font-weight: 800;
}

/* Lesson pages */
.lesson-page {
    padding-block: 34px 80px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.breadcrumb a {
    color: var(--blue-dark);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.lesson-header {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 6vw, 58px);
    border-radius: 20px;
    color: #fff;
    background: var(--dark-panel);
}

.lesson-color-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 9px;
    background: var(--category-color);
}

.category-label {
    margin: 0 0 12px;
    color: color-mix(in srgb, var(--category-color) 60%, white);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.lesson-header h1 {
    margin: 0;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: .95;
    letter-spacing: -.065em;
}

.lesson-description {
    max-width: 760px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.65;
}

.lesson-starting-point {
    display: flex;
    max-width: 760px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding: 14px 14px 14px 18px;
    border: 1px solid #334155;
    border-radius: 12px;
    background: rgba(255, 255, 255, .045);
}

.lesson-starting-point > div {
    min-width: 0;
}

.lesson-starting-point > div > span {
    display: block;
    margin-bottom: 4px;
    color: #94a3b8;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.lesson-starting-point a {
    display: block;
    overflow: hidden;
    color: #93c5fd;
    font: 750 clamp(.85rem, 2vw, 1rem)/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-starting-point a:hover,
.lesson-starting-point a:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.lesson-starting-point button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid #475569;
    border-radius: 9px;
    color: #e2e8f0;
    background: #1e293b;
    font-size: .76rem;
    font-weight: 800;
}

.lesson-starting-point button:hover,
.lesson-starting-point button:focus-visible,
.lesson-starting-point button.is-copied {
    color: #fff;
    border-color: #60a5fa;
    background: #1d4ed8;
}

.learning-path {
    margin-top: 76px;
    padding-top: 64px;
    border-top: 1px solid var(--line);
}

.learning-path > .section-heading > p,
.projects-collection > .section-heading > p {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.learning-path-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.learning-step {
    position: relative;
    display: flex;
    min-height: 285px;
    overflow: hidden;
    flex-direction: column;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.learning-step > span:first-child {
    position: absolute;
    top: 18px;
    right: 22px;
    color: color-mix(in srgb, var(--muted) 38%, transparent);
    font: 850 3rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.learning-step h3 {
    position: relative;
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
    letter-spacing: -.04em;
}

.learning-step > p:not(.section-kicker) {
    position: relative;
    max-width: 500px;
    margin: 14px 0 24px;
    color: var(--muted);
    line-height: 1.7;
}

.learning-step > strong,
.learning-step > button {
    position: relative;
    margin-top: auto;
}

.learning-step > strong {
    color: var(--blue-dark);
    font-size: .83rem;
}

.learning-step-official:hover,
.learning-step-official:focus-visible {
    transform: translateY(-3px);
    border-color: var(--blue);
    box-shadow: var(--shadow-md);
}

.learning-step-prompt {
    color: #f8fafc;
    border-color: #263247;
    background: var(--dark-panel);
}

.learning-step-prompt .section-kicker {
    color: #60a5fa;
}

.learning-step-prompt > p:not(.section-kicker) {
    color: #94a3b8;
}

.learning-prompt-preview {
    position: relative;
    margin: 0 0 18px;
    padding: 16px 17px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: rgba(15, 23, 42, .72);
}

.learning-prompt-preview > span {
    display: block;
    margin-bottom: 9px;
    color: #60a5fa;
    font: 800 .65rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.learning-prompt-preview > p {
    margin: 0;
    color: #dbe4f0;
    font: 500 .8rem/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow-wrap: anywhere;
}

.learning-step-prompt > button {
    align-self: flex-start;
    min-height: 44px;
    padding: 0 15px;
    border: 1px solid #475569;
    border-radius: 9px;
    color: #e2e8f0;
    background: #1e293b;
    font-size: .78rem;
    font-weight: 800;
}

.learning-step-prompt > button:hover,
.learning-step-prompt > button:focus-visible,
.learning-step-prompt > button.is-copied {
    color: #fff;
    border-color: #60a5fa;
    background: #1d4ed8;
}

.related-starting-points {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
    gap: 40px;
    align-items: start;
    margin-top: 18px;
    padding: 28px 30px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 75%, transparent);
}

.related-starting-points h3 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -.025em;
}

.related-starting-points > div:last-child {
    display: grid;
    gap: 8px;
}

.related-starting-points a {
    display: grid;
    grid-template-columns: minmax(110px, .55fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 11px 13px;
    border: 1px solid var(--divider-soft);
    border-radius: 9px;
    color: var(--ink-soft);
    background: var(--surface);
    text-decoration: none;
}

.related-starting-points a:hover,
.related-starting-points a:focus-visible {
    color: var(--ink);
    border-color: var(--blue);
}

.related-starting-points a > span:first-child {
    font-weight: 800;
}

.related-starting-points code {
    overflow: hidden;
    color: var(--blue-dark);
    font: 700 .72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reviewed-date {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: .7rem;
    text-align: right;
}

.lesson-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 26px;
}

.language-facts {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.language-facts div {
    padding: 18px;
    border-bottom: 1px solid var(--divider-soft);
}

.language-facts div:last-child {
    border-bottom: 0;
}

.language-facts dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.language-facts dd {
    margin: 0;
    color: var(--ink-soft);
    font-size: .9rem;
    line-height: 1.6;
}

.language-facts a {
    color: var(--blue-dark);
    font-weight: 700;
    text-decoration: none;
}

.language-facts a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.code-example {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #263247;
    border-radius: 14px;
    background: #151b13;
    box-shadow: var(--shadow-md);
}

.code-example-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-bottom: 1px solid #2d3748;
    background: #111827;
}

.code-example-header .section-kicker {
    margin-bottom: 5px;
    color: color-mix(in srgb, var(--category-color) 65%, white);
}

.code-example-header h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.3rem;
    letter-spacing: -.02em;
}

.code-example-header > span {
    padding: 6px 9px;
    border: 1px solid #334155;
    border-radius: 7px;
    color: #94a3b8;
    font: 700 .7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.code-example pre[class*="language-"],
.code-example pre {
    max-height: 560px;
    margin: 0;
    padding: 28px;
    border-radius: 0;
    background: #151b13;
    font-size: clamp(.82rem, 1.6vw, 1rem);
    line-height: 1.7;
    overflow: auto;
}

.lesson-next {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.lesson-next a {
    color: var(--blue-dark);
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none;
}

.lesson-next a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Content pages */
.content-page {
    max-width: 820px;
    padding-block: 70px 100px;
}

.content-page h1 {
    margin: 0;
    font-size: clamp(2.7rem, 7vw, 5rem);
    line-height: 1;
    letter-spacing: -.06em;
}

.content-lede {
    margin: 24px 0 52px;
    color: var(--ink-soft);
    font-size: 1.2rem;
    line-height: 1.7;
}

.content-page section {
    margin-top: 38px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.content-page h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.content-page section p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.8;
}

.content-page a {
    color: var(--blue-dark);
}

.not-found {
    min-height: 65vh;
}

.not-found .button {
    color: #fff;
}

/* EFX projects */
.projects-page {
    background: var(--catalog-bg);
}

.projects-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 82% 24%, rgba(37, 99, 235, .24), transparent 28%),
        var(--dark-panel);
}

.projects-hero::after {
    content: "EFX";
    position: absolute;
    right: 5vw;
    bottom: -2.2rem;
    color: rgba(96, 165, 250, .065);
    font: 900 clamp(8rem, 25vw, 22rem)/.8 ui-sans-serif, sans-serif;
    letter-spacing: -.12em;
}

.projects-hero > .site-shell {
    position: relative;
    z-index: 1;
    padding-block: 90px 100px;
}

.projects-hero h1 {
    max-width: 850px;
    margin: 20px 0 0;
    font-size: clamp(4rem, 10vw, 7.5rem);
    line-height: .88;
    letter-spacing: -.075em;
}

.projects-hero h1 span {
    color: #60a5fa;
}

.projects-hero > .site-shell > p:not(.eyebrow) {
    max-width: 670px;
    margin: 34px 0 0;
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1.75;
}

.projects-hero .button {
    gap: 8px;
    margin-top: 30px;
}

.projects-collection {
    padding-block: 78px 100px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    position: relative;
    display: flex;
    min-height: 500px;
    overflow: hidden;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.project-card:hover,
.project-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--blue);
    box-shadow: var(--shadow-md);
}

.project-visual {
    aspect-ratio: 1200 / 630;
    margin: -24px -24px 28px;
    overflow: hidden;
    background: #e2e8f0;
}

.project-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.project-visual .project-art-dark {
    display: none;
}

:root[data-theme="dark"] .project-visual .project-art-light {
    display: none;
}

:root[data-theme="dark"] .project-visual .project-art-dark {
    display: block;
}

.project-card:hover .project-visual img,
.project-card:focus-visible .project-visual img {
    transform: scale(1.025);
}

.project-app-visual {
    position: relative;
    background:
        radial-gradient(circle at 50% 24%, rgba(255, 255, 255, .24), transparent 34%),
        linear-gradient(145deg, #2563eb 0%, #172554 100%);
}

.project-app-visual::before,
.project-app-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
}

.project-app-visual::before {
    width: 250px;
    height: 250px;
    top: -125px;
    left: -55px;
}

.project-app-visual::after {
    width: 190px;
    height: 190px;
    right: -90px;
    bottom: -120px;
}

.project-app-visual .project-app-glow {
    position: absolute;
    inset: auto 12% -48% 12%;
    height: 78%;
    border-radius: 50%;
    background: rgba(96, 165, 250, .45);
    filter: blur(32px);
}

.project-app-visual .project-app-screen {
    position: absolute;
    top: 15px;
    width: 31%;
    height: auto;
    border: 3px solid rgba(255, 255, 255, .75);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, .42);
    object-fit: initial;
    transition: transform .35s ease;
}

.project-app-screen-map {
    left: 18%;
    z-index: 1;
    transform: translateY(8px) rotate(-7deg);
}

.project-app-screen-superhero {
    left: 35%;
    z-index: 3;
    transform: translateY(-2px) rotate(1deg);
}

.project-app-screen-puzzle {
    right: 17%;
    z-index: 2;
    transform: translateY(7px) rotate(8deg);
}

.project-card:hover .project-app-screen-map,
.project-card:focus-visible .project-app-screen-map {
    transform: translateY(3px) rotate(-7deg) scale(1.025);
}

.project-card:hover .project-app-screen-superhero,
.project-card:focus-visible .project-app-screen-superhero {
    transform: translateY(-7px) rotate(1deg) scale(1.025);
}

.project-card:hover .project-app-screen-puzzle,
.project-card:focus-visible .project-app-screen-puzzle {
    transform: translateY(2px) rotate(8deg) scale(1.025);
}

.project-card h3 {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: -.035em;
}

.project-card > p:not(.section-kicker) {
    margin: 14px 0 24px;
    color: var(--muted);
    line-height: 1.7;
}

.project-card > strong,
.project-store-link strong {
    margin-top: auto;
    color: var(--blue-dark);
    font-size: .84rem;
}

.project-store-link {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    margin-top: auto;
}

.app-store-badge {
    display: block;
    width: 120px;
    height: 40px;
}

.apple-credit {
    max-width: 760px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.6;
}

/* About code.study */
.about-page {
    background: var(--catalog-bg);
}

.about-hero {
    color: #fff;
    background:
        radial-gradient(circle at 78% 16%, rgba(37, 99, 235, .26), transparent 30%),
        var(--dark-panel);
}

.about-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 70px;
    align-items: end;
    padding-block: 88px 100px;
}

.about-hero h1 {
    margin: 20px 0 0;
    font-size: clamp(4rem, 9vw, 7rem);
    line-height: .9;
    letter-spacing: -.075em;
}

.about-hero h1 span {
    color: #60a5fa;
}

.about-hero-layout > div:first-child > p:not(.eyebrow) {
    max-width: 700px;
    margin: 32px 0 0;
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1.75;
}

.about-url {
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 18px;
    background: rgba(15, 23, 42, .66);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
}

.about-url > span {
    display: block;
    color: #93c5fd;
    font: 800 .7rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.about-url > strong {
    display: block;
    margin: 18px 0 24px;
    font: 750 clamp(1.15rem, 2.2vw, 1.65rem)/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: -.045em;
}

.about-url > strong em {
    color: #60a5fa;
    font-style: normal;
}

.about-url > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.about-url a {
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 8px;
    color: #cbd5e1;
    font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    text-decoration: none;
}

.about-url a:hover,
.about-url a:focus-visible {
    border-color: #60a5fa;
    color: #fff;
}

.about-intro {
    display: grid;
    grid-template-columns: minmax(180px, .42fr) minmax(0, 1.58fr);
    gap: 56px;
    padding-block: 86px;
    border-bottom: 1px solid var(--line);
}

.about-intro h2,
.about-ai h2,
.about-maker h2 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -.025em;
}

.about-intro > div > p {
    max-width: 820px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.85;
}

.about-language-design {
    color: #f8fafc;
    background:
        radial-gradient(circle at 86% 8%, rgba(202, 138, 4, .22), transparent 28%),
        #111827;
}

.about-language-design > .site-shell {
    padding-block: 82px 90px;
}

.about-language-design-heading {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
    gap: 70px;
    align-items: end;
}

.about-language-design h2 {
    max-width: 620px;
    margin: 10px 0 0;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: .96;
    letter-spacing: -.035em;
}

.about-language-design-heading > p {
    margin: 0;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.8;
}

.language-purpose-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 52px;
}

.language-purpose-grid article {
    min-height: 230px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 14px;
    background: rgba(15, 23, 42, .66);
}

.language-purpose-grid span {
    color: #facc15;
    font: 800 .7rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.language-purpose-grid h3 {
    margin: 44px 0 0;
    font-size: 1.2rem;
    letter-spacing: -.025em;
}

.language-purpose-grid p {
    margin: 12px 0 0;
    color: #94a3b8;
    line-height: 1.65;
}

.about-principles {
    padding-block: 80px 96px;
}

.principle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.principle-grid article {
    min-height: 290px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.principle-grid article > span {
    color: var(--blue);
    font: 800 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.principle-grid h3 {
    margin: 64px 0 14px;
    font-size: 1.45rem;
    letter-spacing: -.035em;
}

.principle-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.principle-grid code {
    color: var(--blue-dark);
    font-size: .88em;
    font-weight: 750;
}

.about-ai {
    color: #fff;
    background: var(--dark-panel);
}

.about-ai-layout {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 80px;
    padding-block: 86px;
}

.about-ai .section-kicker {
    color: #60a5fa;
}

.about-ai-layout > div:last-child p {
    margin: 0;
    color: #cbd5e1;
    font-size: 1.04rem;
    line-height: 1.8;
}

.about-ai-layout > div:last-child p + p {
    margin-top: 20px;
}

.about-maker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 70px;
    align-items: end;
    padding-block: 90px 100px;
}

.about-maker > div:first-child > p:not(.section-kicker) {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.about-maker-actions {
    display: flex;
    gap: 10px;
}

/* Footer */
.site-footer {
    color: #cbd5e1;
    background: var(--dark-panel);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 46px;
    align-items: start;
    padding-block: 48px 32px;
}

.footer-brand {
    color: #fff;
}

.footer-brand .brand-mark {
    color: var(--ink);
    background: #fff;
}

.footer-content > div:first-child > p {
    margin: 12px 0 0;
    color: #94a3b8;
    font-size: .85rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a {
    color: #cbd5e1;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 28px;
    border-top: 1px solid #263247;
    color: #64748b;
    font-size: .74rem;
}

@media (max-width: 1040px) {
    .featured-grid,
    .language-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-layout {
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 20px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: 0;
    }

    .about-hero-layout {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .principle-grid {
        grid-template-columns: 1fr;
    }

    .language-purpose-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .principle-grid article {
        min-height: 0;
    }

    .principle-grid h3 {
        margin-top: 42px;
    }
}

@media (max-width: 780px) {
    .site-shell {
        width: min(100% - 28px, 1180px);
    }

    .site-nav {
        min-height: 64px;
    }

    .nav-explore {
        display: none;
    }

    .hero {
        min-height: 0;
    }

    .hero-grid {
        inset: 0 0 0 30%;
        opacity: .14;
    }

    .hero-content {
        padding-block: 66px 56px;
    }

    .hero h1 br {
        display: none;
    }

    .hero-stats div {
        min-width: 0;
        padding-right: 18px;
        margin-right: 18px;
    }

    .featured-section,
    .catalog-section {
        padding-block: 54px;
    }

    .starting-point {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-bottom: 54px;
    }

    .catalog-section {
        padding-top: 28px;
    }

    .section-heading,
    .catalog-heading {
        align-items: start;
        flex-direction: column;
        gap: 12px;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .discovery-filters {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .category-panel {
        position: static;
    }

    .category-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .sort-field {
        justify-content: space-between;
    }

    .sort-field select {
        flex: 1;
    }

    .lesson-layout {
        grid-template-columns: 1fr;
    }

    .learning-path-grid,
    .related-starting-points {
        grid-template-columns: 1fr;
    }

    .projects-hero > .site-shell {
        padding-block: 72px 78px;
    }

    .about-hero-layout,
    .about-intro,
    .about-language-design-heading,
    .about-ai-layout,
    .about-maker {
        grid-template-columns: 1fr;
    }

    .about-language-design-heading {
        gap: 28px;
    }

    .about-hero-layout {
        padding-block: 70px 76px;
    }

    .about-intro,
    .about-ai-layout,
    .about-maker {
        gap: 28px;
    }

    .about-maker {
        align-items: start;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 540px) {
    .brand {
        font-size: 1.08rem;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
    }

    .nav-links a {
        padding-inline: 8px;
        font-size: .82rem;
    }

    .nav-links a[href="/python"] {
        display: none;
    }

    .theme-toggle {
        padding-left: 5px;
    }

    .theme-toggle-label {
        display: none;
    }

    .hero h1 {
        font-size: clamp(2.75rem, 15vw, 4.2rem);
    }

    .hero-copy {
        font-size: 1rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-stats {
        justify-content: space-between;
    }

    .hero-stats div {
        padding-right: 12px;
        margin-right: 12px;
    }

    .hero-stats dt {
        font-size: 1.25rem;
    }

    .hero-stats dd {
        font-size: .62rem;
    }

    .featured-grid,
    .language-grid {
        grid-template-columns: 1fr;
    }

    .featured-card {
        min-height: 90px;
    }

    .starting-point {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .url-pattern {
        padding: 24px 20px;
    }

    .lesson-starting-point {
        align-items: stretch;
        flex-direction: column;
    }

    .lesson-starting-point button {
        width: 100%;
    }

    .learning-step {
        min-height: 0;
        padding: 24px 20px;
    }

    .related-starting-points {
        gap: 22px;
        padding: 24px 20px;
    }

    .related-starting-points a {
        grid-template-columns: 1fr auto;
    }

    .related-starting-points code {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .reviewed-date {
        text-align: left;
    }

    .projects-hero h1 {
        font-size: clamp(3.4rem, 17vw, 5.2rem);
    }

    .projects-collection {
        padding-block: 58px 72px;
    }

    .about-hero h1 {
        font-size: clamp(3.4rem, 17vw, 5.2rem);
    }

    .about-url {
        padding: 22px 18px;
    }

    .about-intro,
    .about-principles,
    .about-language-design > .site-shell,
    .about-ai-layout,
    .about-maker {
        padding-block: 58px 68px;
    }

    .language-purpose-grid {
        grid-template-columns: 1fr;
        margin-top: 38px;
    }

    .language-purpose-grid article {
        min-height: 0;
    }

    .language-purpose-grid h3 {
        margin-top: 32px;
    }

    .about-maker-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .category-legend {
        grid-template-columns: 1fr;
    }

    .language-card {
        min-height: 164px;
    }

    .lesson-page {
        padding-top: 24px;
    }

    .lesson-header {
        border-radius: 14px;
    }

    .lesson-header h1 {
        font-size: clamp(2.7rem, 18vw, 4.5rem);
    }

    .code-example-header {
        align-items: start;
        flex-direction: column;
        gap: 12px;
    }

    .code-example pre[class*="language-"],
    .code-example pre {
        padding: 20px;
    }

    .lesson-next {
        align-items: start;
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
