/* ============================================
   Theme A: "Claude Warmth" — 温暖两栏风格
   Claude warm terracotta palette + two-column layout
   ============================================ */

body.theme-claude {
  background-color: #FAF9F7;
  color: #3D3929;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  padding: 0;
}

/* --- Theme Switcher --- */
body.theme-claude .theme-switcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  background: #FFFFFF;
  padding: 8px 12px;
  border-radius: 50px;
  box-shadow: 0 2px 12px rgba(61, 57, 41, 0.12);
}

body.theme-claude .theme-btn {
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
}

body.theme-claude .theme-btn.active {
  border-color: #C2714F;
}

body.theme-claude .theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: block;
}

body.theme-claude .dot-claude { background: #C2714F; }
body.theme-claude .dot-apple  { background: #0071E3; }
body.theme-claude .dot-fusion { background: #B5654A; }

/* --- Wrapper: two-column layout --- */
body.theme-claude .wrapper {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  min-height: 100vh;
}

/* --- Sidebar: sticky, top-aligned --- */
body.theme-claude .sidebar {
  width: 320px;
  flex-shrink: 0;
  position: fixed; /* 从 sticky 改为 fixed，确保完全固定 */
  left: calc(50% - 560px); /* 560px 是 wrapper 最大宽度 1120px 的一半 */
  top: 0;
  height: 100vh;
  overflow-y: auto;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 120px; /* 从 80px 增加到 120px */
  z-index: 10;
}

/* 当屏幕宽度小于 wrapper 最大宽度时，固定在左侧 */
@media (max-width: 1120px) {
  body.theme-claude .sidebar {
    left: 0;
  }
}

body.theme-claude .profile-card {
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

body.theme-claude .image.avatar {
  margin: 0 auto 32px;
  display: block;
}

body.theme-claude .image.avatar img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  padding: 0;
  box-shadow: 0 6px 24px rgba(194, 113, 79, 0.15);
  object-fit: cover;
}

body.theme-claude .site-name {
  font-size: 28px;
  font-weight: 700;
  color: #3D3929;
  margin: 0 0 8px;
  line-height: 1.2;
}

body.theme-claude .site-email {
  font-size: 13px;
  color: #8C8577;
  font-family: "Ubuntu Mono", "SF Mono", monospace;
  margin: 0 0 24px;
  word-break: break-all;
}

/* --- Social Icons: single row --- */
body.theme-claude .social-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

/* --- Sidebar visitor map --- */
body.theme-claude .sidebar-map {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 48px auto 0;
  width: 240px; /* 调整宽度以对齐文字边缘 */
  background-color: transparent;
  border: none; /* 移除边框 */
  border-radius: 12px;
  box-shadow: none; /* 移除阴影 */
  transition: all 0.3s ease;
  box-sizing: border-box;
  overflow: hidden;
  line-height: 0;
}

body.theme-claude .sidebar-map:hover {
  transform: translateY(-4px);
  /* 悬浮时可以保留轻微的阴影或不加，这里先移除以保持极简 */
}

body.theme-claude .sidebar-map img,
body.theme-claude .sidebar-map canvas {
  max-width: 100%;
  width: 100%;
  height: auto !important;
  display: block;
  border: none;
}

/* Hide footer map for Claude theme */
body.theme-claude .site-footer .visitor-map {
  display: none;
}

body.theme-claude .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #8B7355 !important;
  font-size: 1.1rem;
  line-height: 1;
  margin: 0;
  box-shadow: 0 2px 8px rgba(61, 57, 41, 0.08);
  transition: all 0.2s ease;
}

body.theme-claude .social-icons a:hover {
  background: #C2714F;
  color: #FFFFFF !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(194, 113, 79, 0.25);
}

body.theme-claude .social-icons a i {
  font-size: 1.2rem;
}

/* --- Main Content: right column --- */
body.theme-claude .content {
  flex: 1;
  min-width: 0;
  padding: 120px 40px 80px 60px; /* 顶部内边距从 80px 增加到 120px */
  box-sizing: border-box;
  margin-left: 320px; /* 为固定的侧边栏留出空间 */
}

/* --- Sections --- */
body.theme-claude .section {
  margin-bottom: 44px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.theme-claude .section.visible {
  opacity: 1;
  transform: translateY(0);
}

body.theme-claude .section-title {
  font-size: 19px;
  font-weight: 600;
  color: #C2714F;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #C2714F;
  display: inline-block;
}

body.theme-claude .section-body {
  color: #3D3929;
}

body.theme-claude .section-body p {
  margin: 0 0 14px;
}

body.theme-claude .section-body a {
  color: #C2714F;
  text-decoration: none;
  transition: color 0.2s ease;
}

body.theme-claude .section-body a:hover {
  color: #9A4F38;
}

/* --- Cards: no background, clean --- */
body.theme-claude .card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  box-shadow: none;
}

/* --- Timeline items (Education & Experience) --- */
body.theme-claude .timeline-item {
  position: relative;
  margin-left: 20px;
  padding-left: 8px;
  padding-bottom: 20px;
}

body.theme-claude .timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #C2714F, rgba(194, 113, 79, 0.12));
}

body.theme-claude .timeline-item:last-child::before {
  bottom: 50%;
}

body.theme-claude .timeline-item::after {
  content: '';
  position: absolute;
  left: -25px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #C2714F;
  border: 2px solid #FAF9F7;
}

body.theme-claude .experience-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0;
  padding-bottom: 4px;
}

