@font-face {
  font-family: 'RCDemo';
  src: url('../font/Oswald-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 200 700; /* 定义可变字重范围 */
  font-style: normal;
}
@font-face {
  font-family: 'ali';
  /* 路径保持不变 */
  src: url('../font/AlimamaFangYuanTiVF-Thin.ttf') format('truetype-variations');
  
  /* 
   * 关键步骤：定义这个字体支持的字重范围。
   * 阿里巴巴普惠体的范围是 100 (Thin) 到 900 (Heavy)。
   */
  font-weight: 200;
  
  font-style: normal;
}

@font-face {
  font-family: 'Compressa VF';
  src: url('https://res.cloudinary.com/dr6lvwubh/raw/upload/v1529908256/CompressaPRO-GX.woff2');
  font-style: normal;
}

.hero-content .mb-4 {
  margin-bottom: 2rem !important;
  font-family: ali, sans-serif;
}

/* 字体间距控制 */
/* 
@font-face {
  font-family: 'RCDemo';
  src: url('../font/Oswald-VariableFont_wght.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
} */

:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --light: #f8f9fa;
    --dark: #121212;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --brand-border: #262626; 
    --font-weight-dynamic: 400; /* 动态字重变量 */
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; 
}

body {
    font-family: 'Inter', sans-serif;
    color: #e5e5e5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0;
    line-height: 1.6;
    overscroll-behavior-y: none;

    /* --- 关键修改：应用新的静态渐变背景 --- */
    /* 定义渐变的起始和结束颜色 */
    --color-bg-top: hsl(120, 8%, 8%);      /* 顶部颜色：深绿灰色 */
    --color-bg-bottom: hsl(100, 10%, 25%); /* 底部颜色：稍亮的绿灰色 */

    /* 应用一个从上到下、贯穿整个页面的线性渐变 */
    background-image: linear-gradient(
        to bottom,
        var(--color-bg-top),
        var(--color-bg-bottom)
    );
    
    /* 确保背景不重复，并能覆盖整个页面高度 */
    background-repeat: no-repeat;
    background-attachment: scroll; /* 让背景随内容滚动，而不是固定 */
}


/* Hero Section for 3D Canvas */

.max-w-full {
  max-width: 100%;
}
.text-xs {
  font-size: 1rem;
}
#little{
  font-size:1.5vw;
}
/* .px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
} */

.dynamic-text-container {
  margin-top: 5rem;
  margin-bottom: 5rem;
}
#dynamic-text {
    width: 100%; /* 确保它能填满父容器 */
    font-family: 'RCDemo', sans-serif;
    font-size: clamp(20px, 12vw, 250px);
    letter-spacing: 0.12em !important;
    font-weight: 200; /* 使用变量 */
    
    /* 添加所有必要的布局样式 */
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;

    /* 确认 transform 已被移除 */
    transform: none; 
}



/* Mobile-specific styling for omniartist */
@media (max-width: 768px) {
    .hero-content { 
    position: absolute; /* To position it within #hero-section */
    inset: 0; /* Fill #hero-section */
    z-index: 3; /* Higher than #three-canvas-container */
    display: flex;
    flex-direction: column;
    /* justify-content: center;  */
    align-items: center;
    min-height: 100vh; 
    color: var(--light); 
    text-align: center;
    padding: 0px; 
}
    #little{
  font-size:0.7rem;
}
    #dynamic-text {
        /* flex-direction: column; */
        font-size: clamp(60px, 10vw, 100px);
        white-space: normal;
        line-height: 0.9;
        gap: 10px; /* Add space between words */
        font-family: 'RCDemo', sans-serif; /* Use Compressa VF font */
        font-weight: 600;
    }
    
    #dynamic-text .word {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    #dynamic-text span {
        transition: none !important;
        font-variation-settings: 'wght' 200 !important;
        animation: none !important
    }
}

#dynamic-text span {
    display: inline-block;
    transition: font-variation-settings 0.1s ease-out;
    will-change: font-variation-settings;
    margin-right: 0.02em; /* 添加额外的间距控制 */
}

#hero-section {
    position: relative; 
    min-height: 100vh;
    overflow: visible; 
}

