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

:root {
  --bg: #faf8f5;
  --text: #2d2d2d;
  --accent: #c74b4b;
  --secondary: #5a8a6e;
  --muted: #8b7355;
  --border: rgba(139, 115, 85, 0.15);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  min-height: 100vh;
}

/* subtle texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* navigation */
nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 48px;
  font-size: 0.95rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  padding-bottom: 2px;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* header */
header {
  text-align: center;
  margin-bottom: 60px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
  border: 3px solid var(--border);
}

h1 {
  font-family: 'Noto Serif', serif;
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.chinese-name {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.tagline {
  font-size: 1rem;
  color: var(--muted);
  font-style: italic;
}

/* sections */
section {
  margin-bottom: 48px;
}

h2 {
  font-family: 'Noto Serif', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

h3 {
  font-family: 'Noto Serif', serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

p {
  margin-bottom: 12px;
}

/* shifu section */
.shifu-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

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

.shifu-card .info h3 {
  font-family: 'Noto Serif', serif;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.shifu-card .info .meaning {
  font-size: 0.9rem;
  color: var(--muted);
}

/* links */
a {
  color: var(--secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

a:hover {
  border-bottom-color: var(--secondary);
}

/* interests */
.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--muted);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* wisdom box */
.wisdom {
  background: url('../img/light_bg.jpg') center / cover no-repeat;
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  position: relative;
}

.wisdom::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(250, 248, 245, 0.82);
  border-radius: 0 8px 8px 0;
}

.wisdom > * {
  position: relative;
}

.wisdom .chinese {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 4px;
}

.wisdom .pinyin {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 8px;
}

.wisdom .translation {
  font-size: 0.95rem;
  color: var(--muted);
}

/* post list */
.post-list {
  list-style: none;
}

.post-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list .post-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.post-list .post-title {
  font-family: 'Noto Serif', serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 4px 0;
}

.post-list .post-title a {
  color: var(--text);
  border-bottom: none;
}

.post-list .post-title a:hover {
  color: var(--accent);
}

.post-list .post-excerpt {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0;
}

.post-list .post-category {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--secondary);
  background: rgba(90, 138, 110, 0.08);
  padding: 2px 10px;
  border-radius: 12px;
  margin-top: 6px;
}

/* category filter */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.categories a {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--muted);
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border-bottom: none;
  transition: color 0.2s, background 0.2s;
}

.categories a:hover,
.categories a.active {
  color: white;
  background: var(--accent);
}

/* single post */
.post-header {
  margin-bottom: 40px;
}

.post-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0;
}

.post-content {
  line-height: 1.85;
}

.post-content h2 {
  font-size: 1.3rem;
  margin-top: 36px;
  margin-bottom: 16px;
}

.post-content h2::after {
  display: none;
}

.post-content ul,
.post-content ol {
  margin: 12px 0 12px 24px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(199, 75, 75, 0.03);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted);
}

.post-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
}

/* recipe specific */
.recipe-info {
  background: url('../img/recipe_bg.jpg') center / cover no-repeat;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  position: relative;
}

.recipe-info::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 12px;
}

.recipe-info > * {
  position: relative;
}

.recipe-info h3 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.recipe-info ul {
  list-style: none;
  margin: 0;
}

.recipe-info li {
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.recipe-info li:last-child {
  border-bottom: none;
}

.shifu-rating {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* about page */
.about-hero {
  text-align: center;
  margin-bottom: 48px;
}

.about-hero img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 20px;
}

/* back link */
.back-link {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
  border-bottom: none;
}

.back-link:hover {
  color: var(--accent);
}

/* view all link */
.view-all {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--secondary);
}

/* footer */
footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* responsive */
@media (max-width: 480px) {
  .container {
    padding: 40px 20px;
  }

  h1 {
    font-size: 2rem;
  }

  .shifu-card {
    flex-direction: column;
    text-align: center;
  }

  nav {
    gap: 16px;
    font-size: 0.9rem;
  }
}
