/* ========================================
   雨·舍 Portal Style — 温暖手账风格
   完全复用 diary/blog 设计系统
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
  --color-primary: #D4A574;
  --color-primary-hover: #C49464;
  --color-accent: #F5A0A0;
  --color-accent-light: #F8C8C8;
  --color-secondary: #8B7355;
  --color-bg: #FDF8F4;
  --color-card: #FFFFFF;
  --color-nav: #FFF8F0;
  --color-hover-bg: #FFF0E0;
  --color-text: #3D2B1F;
  --color-text-secondary: #8B7355;
  --color-text-light: #B8A088;
  --color-success: #7DB87D;
  --color-warning: #E8A87C;
  --color-danger: #D48686;
  --color-link: #A0724A;
  --shadow-soft: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.10);
  --radius-card: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --max-width: 1000px;
  --transition: 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Georgia", "Times New Roman", serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.8;
}

/* ---------- App Layout ---------- */
#app {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
}

/* ---------- Header ---------- */
.header {
  background: var(--color-nav);
  border-bottom: 1px solid #E8DDD0;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  margin: 0 -20px;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 20px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 2px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-item {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  font-family: inherit;
}

.nav-item.active {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- Hero Section ---------- */
.hero {
  text-align: center;
  padding: 48px 20px 32px;
  animation: fadeIn 0.4s ease;
}

.hero-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.hero-greeting {
  font-size: 16px;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.hero-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.hero-time {
  font-size: 13px;
  color: var(--color-text-light);
}

/* ---------- Section Divider ---------- */
.section-divider {
  text-align: center;
  margin: 8px 0 32px;
  position: relative;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #E8DDD0;
}

.divider-dot {
  position: relative;
  display: inline-block;
  background: var(--color-bg);
  padding: 0 20px;
  font-size: 14px;
  color: var(--color-primary);
}

/* ---------- Projects Grid ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

/* ---------- Project Card ---------- */
.project-card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 24px 20px;
  cursor: pointer;
  transition: all var(--transition);
  animation: slideUp 0.3s ease both;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid transparent;
  user-select: none;
}

.project-card:nth-child(1) { animation-delay: 0.03s; }
.project-card:nth-child(2) { animation-delay: 0.06s; }
.project-card:nth-child(3) { animation-delay: 0.09s; }
.project-card:nth-child(4) { animation-delay: 0.12s; }
.project-card:nth-child(5) { animation-delay: 0.15s; }
.project-card:nth-child(6) { animation-delay: 0.18s; }

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--color-primary);
}

.project-card:active {
  transform: scale(0.98);
}

/* Coming soon 卡片透明感 */
.project-card.card-coming {
  opacity: 0.65;
}

.project-card.card-coming:hover {
  opacity: 0.85;
  border-color: var(--color-text-light);
}

/* 圆形图标区 */
.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card-color) 15%, #FFFDFA);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--card-color) 25%, transparent);
  transition: all var(--transition);
}

.project-card:hover .card-icon-wrap {
  background: color-mix(in srgb, var(--card-color) 25%, #FFFDFA);
}

.card-icon {
  font-size: 22px;
  line-height: 1;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.card-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-status {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
}

.status-active {
  color: var(--color-success);
  background: color-mix(in srgb, #7DB87D 10%, transparent);
}

.status-coming {
  color: var(--color-text-light);
  background: #F5F0EB;
}

.card-arrow {
  font-size: 14px;
  color: var(--color-text-light);
  transition: all var(--transition);
}

.project-card:hover .card-arrow {
  color: var(--color-primary);
  transform: translateX(4px);
}

/* ---------- Quote Block ---------- */
.quote-block {
  background: #FFF8F4;
  border-left: 4px solid var(--color-accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  margin-bottom: 24px;
  position: relative;
  animation: fadeIn 0.4s ease 0.2s both;
}

.quote-block::before {
  content: '\201C';
  font-size: 36px;
  color: var(--color-accent);
  position: absolute;
  top: 4px;
  left: 12px;
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.6;
}

.quote-text {
  font-style: italic;
  color: var(--color-text-secondary);
  font-size: 15px;
  padding-left: 16px;
  line-height: 1.7;
  text-align: center;
}

/* ---------- Footer ---------- */
.footer {
  margin: 16px -20px 0;
  padding: 20px;
  border-top: 1px solid #E8DDD0;
  background: var(--color-nav);
}

.footer-inner {
  text-align: center;
}

.footer-text {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 2;
}

.footer-icp a {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-icp a:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-link {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  #app {
    padding: 0 12px 30px;
  }

  .header {
    margin: 0 -12px;
  }

  .footer {
    margin: 12px -12px 0;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero {
    padding: 36px 12px 24px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-icon {
    font-size: 40px;
  }

  .project-card {
    padding: 20px 16px;
  }

  .card-icon-wrap {
    width: 42px;
    height: 42px;
  }

  .card-icon {
    font-size: 18px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .projects {
    grid-template-columns: repeat(2, 1fr);
  }
}
