:root {
    color-scheme: light;
    --bg: #f7faff;
    --surface: #ffffff;
    --surface-soft: #eef5ff;
    --surface-strong: rgba(255, 255, 255, 0.92);
    --ink: #071a35;
    --text: #24344d;
    --muted: #4d6079;
    --line: #dce8f8;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    --accent-secondary: #f59e0b;
    --accent-secondary-ink: #92400e;
    --accent-rose: #e11d48;
    --signal: #1d4ed8;
    --header-bg: rgba(250, 252, 255, 0.84);
    --footer-bg: rgba(255, 255, 255, 0.88);
    --hero-glow-one: rgba(37, 99, 235, 0.14);
    --hero-glow-two: rgba(245, 158, 11, 0.06);
    --hero-glow-three: rgba(225, 29, 72, 0.055);
    --hero-wash: rgba(239, 246, 255, 0.48);
    --ambient-sheen: rgba(255, 255, 255, 0.34);
    --focus-ring: rgba(37, 99, 235, 0.34);
    --shadow: 0 22px 54px rgba(30, 64, 175, 0.09);
    --shadow-hover: 0 28px 68px rgba(30, 64, 175, 0.16);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #061225;
    --surface: #0d1b33;
    --surface-soft: #13294a;
    --surface-strong: rgba(13, 27, 51, 0.88);
    --ink: #f8fbff;
    --text: #d9e6f8;
    --muted: #b2c0d3;
    --line: #223b60;
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --accent: #fbbf24;
    --accent-secondary: #fbbf24;
    --accent-secondary-ink: #fde68a;
    --accent-rose: #fb7185;
    --signal: #93c5fd;
    --header-bg: rgba(6, 18, 37, 0.82);
    --footer-bg: rgba(9, 22, 42, 0.9);
    --hero-glow-one: rgba(96, 165, 250, 0.18);
    --hero-glow-two: rgba(251, 191, 36, 0.06);
    --hero-glow-three: rgba(251, 113, 133, 0.08);
    --hero-wash: rgba(8, 18, 37, 0.1);
    --ambient-sheen: rgba(96, 165, 250, 0.04);
    --focus-ring: rgba(96, 165, 250, 0.42);
    --shadow: 0 22px 54px rgba(0, 0, 0, 0.26);
    --shadow-hover: 0 28px 68px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    margin: 0;
    background:
        radial-gradient(circle at 14% -4%, var(--hero-glow-one), transparent 34rem),
        radial-gradient(circle at 88% 5%, var(--hero-glow-two), transparent 30rem),
        radial-gradient(circle at 52% 22%, var(--hero-glow-three), transparent 32rem),
        linear-gradient(135deg, var(--ambient-sheen), transparent 36rem),
        linear-gradient(180deg, var(--hero-wash), transparent 460px),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
    transition: background 180ms ease, color 180ms ease;
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
}

:target {
    scroll-margin-top: 92px;
}

#top {
    scroll-margin-top: 0;
}

a {
    color: inherit;
}

h1,
h2,
h3,
p,
li,
a {
    overflow-wrap: anywhere;
}

.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 100;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 850;
    padding: 10px 14px;
    text-decoration: none;
    transform: translateY(-180%);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
    box-shadow: var(--shadow-hover);
}

a:focus-visible,
.button:focus-visible,
.back-to-top:focus-visible,
.nav-toggle:focus-visible,
.theme-toggle:focus-visible,
.section-card:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.container {
    width: min(1140px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 22%);
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 32px rgba(30, 64, 175, 0.055);
}

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

.brand,
.nav-links,
.hero-actions,
.footer-inner,
.post-topline {
    display: flex;
    align-items: center;
}

.brand {
    flex: 0 1 auto;
    color: var(--ink);
    font-weight: 850;
    text-decoration: none;
}

.site-logo {
    display: block;
    width: min(360px, 58vw);
    height: auto;
    max-height: 68px;
    object-fit: contain;
}

[data-theme="dark"] .site-logo {
    filter: brightness(1.08) contrast(1.05) drop-shadow(0 0 1px rgba(255, 255, 255, 0.2));
}

@media (max-width: 420px) {
    .site-logo {
        width: min(260px, 78vw);
        max-height: 54px;
    }
}

