@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');

/* CV PDF Download Button Styles */
.cv-download-section {
    display: none;
    text-align: left;
    margin: 1.5rem 0;
    padding: 1rem 0;
}

.cv-download-btn {
    display: inline-block;
    padding: 2px 20px;
    color: rgb(0, 0, 0);
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: 1.2px solid rgb(0, 0, 0);
    font-size: 1rem;
}

.cv-download-btn:hover {
    background-color: #191919;
    color: white;
    text-decoration: none;
}

.cv-download-note {
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.8rem;
    font-style: italic;
}

/* CV下载链接样式 */
.cv-download-link {
    margin: 20px 0 10px 0;
    position: relative;
    z-index: 1;
}

.cv-download-text {
    font-family: "JetBrains Mono" !important;
    font-size: 14px;
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.1s ease;
    -webkit-font-feature-settings: "liga" 0;
    font-feature-settings: "liga" 0;
}

.cv-download-text:hover {
    color: var(--color-text-hover);
    text-decoration-thickness: 1.5px;
}

/* 社交媒体按钮样式 - 使用meta-link样式 */
.social-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin: 20px 0 40px 0;
    padding: 0;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.social-btn {
    background-color: var(--color-text) !important;
    color: var(--color-white) !important;
    text-decoration: none;
    transition: color 0.1s ease;
    padding: 2px 10px;
    border-radius: 0px;
    font-size: 12px;
    border: 1.5px solid var(--color-text) !important;
    margin-bottom: 20px;
    letter-spacing: -0.4px;
    font-family: "JetBrains Mono" !important;
    -webkit-font-feature-settings: "liga" 0;
    font-feature-settings: "liga" 0;
}

.social-btn:hover {
    color: var(--color-text) !important;
    background-color: var(--color-white) !important;
    border: 1.5px solid var(--color-text) !important;
    margin-bottom: 20px;
}

/* 确保社交媒体按钮不会出现在PDF中 */
@media print {
    .no-print {
        display: none !important;
    }
}

