/* About Me 页面增强特效和动效 */

/* 页面加载动画 */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromRight {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 30px rgba(59, 130, 246, 0.6);
  }
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  0%, 50% {
    border-color: transparent;
  }
  51%, 100% {
    border-color: currentColor;
  }
}

/* 个人照片容器增强 */
.photo-container {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  animation: slideInFromLeft 1s ease-out;
  transition: all 0.3s ease;
}

.photo-container:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.photo-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
  z-index: 1;
}

.photo-container:hover::before {
  left: 100%;
}

.photo-container img {
  transition: all 0.3s ease;
  filter: brightness(1) contrast(1);
}

.photo-container:hover img {
  filter: brightness(1.1) contrast(1.1);
}

/* 文本内容动画 */
.content-section {
  animation: slideInFromRight 1s ease-out;
}

.content-section h1 {
  animation: fadeInUp 1s ease-out 0.2s both;
  position: relative;
}

.content-section h1::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  animation: typewriter 2s ease-out 1s both;
}

.content-section h2 {
  animation: fadeInUp 1s ease-out 0.4s both;
  position: relative;
  transition: all 0.3s ease;
}

.content-section h2:hover {
  color: #3b82f6;
  transform: translateX(10px);
}

.content-section h2::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: width 0.3s ease;
}

.content-section h2:hover::before {
  width: 15px;
}

.content-section p {
  animation: fadeInUp 1s ease-out 0.6s both;
  transition: all 0.3s ease;
  line-height: 1.8;
}

.content-section p:hover {
  color: #374151;
  transform: translateX(5px);
}

/* 特殊文本效果 */
.highlight-text {
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
  animation: pulse 2s infinite;
}

/* 浮动元素 */
.floating-element {
  animation: float 3s ease-in-out infinite;
}

/* 发光效果 */
.glow-effect {
  animation: glow 2s ease-in-out infinite alternate;
  border-radius: 10px;
  padding: 20px;
  background: rgba(59, 130, 246, 0.1);
}

/* 社交媒体链接增强 */
.social-link {
  display: inline-block;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
  transition: left 0.5s;
}

.social-link:hover::before {
  left: 100%;
}

.social-link:hover {
  transform: translateY(-3px);
  color: #3b82f6;
}

/* 卡片容器 */
.info-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  animation: rotate 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.info-card:hover::before {
  opacity: 1;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .photo-container,
  .content-section {
    animation-duration: 0.8s;
  }
  
  .content-section h1::after {
    animation-duration: 1.5s;
  }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .info-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .content-section p:hover {
    color: #d1d5db;
  }
}

/* 滚动触发动画 */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 交互式按钮效果 */
.interactive-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.interactive-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.interactive-button:hover::after {
  width: 300px;
  height: 300px;
}

/* 文字打字机效果 */
.typewriter {
  overflow: hidden;
  border-right: 2px solid currentColor;
  white-space: nowrap;
  animation: typewriter 3s steps(40) 1s both, blink 1s step-end infinite;
}