.nav-links {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface), var(--surface-soft) 32%);
    color: var(--ink);
    cursor: pointer;
    padding: 0;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-toggle:hover {
    border-color: color-mix(in srgb, var(--primary), transparent 56%);
    background: var(--surface-soft);
}

.nav-toggle-line {
    position: absolute;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle-line:nth-child(1) {
    transform: translateY(-6px);
}

.nav-toggle-line:nth-child(3) {
    transform: translateY(6px);
}

.nav.is-nav-open .nav-toggle-line:nth-child(1) {
    transform: rotate(45deg);
}

.nav.is-nav-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav.is-nav-open .nav-toggle-line:nth-child(3) {
    transform: rotate(-45deg);
}

.nav-links a {
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 750;
    padding: 8px 12px;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease;
}

.theme-toggle {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface), var(--surface-soft) 32%);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 850;
    padding: 0 10px 0 12px;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
    border-color: color-mix(in srgb, var(--primary), transparent 56%);
    background: var(--surface-soft);
    transform: translateY(-1px);
}

.theme-toggle-icon {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.82rem;
    line-height: 1;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.post-card a:hover,
.back-link:hover,
.section-card:hover,
.section-link:hover {
    color: var(--primary);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    background: color-mix(in srgb, var(--primary), transparent 90%);
}

.hero {
    padding: 76px 0 46px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
    gap: clamp(28px, 4vw, 48px);
    align-items: center;
}

.hero-copy {
    padding: 18px 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.hero h1,
.page h1 {
    max-width: 850px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(2.3rem, 5.4vw, 4.55rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero h1 {
    background: linear-gradient(120deg, var(--ink) 0%, var(--primary) 72%, color-mix(in srgb, var(--accent-secondary), var(--primary) 35%) 116%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.hero-copy p:not(.eyebrow) {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--text);
    font-size: 1.12rem;
}

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

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    font-weight: 850;
    padding: 0 22px;
    text-decoration: none;
    box-shadow: 0 16px 32px color-mix(in srgb, var(--primary), transparent 76%);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 20px 40px color-mix(in srgb, var(--primary), transparent 70%);
}

.button-ghost {
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface), transparent 4%);
    box-shadow: none;
    color: var(--ink);
}

.button-ghost:hover {
    background: linear-gradient(135deg, var(--surface-soft), color-mix(in srgb, var(--accent-secondary), transparent 90%));
    box-shadow: 0 14px 30px rgba(30, 64, 175, 0.08);
}

.post-card {
    border: 1px solid color-mix(in srgb, var(--line), transparent 12%);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.post-card h2,
.post-card h3 {
    margin: 0;
    color: var(--ink);
    line-height: 1.18;
}

.post-card h2 a,
.post-card h3 a,
.read-more,
.back-link {
    text-decoration: none;
}

.post-card h2 a,
.post-card h3 a {
    color: var(--ink);
    transition: color 160ms ease;
}

.post-card h2 a:hover,
.post-card h2 a:focus-visible,
.post-card h3 a:hover,
.post-card h3 a:focus-visible {
    color: var(--primary);
}

.post-card p {
    color: var(--muted);
}

.post-card-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0 0 16px;
}

.hero-visual {
    position: relative;
    overflow: visible;
    min-height: clamp(310px, 38vw, 430px);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    isolation: isolate;
}

.hero-visual::before {
    content: none;
}

.visual-shell {
    position: relative;
    display: grid;
    overflow: visible;
    height: 100%;
    min-height: clamp(300px, 36vw, 410px);
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.visual-shell::before,
.visual-shell::after {
    content: none;
}

.cube-scene {
    position: relative;
    --cube-size: clamp(180px, 22vw, 220px);
    width: var(--cube-size);
    height: var(--cube-size);
    perspective: 1100px;
    transform: scale(0.9);
}

.blue-cube {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    animation: cube-rotate 52s linear infinite;
}

.cube-face {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(191, 219, 254, 0.92);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 24%),
        linear-gradient(145deg, rgba(96, 165, 250, 0.94), rgba(37, 99, 235, 0.9));
    box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.12), 0 10px 22px rgba(37, 99, 235, 0.18);
}

.cube-face--front {
    transform: translateZ(calc(var(--cube-size) / 2));
}

.cube-face--back {
    transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2));
}

