:root {
  --bg: #f5f0e8;
  --panel: rgba(255, 252, 246, 0.78);
  --ink: #17201b;
  --muted: #6c746d;
  --line: rgba(23, 32, 27, 0.12);
  --accent: #ff5a3c;
  --accent-2: #075e54;
  --gold: #d8a84c;
  --shadow: 0 24px 80px rgba(28, 38, 33, 0.14);
  --display: "Noto Serif SC", serif;
  --body: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 90, 60, 0.22), transparent 28rem),
    radial-gradient(circle at 84% 6%, rgba(7, 94, 84, 0.2), transparent 25rem),
    linear-gradient(135deg, #f8f1e5 0%, #efe9dd 52%, #f9f6ef 100%);
}

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

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.72);
  backdrop-filter: blur(20px);
  box-shadow: 0 14px 50px rgba(28, 38, 33, 0.08);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fffaf2;
  background: var(--ink);
  font-family: var(--display);
}

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); background: rgba(23,32,27,.08); transform: translateY(-1px); }

.menu-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); cursor: pointer; }
.menu-toggle span { display: block; width: 18px; height: 2px; margin: 5px auto; background: #fff8ed; transition: transform .2s ease; }
.menu-toggle.open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle.open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

main { position: relative; z-index: 1; width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 62px 0 88px; }
.view { display: none; opacity: 0; transform: translateY(12px); }
.view.active { display: block; animation: fadeIn .42s ease forwards; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: clamp(24px, 5vw, 72px); align-items: center; min-height: 64vh; }
.eyebrow { margin: 0 0 14px; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 800; }
h1, h2, h3 { margin: 0; letter-spacing: -0.04em; }
h1 { font-family: var(--display); font-size: clamp(3rem, 8vw, 6.9rem); line-height: .98; }
h2 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }
.hero-text, .page-intro p, .bio-panel p, .portrait-card p { color: var(--muted); line-height: 1.85; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(23, 32, 27, .14); }
.button.primary { color: #fffaf2; background: var(--ink); }
.button.ghost { color: var(--ink); background: rgba(255,255,255,.35); }
.button.small { min-height: 44px; background: var(--ink); color: #fffaf2; }
.notice { margin-top: 22px; padding: 18px 20px; border: 1px dashed rgba(255,90,60,.42); border-radius: 20px; background: rgba(255,90,60,.08); color: var(--muted); line-height: 1.7; }
.notice[hidden] { display: none; }

.portrait-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 46px);
  min-height: 440px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(255,255,255,.7), rgba(255,250,240,.5));
  box-shadow: var(--shadow);
}
.portrait-card::after { content: ""; position: absolute; right: -50px; bottom: -50px; width: 190px; height: 190px; border: 1px solid rgba(23,32,27,.16); border-radius: 44px; transform: rotate(18deg); }
.avatar-placeholder { display: grid; place-items: center; width: 160px; height: 160px; margin-left: auto; border-radius: 42% 58% 65% 35%; color: #fffaf2; background: radial-gradient(circle at 30% 30%, #ffe0b2, var(--accent) 45%, var(--accent-2)); box-shadow: 0 24px 80px rgba(255,90,60,.28); animation: float 5s ease-in-out infinite; font-family: var(--display); font-size: 3rem; font-weight: 900; }
@keyframes float { 50% { transform: translateY(-12px) rotate(5deg); } }
.card-kicker { margin-top: 42px; color: var(--accent-2) !important; font-weight: 800; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.metric-row span { padding: 14px; border-radius: 18px; background: rgba(23,32,27,.06); color: var(--muted); font-size: .86rem; }
.metric-row strong { display: block; color: var(--ink); font-size: 1.35rem; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 72px 0 24px; }
.section-heading .eyebrow { margin-bottom: 10px; }
.text-link { color: var(--accent); font-weight: 900; white-space: nowrap; }
.page-intro { margin: 72px 0 24px; }
.page-intro { max-width: 760px; margin-top: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 14px 42px rgba(28,38,33,.08);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255,90,60,.4); box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent-2)); }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(7,94,84,.09); color: var(--accent-2); font-size: .76rem; font-weight: 800; }
.card p { color: var(--muted); line-height: 1.7; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--accent); font-weight: 800; }
.empty { grid-column: 1 / -1; width: 100%; padding: 40px; border: 1px dashed var(--line); border-radius: 26px; text-align: center; color: var(--muted); background: rgba(255,252,246,.48); }

.toolbar { display: flex; gap: 14px; margin-bottom: 24px; }
input[type="search"] { flex: 1; min-height: 52px; padding: 0 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,252,246,.72); color: var(--ink); font: inherit; outline: none; }
input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,90,60,.12); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; }
.pagination-info { color: var(--muted); font-weight: 800; }
.pagination .button[disabled] { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }

.about-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 22px; }
.bio-panel, .skills-panel, .timeline, .interests { padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: 32px; background: var(--panel); box-shadow: 0 14px 42px rgba(28,38,33,.08); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tag-cloud .empty { padding: 28px; }
.tag-cloud span { padding: 10px 13px; border-radius: 999px; background: var(--ink); color: #fffaf2; font-weight: 800; font-size: .88rem; }
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.timeline-item { position: relative; padding: 20px 0 20px 28px; border-left: 2px solid rgba(23,32,27,.14); }
.timeline-item::before { content: ""; position: absolute; left: -7px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(255,90,60,.14); }
.timeline-item strong { color: var(--accent-2); }
.timeline-item p, .interest-list p { color: var(--muted); line-height: 1.7; }
.interest-card { padding: 18px; margin-top: 14px; border-radius: 22px; background: rgba(23,32,27,.06); }

.reveal { animation: rise .65s ease both; }
.delay-1 { animation-delay: .12s; }
.delay-2 { animation-delay: .22s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .hero-grid, .about-layout, .about-split { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: clamp(2.7rem, 12vw, 5rem); }
}

@media (max-width: 680px) {
  .site-header { border-radius: 24px; align-items: flex-start; }
  .menu-toggle { display: block; flex: 0 0 auto; }
  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 252, 246, .94);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .site-nav a { padding: 14px 16px; }
  main { padding-top: 42px; }
  .card-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; }
  .pagination { flex-direction: column; align-items: stretch; }
  .pagination-info { text-align: center; }
  .button.small { width: 100%; }
  .portrait-card { min-height: 360px; }
  .metric-row { grid-template-columns: 1fr; }
}
