/* ===== 变量：浅色 / 深色 ===== */
:root {
  --bg: #f8f6f2;
  --text: #1a1a1a;
  --text-muted: #4a4a4a;
  --border: #e0ddd8;
  --accent: #8b7355;
}

[data-theme="dark"] {
  --bg: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #b0b0b0;
  --border: #333;
  --accent: #c4a574;
}

/* ===== 基础与排版 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== 布局容器 ===== */
.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

@media (min-width: 640px) {
  .content {
    padding: 4rem 2rem 5rem;
  }
}

.content--wide {
  max-width: 900px;
}

/* ===== 头部 ===== */
.site-header {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  margin-bottom: 1.5rem;
}

.logo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: none;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.logo-text {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav a {
  color: var(--text-muted);
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a.nav-active {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.nav-contact {
  flex-basis: 100%;
  text-align: center;
}

@media (min-width: 640px) {
  .nav-contact {
    flex-basis: auto;
  }
}

/* ===== 区块通用 ===== */
.section {
  margin-top: 3.5rem;
}

.section-heading {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}

.section-placeholder {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

/* ===== About 区块 ===== */
.about-section {
  margin-top: 2.5rem;
}

.name {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.25rem;
  letter-spacing: 0.02em;
}

.title-line {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

.about-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .about-block {
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
  }
}

.avatar-wrap {
  flex-shrink: 0;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a8d5e5 0%, #7eb8c9 100%);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.about-text {
  flex: 1;
  min-width: 0;
}

.about-text p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* ===== Hobby 列表 ===== */
.hobby-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hobby-list li {
  padding: 0.25rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.hobby-list li::before {
  content: "· ";
  color: var(--accent);
}

/* ===== Contact ===== */
.contact-section .contact-email {
  display: inline-block;
  font-size: 0.9375rem;
  color: var(--accent);
  margin-top: 0.5rem;
}

.contact-section .contact-email:hover {
  text-decoration: underline;
}

/* ===== 页脚与主题切换 ===== */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-content {
  margin-bottom: 1.5rem;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.social-link {
  color: var(--text-muted);
  transition: color 0.2s;
}

.social-link:hover {
  color: var(--text);
  text-decoration: none;
}

.social-separator {
  color: var(--border);
}

.theme-toggle {
  font-family: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ===== Travel 卡片列表（参考 旅游.jpg） ===== */
.travel-intro {
  margin-bottom: 2.5rem;
}

.travel-grid {
  display: grid;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 640px) {
  .travel-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

.travel-card {
  display: flex;
  flex-direction: column;
}

.travel-card-link {
  color: inherit;
  text-decoration: none;
}

.travel-card-link:hover {
  text-decoration: none;
}

.travel-card-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border);
  margin-bottom: 1rem;
}

.travel-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.travel-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
  color: #fff;
}

.travel-card-overlay-tag {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.travel-card-overlay-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
}

.travel-card-overlay-sub {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.15rem;
  opacity: 0.95;
}

.travel-card-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.travel-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.travel-card-read {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.travel-card-link:hover .travel-card-read {
  color: var(--accent);
}

/* ===== Travel 详情页 ===== */
.travel-detail-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.travel-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
}