body.theme-claude .institution-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin-right: 16px;
  flex-shrink: 0;
}

body.theme-claude .experience-content {
  flex: 1;
}

body.theme-claude .experience-content p {
  margin: 0 0 2px;
}

body.theme-claude .exp-title {
  font-size: 15px;
  color: #3D3929;
}

body.theme-claude .exp-detail {
  font-size: 14px;
  color: #8C8577;
}

body.theme-claude .exp-period {
  font-size: 13px;
  color: #8B7355;
  font-weight: 500;
}

/* --- Project card --- */
body.theme-claude .project-card {
  font-size: 15px;
  line-height: 1.6;
}

/* --- Publications --- */
body.theme-claude .publications {
  margin-top: 0;
}

body.theme-claude .publications ol.bibliography {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.theme-claude .publications ol.bibliography li {
  padding: 15px 0 15px 16px;
  border-left: 3px solid #C2714F;
  margin-bottom: 14px;
  min-height: auto;
}

body.theme-claude .pub-row {
  display: block;
}

body.theme-claude .pub-content {
  padding: 0;
}

body.theme-claude .publications ol.bibliography li .title {
  font-weight: 600;
  font-size: 15px;
  color: #3D3929;
  margin-bottom: 4px;
}

body.theme-claude .publications ol.bibliography li .author {
  font-size: 14px;
  color: #8C8577;
  margin-bottom: 4px;
}

body.theme-claude .publications ol.bibliography li .periodical {
  font-size: 14px;
  color: #8B7355;
  margin-bottom: 6px;
}

body.theme-claude .publications ol.bibliography li .links a {
  color: #C2714F;
  font-size: 13px;
  font-weight: 500;
}

body.theme-claude .publications ol.bibliography li .links a:hover {
  color: #9A4F38;
}

/* --- Awards --- */
body.theme-claude .awards-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.theme-claude .award-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  padding: 4px 0;
}

body.theme-claude .award-icon {
  font-size: 20px;
  flex-shrink: 0;
}

body.theme-claude .award-text {
  font-size: 14px;
  color: #3D3929;
}

body.theme-claude .award-text a {
  color: #C2714F;
}

/* --- Footer --- */
body.theme-claude .site-footer {
  position: static !important;
  float: none !important;
  width: 100%;
  flex-basis: 100%;
  text-align: center;
  padding: 32px 24px 40px 380px; /* 增加左边距以避开固定的侧边栏 (320px + 60px content padding) */
  border-top: none !important;
  box-sizing: border-box;
}

body.theme-claude .site-footer p {
  font-size: 13px;
  color: #8C8577;
  margin: 0;
}

body.theme-claude .visitor-map {
  margin-bottom: 16px;
}

body.theme-claude .visitor-map img {
  max-width: 240px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(194, 113, 79, 0.12);
  transition: box-shadow 0.2s ease;
}

body.theme-claude .visitor-map img:hover {
  box-shadow: 0 4px 16px rgba(194, 113, 79, 0.2);
}

/* --- Headings override --- */
body.theme-claude h1,
body.theme-claude h2,
body.theme-claude h3,
body.theme-claude h4 {
  color: #3D3929;
}

body.theme-claude strong {
  color: #3D3929;
}

/* --- Responsive --- */
@media (max-width: 1080px) {
  body.theme-claude .wrapper {
    width: 100%;
    flex-direction: column;
    padding: 0 20px;
    box-sizing: border-box;
  }

  body.theme-claude .sidebar {
    width: 100%;
    position: static;
    height: auto;
    padding: 48px 0 24px;
    overflow: visible;
    margin-left: 0;
  }

  body.theme-claude .content {
    padding: 32px 0 48px;
    margin-left: 0;
  }

  body.theme-claude .site-footer {
    padding: 32px 0;
  }

  body.theme-claude .image.avatar img {
    width: 140px;
    height: 140px;
  }

  body.theme-claude .theme-switcher {
    bottom: 16px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  body.theme-claude .card {
    padding: 14px 16px;
  }

  body.theme-claude .section {
    margin-bottom: 32px;
  }
}
