:root {
    /* spacing & sizing */
    --space-xxs: 0.125rem;
    --space-xs: 0.25rem;
    --space-sm: 0.375rem;
    --space-md: 0.5rem;
    --space-lg: 0.625rem;
    --space-xl: 0.75rem;
    --space-2xl: 0.875rem;
    --space-3xl: 1rem;
    --space-4xl: 1.125rem;
    --space-5xl: 1.25rem;

    --space-6xl: 1.5rem;
    --space-7xl: 2.5rem;

    --page-pad-top: 1.5rem;
    --nav-height: 71.6px;
    --page-pad-bottom: 3.75rem;

    --icon-size: 2.75rem;
    --icon-svg-size: 1.25rem;

    --padding: var(--space-lg);
    --gap: var(--space-5xl);
    --content-gap: var(--space-5xl);
    --nav-pad: var(--space-md) var(--space-xl);

    --card-padding: var(--space-4xl);
    --card-gap: var(--space-lg);

    --max-width: 68.75rem;

    /* radii & borders */
    --radius: 1.25rem;
    --card-radius: 0.875rem;
    --avatar-size: 12rem;
    --avatar-border: 0.125rem;
    --edge-width: 0.125rem;
    --thin-border: 0.0625rem;

    /* colors */
    --bg-color: #0b0f0b;
    --panel-bg: rgba(6, 10, 7, 0.78);
    --edge-color: rgba(81, 101, 84, 0.792);
    --glass: rgba(255, 255, 255, 0.04);
    --glass-weak: rgba(255, 255, 255, 0.02);
    --muted: #dfeee3;
    --muted-2: #cfe9d5;

    --text: #f3fbf5;
    --accent: #8bd2a7;
    --accent-2: #63c392;
    --accent-on: #052108;
    --accent-secondary-on: #ad41c7;
    --accent-secondary: #8d2ea5;
    --inverted-bg: #ffffff;
    --inverted-text: #000000;
    --focus-ring: rgba(139, 210, 167, 0.18);

    --dot-bg: rgba(255, 255, 255, 0.14);
    --carousel-aspect: 56.25%;
    --inactive-blur: 6px;
    --inactive-dim: 0.72;

    --sr-offset: -1px;

    --page-pad-total: calc(var(--space-5xl) * 2);
    --edge-gap: var(--content-gap);
}

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

/* Suppress focus rings from mouse/touch; keep them for keyboard nav */
:focus:not(:focus-visible) {
    outline: none;
}

html {
    color-scheme: dark;
    font-size: 16px;
    overflow-y: scroll;
}

body {
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("../image/IMC06117-min.jpg");
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    filter: blur(12px) brightness(0.94);
    transform: scale(1.04);
    z-index: -1;
}

main {
    width: 100%;
    padding-top: 0;
    padding-bottom: var(--page-pad-bottom);
    flex: 1 0 auto;
}

.app-shell {
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.app {
    flex: 1 0 auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: calc(var(--nav-height) + var(--content-gap)) var(--space-3xl) var(--content-gap);
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
    align-self: stretch;
}

.site-footer {
    flex-shrink: 0;
    padding: var(--space-4xl) var(--space-3xl);
    border-top: var(--edge-width) solid var(--edge-color);
    color: var(--muted-2);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

nav {
    display: flex;
    position: fixed;
    top: var(--edge-gap);
    left: var(--edge-gap);
    right: var(--edge-gap);
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    z-index: 20;
    justify-content: center;
}

.nav-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3xl);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius);
    background: rgba(16, 26, 17, 0.95);
    border: var(--edge-width) solid var(--edge-color);
    backdrop-filter: blur(0.375rem);
    box-sizing: border-box;
    position: relative;
}

.logo {
    font-family: "Pacifico", cursive;
    font-size: 1.4rem;
    letter-spacing: 0.03rem;
    color: var(--muted-2);
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 0;
}

.nav-links {
    display: none;
    flex-direction: column;
    gap: var(--space-md);
    position: absolute;
    right: 0;
    top: calc(100% + var(--space-md));
    background: rgba(16, 26, 17, 0.98);
    border: var(--edge-width) solid var(--edge-color);
    border-radius: 0.75rem;
    padding: var(--space-xl);
    min-width: 12rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.nav-links.is-open {
    display: flex;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    padding: var(--nav-pad);
    border-radius: calc(var(--radius) / 2);
    font-size: 0.9375rem;
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.03);
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background: linear-gradient(90deg, rgba(139, 210, 167, 0.06), rgba(99, 195, 146, 0.04));
    border-color: rgba(139, 210, 167, 0.12);
    transform: translateY(-1px);
}

