/*-----------------------------------*\
  #CUSTOM MODERN STYLES
\*-----------------------------------*/

:root {
  /* 更现代的颜色方案 */
  --primary-color: #FFCB6B;
  --secondary-color: #82AAFF;
  --accent-color: #C792EA;
  --success-color: #C3E88D;
  --info-color: #89DDFF;
  --warning-color: #F78C6C;
  --danger-color: #FF5370;
  
  /* 更细腻的背景渐变 */
  --modern-gradient-dark: linear-gradient(
    135deg, 
    hsl(220, 13%, 18%) 0%, 
    hsl(220, 13%, 10%) 100%
  );
  
  /* 更现代的字体设置 */
  --ff-main: 'Inter', sans-serif;
  --ff-code: 'Fira Code', monospace;
  --ff-heading: 'Playfair Display', serif;
  
  /* 增强的阴影效果 */
  --modern-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --modern-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  --modern-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.25);
  --modern-shadow-float: 0 10px 25px rgba(0, 0, 0, 0.2);
  
  /* 玻璃态效果 */
  --glass-bg: rgba(25, 28, 39, 0.6);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-blur: blur(12px);
  
  /* 圆角大小 */
  --border-radius-sm: 8px;
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 28px;
  
  /* 动画持续时间 */
  --animation-fast: 0.2s;
  --animation-normal: 0.3s;
  --animation-slow: 0.5s;
}

/* 基础样式优化 */
body {
  font-family: var(--ff-main);
  background-color: var(--smoky-black);
  background-image: 
    radial-gradient(at 40% 20%, hsla(228, 100%, 25%, 0.1) 0px, transparent 50%),
    radial-gradient(at 80% 80%, hsla(287, 100%, 25%, 0.1) 0px, transparent 50%),
    radial-gradient(at 20% 90%, hsla(44, 100%, 60%, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--white-2);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* 现代化的排版 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-main);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

h1, h2 {
  background: var(--text-gradient-yellow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem; 
}

a {
  color: var(--primary-color);
  transition: all var(--animation-normal) ease;
}

a:hover {
  color: var(--secondary-color);
  transform: translateY(-2px);
}

p {
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

code {
  font-family: var(--ff-code);
  background: rgba(30, 30, 30, 0.6);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--info-color);
}

/* 玻璃态卡片效果 */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--modern-shadow);
  transition: transform var(--animation-normal) ease, box-shadow var(--animation-normal) ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--modern-shadow-float);
}

/* 按钮样式优化 */
.modern-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all var(--animation-normal) ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), var(--warning-color));
  color: var(--smoky-black);
  border: none;
  box-shadow: var(--modern-shadow-sm);
}

.modern-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--modern-shadow);
}

.modern-btn.outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.modern-btn.outline:hover {
  background: var(--primary-color);
  color: var(--smoky-black);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
}

/* 动画效果 */
.fade-in {
  animation: fadeIn var(--animation-slow) ease forwards;
}

.slide-up {
  animation: slideUp var(--animation-normal) ease forwards;
}

.scale-in {
  animation: scaleIn var(--animation-normal) ease forwards;
}

/* 技能标签样式 */
.skill-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  background: var(--glass-bg);
  border: var(--glass-border);
  font-size: 0.85rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all var(--animation-normal) ease;
}

.skill-tag:hover {
  background: var(--primary-color);
  color: var(--smoky-black);
}

/* 简单的过渡动效 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from { 
    opacity: 0;
    transform: scale(0.95);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

/* 现代卡片悬浮效果 */
.hover-float {
  transition: transform var(--animation-normal) ease-out, box-shadow var(--animation-normal) ease-out;
}

.hover-float:hover {
  transform: translateY(-10px);
  box-shadow: var(--modern-shadow-lg);
}

/* 改进的滚动条样式 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--eerie-black-1);
}

::-webkit-scrollbar-thumb {
  background: var(--onyx);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* 社交图标悬停效果改进 */
.social-link {
  transition: all var(--animation-normal) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-link:hover {
  transform: translateY(-5px) scale(1.1);
  color: var(--primary-color);
}

/* 现代化的卡片设计 */
.sidebar,
article {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--modern-shadow);
  transition: transform var(--animation-normal) ease, box-shadow var(--animation-normal) ease;
  overflow: hidden;
}

/* 调整侧边栏和主要内容的样式 */
.sidebar {
  background: var(--modern-gradient-dark);
  border: var(--glass-border);
  max-height: 180px;  /* 初始状态下的最大高度 */
  overflow: hidden;
  transition: max-height 0.3s ease-out; /* 优化过渡效果 */
  position: relative;
  padding: 25px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--modern-shadow);
}

/* 添加侧边栏动态效果背景 */
.sidebar:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 203, 107, 0.08), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(199, 146, 234, 0.08), transparent 30%);
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
}

.sidebar.active { 
  max-height: 584px; /* 展开状态下的最大高度 */
}

/* 针对宽屏的侧边栏样式 */
@media (min-width: 1250px) {
  .sidebar {
    max-height: none !important; /* 使用!important覆盖其他样式 */
    overflow: visible !important;
    height: auto !important;
    padding-top: 60px;
  }
  
  .sidebar-info_more {
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .info_more-btn {
    display: none !important;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .sidebar {
    padding: 20px 15px;
  }
}

.sidebar-info_more {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out; /* 调整过渡时间 */
}

.sidebar.active .sidebar-info_more {
  opacity: 1;
  visibility: visible;
}

/* 增强的分隔线 */
.separator {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent
  );
  margin: 1.5rem 0;
}

/* 模块进入动画 */
.module-enter {
  animation: moduleEnter var(--animation-slow) forwards;
}

@keyframes moduleEnter {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 调整文本间距 */
.article-title {
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.article-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

/* 增强图片效果 */
img {
  border-radius: var(--border-radius-sm);
  transition: transform var(--animation-normal) ease;
}

img:hover {
  transform: scale(1.03);
}

/* 高质量图像渲染 */
.high-quality {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
  backface-visibility: hidden;
  filter: contrast(1.05);
}

/* 时间轴美化 */
.timeline-text {
  position: relative;
  padding-left: 1rem;
  border-left: 2px solid var(--primary-color);
  margin-left: 0.5rem;
}

/* 预览图像样式简化 */
.preview-able {
  cursor: zoom-in !important;
  transition: all 0.3s ease;
}

.preview-able:hover {
  transform: scale(1.02);
}

/* 给主内容区域添加微妙的动态背景 */
.main-content {
  position: relative;
}

.main-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 50% 20%, rgba(255, 203, 107, 0.03), transparent 25%),
    radial-gradient(circle at 80% 50%, rgba(130, 170, 255, 0.03), transparent 25%);
  pointer-events: none;
}

/* 图片预览弹窗全局样式 */
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-preview-modal.active {
  opacity: 1;
}

.image-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.image-preview-container {
  width: 90%;
  max-width: 900px;
  background: rgba(30, 30, 30, 0.9);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  animation: scaleIn 0.3s forwards;
}

.image-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.image-preview-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.image-preview-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-preview-close:hover {
  background: var(--primary-color);
  color: #111;
  transform: rotate(90deg);
}

.image-preview-content {
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.image-preview-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
} 