#intro {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg);
    box-shadow: 0 0 0 100vmax var(--bg);
    cursor: pointer;
    transition:
        opacity 0.7s ease,
        visibility 0.7s;
}
#intro [data-intro-stage] {
    position: absolute;
    inset: 0;
}
.intro-done #intro {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.no-intro #intro,
html:not(.js) #intro {
    display: none;
}
html.js:not(.intro-done):not(.no-intro) body {
    overflow: hidden;
}

.hero {
    position: relative;
    z-index: 10;
    padding-top: clamp(120px, 18vw, 200px);
    padding-bottom: clamp(32px, 7vw, 112px);
    text-align: center;
}
.hero-title {
    margin: 0;
    --hero-size: min(14vw, 160px);
    font-size: var(--hero-size);
    line-height: 1;
}
.hero-title [data-fx-title] {
    display: block;
    min-height: 1.04em;
}
.js .hero-title [data-fx-title] {
    color: transparent;
}

.tool-ticker {
    max-width: 880px;
    margin: clamp(24px, 4vw, 40px) auto 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.tool-track {
    display: flex;
    gap: 40px;
    width: max-content;
    padding: 8px 20px;
}
.tool-track img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}
.js .tool-track.is-looping {
    animation: tool-scroll 40s linear infinite;
}
.tool-ticker:hover .tool-track {
    animation-play-state: paused;
}
@keyframes tool-scroll {
    to {
        transform: translateX(-50%);
    }
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 880px;
    margin: clamp(24px, 4vw, 40px) auto 0;
}
.skill-tags li {
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--fg-muted);
    font-size: var(--fs-sm);
    font-weight: 500;
    line-height: 1.5;
}
.skill-tags li.is-more {
    border-style: dashed;
    background: transparent;
    color: var(--fg-subtle);
}

@media (prefers-reduced-motion: reduce) {
    .tool-track {
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
    }
    .tool-ticker {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

.filter-bar {
    position: sticky;
    top: calc(var(--fx-icon-size) + 32px);
    z-index: 40;
    display: flex;
    justify-content: center;
    margin-bottom: clamp(24px, 4vw, 40px);
    pointer-events: none;
}
.filter-group {
    pointer-events: auto;
    display: flex;
    gap: 4px;
    width: 100%;
    max-width: 520px;
    padding: 4px;
    border-radius: 9999px;
    background: rgb(20 20 20 / 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--line-strong);
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.4);
}
.filter-btn {
    flex: 1;
    height: 40px;
    border-radius: 9999px;
    color: var(--fg-muted);
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition:
        background-color 0.2s,
        color 0.2s,
        transform 0.2s;
}
.filter-btn:hover {
    color: var(--fg);
}
.filter-btn:active {
    transform: scale(0.96);
}
.filter-btn[aria-pressed="true"] {
    background: var(--fg);
    color: var(--bg);
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
@media (min-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.project-card {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-card);
    border: 1px solid var(--line);
    background: var(--surface);
    text-align: left;
    cursor: pointer;
    transition: transform 0.5s;
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        filter 0.7s,
        transform 0.7s;
}
.project-card .project-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: clamp(16px, 2.5vw, 24px);
    background: linear-gradient(to top, rgb(0 0 0 / 0.8), transparent 60%);
    color: var(--fg);
    font-size: var(--fs-lg);
    font-weight: 900;
    font-style: italic;
    line-height: 1.3;
    text-transform: uppercase;
}
@media (hover: hover) {
    .project-card .project-caption {
        opacity: 0;
        transition: opacity 0.3s;
    }
    .project-card .project-caption span {
        transform: translateY(12px);
        transition: transform 0.3s;
    }
    .project-card:hover,
    .project-card:focus-visible {
        transform: translateY(-6px);
    }
    .project-card:hover img,
    .project-card:focus-visible img {
        transform: scale(1.06);
    }
    .project-card:hover .project-caption,
    .project-card:focus-visible .project-caption {
        opacity: 1;
    }
    .project-card:hover .project-caption span,
    .project-card:focus-visible .project-caption span {
        transform: none;
    }
}

.works-gallery {
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow: hidden;
    overflow-x: clip;
    overflow-y: visible;
}
.works-gallery .fan-gallery {
    padding: 8px 0 0;
}
.works-gallery .fan-gallery-card {
    background: var(--surface);
    box-shadow: 0 18px 40px rgb(0 0 0 / 0.45);
    outline: 1px solid var(--line);
    outline-offset: -1px;
}
.works-gallery .fan-gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgb(0 0 0 / 0.55)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E")
        center / 22px no-repeat;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transform: scale(0.8);
    transition:
        opacity 0.25s,
        transform 0.25s;
}
.works-gallery .fan-gallery-card[aria-current="true"]::after {
    opacity: 1;
    transform: none;
}
.works-gallery .fan-gallery-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.works-caption {
    margin: 16px 0 0;
    min-height: 1.4em;
    text-align: center;
    color: var(--fg);
    font-size: var(--fs-lg);
    font-weight: 700;
    line-height: 1.4;
}