.cube-face--right {
    transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2));
}

.cube-face--left {
    transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2));
}

.cube-face--top {
    transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2));
}

.cube-face--bottom {
    transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2));
}

@keyframes grid-breathe {
    0%,
    100% {
        opacity: 0.42;
        transform: scale(1);
    }

    50% {
        opacity: 0.72;
        transform: scale(1.06);
    }
}

@keyframes cube-rotate {
    0% {
        transform: rotateX(-18deg) rotateY(0deg) rotateZ(2deg);
    }

    25% {
        transform: rotateX(28deg) rotateY(95deg) rotateZ(-8deg);
    }

    50% {
        transform: rotateX(8deg) rotateY(190deg) rotateZ(12deg);
    }

    75% {
        transform: rotateX(-34deg) rotateY(285deg) rotateZ(-6deg);
    }

    100% {
        transform: rotateX(-18deg) rotateY(360deg) rotateZ(2deg);
    }
}

.post-meta,
.post-topline,
.section-pill {
    color: var(--accent-secondary-ink);
    font-size: 0.88rem;
    font-weight: 800;
}

.section {
    padding: 34px 0 86px;
}

.section-follow {
    padding-top: 0;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.1;
}

.section-compact {
    padding-bottom: 34px;
}

.section-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.section-link,
.section-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 850;
    padding: 8px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.section-link:hover {
    background: var(--surface-soft);
}

.section-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.section-card {
    display: grid;
    gap: 12px;
    min-height: 180px;
    border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
    border-radius: 8px;
    background:
        linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface-soft), transparent 48%));
    box-shadow: var(--shadow);
    padding: 26px;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.section-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--primary), transparent 62%);
    box-shadow: var(--shadow-hover);
}

.section-card strong {
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1.15;
}

.section-card span:last-child {
    color: var(--muted);
}

.section-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-secondary), transparent 84%), color-mix(in srgb, var(--surface), transparent 4%));
    color: var(--accent-secondary-ink);
    font-size: 0.82rem;
    font-weight: 900;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.post-card {
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 245px;
    flex-direction: column;
    padding: 26px;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.post-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--primary);
    opacity: 0;
}

.post-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--primary), transparent 62%);
    box-shadow: var(--shadow-hover);
}

.post-card:focus-within,
.section-card:focus-within {
    border-color: color-mix(in srgb, var(--primary), transparent 42%);
    box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-hover);
}


.post-topline {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.post-topline span:first-child {
    color: var(--accent-secondary-ink);
}

.post-topline span:last-child,
.post-topline time {
    color: var(--muted);
}

.post-card h2,
.post-card h3 {
    font-size: 1.22rem;
}

.post-card p {
    margin: 14px 0 22px;
    line-height: 1.62;
}

.read-more {
    margin-top: auto;
    color: var(--primary);
    font-weight: 850;
    width: fit-content;
    border-bottom: 1px solid color-mix(in srgb, var(--primary), transparent 72%);
    transition: color 160ms ease, border-color 160ms ease;
}

.read-more:hover {
    border-color: var(--primary);
}

.simple-section {
    padding-top: 0;
}

.simple-panel {
    max-width: 760px;
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, var(--surface-strong), color-mix(in srgb, var(--surface-soft), transparent 42%));
    color: var(--muted);
    font-size: 1.08rem;
    padding: 18px 22px;
}

.simple-panel p {
    margin: 0;
}

.page {
    max-width: 790px;
    padding: clamp(52px, 7vw, 76px) 0 clamp(64px, 8vw, 92px);
}

.about-page {
    max-width: none;
    min-height: 0;
    padding: 0 0 56px;
}

.about-page p:last-child {
    margin-bottom: 0;
}

.about-hero {
    padding: clamp(42px, 6vw, 72px) 0 clamp(24px, 4vw, 40px);
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: clamp(20px, 4vw, 40px);
    align-items: start;
}

.about-intro {
    display: grid;
    gap: 18px;
}

.about-intro .lead {
    max-width: 62ch;
    margin: 0;
}

