:root {
    --bg-color: #efeae3;
    --text-color: #393739;
    --muted-text-color: #96847b;
    --accent-color: #8a929d;
    --surface-color: rgba(255, 255, 255, 0.58);
    --surface-strong: rgba(255, 255, 255, 0.82);
    --border-color: rgba(57, 55, 57, 0.14);
    --shadow-color: rgba(57, 55, 57, 0.14);
    --project-title-bg: rgba(239, 234, 227, 0.88);
}

p{
    line-height: 1.4;
    letter-spacing: 0.3px;
}

a {
    text-decoration: none;
    color: inherit;
}

a.underline {
    text-decoration: underline;
}

::-webkit-scrollbar {
    width: 0px;
    height: 0px;
}
/* 隐藏滚动条轨�?*/
::-webkit-scrollbar-track {
    background: transparent;
}

/* 隐藏滚动条滑�?*/
::-webkit-scrollbar-thumb {
    background: transparent;
}

body {
    display: flex;
    flex-direction: column;
    font-family: "Manrope", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    align-items: center;
}

body.other-works {
    overflow: hidden;
}

body.other-works footer {
    display: none;
}

h1,
h2,
h3,
#tags a,
.footer-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

menu {
    height: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(239, 234, 227, 0.92);
    position: fixed;
    z-index: 10;
}

menu section {
    height: 60px;
    width: 100%;
    padding-inline: clamp(16px, 4vw, 80px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(239, 234, 227, 0.92);
    margin: 0 auto;
    z-index: 10;
}



menu section #tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

menu section #tags a {
    margin: 0;
    padding: 0;
    padding-bottom: 5px;
    text-align: center;
    position: relative;
    display: inline-block;
    font-size: 32px;
    color: var(--muted-text-color);
}

#tags a:hover {
    color: var(--accent-color);
    /* 悬停时改变颜�?*/
}

#tags a.selected::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
}

#tags a.selected {
    pointer-events: none;
    /* 禁止点击 */
    cursor: default;
    /* 光标样式 */
    color: var(--text-color) !important;
    /* 可选：改变颜色，表明当前不可点�?*/
}

main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 80px !important;
    /* margin: 0 20px; */
    /* background-color: aquamarine; */
}

.scroll-hint {
    position: fixed;
    left: 50%;
    bottom: 105px;
    width: 50px;
    height: 50px;
    pointer-events: none;
    opacity: 0;
    z-index: 9;
    transform: translateX(-50%);
    animation: scroll-bob 2.8s ease-in-out infinite;
}

.scroll-hint.is-visible {
    opacity: 0.9;
}

.scroll-hint::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 42px;
    background-color: var(--accent-color);
    transform: translateX(-50%);
}

.scroll-hint::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 4px;
    width: 32px;
    height: 32px;
    border-right: 4px solid var(--accent-color);
    border-bottom: 4px solid var(--accent-color);
    transform: translateX(-50%) rotate(45deg);
}

@keyframes scroll-bob {
    0%,
    55%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    10% {
        transform: translateX(-50%) translateY(6px);
    }
    20% {
        transform: translateX(-50%) translateY(0);
    }
    30% {
        transform: translateX(-50%) translateY(6px);
    }
    40% {
        transform: translateX(-50%) translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-hint {
        animation: none;
    }
}

.portfolio-gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin: 0;
    line-height: 0;
}

.portfolio-gallery img {
    display: block;
    width: 100%;
    height: calc(100vh - 80px);
    object-fit: contain;
    background-color: var(--accent-color);
}

.portfolio-gallery .portfolio-link {
    display: block;
    line-height: 1.4;
    font-size: 18px;
    margin-top: 8px;
}

.tiny-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.tiny-widget.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.tiny-widget-trigger {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--surface-strong);
    color: var(--text-color);
    font-family: "Space Grotesk", sans-serif;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 26px var(--shadow-color);
}

