:root {
  --bg:        #faf9f6;
  --text:      #181614;
  --sub:       #6b645e;
  --muted:     #a09890;
  --accent:    #c27b57;
  --border:    #e8e4de;
  --surface:   #f3f0eb;
  --font-display: 'Playfair Display', 'Noto Serif SC', 'STSong', serif;
  --font-body:    system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --w: min(960px, 100% - clamp(1.5rem, 6vw, 4rem));
}

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

html { font-size: 100%; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.page {
  width: var(--w);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

/* ====== Header ====== */
.header { margin-bottom: clamp(3rem, 8vw, 6rem); }

.header-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.35em 0.9em;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s var(--ease) forwards;
}

.header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
}
.header h1 span {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.6s 0.2s var(--ease) forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== Project List ====== */
.project-list { list-style: none; }

.project-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.3s var(--ease);
  opacity: 0;
  transform: translateY(20px);
}

.project-item.visible {
  animation: fadeUp 0.55s var(--ease) forwards;
}

.project-item:hover { background: var(--surface); }
.project-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Number */
.project-num {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  color: var(--muted);
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s var(--ease);
}
.project-item:hover .project-num { color: var(--accent); }

/* Name */
.project-name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s var(--ease), color 0.3s var(--ease);
}
.project-item:hover .project-name {
  color: var(--accent);
  background-size: 100% 2px;
}

/* ====== Footer ====== */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--border);
  margin-top: clamp(0rem, 0vw, 0rem);
  opacity: 0;
  animation: fadeUp 0.5s 0.8s var(--ease) forwards;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
}
.footer-year { font-size: 0.8125rem; color: var(--muted); }

/* ====== Reduced motion ====== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .project-item, .header-tag, .header h1 span, .footer {
    opacity: 1; transform: none;
  }
}

::selection { background: rgba(194,123,87,0.15); }
