/* r0ad-theme 核心样式 - 极客极简风格 */

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*
 * Vue 挂载前，内联模板里的 <teleport> 仍会被浏览器当成普通节点排版，
 * 子元素上的 fixed inset-0 会短暂盖住全屏。挂载后 Teleport 会移走该节点。
 */
#app > teleport {
  display: none !important;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0a0a0a;
  color: #e5e5e5;
  line-height: 1.6;
}

/* 整站底衬（略提亮，接近精品个人站的阅读感） */
.r0ad-body {
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(34, 211, 238, 0.06), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(139, 92, 246, 0.04), transparent 45%),
    #0b0b0b;
  background-attachment: fixed;
}

.section-eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #737373;
}

.hero-welcome {
  letter-spacing: 0.35em;
}

.about-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #a3a3a3;
  margin-bottom: 1rem;
  letter-spacing: 0.06em;
}

/* 关于页整体版式 */
.about-page .about-intro-card {
  backdrop-filter: blur(8px);
}

.about-page .avatar-container.about-avatar {
  width: 7rem;
  height: 7rem;
}

.about-page .about-avatar .avatar-placeholder {
  font-size: 1.625rem;
}

.about-panel {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 1.25rem 1.375rem;
}

@media (min-width: 640px) {
  .about-panel {
    padding: 1.375rem 1.5rem;
  }
}

.about-panel-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-panel--contact .about-panel-title {
  margin-bottom: 1.125rem;
}

.about-panel--contact .social-link {
  min-width: 8.5rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .about-panel--contact .social-link {
    min-width: auto;
  }
}

.about-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-topic-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.about-topic-item:hover {
  border-color: rgba(34, 211, 238, 0.15);
  background: rgba(34, 211, 238, 0.04);
}

.about-topic-mark {
  width: 3px;
  margin-top: 0.4em;
  height: 0.85em;
  border-radius: 2px;
  background: linear-gradient(180deg, #22d3ee, #6366f1);
  flex-shrink: 0;
}

.about-topic-text {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #a3a3a3;
}

.about-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 5.5rem;
}

.page-prose :where(p, ul, ol) {
  margin-bottom: 1.25em;
}

.page-prose :where(ul, ol) {
  padding-left: 1.25em;
}

.page-prose a {
  color: #22d3ee;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-prose a:hover {
  color: #67e8f9;
}

.page-prose :where(h2, h3) {
  color: #e5e5e5;
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.75em;
}

.page-prose h2 {
  font-size: 1.25rem;
}

.page-prose h3 {
  font-size: 1.1rem;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* 统计卡片 */
.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.05);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: #737373;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* 项目卡片 - 极简风格 */
.project-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  height: 100%;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--project-color, #22d3ee);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

/* 悬停高亮与每个项目的 --project-color 一致，避免与顶部条/光晕各用一套色 */
.project-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--project-color, #22d3ee) 58%, rgba(255, 255, 255, 0.35));
  background: color-mix(in srgb, var(--project-color, #22d3ee) 16%, rgba(255, 255, 255, 0.07));
  box-shadow: 0 16px 52px color-mix(in srgb, var(--project-color, #22d3ee) 32%, transparent);
}

.project-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  border-radius: 0.5rem;
}

.project-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--project-color, #22d3ee) 72%, transparent);
  outline-offset: 2px;
}

.project-icon-wrap {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  border-radius: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-icon-wrap::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 1.25rem;
  background: var(--project-color, #22d3ee);
  opacity: 0.22;
  filter: blur(16px);
}

.project-icon-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.project-icon {
  position: relative;
  z-index: 1;
  font-size: 2.25rem;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.project-card:hover .project-icon {
  transform: translateY(-1px);
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.45));
}

.project-card:hover .project-icon-wrap::before {
  opacity: 0.38;
}

.project-card:hover .project-icon-wrap::after {
  border-color: color-mix(in srgb, var(--project-color, #22d3ee) 42%, rgba(255, 255, 255, 0.2));
}

.project-title {
  font-size: 1.05rem;
  font-weight: 650;
  color: #ffffff;
  line-height: 1.4;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card:hover .project-title {
  color: var(--project-color, #22d3ee);
}

.project-desc {
  margin-top: 0.5rem;
  color: #d4d4d4;
  font-size: 0.875rem;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  height: 3em;
  transition: color 0.25s ease;
}

.project-card:hover .project-desc {
  color: #ececec;
}

/* 文章列表（与关于页同系的 panel） */
.blog-list-panel {
  backdrop-filter: blur(8px);
}

.blog-post-row + .blog-post-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-post-link {
  text-decoration: none;
  color: inherit;
}

.blog-post-link:hover {
  background: rgba(34, 211, 238, 0.06);
}

.blog-post-link:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.45);
  outline-offset: 2px;
}

/* 首条与容器圆角衔接 */
.blog-post-row:first-of-type .blog-post-link {
  border-top-left-radius: 0.65rem;
  border-top-right-radius: 0.65rem;
}

.blog-post-row:last-of-type .blog-post-link {
  border-bottom-left-radius: 0.65rem;
  border-bottom-right-radius: 0.65rem;
}

/* About 页面样式 */
.avatar-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}

.avatar-glow {
  position: absolute;
  inset: -3px;
  background: linear-gradient(45deg, #22d3ee, #3b82f6, #8b5cf6);
  border-radius: 50%;
  animation: gradient-x 3s linear infinite;
  background-size: 200% 200%;
}

.avatar-placeholder {
  position: absolute;
  inset: 0;
  background: #111;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  color: #737373;
  text-decoration: none;
  font-size: 0.875rem;
}

.social-link:hover {
  border-color: rgba(34, 211, 238, 0.3);
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.05);
}

/* 技能标签 */
.skill-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #a3a3a3;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  border-color: rgba(34, 211, 238, 0.3);
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.05);
}

/* Three.js 背景容器 */
#three-bg {
  pointer-events: none;
}

/* 动画类 */
.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes gradient-x {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .stat-card {
    padding: 0.75rem;
  }
  
  .stat-number {
    font-size: 1.25rem;
  }
  
  .project-card {
    padding: 1rem;
  }
  
  .project-icon {
    font-size: 1.75rem;
  }
}

/* 加载状态 */
.v-cloak {
  display: none;
}

/* 导航栏优化 */
header {
  backdrop-filter: blur(12px);
}