.about-actions {
    margin-top: 8px;
}

.about-profile {
    border: 1px solid color-mix(in srgb, var(--line), transparent 8%);
    border-radius: 8px;
    background:
        linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface-soft), transparent 28%));
    box-shadow: var(--shadow);
    padding: 24px;
}

.about-profile-kicker {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.about-profile h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.14;
}

.about-profile > p {
    margin: 14px 0 0;
    color: var(--text);
}

.about-facts {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.about-facts li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid color-mix(in srgb, var(--line), transparent 14%);
    padding-top: 12px;
}

.about-facts strong {
    color: var(--ink);
}

.about-facts span {
    color: var(--muted);
    text-align: right;
}

.about-section {
    padding-top: 12px;
    padding-bottom: 36px;
}

.about-card-grid {
    margin-top: 10px;
}

.about-card {
    min-height: 0;
    cursor: default;
}

.about-card strong {
    font-size: 1.22rem;
}

.about-note {
    max-width: 860px;
}

.about-stack {
    display: grid;
    gap: 18px;
}

.about-quote {
    display: grid;
    gap: 8px;
    max-width: 860px;
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, var(--surface-strong), color-mix(in srgb, var(--surface-soft), transparent 42%));
    padding: 20px 22px;
}

.about-quote p {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.5;
}

.about-quote span {
    color: var(--muted);
    font-size: 0.98rem;
}

.about-split {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
    gap: 18px;
    align-items: start;
}

.about-side {
    border: 1px solid color-mix(in srgb, var(--line), transparent 8%);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 22px;
}

.about-side h3 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: 1.15rem;
}

.about-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    display: grid;
    gap: 10px;
}

.about-rules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.about-rule {
    border: 1px solid color-mix(in srgb, var(--line), transparent 8%);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    padding: 22px;
}

.about-rule strong {
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 1.08rem;
}

.about-rule p {
    margin: 0;
    color: var(--muted);
}

.page h1 {
    font-size: clamp(1.9rem, 4.4vw, 3.05rem);
}

.page > p,
.article p {
    color: var(--text);
    font-size: 1.08rem;
}

.lead {
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1.7;
}

.article-page {
    max-width: 760px;
}

.not-found-page {
    width: min(760px, calc(100% - 32px));
    min-height: clamp(520px, 72vh, 720px);
    margin: 0 auto;
    padding: clamp(56px, 10vw, 110px) 0;
    display: grid;
    place-items: center;
}

.not-found-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--line), transparent 8%);
    border-radius: 18px;
    padding: clamp(34px, 7vw, 64px);
    background:
        radial-gradient(circle at 84% 16%, var(--hero-glow-one), transparent 15rem),
        var(--surface-strong);
    box-shadow: var(--shadow);
    text-align: center;
}

.not-found-code {
    margin-bottom: 8px;
    color: color-mix(in srgb, var(--primary), transparent 78%);
    font-size: clamp(5rem, 19vw, 9rem);
    font-weight: 950;
    line-height: 0.82;
    letter-spacing: -0.08em;
    transform: translateX(-0.04em);
    user-select: none;
}

.not-found-card .eyebrow {
    margin: 28px 0 8px;
}

.not-found-card h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 6vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.not-found-copy {
    max-width: 520px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.not-found-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

@media (max-width: 520px) {
    .not-found-page {
        min-height: 66vh;
        padding: 40px 0;
    }

    .not-found-card {
        padding: 34px 20px;
    }

    .not-found-actions {
        flex-direction: column;
    }

    .not-found-actions .button {
        width: 100%;
    }
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 28px 0 0;
    box-shadow: var(--shadow);
}

.article {
    margin-top: 32px;
    border-top: 1px solid color-mix(in srgb, var(--line), transparent 20%);
    padding-top: 12px;
}

.article p {
    margin: 22px 0;
    line-height: 1.78;
}

.article h2 {
    margin: 34px 0 12px;
    color: var(--ink);
    font-size: clamp(1.22rem, 2.1vw, 1.55rem);
    line-height: 1.18;
}

.article ul,
.article ol {
    margin: 16px 0 24px;
    padding-left: 22px;
}

.article li {
    margin: 8px 0;
}

.article blockquote {
    margin: 28px 0;
    border-left: 4px solid var(--primary);
    background: color-mix(in srgb, var(--surface-soft), transparent 42%);
    color: var(--ink);
    padding: 16px 20px;
}

.article blockquote p {
    margin: 0;
    font-size: 1.18rem;
}

.article .article-recap {
    border-left: 4px solid var(--primary);
    background: color-mix(in srgb, var(--primary), transparent 92%);
    color: var(--ink);
    font-weight: 700;
    padding: 16px 18px;
}

.article cite {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding-left: 0;
}

.social-links li {
    margin: 0;
}

.social-links a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 800;
    padding: 0 14px 0 8px;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
    border-color: color-mix(in srgb, var(--primary), transparent 52%);
    background: var(--surface-soft);
    color: var(--primary);
}

