/* YOAViNATIONS variants base 1.1.0 · shared reset, layout, dialog and motion plumbing; each variant sets the tokens and the look */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}

html:has(dialog[open]) {
    overflow: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

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

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

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

.container {
    width: min(100% - 32px, var(--container, 1200px));
    margin-inline: auto;
}

.site-nav {
    display: flex;
    gap: clamp(12px, 3vw, 32px);
}

.site-nav a {
    text-decoration: none;
}

.scheme-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.platform-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.platform-icon,
.contact-icon {
    width: 16px;
    height: 16px;
    filter: var(--icon-filter);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.85rem;
}

.footer-row p {
    margin: 0;
}

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

.project-tile {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.project-tile > span,
.project-body > span {
    display: block;
}

/* Card anatomy (Owner, 2026-11-24): status chip placed alike on every card (beside the title), descriptions start level, platforms bottom-right */
.project-grid > .project-tile {
    display: flex;
    flex-direction: column;
}

.project-tile > .project-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.project-body > .project-title-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px 12px;
}

.project-title-row > .project-title {
    min-width: 0;
}

.project-title-row > .status-badge {
    flex: none;
    white-space: nowrap;
}

.project-body > .platform-row {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 12px;
}

.project-media,
.featured-media,
.dialog-media {
    display: block;
    overflow: hidden;
}

.project-media img,
.featured-media img,
.dialog-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-fallback {
    display: grid;
    place-items: center;
    height: 100%;
    font-size: 3rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    text-decoration: none;
    cursor: pointer;
}

.featured-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.project-dialog {
    width: min(100% - 32px, 760px);
    max-height: min(100% - 32px, 900px);
    padding: 0;
    border: 0;
    background: var(--surface);
    color: var(--text);
    overflow: auto;
}

.project-dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}

.dialog-close {
    position: sticky;
    top: 12px;
    float: right;
    z-index: 2;
    width: 40px;
    height: 40px;
    margin: 12px 12px -52px 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.dialog-media {
    aspect-ratio: 16 / 9;
}

.dialog-body {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: clamp(20px, 4vw, 36px);
}

.dialog-title {
    margin: 0;
}

.dialog-description,
.detail-line,
.detail-note {
    margin: 0;
}

.marquee {
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll var(--marquee-duration, 40s) linear infinite;
}

.marquee-run {
    display: flex;
    flex-shrink: 0;
}

@keyframes marquee-scroll {
    to {
        transform: translateX(-50%);
    }
}

.motion-ready [data-reveal]:not(.is-visible),
.motion-ready [data-render="projects"] > :not(.is-visible),
.motion-ready [data-render="featured"]:not(.is-visible) {
    opacity: 0;
}

.motion-ready .is-visible {
    animation: reveal-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes reveal-in {
    from {
        opacity: 0;
        translate: 0 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