.tiny-widget-overlay {
    position: fixed;
    inset: 0;
    background: rgba(57, 55, 57, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tiny-widget-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(620px, calc(100vw - 36px));
    transform: translate(-50%, -46%) scale(0.97);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    background: var(--surface-strong);
    box-shadow: 0 24px 58px rgba(57, 55, 57, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tiny-widget-close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(138, 146, 157, 0.12);
    color: var(--text-color);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.tiny-widget-close-icon:hover {
    background: rgba(138, 146, 157, 0.18);
}

.tiny-widget.is-open .tiny-widget-overlay {
    opacity: 1;
    pointer-events: auto;
}

.tiny-widget.is-open .tiny-widget-modal {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.tiny-widget-eyebrow {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--muted-text-color);
}

.tiny-widget-title {
    margin: 9px 0 5px;
    font-size: clamp(24px, 3vw, 34px);
}

.tiny-widget-desc {
    margin: 0;
    color: var(--muted-text-color);
}

.tiny-widget-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tiny-widget-play {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 8px 14px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    color: var(--text-color);
    background: transparent;
}

.tiny-widget-play:hover {
    background: rgba(138, 146, 157, 0.16);
}

.project .title {
    position: absolute;
    bottom: 0;
    padding: 20px;
    width:calc(100% - 40px);
    margin: 0;
    background: var(--project-title-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: height 0.3s ease;

    white-space: nowrap;

}

.project .title p {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.title {
    margin: 1em;
}

.project-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--accent-color);
}


.project-media::before {
    content: "";
    position: absolute;
    inset: -12%;
    background-image: var(--project-image);
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    transform: scale(1.08);
    opacity: 0.9;
}

.project-media img {
    position: relative;
    width: 100%;
    height: 225px;
    object-fit: contain;
    display: block;
    background-color: var(--accent-color);
}

/* Other Works: force project card size (fixed 400x225, 16:9) */
main.other-works-rows .project,
main.other-works-columns .project {
    height: 225px;
    width: 400px;
}

main.other-works-rows .project-media,
main.other-works-columns .project-media {
    height: 100%;
    width: 100%;
    aspect-ratio: auto;
}







/* 手机 */
@media(max-width: 650px) {
    h1 {
        letter-spacing: 0.5px;
        font-size: 20px;
    }

    p {
        letter-spacing: 0.3px;
        font-size: 18px;
    }

    menu section {
        padding-inline: clamp(12px, 5vw, 24px);
        /* background-color: aqua; */
    }

    menu section #tags {
        gap: 20px;
    }

    #tags a {
        letter-spacing: 0.5px;
        font-size: 20px;
    }

    .portfolio-gallery img {
        height: auto;
        object-fit: contain;
    }

    .project {
        position: relative;
        width: 100%;
    }

    .project img {
        width: 100%;
        /* aspect-ratio: 3 / 2; */
        /* object-fit: cover; */
        /* 保持图片填充且不变形 */
        display: block;
    }

    .project .title {
        width: calc(100% - 40px);
        height: 15px;
        /* 初始高度，仅容纳 h1 */
    }

    /* .project:active .title {
        height: 45px;
    } */

    #project-detail img {
        width: 100%;
        /* aspect-ratio: 3 / 2;
        object-fit: cover; */
        /* 保持图片填充且不变形 */
        display: block;
    }

    .intro-container {
        display: flex;
        flex-direction: column;
    }
}

@media(min-width: 651px) {
    menu section{
        padding-inline: clamp(20px, 4vw, 80px);
    }

    .project {
        position: relative;
        width: 100%;
    }

    .project img {
        width: 100%;
        /* aspect-ratio: 3 / 2;
        object-fit: cover; */
        /* 保持图片填充且不变形 */
        display: block;
    }

    .project .title {
        width: calc(100% - 40px);
        height: 30px;
        /* 初始高度，仅容纳 h1 */
    }
    #project-detail img {
        width: 600px;
        aspect-ratio: 3 / 2;
        object-fit: cover;
        /* 保持图片填充且不变形 */
        display: block;
    }
    #project-detail{
        width: 600px;
    }
}

/* 小型桌面 */
@media (min-width: 1025px) {
    h1 {
        font-size: 32px;
    }

    p {
        font-size: 18px;
    }

    .project:hover .title {
        height: 80px;
        /* 悬停时的高度，容�?h1 �?p 标签 */
    }

    .project:hover .title p {
        opacity: 1;
    }
}

/* 平板 */
@media (min-width: 651px)and (max-width: 1024px) {
    h1 {
        font-size: 24px;
    }

    p {
        font-size: 18px;
    }

    #tags a {
        font-size: 24px;
    }

    .project .title {
        width: calc(100% - 40px);
    }
}

.poppins-thin {
    font-family: "Poppins", sans-serif;
    font-weight: 100;
    font-style: normal;
}

.poppins-extralight {
    font-family: "Poppins", sans-serif;
    font-weight: 200;
    font-style: normal;
}

