/* 全局重置与基础样式 */
:root {
  --bg-color: #0f172a;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent-color: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.5);
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --font-main: "Outfit", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* 动态背景形状 */
.background-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px); /* 100px */
  z-index: -1;
  animation: float 10s infinite alternate;
}

.shape-1 {
  width: 400px;
  height: 400px;
  top: -50px;
  left: -100px;
  background: linear-gradient(135deg, #ff00cc, #333399);
}

.shape-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  right: -50px;
  background: linear-gradient(135deg, #00d2ff, #3a7bd5);
  animation-delay: -5s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, 50px) scale(1.1);
  }
}

/* 玻璃拟态通用类 */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
}

/* 布局容器 */
.container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  width: 100%;
  max-width: 1200px;
  height: fit-content;
}

/* 侧边个人资料栏 */
.profile-card {
  padding: 40px 20px;
  text-align: center;
  height: fit-content;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.avatar-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  transition: transform 0.5s ease;
}

.profile-card:hover .avatar {
  transform: rotate(360deg);
}

.status-indicator {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  background-color: #10b981;
  border: 3px solid var(--bg-color);
  border-radius: 50%;
}

.name {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 5px;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-info {
  text-align: left;
  padding: 0 10px;
}

.contact-info h3 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-info li i {
  width: 20px;
  text-align: center;
  color: var(--text-primary);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: auto;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.social-links a:hover {
  background: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translateY(-3px);
}

/* 主内容区 */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* 顶部导航 */
.top-nav {
  padding: 20px 30px;
  display: flex;
  align-items: center;
}

.top-nav nav {
  display: flex;
  gap: 30px;
}

.top-nav a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-secondary);
  position: relative;
  padding: 5px 0;
}

.top-nav a:hover,
.top-nav a.active {
  color: var(--text-primary);
}

.top-nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.top-nav a:hover::after,
.top-nav a.active::after {
  width: 100%;
}

/* 文章列表 */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.post-card {
  padding: 0;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.post-image {
  height: 200px;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.post-image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, var(--bg-color), transparent);
  opacity: 0.3; /* Subtle gradient overlay */
}

.post-content {
  padding: 25px;
}

.post-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.post-content h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-content h2 a:hover {
  color: var(--accent-color);
}

.excerpt {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.read-more:hover {
  gap: 12px;
  color: var(--accent-color);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .profile-card {
    position: relative;
    top: 0;
  }

  .top-nav {
    justify-content: center;
  }

  .top-nav nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}
