/* 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: 'Barlow';
    src: url('../fonts/Barlow-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Barlow';
    src: url('../fonts/Barlow-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Barlow';
    src: url('../fonts/Barlow-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Barlow';
    src: url('../fonts/Barlow-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@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: #f6f4f3;
    --color-text: #000;
    --color-text-hover: #9f9f9f;
    --color-border: #000;
    --color-white: #fff;
    --color-text-grey: #7f7f7f;
    --color-text-darkgrey: #333;
    --color-red: #27b3b3d1;
    --color-light-grey: #c5c5c5;
    /* 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: "Barlow", sans-serif;
    letter-spacing: 0.4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 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;
    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: 1350px;
    width: 100%;
    padding: 0;
    margin: 80px auto 100px;
    display: flex;
    flex-direction: column;
}
.mobile-tips {
    display:none;
}

/* filter container */
.filter-container {
    width: 100%;
    margin: 0 auto;
    max-width: 760px;
    position: sticky;
    top: 120px;
    background-color: var(--color-background);
    z-index: 99;
}

/* filter content */
.filter-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    position: relative;
    width: 760px;
    margin: 0 auto;
    justify-content: space-between;
}

/* active button style */
.active {
    color: var(--color-white);
    background: var(--color-text);
}

/* button style */
button {
    border: 1.6px solid var(--color-border);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px; 
    font-weight: 400;
    background: transparent;
    transition: all 0.1s ease;
    margin: 0;
    color: var(--color-border);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* button hover effect */
button:hover {
    background-color: var(--color-text-hover);
    color: #ffffff;
    border-color: var(--color-text);
}

/* card grid area */
.cards-section {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    row-gap: 28px;
    justify-content: flex-start;
    align-items: left;
    width: 100%;
    max-width: 760px;
    margin: 12px auto;
    padding: 0 0px;
}

/* card style */
.card {
    width: 243.2px;
    display: flex;
    flex-direction: column;
    height: 280px;
    order: 0;
    margin: 0;
    border: 1.5px solid var(--color-border);
    padding: 0;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    transition: all 0.7s ease;
}

/* card hover effect */
.card:hover {
    background-color: #ffffff;}

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

/* card image link style */
.card-image-link {
    display: block;
    width: 100%;
    height: 180px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.1s ease;
    text-decoration: none;
    color: inherit;
    border-bottom: 1.5px solid var(--color-text);
    filter: saturate(0.0) brightness(1.02) !important;
}

/* when the card is hovered, the image style */
.card:hover .card-image-link {
    filter: saturate(1.0) brightness(1.02) !important;
    opacity: 0.9;
}

/* card image container */
.card-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    filter: url(#noiseFilter2);
    
}

.card-image-container::before {
    content: "";
    position: absolute;
    inset: -100%;
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}


/* card image style */
.card-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    mix-blend-mode: multiply;
}


/* when the card is faded */
.card:has(.card-fade) {
    border-color: var(--color-light-grey);
    .card-title-container::after {
        background-color: var(--color-light-grey);
        height: 1.5px;
        transform: scaleY(0.5);
    }
    img {
        opacity: 0.3;
    }
}

/* card content area */
.card-body {
    padding: 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: "JetBrains Mono", monospace;
    position: relative;
    overflow: hidden;
}

/* card title container */
.card-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
}

/* add a horizontal line below the title */
.card-title-container::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: -20px;
    right: -20px;
    height: 1.1px;
    background-color: var(--color-text);
    width: calc(100% + 40px);
    transform-origin: center;
}

/* card title style */
.card-title {
    font-size: 14px;
    letter-spacing: 0.8px;
    font-weight: 400;

    color: var(--color-text);
    transition: all 0.2s ease;
}

/* video icon style */
.video-icon {
    color: var(--color-border);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 2.8px;
}

.video-icon:hover {
    color: var(--color-red);
    border-color: var(--color-red);
}

/* time style */
.card-time {
    font-size: 12px;
    font-weight: 350;
    color: var(--color-text);
    margin: 0px 0 0 0;
    padding-bottom: 2px;
}