.poppins-light {
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.poppins-regular {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.poppins-medium {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.poppins-semibold {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-style: normal;
}

.poppins-bold {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.poppins-extrabold {
    font-family: "Poppins", sans-serif;
    font-weight: 800;
    font-style: normal;
}

.poppins-black {
    font-family: "Poppins", sans-serif;
    font-weight: 900;
    font-style: normal;
}

.poppins-thin-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 100;
    font-style: italic;
}

.poppins-extralight-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 200;
    font-style: italic;
}

.poppins-light-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    font-style: italic;
}

.poppins-regular-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.poppins-medium-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-style: italic;
}

.poppins-semibold-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-style: italic;
}

.poppins-bold-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: italic;
}

.poppins-extrabold-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 800;
    font-style: italic;
}

.poppins-black-italic {
    font-family: "Poppins", sans-serif;
    font-weight: 900;
    font-style: italic;
}

/* Empty portfolio page styling */
.empty-portfolio {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 140px);
    text-align: center;
}

.empty-portfolio h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--muted-text-color);
}

.empty-portfolio p {
    font-size: 24px;
    color: var(--muted-text-color);
}

@media(max-width: 900px) {
    .empty-portfolio h1 {
        font-size: 36px;
    }
    
    .empty-portfolio p {
        font-size: 20px;
    }
}

@media(max-width: 650px) {
    body.other-works {
        overflow: auto;
    }

    body.other-works footer {
        display: block;
    }

    .empty-portfolio h1 {
        font-size: 32px;
    }
    
    .empty-portfolio p {
        font-size: 18px;
    }

    .tiny-widget {
        right: 16px;
        bottom: 16px;
    }

    .tiny-widget-trigger {
        width: 56px;
        height: 56px;
        font-size: 30px;
    }

    .tiny-widget-modal {
        width: calc(100vw - 24px);
        padding: 18px;
    }
}

.portfolio-video-card {
    position: relative;
    width: 100%;
}

.portfolio-hotspot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    display: block;
}

.portfolio-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block;
    padding: 8px 10px;
    background: rgba(239, 234, 227, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.2px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.portfolio-tooltip .line {
    display: block;
    white-space: nowrap;
}

.portfolio-hotspot:hover .portfolio-tooltip,
.portfolio-hotspot:focus-visible .portfolio-tooltip {
    opacity: 1;
}








/* Other Works rows layout */
main.other-works-rows {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: calc(100% - 80px);
    max-width: 1200px;
    margin: 0 auto;
}

.other-works-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.other-works-section-title {
    font-size: 26px;
    margin: 0;
    padding-bottom: 0;
    color: var(--muted-text-color);
    text-align: left;
}

.other-works-section-desc {
    margin: -6px 0 0 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(138, 146, 157, 0.4);
    font-size: 16px;
    line-height: 1.4;
    color: var(--muted-text-color);
}

.other-works-row {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
}

.other-works-row a {
    display: block;
    flex: 0 0 auto;
}

.other-works-row .project {
    width: 400px;
    height: 225px;
    min-width: 400px;
    max-width: 400px;
}

@media(max-width: 1200px) {
    main.other-works-rows {
        width: calc(100% - 60px);
    }
}

@media(max-width: 900px) {
    main.other-works-rows {
        width: calc(100% - 40px);
    }

    .other-works-section-title {
        font-size: 22px;
    }

.other-works-section-desc {
    font-size: 14px;
}

    .other-works-row {
        gap: 20px;
    }
}

@media(max-width: 650px) {
    main.other-works-rows {
        width: calc(100% - 24px);
        gap: 32px;
    }

    .other-works-section-title {
        font-size: 20px;
    }

.other-works-section-desc {
    font-size: 14px;
}

    .other-works-row {
        gap: 16px;
    }

    .other-works-row .project {
        width: 400px;
        height: 225px;
        min-width: 400px;
        max-width: 400px;
    }
}


/* Other Works rows: fixed card size */
.other-works-row .project {
    width: 400px;
    height: 225px;
    min-width: 400px;
    max-width: 400px;
}

.other-works-row .project-media {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
}

.other-works-row .project-media img {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 100%;
    width: auto;
    max-width: none;
    transform: translate(-50%, -50%);
}


.other-works-row .project {
    width: 400px;
    height: 225px;
    min-width: 400px;
    max-width: 400px;
}


/* Lock page horizontal scroll; allow only row scroll */
body.other-works-rows {
    overflow-x: hidden;
}

main.other-works-rows {
    overflow-x: hidden;
}


/* Ensure rows don't expand to content so horizontal scroll works */
main.other-works-rows {
    align-items: stretch;
}

.other-works-section {
    width: 100%;
    min-width: 0;
}

.other-works-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.project img,
#project-detail img,
.other-works-row .project-media img {
    background-color: var(--accent-color);
}