.nav-admin-link {
    display: grid;
    place-items: center;
    padding: var(--space-md);
}

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    background: transparent;
    border: none;
    padding: var(--space-xs);
    cursor: pointer;
}

.nav-toggle-bar {
    width: 1.5rem;
    height: 0.125rem;
    background: var(--text);
    border-radius: 999px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--muted-2);
    font-weight: 600;
}

p,
li,
blockquote,
dd,
dt {
    color: var(--text);
}

a {
    color: var(--text);
    text-decoration: underline dotted rgba(223, 238, 227, 0.12);
}

a:hover,
a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

a:visited {
    color: var(--muted-2);
}

a:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

a svg {
    color: inherit;
    fill: currentColor;
}

.container {
    width: calc(100% - var(--page-pad-total));
    max-width: var(--max-width);
    margin: 0 auto;
}

.card {
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    background: var(--panel-bg);
    border: var(--edge-width) solid var(--edge-color);
    backdrop-filter: blur(10px) saturate(1.05);
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
}

.site-nav {
    justify-content: center;
    flex-wrap: wrap;
}

.home-hero {
    gap: var(--content-gap);
}

.home-previews {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--content-gap);
    align-items: stretch;
}

.home-previews > .card {
    max-height: 34rem;
    overflow-y: auto;
    padding-bottom: 0;
}

.home-grid {
    display: flex;
    gap: var(--content-gap);
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.home-copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    flex: 1 1 18rem;
    border-top: var(--edge-width) solid var(--edge-color);
    padding-top: var(--space-4xl);
}

.home-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.about-subtitle {
    font-size: 1rem;
    color: var(--muted-2);
    margin-top: var(--space-sm);
}

.about-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.home-portrait {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: calc(var(--card-radius) / 1.5);
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.04);
    width: fit-content;
    max-width: calc(var(--avatar-size) + (var(--space-lg) * 2));
    flex: 0 0 auto;
}

.portrait-placeholder,
.portrait-image {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 999px;
    background: var(--glass);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.06);
    display: grid;
    place-items: center;
    color: var(--muted-2);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.portrait-image {
    display: block;
    object-fit: cover;
}

.portrait-meta {
    margin-top: var(--space-md);
    text-align: center;
}

.portrait-name {
    font-size: 1rem;
    color: var(--muted-2);
}

.portrait-pronouns {
    font-size: 0.875rem;
    color: var(--muted-2);
}

.preview-list {
    display: grid;
    gap: var(--content-gap);
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
}

.preview-item,
.post-item,
.portfolio-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-4xl);
    border-radius: calc(var(--card-radius) / 1.5);
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.04);
}

.contact-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-4xl);
    padding: var(--space-4xl);
    border-radius: calc(var(--card-radius) / 1.5);
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.04);
    color: inherit;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease;
}

.contact-item:hover,
.contact-item:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: inherit;
}

.contact-item-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xxs);
}

.contact-item-arrow {
    flex: 0 0 auto;
    color: var(--muted-2);
    opacity: 0.55;
    transition: transform 160ms ease, opacity 160ms ease;
}

.contact-item:hover .contact-item-arrow,
.contact-item:focus-visible .contact-item-arrow {
    transform: translateX(4px);
    opacity: 1;
}

a.preview-item,
a.post-item {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

a.preview-item:hover,
a.preview-item:focus-visible,
a.post-item:hover,
a.post-item:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.read-more-link {
    color: var(--accent);
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: color 160ms ease;
}

.read-more-link::after {
    content: "\2192";
    display: inline-block;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 160ms ease, transform 160ms ease;
}

a.preview-item:hover .read-more-link,
a.preview-item:focus-visible .read-more-link,
a.post-item:hover .read-more-link,
a.post-item:focus-visible .read-more-link {
    color: var(--accent-2);
}

a.preview-item:hover .read-more-link::after,
a.preview-item:focus-visible .read-more-link::after,
a.post-item:hover .read-more-link::after,
a.post-item:focus-visible .read-more-link::after {
    opacity: 1;
    transform: translateX(0);
}

.preview-meta,
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.c-chip-link {
    text-decoration: none;
}

.c-chip-link:hover,
.c-chip-link:focus-visible {
    border-color: rgba(139, 210, 167, 0.3);
    color: var(--accent);
}

.content-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md) var(--space-3xl);
}

.content-heading {
    display: flex;
    flex-direction: column;
    gap: var(--space-xxs);
    min-width: min(100%, 14rem);
}

.content-title-row h1,
.content-title-row h2,
.content-title-row h3 {
    min-width: 0;
}

