/* ========================================
   Rhine's Homepage - 现代简洁风格
   ======================================== */

:root {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 16px 48px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: all 0.25s ease; }
a:hover { color: var(--accent-2); }

/* ========================================
   导航栏
   ======================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo span {
  color: var(--accent);
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--accent);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}

/* ========================================
   页面容器
   ======================================== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.page-desc {
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

/* ========================================
   首页 - Hero
   ======================================== */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

/* 渐变背景装饰 */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 100%;
  background: radial-gradient(ellipse at 30% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('../img/bg.jpg') center/cover no-repeat;
  opacity: 0.06;
  z-index: 0;
}

.hero-bg + *, .hero > * { position: relative; z-index: 1; }

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 3px solid #fff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2), 0 0 0 4px rgba(37, 99, 235, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.25), 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.avatar.fallback {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.tag {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.25s ease;
}
.tag:hover {
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.hero-desc {
  max-width: 520px;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 2;
  font-size: 0.95rem;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(124, 58, 237, 0.85));
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
  opacity: 0.95;
  color: #fff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(124, 58, 237, 0.95));
}

.btn-outline {
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-outline:hover {
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  background: rgba(255, 255, 255, 0.8);
}

/* ========================================
   项目卡片
   ======================================== */
.project-grid {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.35s ease;
  box-shadow: var(--shadow);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-hover);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.project-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.project-title { font-size: 1.2rem; font-weight: 700; }

.project-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.project-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
}

.project-links { display: flex; gap: 1.2rem; }
.project-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
}
.project-links a:hover { color: var(--accent); }

/* ========================================
   博客列表
   ======================================== */
.blog-list { display: flex; flex-direction: column; gap: 1rem; }

.blog-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.35s ease;
  display: block;
  color: var(--text);
  box-shadow: var(--shadow);
}

.blog-item:hover {
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateX(6px);
  box-shadow: var(--shadow-hover);
}

.blog-item-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.blog-item-meta { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 0.6rem; font-weight: 500; }
.blog-item-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

/* ========================================
   博客文章详情页
   ======================================== */
.article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow);
}

.article h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.article-content {
  color: var(--text);
  line-height: 2;
}

.article-content h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.article-content h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.article-content p { margin-bottom: 1.25rem; }

.article-content ul, .article-content ol {
  margin: 1.25rem 0 1.25rem 1.5rem;
}

.article-content li { margin-bottom: 0.5rem; }

.article-content code {
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 0.85rem;
  color: var(--accent-2);
}

.article-content pre {
  background: #f8fafc;
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ========================================
   诗集
   ======================================== */
.poetry-list { display: flex; flex-direction: column; gap: 2rem; }

.poetry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: all 0.35s ease;
  box-shadow: var(--shadow);
}

.poetry-card:hover {
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: var(--shadow-hover);
}

.poetry-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--accent);
}

.poetry-date {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.poetry-content {
  font-size: 1.05rem;
  line-height: 2.5;
  white-space: pre-line;
  color: var(--text);
}

/* ========================================
   Footer
   ======================================== */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  background: var(--bg-elevated);
}

/* ========================================
   动态时钟
   ======================================== */
.clock {
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}
.clock:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent);
}

/* ========================================
   关于我页面
   ======================================== */
.about-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.35s ease;
}
.about-section:hover {
  box-shadow: var(--shadow-hover);
}

.about-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.about-content p {
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.about-content p:last-child { margin-bottom: 0; }
.about-content strong { color: var(--accent); font-weight: 600; }

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-tag {
  padding: 0.4rem 1rem;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s ease;
}
.tech-tag:hover {
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.35s ease;
  min-width: 280px;
}
.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-hover);
}

.contact-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.contact-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.contact-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 600px) {
  .nav-links { gap: 1.2rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 1rem; }
  .container { padding: 2.5rem 1rem; }
  .article { padding: 1.75rem; }
  .poetry-card { padding: 1.75rem; }
  .project-card { padding: 1.5rem; }
}