/* --- ProfileCard Styles --- */
.pc-card-wrapper {
  --card-opacity: 0;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --background-x: 50%;
  --background-y: 50%;
  --pointer-x: 50%;
  --pointer-y: 50%;
  
  width: 90vw; 
  max-width: 400px; 
  aspect-ratio: 1/1; 
  perspective: 1500px;
  position: relative;
  border-radius: 20px;
  height: auto;
}

.pc-card-wrapper::before {
  content: "";
  position: absolute;
  inset: -20px; /* Make it larger than the wrapper */
  background: conic-gradient(from 180deg at var(--pointer-x) var(--pointer-y), rgba(0, 191, 255, 0.103) 0%, rgba(192, 55, 255, 0.192) 25%, rgba(0, 191, 255, 0.226) 50%, rgba(25, 250, 152, 0.219) 75%, rgba(0, 191, 255, 0.096) 100%);
  filter: blur(30px);
  z-index: 0; /* Behind the card */
  opacity: 0;
  transition: opacity 0.5s;
}

.pc-card-wrapper.active::before {
  opacity: 1;
}

.pc-card-wrapper.active { --card-opacity: 0.2; }

.pc-card {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  position: relative;
  z-index: 1; /* Above the glow */
  transform-style: preserve-3d;
  transform: rotateY(var(--rotate-y)) rotateX(var(--rotate-x));
  transition: transform 0.6s ease-out;
  background: radial-gradient(
    circle at var(--background-x) var(--background-y),
    rgba(3, 36, 49, 0.1),
    transparent 40%
  ), linear-gradient(145deg, #04517063, #2b2b2b);
  opacity: 1;
  filter: grayscale(0.5);
}

.pc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 180deg at var(--pointer-x) var(--pointer-y), #00bfff1f 0%, #c037ff1e 50%, #00bfff3d 100%);
  filter: blur(20px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s;
  border-radius: inherit;
}

.pc-card.active::before {
  opacity: 1;
}

.pc-card.active { transition: transform 0s; }


.pc-webgl-border {
  position: absolute;
  inset: 0;
  z-index: 0;
  mix-blend-mode: screen;
  opacity: 0.6;
}

.pc-webgl-border canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.pc-inside {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1; /* 确保内容在WebGL之上 */
  overflow: hidden;
  transform: translateZ(30px);
  background: transparent;
  border: none;
  isolation: isolate;
}

.avatar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  filter: grayscale(1);
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  pointer-events: none;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
  z-index: 2; /* 在内容层之上 */
}

.pc-details {
  position: relative;
  z-index: 3; /* 在头像之上 */
  padding: 40px 24px;
  color: #fff;
  text-align: center;
}

.pc-details h3 {
  font-family: 'ali', sans-serif; /* 确保您已加载此字体 */
  font-size: clamp(22px, 7vw, 35px);
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
  margin-top: -10px;
}

.pc-details p {
  display: none; /* 根据您的设计，标题是空的，所以隐藏p标签 */
}

/* 响应式调整 */
@media (min-width: 480px) {
  .pc-card-wrapper {
    width: 300px; 
    height: 300px;
  }


}

@media (max-width: 780px) {
  #profile-card-container { /* 确保容器有ID或唯一的类 */
    transform: translateY(-10%);
  }
  .avatar {
    transform: translateX(-50%) scale(0.9);
  }
  .pc-webgl-border {
  opacity: 0;
}

}


/* Canvas container for 3D model - overlay */
#three-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Higher than .hero-content to cover it */
}

.hero-content { 
    position: absolute; /* To position it within #hero-section */
    inset: 0; /* Fill #hero-section */
    z-index: 3; /* Higher than #three-canvas-container */
    display: flex;
    flex-direction: column;
    /* justify-content: center;  */
    align-items: center;
    min-height: 100vh; 
    color: var(--light); 
    text-align: center;
    padding: 20px; 
    overflow: visible; /* Prevent overflow */
}

/* Third Screen: Horizontal Accordion (No Spacing) */
#featured-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 95%;
    max-width: 1400px;
    height: 75vh;
    transform: skewX(-5deg);
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    background: rgba(10, 10, 30, 0.3);
}

.card {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0.95);
    cursor: pointer;
}

/* Remove all card spacing */
.card:not(:last-child) {
    margin-right: 0;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(1);
    filter: brightness(0.8);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
    z-index: 20;
}

.card-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #ff7bac;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.card-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 90%;
    line-height: 1.6;
    font-weight: 300;
}