.content-title-row .preview-meta,
.content-title-row .c-tag-list {
    justify-content: flex-end;
}

.portfolio-highlight-card {
    position: relative;
    display: block;
    min-height: 18rem;
    border-radius: calc(var(--card-radius) / 1.5);
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
}

.portfolio-highlight-card:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.portfolio-highlight-photos {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: var(--space-xs);
    padding: var(--space-xs);
    transition:
        filter 160ms ease,
        transform 160ms ease;
}

.portfolio-highlight-card:hover .portfolio-highlight-photos,
.portfolio-highlight-card:focus-visible .portfolio-highlight-photos {
    filter: brightness(0.55);
    transform: scale(1.015);
}

.portfolio-highlight-photo {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: calc(var(--card-radius) / 2.5);
    object-fit: cover;
}

.portfolio-highlight-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: var(--space-4xl);
    background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.72));
}

.portfolio-highlight-copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
}

.portfolio-highlight-copy h3 {
    color: var(--text);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.portfolio-highlight-eye {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.8);
    transition:
        opacity 200ms ease,
        transform 200ms ease;
}

.portfolio-highlight-card:hover .portfolio-highlight-eye,
.portfolio-highlight-card:focus-visible .portfolio-highlight-eye {
    opacity: 1;
    transform: scale(1);
}

.portfolio-highlight-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 0;
    border-radius: calc(var(--card-radius) / 2.5);
    background: var(--glass);
    color: var(--muted-2);
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-overflow {
    position: relative;
    display: inline-flex;
}

.tag-overflow__trigger {
    cursor: default;
    white-space: nowrap;
}

.tag-overflow__tooltip {
    position: absolute;
    bottom: calc(100% + var(--space-sm));
    right: 0;
    display: none;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-3xl);
    background: var(--panel-bg);
    border: var(--edge-width) solid var(--edge-color);
    border-radius: var(--card-radius);
    backdrop-filter: blur(10px);
    z-index: 20;
    min-width: 8rem;
    max-width: 18rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tag-overflow:hover .tag-overflow__tooltip,
.tag-overflow:focus-within .tag-overflow__tooltip {
    display: flex;
}

.muted-label {
    color: var(--muted-2);
    font-size: 0.875rem;
}

.filter-collapse {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    background: none;
    border: none;
    color: var(--muted-2);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: var(--space-sm) 0;
    width: fit-content;
}

.filter-toggle svg {
    transition: transform 200ms ease;
}

.filter-toggle.is-open svg {
    transform: rotate(180deg);
}

.filter-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 220ms ease;
}

.filter-body > * {
    overflow: hidden;
}

.filter-body.is-open {
    grid-template-rows: 1fr;
}

.filter-body-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
    padding-top: var(--space-3xl);
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.tab:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.portfolio-grid {
    display: grid;
    gap: var(--content-gap);
}

.portfolio-card {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: var(--space-4xl);
}

.portfolio-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
}

.media-frame {
    position: relative;
    width: 100%;
    padding-bottom: var(--carousel-aspect);
    border-radius: calc(var(--card-radius) / 2);
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.media-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted-2);
    font-size: 0.9rem;
}

.portfolio-card-media {
    min-height: 12rem;
}

.portfolio-media-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: var(--space-xs);
    padding: var(--space-xs);
}

.portfolio-media-button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: calc(var(--card-radius) / 2.5);
    overflow: hidden;
}

.portfolio-media-item {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-media-link {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: var(--space-4xl);
    color: var(--muted-2);
    text-align: center;
}

.media-viewer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--edge-gap);
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
}

.media-viewer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3xl);
    width: 100%;
    height: 100%;
}

.media-viewer__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-viewer__media-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    will-change: transform;
    touch-action: pan-y;
}

.media-viewer__media {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--card-radius);
}

.media-viewer__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 160ms ease, background 160ms ease;
}

.media-viewer__arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    opacity: 1;
}

.media-viewer__arrow--prev { left: var(--space-3xl); }
.media-viewer__arrow--next { right: var(--space-3xl); }

.media-viewer__close {
    padding: var(--space-md) var(--space-4xl);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: var(--inverted-bg);
    color: var(--inverted-text);
    cursor: pointer;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.media-viewer__thumbs {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: var(--space-xs);
    scroll-snap-type: x mandatory;
    flex-shrink: 0;
}

.media-viewer__thumb {
    flex: 0 0 5rem;
    min-height: 3.5rem;
    max-height: 3.5rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: calc(var(--card-radius) / 2);
    overflow: hidden;
    opacity: 0.5;
    cursor: pointer;
    scroll-snap-align: center;
    transition: opacity 160ms ease, border-color 160ms ease;
    display: flex;
    align-items: stretch;
}

.portfolio-media-video-thumb,
.media-viewer__thumb-video {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    color: var(--muted-2);
    position: relative;
}

.portfolio-media-video-thumb img,
.portfolio-media-video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portfolio-media-video-thumb .video-play-badge,
.video-play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.3);
    color: #fff;
    pointer-events: none;
}