/* font declaration */
@font-face {
    font-family: 'MarrSans';
    src: url('../fonts/MarrSans-Regular-Web.woff.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/RobotoMono-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 700;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/RobotoMono-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 700;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/RobotoMono-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 700;
    font-style: italic;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/JetBrainsMono[wght].ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/JetBrainsMono-Italic[wght].ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

@font-face {
    font-family: 'Libertinus Serif';
    src: url('../fonts/LibertinusSerif-SemiboldItalic.ttf') format('truetype'); 
    font-weight: 600;
    font-style: italic;
}

/* add SVG filter definition at the beginning of the style sheet */
@supports (filter: url('#noiseFilter')) {
    body::before {
        content: '';
        position: fixed;
        top: -100vh;
        left: -100vw;
        width: 0;
        height: 0;
        z-index: -1;
    }

    body::before {
        content: '<svg style="display:none"><defs><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter><filter id="noiseFilter2"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter></defs></svg>';
    }
}


/* color definition */
:root {
    --color-background: #f5f5f5;
    --color-text: #000;
    --color-text-hover: #9f9f9f;
    --color-border: #000;
    --color-white: #fff;
    --color-text-grey: #7f7f7f;
    --color-text-darkgrey: #333;
    --color-red: #009797d1;
    --color-light-grey: #c5c5c5;
    --color-highlight: #c8c8c8e3;
    /* prevent symbols from being converted to emojis */
    font-variant-emoji: none;
    -webkit-font-variant-emoji: none;
}

/* global style reset and basic settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", sans-serif;
    letter-spacing: 0.4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Make all images non-selectable and non-draggable (global) */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}

a img {
    -webkit-user-drag: none;
}

/* 文本选择的样式 */
::selection {
    background-color: var(--color-text);
    color: var(--color-background);
}

/* 为 Firefox 浏览器添加文本选择样式 */
::-moz-selection {
    background-color: var(--color-text);
    color: var(--color-background);
}

/* hide the scrollbar of webkit browser */
*::-webkit-scrollbar {
    display: none;
}

/* set the background of the page */
body {
    min-height: 100vh;
    background: var(--color-background);
    padding-bottom: 100px;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-font-feature-settings: "liga" 0;
    font-feature-settings: "liga" 0;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* hide the scrollbar of body */
body::-webkit-scrollbar {
    display: none;
}


/* main container */
.container {
    position: relative;
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 40px auto 100px;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
.mobile-tips {
    display:none;
}


/* hide class */
.hide {
    display: none;
}

.intro-wrapper {
    width: 100%;
    margin: 0 0 40px 0;
    padding: 0;
}

/* 介绍文本样式 */
.intro {
    font-size: 15px;
    font-family: "Roboto", sans-serif !important;
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
    font-weight: 350;
    text-align: left;
    padding: 0;
    width: 100%;
}

.intro-callout {
    border: 1.2px solid var(--color-text);
    background: var(--color-white);
    padding: 16px 24px;
    box-sizing: border-box;
}

.intro + .intro {
    margin-top: 16px;
}

.intro p {
    margin: 0;
    line-height:1.4 ;
    font-size: 15px
}

.intro p.intro-break {
    margin: 12px 0 0;
}

.intro strong {
    font-weight: 600;
}

.intro-item {
    margin: 24px 0 0;
    line-height: 1.2;
}

.intro-note {
    display: inline;
    background: rgba(0, 0, 0, 0.091);
}

.intro > ul {
    margin: 0;
    padding-left: 64px; /* 圆点和文字整体右移 */
    font-weight: 350;
    /* color: #6c757d; */
}

.intro > ul > li {
    margin-bottom: 0.9rem;
    margin-top: 0.8rem;

    font-size: 0.9em;
}



.intro-list {
    padding-left: 48px;
}

/* .intro-list .intro-item {
    max-width: 600px;
} */

.intro-item + .intro-item {
    margin-top: 8px;
}

.intro-item:first-of-type {
    margin-top: 0.8em;
}

.intro-highlight {
    font-weight: 600;
}
.intro-highlight-b,
.intro-highlight-p {
    position: relative;
    color: inherit;            /* 不改文字颜色 */
}

/* INTEGRATION 高光 */
.intro-highlight-p::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;

    /* 控制高光的“行高”和垂直位置 */
    height: 0.6em;           /* 比整行小一点的高度 */
    bottom: 0.1em;            /* 向下偏一点，贴近字底部 */

    background: #ff0d8e2e;      /* 高光颜色 */
    z-index: -1;              /* 在文字下面 */
}

/* INTERACTIVITY 高光 */
.intro-highlight-b::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;

    height: 0.6em;
    bottom: 0.1em;

    background: #0015ff35;
    z-index: -1;
}

.intro-highlight-integration { color: #ff0d7a; } .intro-highlight-interactivity { color: #0004ff; }


.intro-image {
    width: 100%;
    height: auto;
    margin: 20px auto;
    display: block;
}

.intro a,
.intro a:link,
.intro a:visited {
    color: var(--color-text);
    transition: all 0.1s ease;
    font-family: "Roboto", sans-serif !important;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-decoration: none;
    padding: 1px 4px;
    margin: -1px -4px;
    border-bottom: 0.5px solid var(--color-text);
}

.intro a:hover,
.intro a:active {
    color: var(--color-white);
    background-color: var(--color-text);
    border-bottom: 0.5px solid var(--color-white);
    font-family: "Roboto", sans-serif !important;
}

/* 矩阵说明文本样式 */
.matrix-caption {
    text-align: right;
    margin-top: 32px;
    font-family: "JetBrains Mono", monospace;
    font-style: italic;
    font-size: 24px;
    color: var(--color-text);
    font-weight: 550;
    padding: 0 0px;
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.matrix-caption a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.05s ease;
}

.matrix-caption a:hover {
    color: white;
    background-color: black;
}

/* 主内容区域 - 左右布局 */
.main-content-wrapper {
    display: flex;
    gap: 30px;
    max-width: 1160px;
    margin: 0 auto 0 calc(50% - 540px);
    padding: 0 20px;
    align-items: flex-start;
    justify-content: center;
}

/* 项目列 (左侧) */
.projects-column {
    flex: 0 0 760px;
    min-width: 0;
    padding-top: 100px;
    padding-left: 30px;
}

.research-section {
    width: 100%;
    margin: 24px 0 40px;
}

.research-projects {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.research-card {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    align-items: stretch;
}

.research-card .carousel-project-image {
    flex-basis: 288px;
    height: 162px;
}


.research-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.research-card-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    margin-top: 4px;
    padding-left: 22px;
}

.research-card-author {
    font-family: "Roboto", sans-serif;
    font-weight: 350;
    font-size: 13px;
    line-height: 1.3;
    color: var(--color-text);
}

.author-highlight {
    background: rgba(0, 0, 0, 0.08);
    padding: 0 4px;
}

.research-card-venue {
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    line-height: 1.3;
    color: var(--color-text);
    font-weight: 600;
    margin-top: auto;
}

.research-card-venue-note {
    font-weight: 350;
}

.research-card-links,
.carousel-project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.carousel-project-links {
    margin-top: 6px;
}

.research-card-link,
.project-card-link {
    font-family: "GeistMono", monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-white);
    background-color: var(--color-text);
    padding: 2px 10px 2px;
    text-decoration: none;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

.project-card-link:hover,
.research-card-link:hover {
    opacity: 0.45;
}

.research-card-title-link {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.1s ease;
    cursor: pointer;
}

.research-card-title-link:hover {
    color: var(--color-text-hover);
}

.research-card-image-clickable {
    cursor: pointer;
}

/* 新闻列 (右侧) */
.news-column {
    flex: 0 0 360px;
    min-width: 0;
    padding-top: 80px;
    align-self: flex-start;
}

/* Desktop carousel view */
.desktop-carousel {
    display: block;
    width: 100%;
}

/* Category carousel (top section) */
.carousel-categories {
    width: 100%;
    margin-bottom: 40px;
    overflow: hidden;
    background-color: var(--color-background);
}

.carousel-track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0px 0;
    background-color: var(--color-background);
}

.carousel-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(0.9);
    pointer-events: auto;
    flex-shrink: 0;
}