/* card description text style */
.card-description {
    font-family: "JetBrains Mono", monospace;
    font-size: 14px;
    font-weight: 350;
    color: var(--color-text);
    margin: 2px 0 8px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* filter button area */
.buttons-section {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

/* card label container */
.card-labels {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* card label style */
.label {
    font-size: 11px;
    color: var(--color-text);
    padding-top: 0px;
    padding-bottom: 2px;
    padding-left: 8px;
    padding-right: 8px;
    border: 1.3px solid var(--color-text);
    font-weight: 420;
    border-radius: 8px;
    opacity: 0.8;
    transition: all 0.1s ease;
}

/* card label hover state */
.card-label.hover {
    border-color: var(--color-red);
    color: var(--color-red);
}

/* add fade effect */
.card-fade {
    color: var(--color-light-grey) !important;
    border-color: var(--color-light-grey) !important;
    transition: all 0.2s ease;
}

/* ensure all card elements have a transition effect */
.card-title,
.card-label {
    transition: all 0.2s ease;
}

.card-title{
    font-weight: 500;
}

/* card image link style */
.card-image-link:hover img {
    opacity: 0.9;
    filter: saturate(1.02) brightness(1.02) !important;
}

/* when the card is faded and the image is hovered */
.card:has(.card-fade) .card-image-link:hover img {
    opacity: 0.1;
}

/* Filter wrapper style */
.filter-wrapper {
    width: 100%;
    background-color: var(--color-background);
    padding: 20px 0 16px 0;
    padding-top: 120px;
    padding-bottom: 0px;
    transition: all 0.1s ease;
    margin-top: 0px;
    position: relative;
}

/* filter container fixed style */
.filter-wrapper.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding-top: 80px;
    padding-bottom: 20px;
    background-color: var(--color-background);
}

/* when the filter is fixed, add padding to the content to prevent jumping */
.filter-wrapper-placeholder {
    display: none;
    width: 100%;
    background-color: var(--color-background);
}

.filter-wrapper-placeholder.active {
    display: block;
}

/* when the filter is fixed, add padding-top to the content */
.cards-section.filter-fixed {
    padding-top: 60px;
}

/* switch button container style */
.switch-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch-view:hover {
    background-color: var(--color-text);
}

.switch-view img:hover {
    filter: brightness(0) invert(1);
  }

/* arrow icon style */
.arrow-icon {
    display: inline-block;
    transform: rotate(-50deg);
    font-size: 20px;
    color: var(--color-text);
    margin-top: -12px;
    margin-right: -2px;
    transition: transform 0.3s ease;
}

/* when hovering over the switch button container, the arrow effect */
.switch-container:hover .arrow-icon {
    transform: rotate(-80deg);
}

/* switch button style */
.switch-view {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-family: 'Barlow', sans-serif;
    font-weight: 200;
    padding: 0;
    cursor: pointer;
}

/* coordinate view style */
.coordinate-view {
    width: 760px;
    height: 480px;
    margin: 10px auto;
    position: relative;
}

.coordinate-container {
    position: relative;
    width: 100%;
    height: 100%;
    border: 1.5px solid var(--color-text);
}

.axis {
    position: absolute;
    background-color: var(--color-text);
}

.x-axis {
    width: 100%;
    height: 1.2px;
    transform-origin: center;
    top: 50%;
    left: 0;
}

.y-axis {
    width: 1.2px;
    height: 100%;
    transform-origin: center;
    top: 0;
    left: 50%;
}

/* point wrapper style */
.point-wrapper {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.1s ease;
}

/* project point style */
.project-point {
    width: 12px;
    height: 12px;
    border: 1.2px solid var(--color-text);
    border-radius: 50%;
    background-color: var(--color-background);
    transition: all 0.2s ease;
}

/* when the point is faded */
.point-wrapper.point-fade .project-point {
    border-color: var(--color-light-grey);
    background-color: var(--color-background);
}

/* can add hover effect */
.point-wrapper:hover .project-point {
    transform: scale(1.8);
    /* filter: blur(8px); */
    opacity: 0.6;
    border: 1px solid var(--color-text);
}

/* point label hover effect */
.point-wrapper:hover .point-label {
    color: var(--color-text);
    font-weight: 500;
}

/* hover effect when the point is faded */
.point-wrapper.point-fade:hover .project-point {
    background-color: var(--color-light-grey);
    box-shadow: 0 0 20px 8px rgba(197, 197, 197, 0.2);
}

.point-wrapper.point-fade:hover .point-label {
    color: var(--color-light-grey);
}

/* point label basic style */
.point-label {
    font-size: 12px;
    color: var(--color-text);
    white-space: nowrap;
    font-weight: 450;
    position: absolute;
    left: 50%;
    opacity: 0.8;
    transform: translateX(-50%);
}

/* flipped label style */
.point-label.flipped {
    bottom: 100%;
    margin-bottom: 2px;
}

/* non-flipped label style */
.point-label:not(.flipped) {
    top: 100%;
    margin-top: 2px;
}

/* project point preview style */
.point-preview {
    position: fixed;
    z-index: 1000;
    background: white !important;
    border: 1.2px solid var(--color-text);
    padding: 6px;
    pointer-events: none;
    font-size: 12px;
    transition: opacity 0.1s ease;
    width: 214px;
}

.point-preview img {
    width: 200px;
    aspect-ratio: 4.8/3;
    object-fit: cover;
    display: block;
}
/* add Safari-specific CSS fix */
.point-preview {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform, opacity;
}

/* add transition effect to enhance smoothness */
.point-preview {
    transition: opacity 0.15s linear;
}

/* preview title style */
.preview-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    padding: 4px 0;
}

/* project point fade effect */
.point-wrapper.point-fade {
    opacity: 0.6;
}

.point-wrapper.point-fade .project-point {
    background-color: var(--color-light-grey);
}

.point-wrapper.point-fade .point-label {
    color: var(--color-light-grey);
}

.point-wrapper.hide {
    display: none;
}

/* about page style ////////////////////////////////////////////////////////////////// */
.about-section {
    max-width: 760px;
    margin: 120px auto 0;
    padding: 0 20px;
}

.about-greeting {
    font-family: "JetBrains Mono", monospace;
    font-size: 24px;
    margin-bottom: 40px;
    color: var(--color-text);
    font-weight: 350;
}

/* add image container style */
.about-image {
    width: 200px;
    height: 200px;
    margin: 0 0 40px 20px;
}

/* image style */
.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    font-family: "Barlow", sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text);
    letter-spacing: 0.4px;
    font-weight: 350;
}