.media-viewer__thumb img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.media-viewer__thumb--active {
    opacity: 1;
    border-color: var(--accent);
}

.media-viewer__thumb:hover {
    opacity: 0.85;
}

.media-viewer__thumb-video {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: var(--glass);
    color: var(--muted-2);
}

.media-viewer__link {
    color: var(--text);
}

.media-viewer__audio {
    width: 100%;
    max-width: 32rem;
    border-radius: var(--card-radius);
}

.media-viewer__pdf {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--card-radius);
    background: #fff;
    display: block;
}

.media-viewer__thumb-icon {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: var(--glass);
    color: var(--muted-2);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--muted-2);
    text-decoration: none;
    font-size: 0.9rem;
    padding: var(--space-md) var(--space-3xl);
    border-radius: 0.75rem;
    background: rgba(6, 10, 7, 0.72);
    border: var(--thin-border) solid var(--edge-color);
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.back-link:hover,
.back-link:focus-visible {
    color: var(--text);
    background: rgba(6, 10, 7, 0.88);
    border-color: rgba(81, 101, 84, 1);
}

.markdown-body {
    display: grid;
    gap: var(--space-3xl);
    padding: var(--space-4xl);
    border: var(--edge-width) solid var(--edge-color);
    border-radius: calc(var(--card-radius) / 2);
}

.markdown-body ul,
.markdown-body ol {
    padding-left: var(--space-6xl);
}

.markdown-body pre {
    overflow-x: auto;
    padding: var(--space-3xl);
    border-radius: calc(var(--card-radius) / 2);
    background: rgba(0, 0, 0, 0.35);
}

.markdown-body code {
    padding: 0.05rem 0.25rem;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.28);
}

.markdown-body pre code {
    padding: 0;
    background: transparent;
}

.markdown-body blockquote {
    padding-left: var(--space-4xl);
    border-left: var(--edge-width) solid var(--edge-color);
}

.admin-media-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.admin-media-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: calc(var(--card-radius) / 2);
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.04);
}

.admin-media-thumb {
    width: 4rem;
    height: 3rem;
    object-fit: cover;
    border-radius: calc(var(--card-radius) / 3);
    flex-shrink: 0;
    display: block;
}

.admin-media-icon {
    width: 4rem;
    height: 3rem;
    display: grid;
    place-items: center;
    background: var(--glass);
    border-radius: calc(var(--card-radius) / 3);
    color: var(--muted-2);
    flex-shrink: 0;
}

.admin-media-item__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xxs);
}

.admin-media-item__info span:first-child {
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-media-item__actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.admin-media-item[draggable="true"] {
    cursor: grab;
}

.admin-media-item[draggable="true"]:active {
    cursor: grabbing;
}

.admin-media-item--drag-over {
    border-color: var(--accent);
    background: rgba(139, 210, 167, 0.07);
}

.admin-media-drag-handle {
    flex-shrink: 0;
    color: var(--muted-2);
    opacity: 0.45;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.upload-preview-list {
    display: grid;
    gap: var(--space-sm);
}

.upload-preview-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: 0.5rem;
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.04);
}

.contact-list {
    display: grid;
    gap: var(--content-gap);
}

.captcha-error {
    color: #ffb4ab;
    font-size: 0.875rem;
}

.form-grid {
    display: grid;
    gap: var(--space-lg);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
}

.field {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

label {
    color: var(--muted-2);
    font-size: 0.875rem;
}

input,
textarea,
select {
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: var(--space-md) var(--space-lg);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
    color: rgba(223, 238, 227, 0.6);
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

button {
    font-family: inherit;
}


.preview-image {
    width: 100%;
    height: 18rem;
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--card-radius) / 2);
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.preview-media-link {
    display: block;
}

.preview-media-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--glass-weak);
    overflow: hidden;
}

.preview-media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.preview-media-video,
.preview-media-audio,
.preview-media-other {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.preview-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted-2);
    font-size: 0.9rem;
}

.preview-item:hover .preview-media-image {
    opacity: 0.5;
}