.social-icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    background: var(--ink);
    color: var(--surface);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.social-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.social-icon--instagram {
    background: #c13584;
}

.social-icon--github,
.social-icon--medium {
    background: #111827;
}

.social-icon--linkedin {
    background: #0a66c2;
}

.social-icon--youtube {
    background: #dc2626;
}

.article p:last-child {
    margin-bottom: 0;
}

.back-link {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 850;
    line-height: 1;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.back-link:hover {
    border-color: color-mix(in srgb, var(--primary), transparent 52%);
    background: var(--surface-soft);
    transform: translateX(-2px);
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: var(--footer-bg);
}

.footer-inner {
    min-height: 86px;
    justify-content: space-between;
    gap: 18px;
}

.footer-inner p {
    color: var(--muted);
    margin: 0;
}

.back-to-top {
    appearance: none;
    display: inline-grid;
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 30;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--primary), transparent 68%);
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    box-shadow: 0 16px 34px rgba(13, 27, 42, 0.18);
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 18px 34px color-mix(in srgb, var(--primary), transparent 72%);
}

@media (max-width: 980px) {
    .container {
        width: min(100% - 28px, 1120px);
    }

    .nav {
        position: relative;
        min-height: auto;
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px 14px;
        padding: 10px 0 12px;
    }

    .brand {
        min-width: 0;
        flex: 1 1 auto;
        align-self: center;
    }

    .site-logo {
        width: min(300px, 62vw);
        max-height: 58px;
    }

    .nav-toggle {
        position: relative;
        display: inline-grid;
        flex: 0 0 44px;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: min(280px, calc(100vw - 28px));
        gap: 5px;
        justify-content: center;
        align-items: stretch;
        border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: var(--shadow);
        padding: 8px;
    }

    .nav.is-nav-collapsible .nav-links {
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
        transition: max-height 220ms ease, opacity 160ms ease;
    }

    .nav.is-nav-collapsible.is-nav-open .nav-links {
        max-height: 340px;
        opacity: 1;
        pointer-events: auto;
        padding-top: 8px;
        padding-bottom: 8px;
        border-width: 1px;
    }

    .nav-links a {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
        border-radius: 8px;
        background: transparent;
        color: var(--ink);
        font-size: 0.92rem;
        line-height: 1.25;
        padding: 9px 10px;
        text-align: left;
    }

    .nav-links a:hover,
    .nav-links a[aria-current="page"] {
        background: var(--surface-soft);
    }

    .theme-toggle {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        justify-content: space-between;
        gap: 6px;
        margin-top: 2px;
        border-radius: 8px;
        padding: 0 10px;
        font-size: 0.9rem;
        flex: 0 0 auto;
    }

    .theme-toggle-icon {
        width: 21px;
        height: 21px;
        font-size: 0.76rem;
    }
}

@media (max-width: 920px) {
    .hero {
        padding: 48px 0 34px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        justify-items: center;
    }

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

    .hero-copy {
        max-width: 760px;
        text-align: center;
    }

    .hero-copy p:not(.eyebrow) {
        max-width: 64ch;
        margin-right: auto;
        margin-left: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        width: min(100%, 430px);
        min-height: 330px;
    }

    .visual-shell {
        min-height: 330px;
    }

    .about-intro,
    .about-actions {
        text-align: center;
    }

    .about-intro .lead,
    .about-actions {
        margin-right: auto;
        margin-left: auto;
    }

    .about-actions {
        justify-content: center;
    }
}