.card:hover {
    flex-grow: 6;
    transform: scale(1);
    z-index: 10;
}

.card:hover .card-content {
    transform: translateY(0);
    opacity: 1;
}

.card:hover img {
    transform: scale(1.08);
    filter: brightness(1);
}

/* Responsive Design */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        transform: skewX(0);
        height: 90vh;
    }
    
    .card {
        width: 100%;
        height: 25%;
    }
    
    .card:hover {
        height: 60%;
        flex-grow: 1;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .card-title {
        font-size: 1.8rem;
    }
    
    .card-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        height: 95vh;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .card-subtitle {
        font-size: 0.9rem;
    }
}

/* 视频背景样式 - play button part is below */
#video-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
}
#bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.7;
}
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}
.play-btn {
    width: 100px; 
    height: 100px; 
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3); 
    border: 2px solid rgba(255, 255, 255, 0.7);
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease;
    outline: none;
}
.play-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}
.play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: 4px; 
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 20px 0 20px 30px; 
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
}
.play-btn:hover::after {
    border-color: transparent transparent transparent rgba(255, 255, 255, 1);
}

/* 作品集画廊 - 桌面端瀑布流布局 */
.gallery {
    columns: 6; 
    column-gap: 10px; 
    width: 100%;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    position: relative;
    background-color: #222; 
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; 
    transition: transform 0.4s ease;
}

/* 移动端每行3张图片布局 */
@media (max-width: 768px) {
    .gallery {
        columns: 2; /* 每行3列 */
        column-gap: 8px;
    }
    
    .gallery-item {
        margin-bottom: 8px;
        break-inside: avoid;
    }
    
    .gallery-item img {
        border-radius: 6px;
    }
}

/* 超小屏幕设备保持每行3张 */
@media (max-width: 480px) {
    .gallery {
        columns: 2; /* 保持每行3列 */
    }
    
    .gallery-item {
        margin-bottom: 10px;
    }
}
.gallery-item:hover img {
    transform: scale(1.1); 
}

@media (max-width: 768px) { 
    .hero-content { padding: 15px; }
}

@media (max-width: 480px) {
    /* .hero-content h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); } Replaced by .hero-creator-text-dynamic */
    .hero-content p {
        font-size: clamp(0.6rem, 2.5vw, 1rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80vw;
        margin: 0 auto;
    }
}

/* Profile Section Styles - Enhanced */

#profile-card-container {
  width: 100%;
  margin-top: 0%;
  display: flex;
  justify-content: center;
  padding-top: 2rem;
  position: relative;
  z-index: 15;
}

/* Experience Section - Top Section */

/* Skills Section - Bottom Section */

.skill-tag {
    background: linear-gradient(135deg, #828283, #383838); /* Stronger gradient */
    color: white;
    padding: 25px 30px; /* Larger padding */
    border-radius: 15px; /* Larger border radius */
    text-align: center;
    font-weight: bold;
    font-family: RCDemo; /* Use Ali Baba font */
    font-weight: 200;
    letter-spacing: 0.2vw;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Stronger shadow */
    font-size: clamp(1rem, 0.5vw, 1.4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 8%;
    width: 80%; /* Full width of grid cell */
    box-sizing: border-box; /* Include padding in width */
}

.skill-tag:hover {
    transform: scale(1.08) translateY(-5px); /* Combined effects */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.753); /* Hover shadow */
    z-index: 10;
}

@media (max-width: 768px) { 
    .skill-tag {
    background: linear-gradient(135deg, #828283, #1a1a1a); /* Stronger gradient */
    color: white;
    padding: 25px 30px; /* Larger padding */
    border-radius: 15px; /* Larger border radius */
    text-align: center;
    font-weight: bold;
    font-family: RCDemo; /* Use Ali Baba font */
    font-weight: 200;
    letter-spacing: 0.2vw;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Stronger shadow */
    font-size: 3vw;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 10vh; /* Fixed height */
    width: 100%; /* Full width of grid cell */
    box-sizing: border-box; /* Include padding in width */
    }
}

/* Section Divider */

/* Enhanced Video Player */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(30, 30, 40, 0.7);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.close-modal::before,
.close-modal::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
}

.close-modal::before {
    transform: rotate(45deg);
}

.close-modal::after {
    transform: rotate(-45deg);
}

#modal-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