.carousel-category-item.active {
    transform: scale(1);
    pointer-events: auto;
}

.carousel-category-item.prev,
.carousel-category-item.next {
    transform: scale(0.9);
    pointer-events: auto;
}

.carousel-category-image {
    width: 90px;
    height: 120px;
    object-fit: contain;
    transition: all 0.3s ease;
    mix-blend-mode: multiply;
    opacity: 0.3;
}

.carousel-category-item.active .carousel-category-image {
    width: 140px;
    height: 140px;
    opacity: 1;
}

.carousel-category-item.prev .carousel-category-image,
.carousel-category-item.next .carousel-category-image {
    opacity: 0.3;
}

.carousel-category-name {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 350;
    color: var(--color-text);
    text-align: center;
    max-width: 150px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.carousel-category-item.active .carousel-category-name {
    font-size: 16px;
    font-weight: 600;
    opacity: 1;
}

.carousel-category-item.prev .carousel-category-name,
.carousel-category-item.next .carousel-category-name {
    opacity: 0.5;
}

/* Projects display (bottom section) */
.carousel-projects {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.carousel-project-card {
    display: flex;
    gap: 36px;
    background-color: var(--color-background);
    border: 1.2px solid var(--color-text);
    padding: 8px;
    cursor: pointer;
    transition: all 0.1s ease;
    align-items: stretch;
}

.carousel-project-card:hover {
    background-color: var(--color-white);
}

.carousel-project-image {
    flex: 0 0 160px;
    height: 90px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
}

.carousel-project-title {
    font-family: "Roboto", sans-serif;
    font-size: clamp(13px, 2.6vw, 15px);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    transition: color 0.1s ease;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.research-type-stack {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.research-type-indicator {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-top:4px;
    transform: rotate(-4deg);
}

.research-type-stack .research-type-indicator:first-child {
    transform: none;
}

.research-type-stack .research-type-indicator:nth-child(2) {
    transform: translate(4px, 3px) rotate(6deg);
}

.research-type-stack .research-type-indicator:nth-child(3) {
    transform: translate(2px, 6px) rotate(-2deg);
}

.research-type-stack .research-type-indicator:nth-child(n+4) {
    transform: translate(1px, 8px) rotate(8deg);
}

.research-card-title-text {
    display: inline-block;
    line-height: 1.1;
    flex: 1 1 auto;
    font-weight: 600;
    font-size: 15px;
}

.research-type-aff {
    background-color: #ff0d7a;
}

.research-type-int {
    background-color: #0004ff;
}

.research-type-neutral {
    background-color: #808080;
}

.carousel-project-card:hover .carousel-project-title {
    color: var(--color-text);
}

.carousel-project-subtitle {
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    font-weight: 350;
    color: var(--color-text);
    line-height: 1.2;
    transition: color 0.1s ease;
}

.research-card .carousel-project-subtitle {
    opacity: 0.4;
}

.carousel-project-card:hover .carousel-project-subtitle {
    color: var(--color-text);
}

.carousel-project-date {
    font-family: "GeistMono", monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    margin-top: auto;
    padding-top: 8px;
    transition: color 0.1s ease;
}

.carousel-project-card:hover .carousel-project-date {
    color: var(--color-text);
}

/* Desktop placeholder */
.desktop-placeholder {
    display: none;
    padding: 60px 20px;
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    color: var(--color-text);
    opacity: 0.5;
}

/* Hide column view on desktop, show on mobile */
.column-view {
    display: none;
}

/* 中等屏幕：调整间距和边距，保持左右布局 */
@media screen and (max-width: 1300px) {
    .main-content-wrapper {
        margin: 0 auto;
        max-width: 1160px;
    }
}

/* 中小屏幕：压缩左边列宽度，保持左右布局 */
@media screen and (max-width: 1185px) {
    .main-content-wrapper {
        max-width: 100%;
        padding: 0 20px;
    }

    .projects-column {
        flex: 1 1 auto;
        max-width: 760px;
        min-width: 0;
        padding-top: 100px;
    }

    .news-column {
        flex: 0 0 360px;
    }
}

/* 轮播尺寸调整：1000-1190px范围内，非轮播中的items更小 */
@media screen and (max-width: 1190px) and (min-width: 1001px) {
    .carousel-categories {
        margin-bottom: 30px;
    }

    .carousel-track {
        gap: 12px !important;
        padding: 15px 0;
    }

    .carousel-category-item {
        margin: 0 -15px;
    }

    .carousel-category-item.active {
        margin: 0 0px;
    }

    .carousel-category-image {
        width: 84px !important;
        height: 84px !important;
    }

    .carousel-category-item.active .carousel-category-image {
        width: 126px !important;
        height: 126px !important;
    }

    .carousel-category-name {
        font-size: 12px !important;
    }

    .carousel-category-item.active .carousel-category-name {
        font-size: 14px !important;
    }
}

/* 小屏幕/移动端：改为上下布局，显示mobile column view */
@media screen and (max-width: 1000px) {
    .main-content-wrapper {
        flex-direction: column;
        gap: 60px;
        max-width: 760px;
        margin: 0 auto;
    }

    .projects-column {
        flex: 1;
        max-width: 100%;
        width: 100%;
        padding-top: 100px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .intro-wrapper {
        max-width: 760px;
        width: 100%;
    }

    .intro-image {
        width: 100%;
    }

    .desktop-carousel {
        max-width: 760px;
        width: 100%;
    }

    .column-view {
        max-width: 760px;
        width: 100%;
    }

    .news-column {
        flex: 1;
        width: 100%;
        max-width: 100%;
        padding-top: 0;
    }

    .news-section {
        display: none;
    }

    /* 显示mobile column view，隐藏desktop carousel和about section */
    .desktop-carousel {
        display: none;
    }

    .column-view {
        display: none;
    }

    .column-view.is-open {
        display: block;
    }

    .about-section {
        display: none;
    }

    .intro-wrapper {
        margin-bottom: 20px;
    }

    .intro-image {
        width: 100%;
    }

    .projects-column .projects-heading {
        align-self: stretch;
        width: 100%;
        max-width: 760px;
        padding: 0 8px 4px 8px !important;
        box-sizing: border-box;
    }

    .archive-heading {
        padding-left: 8px !important;
    }

    .archive-toggle {
        cursor: pointer;
        position: relative;
    }

    .archive-toggle .archive-toggle-triangle {
        display: inline-block;
        position: absolute;
        left: -13px;
        top: 50%;
        width: 0;
        height: 0;
        border-top: 5px solid transparent;
        border-bottom: 5px solid transparent;
        border-left: 7px solid currentColor;
        transform-origin: center;
        transform: translateY(-50%);
        transition: transform 0.12s ease;
    }

    .archive-toggle[aria-expanded="true"] .archive-toggle-triangle {
        transform: translateY(-50%) rotate(90deg);
    }

    .projects-column .mobile-news-section {
        display: block;
        width: 100%;
        max-width: 760px;
        margin: 0 0 32px 0;
        padding: 0;
    }

    .mobile-news-section .news-heading {
        padding: 0 8px 4px 8px !important;
    }

    .mobile-news-section .news-item {
        padding: 12px 8px;
    }

    .research-card .carousel-project-image {
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .research-card {
        width: 100%;
        flex-direction: column;
        gap: 8px;
        padding: 16px 8px;
    }

    .research-card-details {
        padding-left: 22px;
        min-height: 0;
    }

    .research-card-venue {
        margin-top: 8px;
    }
}

/* 高亮样式 */
.highlight {
    font-style: italic;
    font-weight: 600;
}

.highlight-special {
    font-style: italic;
    font-weight: 800;
}

.highlight-bg {
    background-color: var(--color-highlight);
    padding: 1px 2px;
}

/* ============================================
   Project Page Styles
   ============================================ */

/* Project page style */
.project-section {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Project page background */
.project-page {
    background: var(--color-white) !important;
}

/* Project header */
.project-header {
    width: 100%;
    margin-bottom: 40px;
    margin-top: 100px;
}

/* Project citation style */
.project-citation {
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text);
    font-family: "Roboto", sans-serif;
    font-style: italic;
}

.project-title {
    font-family: "JetBrains Mono", monospace;
    font-size: 56px;
    font-weight: 400;
    margin: 0;
    padding: 0;
}

.project-subtitle {
    font-family: "JetBrains Mono", monospace;
    font-size: 20px;
    font-weight: 320;
    margin: 8px 0 0 0;
    padding: 0;
}

/* Meta links container style */
.meta-links {
    display: flex;
    margin-top: 2px;
    flex-direction: row;
    gap: 24px;
    flex-wrap: wrap;
    border-bottom: 0px solid var(--color-text) !important;
}

/* Links container style */
.links-container {
    margin-top: 2px;
}

.links-wrapper {
    margin-top: 8px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
}

/* Project link style */
.meta-link {
    display: inline-block;
    background-color: var(--color-text);
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.1s ease;
    padding: 2px 10px;
    border-radius: 0px;
    transition: all 0.1s ease;
    font-size: 14px;
    border: 1.5px solid var(--color-text);
    letter-spacing: -0.4px;
}

.meta-link:hover {
    color: var(--color-text);
    background-color: var(--color-white);
    border: 1.5px solid var(--color-text);
}

/* Project metadata container */
.project-meta {
    display: flex;
    flex-direction: column;
    margin: 40px 0;
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    gap: -76px;
}

/* Vertical separator */
.project-meta::before {
    display: none;
}

/* Single metadata item container */
.metadata-item {
    display: flex;
    min-height: 1px;
    align-items: baseline;
    border-bottom: 1.2px solid var(--color-text);
}

/* The top border of the first metadata item */
.metadata-item:first-child {
    border-top: 1.2px solid var(--color-text);
}

.meta-label {
    width: 85px;
    padding-right: -40px;
    text-align: right;
    font-family: "JetBrains Mono", monospace;
    font-size: 14px;
    color: var(--color-text);
    flex-shrink: 0;
    line-height: 20px;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    font-weight: 500;
    margin: 0 !important;
}

/* Add colon to the label */
.meta-label::after {
    content: '';
}

.meta-text {
    font-family: "JetBrains Mono", monospace;
    font-size: 14px;
    color: var(--color-text);
    flex: 1;
    line-height: 20px;
    min-height: 20px;
    display: inline-block;
    margin-left: 0;
    margin-top: 0 !important;
    padding-left: 40px;
    font-weight: 350;
}

/* Handle multi-line content */
.meta-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Project footer style */
.project-footer {
    margin-top: 40px;
}

.project-context {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.2;
    font-style: italic;
    letter-spacing: 0.9px;
    font-weight: 400;
    width: 40%;
    margin-left: 360px;
}

/* 淡出效果 */
.fade-out {
    opacity: 0.3;
}

/* 确保标签也跟随卡片的透明度变化 */
.fade-out .label {
    opacity: 0.3;
}

/* video container style */
.video-wrapper {
    max-width: 840px;
    margin: 0 auto;
    margin-top: 60px;
    padding: 0 0px;
}

.video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

/* blogs section style */
.blogs-section {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 20px;
}

/* blogs column container */
.blogs-container {
    display: flex;
    justify-content: space-between;
    margin-top: 250px;
}

/* blogs column style */
.blog-column {
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

/* column title style */
.blog-column h2 {
    font-family: "JetBrains Mono", monospace;
    font-size: 18px;
    font-weight: 650;
    color: var(--color-text);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

/* ============================================
   About Section Styles
   ============================================ */

/* About section style */
.about-section {
    width: 100%;
    margin: 0 0 0 0;
    padding: 16px 0px 0;
    position: relative;
    background-color: var(--color-background);
}

.about-heading {
    font-size: 16px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.05em;
    color: var(--color-text);
    padding: 0 40px 20px 16px !important;
    font-family: "Roboto", sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-heading::after {
    content: '';
    flex: 1;
    height: 1.2px;
    background-color: var(--color-text);
    transform: translateY(-1px);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 16px 16px 16px;
}

.about-links-row {
    display: flex;
    gap: 6px;
    padding: 0 0px;
    margin-top: -4px;
}

.about-mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "GeistMono", monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px 3px;
    border: 1.2px solid var(--color-text);
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.about-mini-button:hover {
    background-color: var(--color-text);
    color: var(--color-white);
}

.about-photo {
    width: 100%;
    max-width: 290px;
    height: auto;
    display: block;
}

.about-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 350;
    line-height: 1.4;
}

.about-label {
    font-weight: 600;
    color: var(--color-text);
    padding-top:9px;
}

.about-text {
    color: var(--color-text);
    padding-left: 16px;
    font-weight: 350;
}

.no-padding {
    padding-left: 0 !important;
    font-size: 14px !important;
}

.about-name {
    padding-left: 0 !important;
    font-size: 22px !important;
    font-weight: 600;
}

.about-link {
    text-decoration: none;
    border-bottom: 1.2px solid var(--color-text);
    color: var(--color-text);
    transition: all 0.1s ease;
}

.about-link:hover {
    background-color: var(--color-text);
    color: var(--color-white);
    border-bottom: 1.2px solid var(--color-text);
}

.projects-heading {
    font-size: 16px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.05em;
    color: var(--color-text);
    padding: 0 4px 4px 0px !important;
    font-family: "Roboto", sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
}

.projects-heading::after {
    content: '';
    flex: 1;
    height: 1.2px;
    background-color: var(--color-text);
    transform: translateY(-1px);
}

.archive-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-style: inherit;
    letter-spacing: inherit;
    padding: 0;
    cursor: default;
}

.archive-toggle-triangle {
    display: none;
}

/* ============================================
   News Section Styles
   ============================================ */

/* News page style */
.news-section {
    width: 100%;
    margin: 0px 0 0 0;
    padding: 8px 0px 0;
    position: relative;
    z-index: 101;
    background-color: var(--color-background);
}

.mobile-news-section {
    display: none;
}

.news-heading {
    font-size: 16px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.05em;
    color: var(--color-text);
    padding: 0 40px 4px 16px !important;
    font-family: "Roboto", sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-heading::after {
    content: '';
    flex: 1;
    height: 1.2px;
    background-color: var(--color-text);
    transform: translateY(-1px);
}

.news-container {
    gap: 8px;
}

.news-item {
    display: flex;
    align-items: baseline;
    font-family: "JetBrains Mono", monospace!important;
    padding: 16px;
    transition: all 0.1s ease;
}

.news-item:hover {
    background-color: transparent;
}

/* Add star style */
.news-item.starred::after {
    content: '★';
    position: absolute;
    right: 16px;
    top: 40%;
    transform: translateY(-50%);
    font-size: 32px;
    color: var(--color-text);
}

.news-time {
    min-width: 64px;
    color: var(--color-text);
    font-size: 12px;
    font-weight: 600;
    padding-top: 8px;
    font-family: "GeistMono", monospace;
}

.news-event {
    font-size: 14px;
    font-weight: 350;
    color: var(--color-text);
    font-family: "Roboto", sans-serif!important;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.news-link {
    text-decoration: none;
    border-bottom: 1.2px solid var(--color-text);
    color: var(--color-text);
    transition: all 0.1s ease;
}

.news-link:hover {
    background-color: var(--color-text);
    color: var(--color-white);
    border-bottom: 1.2px solid var(--color-text);
}

/* ============================================
   Blog Section Styles
   ============================================ */

.blog-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 6px;
    position: relative;
    text-decoration: none;
    border-bottom: 1.4px solid var(--color-text);
}


.blog-time {
    min-width: 60px;
    color: var(--color-text);
    font-size: 12px;
    font-family:"JetBrains Mono", monospace;
    font-weight: 600;
}
.blog-title {
    min-width: 60px;
    color: var(--color-text);
    font-size: 12px;
    font-family:"JetBrains Mono", monospace;
}




/* blog article page style */
.blog-post .blog-title {
    font-family: "JetBrains Mono", monospace;
    font-size: 40px;
    font-weight: 400;
    margin: 0;
    padding: 0;
    margin-top: 64px;
    text-align: center;
}

/* blog article time style */
.blog-post .project-header .blog-time {
    display: block;
    font-family: "GeistMono", monospace;
    font-size: 14px;
    color: var(--color-text);
    margin-top: 16px;
    font-weight: 350;
    text-align: center;
}

/* blog description style */
.blog-description {
    font-family: "JetBrains Mono", monospace;
    font-size: 16px;
    color: var(--color-text);
    margin-top: 16px;
    line-height: 1.6;
    letter-spacing: 0.4px;
    font-weight: 350;
    text-align: center;
    max-width: 600px;  /* 限制描述文本的宽度 */
    margin-left: auto;
    margin-right: auto;
}

/* blog content container style */
.blog-article-content {
    max-width: 860px;
    margin: 0 auto;
}

/* blog markdown content style */
.blog-article-content.markdown-content {
    margin-top: 20px;
    width: 100%;
}

/* blog article page project section style */
.blog-post .project-section {
    max-width: 860px !important;
}

/* Time metadata item special style */
.metadata-item.time-item {
    border-top: 1.2px solid var(--color-text);
}

/* keep the original bottom border style */
.metadata-item {
    display: flex;
    min-height: 1px;
    align-items: baseline;
    border-bottom: 1.2px solid var(--color-text);
}

/* Player 基础样式 - 在非移动端隐藏 */
/* 移动端适配 - 先定义移动端规则 */
@media screen and (max-width: 768px) and (hover: none) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        overflow-x: hidden;
        padding-bottom: 60px;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        touch-action: manipulation;
    }

    /* 允许特定元素的文本选择 */
    .blog-article-content,
    .project-content,
    input,
    textarea {
        -webkit-touch-callout: default;
        -webkit-user-select: text;
        user-select: text;
    }

    /* 隐藏箭头图标 */
    .arrow-icon {
        display: none;
    }


    .intro {
        font-size: 16px !important;
        padding: 8px 10px 0px 10px !important;
        line-height: 1.3 !important;
        margin-top: 0px;
        margin-bottom: 12px;
        text-align: left !important;
        position: relative !important;
        top: auto !important;
    }

    .intro-callout {
        margin-top: 14px !important;
    }

    .intro a,
    .intro a:link,
    .intro a:visited {
        font-family: "Roboto", sans-serif !important;
        font-size: 16px !important;
        border-bottom: 0.5px solid var(--color-text) !important;
    }
    
    .intro a:hover,
    .intro a:active {
        font-family: "Roboto", sans-serif !important;
        font-size: 16px !important;
        border-bottom: 0.5px solid var(--color-white) !important;
    }

    .matrix-caption {
        font-size: 18px !important;
        padding: 1px !important;
        line-height: 1.2 !important;
        margin-top: 16px;
    }

    /* 确保主容器正确对齐 */
    .container {
        padding: 0;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    /* 确保坐标轴始终居中 */
    .x-axis {
        top: 50%;
        transform: translateY(-50%);
    }

    .y-axis {
        left: 50%;
        transform: translateX(-50%);
    }

    /* 调整点的大小 */
    .project-point {
        width: 10px;
        height: 10px;
    }

    .axis-label {
        font-size: 9px;
    }

    .x-label.left {
        left: 4px;
    }

    .x-label.right {
        right: 4px;
    }

    .y-label.top {
        top: 0;
    }

    .y-label.bottom {
        bottom: 32px !important;
    }

    button {
        color: var(--color-text) !important;
        background: transparent !important;
        -webkit-tap-highlight-color: transparent;
    }

    /* 确保活动按钮样式正确 */
    button.active {
        color: var(--color-white) !important;
        background: var(--color-text) !important;
    }

    /* 长按按钮样式 */
    button.long-press {
        color: var(--color-white) !important;
        background-color: var(--color-text-hover) !important;
        border: 1.6px solid var(--color-text-hover) !important;
    }

    /* 调整按钮按压效果 */
    button:active {
        background-color: hsl(0, 0%, 32%);
        color: #ffffff;
    }

    /* 移除按钮悬停效果 */
    button:hover {
        background-color: transparent;
        color: inherit;
    }

    /* 调整链接按压效果 */
    .dots-link:active,
    .response-link:active {
        opacity: 0.75;
    }

    /* 移除链接悬停效果 */
    .dots-link:hover,
    .response-link:hover {
        opacity: 1;
    }

    .reward-link:active {
        opacity: 1;
        border-bottom-width: 1.2px;
    }

    .reward-link:hover {
        opacity: 0.7;
        border-bottom-width: 1px;
    }

    .matrix-caption {
        position: relative;
        top: auto;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    /* 调整主容器布局 */
    .container {
        margin-top: 80px;
    }

    /* 移动端提示样式 */
    .mobile-tips {
        display: inline-block;
        position: absolute;
        top: -80px;
        right: 0;
        text-align: right;
        font-family: "Roboto", sans-serif;
        font-style: italic;
        font-size: 11px;
        color: var(--color-text-grey);
        line-height: 1.1;
        width: 100%;
        padding-right: 0% !important;
        margin-right: 0% !important;
        margin-left: 5% !important;
        padding-left: 5% !important;
    }

    .project-section {
        width: 100%;
    }

    .meta-text,
    .meta-label {
        line-height: 1.0;
        font-size: 12px !important;
    }

    .project-context {
        font-size: 12px;
        line-height: 1.2;
        margin: 0px !important;
        font-style: italic;
    }

    .project-subtitle {
        font-size: 16px;
        line-height: 1.2;
    }

    .project-title {
        font-size: 44px;
        line-height: 1.1;
    }

    .news-event {
        font-size: 14px;
        line-height: 1.2;
        margin-right: 2px;
        font-weight: 350;
    }

    .news-item {
        font-size: 14px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .news-link {
        line-height: 1.2;
        margin-right: 2px;
        color: var(--color-text);
    }

    .blog-item {
        font-size: 12px;
        line-height: 1.2;
        margin-right: 2px;
        font-weight: 450;
        color: var(--color-text);
        padding-top: 8px;
        padding-bottom: 8px;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* 拖拽指示器样式 */
    .drag-indicator {
        position: fixed;
        width: 50px;
        height: 50px;
        border-radius: 100%;
        pointer-events: none;
        transform: translate(-50%, -50%);
        z-index: 1000;
        border: 1.4px solid var(--color-red);
        background-color: #c5c5c587;
    }

    /* 将博客容器改为垂直排列 */
    .blogs-container {
        display: flex;
        flex-direction: column;
        gap: 40px;
        margin-top: 400px;
    }

    /* 每个类型列占据全宽 */
    .blog-column {
        width: 100%;
        padding: 0 20px;
    }

    /* 类型标题样式 */
    .blog-column h2 {
        font-size: 16px;
        font-weight: 500;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1.2px solid var(--color-text);
    }

    /* 博客条目样式调整 */
    .blog-item {
        padding: 12px 0;
        gap: 16px;
    }

    /* 时间标签宽度调整 */
    .blog-time {
        min-width: 80px;
        font-size: 12px;
    }

    /* 内容样式调整 */
    .blog-title {
        font-size: 12px;
        line-height: 1.2;
        margin-right: 24px;
    }

    /* 调整星标位置 */
    .blog-item.starred::after {
        right: 0;
        font-size: 14px;
    }
}

/* 桌面端小屏幕适配 - 后定义，优先级更高 */
@media screen and (max-width: 760px) {

    .matrix-caption {
        padding: 0 10px;
        font-size: 20px;
        width: 100%;
        min-width: 320px; /* 与其他容器保持一致 */
        max-width: 100%;
        box-sizing: border-box;
    }

    .intro {
        padding: 0 10px;
        font-size: 14px !important;
        width: 100%;
        min-width: 320px; /* 与其他容器保持一致 */
        max-width: 100%;
        box-sizing: border-box;
        margin-top: 6px;
        margin-bottom: 6px;
        line-height: 1.2;
        text-align: left; /* 移动端左对齐更易读 */
    }

    .intro-callout {
        padding: 14px !important;
    }

    .intro-wrapper .intro:first-of-type {
        margin-top: 24px;
    }

    .intro-item {
        line-height: 1.4;
    }

    .intro-list {
        padding-left: 20px;
    }

    .intro p.intro-break {
        margin: 10px 0 0;
    }

    .intro-item:first-of-type {
        margin-top: 0.7em;
    }

    .projects-column {
        padding: 0 0px;
    }

    .intro-wrapper {
        padding: 40px 0px;

    }
    
    .intro-image {
        width: 100%;
        max-width: 640px;
    }

    /* 右侧按钮块：贴右对齐、禁止换行、不溢出 */
    .buttons-section {
        display: flex;
        flex-wrap: nowrap; /* 禁止换行 */
        gap: 4px; /* 保持适中间距 */

        /* 关键点：让整个按钮块贴到右侧，并在可用空间内伸缩 */
        margin-left: auto;
        justify-content: flex-end;

        flex: 1 1 auto; /* 允许收缩/增长，占据剩余空间 */
        min-width: 0; /* 允许在窄屏下真正收缩，防止被最小内容宽度撑爆 */
        width: 100%;
        max-width: 100%;
        overflow-x: auto; /* 如果内容过多，允许水平滚动 */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE */
    }
    
    .buttons-section::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    /* 每个按钮不要被拉伸，也允许文本收缩 */
    .buttons-section > * {
        flex: 0 0 auto;
        min-width: 0;
    }

    button {
        padding: 3px 5px; /* 增大按钮内边距 */
        font-size: 13px; /* 增大字体大小 */
        white-space: nowrap; /* 防止文字换行 */
    }
}

/* 针对非常小的屏幕（320px以下） */
@media screen and (max-width: 320px) {
    .buttons-section {
        gap: 2px; /* 适中间距 */
    }
    
    .buttons-section button {
        padding: 2px 4px; /* 适中内边距 */
        font-size: 12px; /* 适中字体 */
    }
}

/* 极小屏幕优化（小于320px） */
@media screen and (max-width: 319px) {
    .matrix-caption,
    .intro {
        padding: 0 5px !important;
        min-width: 280px;
        line-height: 1.2 !important;
        text-align: left !important;
        margin-top: 4px !important;
        margin-bottom: 10px !important;
        position: relative !important;
        top: auto !important;
    }
}

/* special processing of elements that may be converted to emoji */
.arrow-icon,
.video-icon,
.nav-item,
.footer,
.matrix-caption a,
.meta-link{
    font-family: "JetBrains Mono" !important;
    -webkit-font-feature-settings: "liga" 0;
    font-feature-settings: "liga" 0;
}

@keyframes noiseAnim {
    0% { filter: url(#noiseFilter2); }
    25% { filter: url(#noiseFilter3); }
    50% { filter: url(#noiseFilter4); }
    75% { filter: url(#noiseFilter5); }
    100% { filter: url(#noiseFilter3); }
}

/* add arrow style */
.column-arrow {
    position: absolute;
    top: -24px;  /* adjust the arrow position */
    left: 50%;
    transform: translateX(-50%);
    font-family: "JetBrains Mono", monospace;
    font-size: 16px;
    color: var(--color-text);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;  /* ensure it does not affect the mouse event */
}

.cv-section {
    width: 100%;
    margin: 32px 0 0 0;
    padding: 0 16px;
    display: flex;
    justify-content: center;
}

.cv-button {
    display: inline-block;
    padding: 6px 14px;
    color: var(--color-text);
    background-color: var(--color-background);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1.2px solid var(--color-text);
    font-size: 12px;
    font-family: "Roboto", sans-serif;
}

.cv-button:hover {
    background-color: var(--color-text);
    color: var(--color-white);
}