/* 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;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

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

.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;
}

/* project link style */
.meta-link {
    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);
    margin-bottom: 20px;
    letter-spacing: -0.4px;
}

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

/* 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: 30px;
    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: "Barlow", 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;
    margin-top: 100px;
    text-align: left;
}
.project-context::before {
    content: '“';
    display: block;
    width: 100%;
    height: 100%;
    text-align: left;
}


/* point wrapper link style */
.point-wrapper a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* ensure the click area covers the whole point and label */
.point-wrapper a:hover {
    text-decoration: none;
}

/* link style in the intro text */
.intro-link {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.1s ease;
}

.intro-link:hover {
    color: var(--color-text-hover);
}

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

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

/* link style */
.meta-link {
    display: inline-block;
    font-size: 14px;
}

/* news page style */
.news-section {
    max-width: 760px;
    margin: 120px auto 0;
    padding: 0 20px;
}

.news-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.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: 80px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    padding-top: 8px;
    font-family: "GeistMono", monospace;
}

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

.news-link {
    border-bottom: 1.2px solid transparent;
    font-family: "MarrSans", sans-serif!important;
    border-bottom: 1.2px solid var(--color-text);
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.1s ease;
}

.news-link:hover {
    color: white;
    background-color: black;
}

/* YouTube 视频部分样式 */
.video-section {
    margin: 60px 0;
    width: 100%;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    height: 0;
    overflow: hidden;
    border: 1.2px solid var(--color-text);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 调整粗体文本样式 */
.markdown-content strong {
    font-weight: 450;  /* 减小粗体的权重 */
    color: var(--color-text-darkgrey);  /* 使用深灰色而不是纯黑 */
    letter-spacing: +0.4px;  /* 增加字间距 */
}

/* 页眉样式 */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent !important;
    z-index: 1000;
}