.preview-item:hover .preview-media-link::after {
    content: "→";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: var(--text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.preview-item:hover .preview-placeholder {
    display: none;
}

.preview-item:active .preview-media-link {
    background: var(--glass);
}

.btn {
    display: inline-block;
    padding: var(--space-xl) var(--space-4xl);
    border-radius: 0.75rem;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: var(--accent-on);
    text-decoration: none;
    font-weight: 600;
    border: none;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-4xl);
    border-radius: 0.75rem;
    background: var(--glass-weak);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font: inherit;
    border: var(--thin-border) solid rgba(139, 210, 167, 0.22);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background: rgba(139, 210, 167, 0.07);
    border-color: rgba(139, 210, 167, 0.4);
    color: var(--accent);
}

.chip {
    display: inline-block;
    padding: var(--space-md) var(--space-2xl);
    border-radius: 0.5rem;
    background: linear-gradient(90deg, rgba(139, 210, 167, 0.07), rgba(99, 195, 146, 0.05));
    color: var(--text);
    border: 0.0625rem solid rgba(255, 255, 255, 0.03);
    font-size: 0.8125rem;
}

.c-card,
.c-button,
.c-chip,
.c-field,
.c-media-frame,
.c-skip-link {
    font: inherit;
}

.c-grid {
    display: grid;
    gap: var(--content-gap);
}

.c-grid--auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.c-stack {
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
}

.c-stack--compact {
    gap: var(--space-md);
}

.c-cluster,
.c-tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
}

.c-cluster--compact,
.c-tag-list--compact {
    gap: var(--space-sm);
}

.c-button {
    cursor: pointer;
    transition:
        transform 160ms ease,
        filter 160ms ease;
}

.c-button:hover,
.c-button:focus-visible {
    color: var(--accent-on);
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.c-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.c-chip-button {
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.c-chip-button:hover,
.c-chip-button:focus-visible,
.c-chip-button[aria-pressed="true"] {
    color: var(--accent-on);
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-color: rgba(139, 210, 167, 0.24);
}

.c-message {
    color: var(--muted-2);
}

.c-message--info {
    color: var(--muted-2);
}

.c-message--success {
    color: var(--accent);
}

.c-message--warning {
    color: var(--muted);
}

.c-message--error {
    color: #ffb4ab;
}

.c-section-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.c-section-header__description {
    color: var(--text);
}

.c-summary-card,
.c-stat-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-4xl);
    border-radius: calc(var(--card-radius) / 1.5);
    background: var(--glass-weak);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.04);
}

.c-summary-card__summary {
    color: var(--text);
}

.c-stat-card__value {
    color: var(--muted-2);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.c-field__hint {
    margin-top: calc(var(--space-xs) * -1);
}

.glass {
    background: var(--glass);
    border: var(--thin-border) solid rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-3xl);
    color: var(--text);
    text-decoration: none;
}

.skip {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip:focus {
    left: var(--space-3xl);
    top: var(--space-3xl);
    width: auto;
    height: auto;
    background: var(--inverted-bg);
    color: var(--inverted-text);
    padding: var(--space-md);
    z-index: 50;
}

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

.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
}

.portfolio-list .portfolio-card {
    grid-template-columns: 22rem 1fr;
    align-items: start;
}

.portfolio-list .media-frame {
    padding-bottom: 0;
    height: 16rem;
}

.portfolio-card {
    font: inherit;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.portfolio-card:hover,
.portfolio-card:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.portfolio-card:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.portfolio-card .media-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle fill='none' stroke='white' stroke-width='1.75' cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, background-color 200ms ease;
}

.portfolio-card:hover .media-frame::after,
.portfolio-card:focus-visible .media-frame::after {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.45);
}

.portfolio-media-more {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: calc(var(--card-radius) / 2.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: var(--glass);
}

.portfolio-media-more__count {
    color: var(--muted-2);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.portfolio-media-more__label {
    color: var(--muted-2);
    font-size: 0.75rem;
    opacity: 0.7;
}

@media (max-width: 700px) {
    .portfolio-list .portfolio-card {
        grid-template-columns: 1fr;
    }

    .portfolio-list .media-frame {
        padding-bottom: var(--carousel-aspect);
        height: auto;
    }

    .home-previews {
        grid-template-columns: 1fr;
    }

    .home-previews__portfolio {
        order: -1;
    }
}

.scroll-hint {
    position: sticky;
    bottom: 0;
    margin-top: -3rem;
    padding-top: 3rem;
    padding-bottom: var(--space-3xl);
    background: linear-gradient(to bottom, transparent, var(--panel-bg) 60%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--muted-2);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 1;
}

.scroll-hint--hidden {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