.feature-card {
    display: grid;
    overflow: hidden;
}
@media (min-width: 900px) {
    .feature-card {
        grid-template-columns: 1.15fr 1fr;
    }
}
.feature-card .feature-media {
    display: block;
    aspect-ratio: 1200 / 630;
    overflow: hidden;
    background: #111;
}
.feature-card .feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s;
}
.feature-card .feature-media:hover img {
    transform: scale(1.04);
}
.feature-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: clamp(20px, 4vw, 40px);
}
.app-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.app-head img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}
.app-head h3 {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: 800;
}
.app-head p {
    margin: 0;
    color: var(--fg-muted);
    font-size: var(--fs-sm);
}
.feature-desc {
    margin: 0;
    color: var(--fg-muted);
}
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 8px;
}
.text-link {
    color: var(--fg-muted);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}
.text-link:hover {
    color: var(--accent);
}

.project-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}
@media (min-width: 1024px) {
    .project-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-top: 20px;
    }
}
.project-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: clamp(20px, 3vw, 28px);
}
.project-item > p {
    margin: 0;
    color: var(--fg-muted);
}
.project-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.project-head svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}
.project-head h3 {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: 800;
}
.tech-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0 0 0 1.1em;
    list-style: disc;
    color: var(--fg-muted);
}
.tech-list li::marker {
    color: var(--accent);
}
.tech-list strong {
    color: var(--fg);
    font-weight: 600;
}
.project-item code {
    padding: 0.1em 0.35em;
    border-radius: 5px;
    background: var(--surface-2);
    color: var(--fg);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: auto;
}

.world-grid {
    display: grid;
    gap: 16px;
}
@media (min-width: 900px) {
    .world-grid {
        grid-template-columns: 2fr 1fr;
        align-items: start;
        gap: 20px;
    }
}
.world-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.gs-viewer {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #000;
    overflow: hidden;
}
@media (min-width: 640px) {
    .gs-viewer {
        aspect-ratio: 16 / 9;
    }
}
.gs-viewer > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.55);
}
.gs-viewer .gs-cta {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}
.gs-viewer iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.world-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.world-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.world-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(16px, 3vw, 24px);
}
.world-body h3 {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: 700;
    line-height: 1.4;
}
.world-note {
    margin: -4px 0 0;
    color: var(--fg-subtle);
    font-size: var(--fs-sm);
}
.spec-list {
    display: grid;
    gap: 8px 32px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--fg-muted);
}
@media (min-width: 1024px) {
    .spec-list {
        grid-template-columns: 1fr 1fr;
    }
}
.spec-list strong {
    color: var(--fg);
    font-weight: 600;
}
.world-desc {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--fg-muted);
}
.world-desc p {
    margin: 0;
}
.world-desc strong {
    color: var(--fg);
    font-weight: 600;
}
.world-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.video-modal.is-open {
    display: flex;
}
.video-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1280px;
    height: min(85vh, 860px);
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    box-shadow: 0 30px 80px rgb(0 0 0 / 0.6);
}
@media (min-width: 1024px) {
    .video-panel {
        flex-direction: row;
    }
}
.video-panel .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
}

.video-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
.video-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50%;
    background: #000;
}
.video-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.video-info {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 50%;
    padding: 24px;
    overflow-y: auto;
}
.video-title {
    margin-bottom: 24px;
    padding-right: 56px;
    color: var(--fg);
    font-size: var(--fs-xl);
    font-weight: 900;
    font-style: italic;
    line-height: 1.15;
    text-transform: uppercase;
}
.video-note {
    color: var(--fg-muted);
    white-space: pre-line;
}
@media (min-width: 768px) {
    .video-info {
        padding: 40px;
    }
}
@media (min-width: 1024px) {
    .video-media {
        width: 66.667%;
        height: 100%;
    }
    .video-info {
        width: 33.333%;
        height: 100%;
    }
    .video-title {
        margin-top: 56px;
        padding-right: 0;
    }
}

#blog-section {
    padding-top: 0;
}