/* 项目页面的固定页眉样式 */
body.project-page #header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent !important;
}

/* 为固定导航栏下的内容添加空间 */
body.project-page {
    padding-top: 60px;  /* 根据导航栏高度调整 */
    height: auto;  /* 移除固定高度 */
    min-height: 100vh;  /* 确保至少有一个视口高度 */
    position: relative;  /* 修改定位方式 */
    overflow-y: auto;  /* 允许垂直滚动 */
}

/* 项目内容区域样式 */
.project-section {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* 矩阵说明文本样式 */
.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;
}

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

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

/* 介绍文本样式 */
.intro {
    font-size: 15px;
    color: var(--color-text);
    margin-top: 6px;
    line-height: 1.2;
    font-weight: 400;
    text-align: right;
}

.intro a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.1s ease;
}

.intro a:hover {
    color: var(--color-text-hover);
}

/* 当卡片被淡出时的样式 */
.card-fade-hover {
    opacity: 0.3;
    transition: opacity 0.1s ease;
}

/* 当卡片被淡出时的样式 */
.card-fade-hover .label {
    opacity: 0.3;
    transition: opacity 0.1s ease;
}

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

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

/* 确保点的标签也有过渡效果 */
.point-wrapper {
    transition: opacity 0.1s ease;
}

/* 点的标签淡出效果 */
.point-wrapper.fade-out {
    opacity: 0.1;  /* 调整透明度到 20% */
}

/* 标签高亮样式 */
.label-highlight {
    color: var(--color-red);
    border-color: var(--color-red);
    transition: all 0.05s ease;
}



/* 轴标注基础样式 */
.axis-label {
    position: absolute;
    font-family: "JetBrains Mono";
    font-style: italic;
    font-size: 10px;
    color: var(--color-text);
    font-weight: 800 !important;  /* 增加字重 */
}

/* X轴标注样式 */
.x-label {
    top: 49%!important;
    transform: translateY(-50%);
}

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

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

/* Y轴标注样式 */
.y-label {
    position: absolute;
    transform-origin: left center;
    transform: rotate(90deg);
    white-space: nowrap;
}

.y-label.top {
    left: 51%!important;
    top: -2px; 
}

.y-label.bottom {
    left: 51%!important;
    bottom: 52px;
}


#clustrmaps {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
  }