@media (max-width: 760px) {
    .about-split {
        grid-template-columns: 1fr;
    }

    .about-side,
    .about-note {
        max-width: none;
    }

    .about-actions .button {
        min-width: min(220px, 100%);
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    .nav {
        gap: 8px 12px;
        padding: 10px 0 12px;
    }

    .site-logo {
        width: min(240px, 72vw);
        max-height: 52px;
    }

    .nav-links {
        width: min(220px, calc(100vw - 24px));
        gap: 4px;
    }

    .nav-links a {
        padding: 8px 10px;
        font-size: 0.88rem;
    }

    .theme-toggle {
        min-height: 36px;
        font-size: 0.88rem;
    }

    .hero {
        padding: 26px 0 22px;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        gap: 18px;
        align-items: center;
    }

    .hero-visual {
        align-self: center;
        width: min(100%, 380px);
        margin-top: 4px;
    }

    .hero h1,
    .page h1 {
        line-height: 1.08;
    }

    .hero-copy {
        padding: 0;
        width: 100%;
        text-align: center;
    }

    .hero-copy p:not(.eyebrow) {
        margin-right: auto;
        margin-left: auto;
        margin-top: 18px;
        font-size: 1rem;
    }

    .hero-actions {
        justify-content: center;
        margin-top: 22px;
    }

    .hero-actions .button {
        flex: 0 1 auto;
    }

    .section-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-card-grid {
        grid-template-columns: 1fr;
    }

    .section,
    .section-compact {
        padding-top: 28px;
        padding-bottom: 64px;
    }

    .post-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .post-card,
    .section-card {
        min-height: auto;
        padding: 20px;
    }

    .hero-visual {
        display: block;
        min-height: 280px;
    }

    .visual-shell {
        min-height: 280px;
    }

    .cube-scene {
        --cube-size: clamp(148px, 44vw, 184px);
        perspective: 1000px;
        transform: scale(0.9);
    }

    .about-hero {
        padding-top: 28px;
    }

    .about-profile,
    .about-note,
    .about-side,
    .about-rule {
        padding: 20px;
    }

    .about-split,
    .about-rules {
        grid-template-columns: 1fr;
    }

    .about-facts li {
        flex-direction: column;
        gap: 4px;
    }

    .about-facts span {
        text-align: left;
    }

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

    .page > p,
    .article p,
    .lead {
        font-size: 1.02rem;
    }

    .page {
        padding-top: 36px;
        padding-bottom: 64px;
    }

    .page h1 {
        font-size: clamp(1.72rem, 8vw, 2.35rem);
    }

    .footer-inner {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 20px 0;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 18px, 1120px);
    }

    .nav-links {
        gap: 5px;
    }

    .site-logo {
        width: min(220px, 78vw);
        max-height: 48px;
    }

    .nav {
        gap: 8px;
        padding: 8px 0 10px;
    }

    .nav-toggle {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .nav-links a {
        width: 100%;
        padding: 8px 10px;
        font-size: 0.86rem;
    }

    .theme-toggle {
        width: 100%;
        min-width: 0;
        padding: 0 10px;
        font-size: 0.86rem;
    }

    .hero {
        padding-top: 22px;
    }

    .hero h1,
    .page h1 {
        font-size: clamp(1.62rem, 8.8vw, 2.12rem);
    }

    .hero-actions {
        align-items: center;
        gap: 10px;
    }

    .hero-actions .button {
        min-height: clamp(38px, 11vw, 42px);
        padding: 0 clamp(14px, 5vw, 18px);
        font-size: clamp(0.86rem, 3.8vw, 0.95rem);
        line-height: 1.15;
        white-space: nowrap;
    }

    .section-heading h2 {
        font-size: clamp(1.28rem, 6.4vw, 1.65rem);
    }

    .section-card strong,
    .post-card h2,
    .post-card h3 {
        font-size: 1.08rem;
    }

    .post-card p,
    .section-card span:last-child {
        font-size: 0.98rem;
    }

    .back-to-top {
        width: 44px;
        height: 44px;
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .visual-shell::before,
    .visual-shell::after,
    .blue-cube {
        animation: none !important;
    }
}