/* extension line style */
.extension-line {
    position: absolute;
    background-color: var(--color-text);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.extension-line.horizontal {
    height: 1px;
}

.extension-line.vertical {
    width: 1px;
}

/* 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;
}

.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: 60px;
    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);
}

/* mobile adaptation */
@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;
    }

    /* allow point dragging */
    .point-wrapper {
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
        cursor: grab;
    }

    .point-wrapper.dragging {
        cursor: grabbing;
        z-index: 1000;
    }

    /* player style */
    .player-left {
        position: relative;
        overflow: hidden;
        background: var(--color-background);
        animation: noiseAnim 0.5s steps(4) infinite;
    }

    .player-left.drag-over {
        background: rgba(0, 0, 0, 0.05);
    }

    .player-preview {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .player-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        filter: saturate(0) brightness(1.02);
        mix-blend-mode: multiply;
    }

    .player-preview.show {
        opacity: 1;
    }

    /* mobile touch behavior control */
    .project-point,
    .point-wrapper {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        cursor: url(images/cross.svg) 10 10, auto !important;
    }

    /* ensure the cursor style when clicking */
    .point-wrapper:active {
        cursor: url(images/cross.svg) 10 10, auto !important;
    }

    /* ensure the main containers can scroll */
    .container,
    .cards-section,
    .coordinate-view,
    .coordinate-container,
    .filter-wrapper {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    /* allow text selection for specific elements */
    .blog-article-content,
    .project-content,
    input,
    textarea {
        -webkit-touch-callout: default;
        -webkit-user-select: text;
        user-select: text;
    }

    /* hide the arrow icon */
    .arrow-icon {
        display: none;
    }

    /* adjust the spacing of the switch button container */
    .switch-container {
        gap: 0;
    }

    .buttons-section {
        gap: 4px;
    }
    .intro {
        font-size: 12px !important;
        padding: 0 !important;
        line-height: 1.1 !important;
    }
    .matrix-caption {
        font-size: 18px !important;
        padding: 1px !important;
        line-height: 1.2 !important;
        margin-top: 16px;
    }
    .point-label {
        font-size: 12px !important;
        font-family: "Barlow", sans-serif !important;
        font-weight: 400 !important;
    }
    .intro {
        margin-top: 0px;
    }

    /* ensure all main containers are centered */
    .container,
    .filter-container,
    .cards-section,
    .coordinate-view {
        width: calc(100% - 40px);
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .filter-wrapper {
        padding-top: 80px;
        background-color: var(--color-background);
        position: relative;
    }
    .coordinate-container {
        margin-top: 10px;
        height: 400px!important;
    }
    .coordinate-container::before {
        content: "longPress: check range, doubleTap: single-elect-- ↑ ";
        position: absolute;
        display: block;
        top: -22px;
        right: 0;
        text-align: right;
        font-size: 10px;
        color: var(--color-text-grey);
        background: none;
        height: auto;
        width: auto;
        border-radius: 0;
    }

    /* adjust the filter container */
    .filter-container {
        top: 120px;
        padding-top: 8px;
        padding-bottom: 0px;

        position: sticky;
        background-color: var(--color-background);
        z-index: 99;
    }

    /* ensure the filter content displays correctly on mobile */
    .filter-content {
        width: 100%;
        padding: 0;
        background-color: var(--color-background);
        position: relative;
        z-index: 99;
    }

    /* adjust the card layout */
    .cards-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 20px;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        margin-top: 16px;
    }
    
    /* adjust the card size */
    .card {
        width: 100%;
        max-width: none;
        margin: 0;
        height: 220px!important;
        border-width: 1.4px;
        color: var(--color-text-darkgrey);

    }
    .card-body{
        padding: 8px;
        padding-top: 4px;
        gap: -2px;
        height: 100px!important;
    }
    /* hide class */
    .hide {
        display: none;
    }

    .card-image-link {
        display: block;
        width: 100%;
        height: 120px;
        overflow: hidden;
        cursor: pointer;
        transition: opacity 0.1s ease;
        text-decoration: none;
        color: inherit;
        border-bottom: 1.5px solid var(--color-text);
        filter: saturate(0.0) brightness(1.02) !important;
    }
    .card-image-link img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        mix-blend-mode: multiply;
    }
    
    /* adjust the card title and label size */
    .card-title {
        font-size: 14px;
        margin-top: 2px;
        font-weight: 450;
    }
    .card-title-container{
        margin-bottom: 2px;
    }
    .card-title-container::after{
        display: none;
    }


    .card-labels {
        font-size: 12px;
        gap: 4px;
        align-items:flex-end;
        border-width: 1.1px;
        font-weight: 350;
        opacity: 0.8;
    }

    /* ensure the card container is aligned correctly */
    .container {
        padding: 0;
        width: 100%;
    }

    /* ensure the coordinate axis is always centered */
    .x-axis {
        top: 50%;
        transform: translateY(-50%);
    }
    
    .y-axis {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* adjust the point size */
    .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: 48px;
    }
    

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


    /* ensure the active button style is correct */
    button.active {
        color: var(--color-white) !important;
        background: var(--color-text) !important;
    }

    /* button style when long pressed */
    button.long-press {
        color: var(--color-white) !important;
        background-color: var(--color-text-hover) !important;
        border: 1.6px solid var(--color-text-hover) !important;
    }

    /* mobile touch behavior */
    .card:active .card-image-link {
        filter: saturate(1.0) brightness(1.02) !important;
        opacity: 0.9;
    }

    .card-image-link:active img {
        opacity: 0.9;
        filter: saturate(0.95) brightness(1.02) !important;
    }

    .point:active,
    .point-wrapper:active .point:not(.current) {
        display: none;
    }

    .point-wrapper:hover .project-point {
        display: none;
    }

    /* the pressed effect of the visited project point */
    .point.visited:active {
        transform: scale(1.4);
        opacity: 1;
    }

    /* remove all hover effects */
    .card:hover .card-image-link,
    .card-image-link:hover img,
    .point:hover,
    .point-wrapper:hover .point:not(.current),
    .point.visited:hover {
        transform: none;
        filter: none;
        opacity: 1;
        box-shadow: none;
    }

    /* adjust the button pressed effect */
    button:active {
        background-color: hsl(0, 0%, 32%);
        color: #ffffff;
    }

    /* remove the button hover effect */
    button:hover {
        background-color: transparent;
        color: inherit;
    }

    /* adjust the link pressed effect */
    .dots-link:active,
    .response-link:active {
        opacity: 0.75;
    }

    /* remove the link hover effect */
    .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 ,
    .intro {
        position: relative;
        top: 90px;
    }

    /* adjust the main container layout */
    .container {
        margin-top: 120px;
    }

    /* mobile tips style */
    .mobile-tips {
        display:inline-block;
        position: absolute;
        top: -80px;
        right: 0;
        text-align: right;
        font-family:"Barlow", 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 {
        font-size: 14px;
        font-family: "JetBrains Mono", monospace;
        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 style */
    .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;
    }

    /* remove the hover effect on mobile */
    .point-wrapper:hover .point-title,
    .point.point-preview {
        opacity: 0;
        display: none;
    }


    .point:hover,
    .point-wrapper:hover .point:not(.current) {
        transform: none;
        filter: none;
        box-shadow: none;
        display: none;
    }

    /* basic style on mobile */
    .point-wrapper {
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }

    .point {
        width: 16px;
        height: 16px;
        border: 1.2px solid var(--color-text);
        border-radius: 50%;
        transition: none;
    }

    /* change the blog container to vertical arrangement */
    .blogs-container {
        display: flex;
        flex-direction: column;
        gap: 40px;
        margin-top: 400px;
    }

    /* each type column takes up the full width */
    .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;
    }

    /* adjust the starred position */
    .blog-item.starred::after {
        right: 0;
        font-size: 14px;
    }

}

/* Player basic style */
.matrix-player {
    display: none !important; /* ensure it is completely hidden on non-mobile */
}

/* mobile specific style */
@media screen and (max-width: 768px) and (hover: none) {
    .matrix-player {
        display: block !important;
        width: 100%;
        max-width: 860px;
        margin: 0 auto;
        margin-top: 20px;
        padding: 0 0px;
        position: relative;
        top: -90px;
    }

    .player-container {
        width: 100%;
        display: grid;  /* use grid layout */
        grid-template-columns: 1fr 1fr;  /* equal width two columns */
        gap: 0;  /* remove the gap */
    }

    .player-left, 
    .player-right {
        height: 80px;
        border: 1.6px solid var(--color-text);
        width: 100%;  /* ensure the width fills the grid cell */
    }
    
    .noise-effect {
        animation: noiseAnim 2s infinite linear;
    }
    

    .player-left::after {
        content: " - Drag a point here - ";
        position: absolute;
        top: 0px;
        left: 9px;
        width: 100%;
        height: 100%;
        font-family: "JetBrains Mono", monospace;
        font-size: 12px;
        font-weight: 450;
        color: var(--color-text);
        line-height: 1.2;
        z-index: 1;
    }


    /* remove the left border of the right border to avoid double borders */
    .player-right {
        border-left: none;
    }

    /* Player right information style */
    .player-right {
        position: relative;
        padding: 8px 12px;
        display: flex;
        align-items: center;
    }

    .player-info {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .player-title {
        font-family: "JetBrains Mono", monospace;
        font-size: 14px;
        font-weight: 450;
        color: var(--color-text);
        line-height: 1.2;
    }

    .player-subtitle {
        font-family: "Barlow", sans-serif;
        font-size: 12px;
        color: var(--color-text);
        line-height: 1.2;
        opacity: 0.8;
    }

}

/* special processing of elements that may be converted to emoji */
.arrow-icon,
.video-icon,
.nav-item,
.footer,
.matrix-caption a,
.meta-link,
.intro a{
    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 {
    text-align: center;
    padding: 80px 0;
}

.cv-button {
    display: inline-block;
    padding: 12px 24px;
    color: rgb(0, 0, 0);
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: 1.2px solid rgb(0, 0, 0);
}

.cv-button:hover {
    background-color: #191919;
    color: white; 
}