:root {
  --ink: #10151a;
  --ink-soft: #1a232c;
  --fog: #d7e0e6;
  --paper: #f3f6f4;
  --muted: #8a9aa6;
  --accent: #c4a574;
  --accent-deep: #9a7a4a;
  --line: rgba(243, 246, 244, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--paper);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(196, 165, 116, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(120, 160, 170, 0.16), transparent 50%),
    linear-gradient(165deg, #0c1116 0%, #151d25 45%, #0f1419 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(12, 17, 22, 0.72), rgba(12, 17, 22, 0));
}

.logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  align-items: center;
  font-size: 0.92rem;
  color: var(--fog);
}

.nav a:hover {
  color: var(--paper);
}

.nav-cta {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  padding: 0 clamp(1.2rem, 4vw, 3rem) clamp(3rem, 8vh, 5rem);
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 14, 18, 0.35) 0%, rgba(10, 14, 18, 0.55) 40%, rgba(10, 14, 18, 0.92) 100%),
    linear-gradient(90deg, rgba(10, 14, 18, 0.7) 0%, rgba(10, 14, 18, 0.2) 55%, rgba(10, 14, 18, 0.55) 100%);
}

.hero-content {
  max-width: 42rem;
  animation: rise 1.1s var(--ease) both;
}

.brand {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.4rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 0.95;
  color: var(--paper);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--fog);
}

.lede {
  margin: 0 0 1.8rem;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #1a140c;
}

.btn-primary:hover {
  background: #d4b687;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.03);
}

.section {
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 4vw, 3rem);
  max-width: 1120px;
  margin: 0 auto;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
}

.section-desc {
  margin: 0;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat {
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.stat.is-visible {
  opacity: 1;
  transform: none;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1;
  margin-bottom: 0.45rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.charts {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.chart-block h3 {
  margin: 0 0 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fog);
}

.skill-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.95rem;
}

.skill-row {
  display: grid;
  gap: 0.4rem;
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--fog);
}

.skill-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width 1.1s var(--ease);
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
  align-items: end;
  min-height: 220px;
  padding-top: 0.5rem;
}

.year-col {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
}

.year-bar {
  width: 100%;
  max-width: 48px;
  height: 0;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #d8c090, #6f7f88);
  transition: height 1s var(--ease);
}

.year-meta {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.year-meta strong {
  display: block;
  color: var(--paper);
  font-size: 0.92rem;
  font-weight: 600;
}

.project-list {
  display: grid;
  gap: 0;
}

.project {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.project.is-visible {
  opacity: 1;
  transform: none;
}

.project:last-child {
  border-bottom: 1px solid var(--line);
}

.project-type {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.project h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
}

.project p {
  margin: 0;
  max-width: 36rem;
  color: var(--fog);
}

.project-side {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  min-width: 8.5rem;
  text-align: right;
}

.project-year {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.metric {
  font-size: 0.9rem;
  color: var(--muted);
}

.metric b {
  color: var(--paper);
  font-weight: 600;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-copy p {
  color: var(--fog);
  max-width: 34rem;
}

.about-copy p + p {
  margin-top: 1rem;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 1.6rem 1.3rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.45rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-period {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.timeline-role {
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.timeline-org {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-size: 0.9rem;
}

.timeline-desc {
  margin: 0;
  color: var(--fog);
  font-size: 0.95rem;
}

.contact-section {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.contact-panel {
  margin: 0 clamp(1.2rem, 4vw, 3rem);
  padding: clamp(2.5rem, 6vw, 4rem);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(196, 165, 116, 0.14), transparent 40%),
    linear-gradient(180deg, #1a232c, #12181f);
  border: 1px solid var(--line);
  text-align: center;
}

.contact-panel .section-desc {
  margin: 0 auto 1.5rem;
  max-width: 28rem;
}

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.4rem;
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  color: var(--muted);
}

.social a:hover {
  color: var(--paper);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem clamp(1.2rem, 4vw, 3rem) 2.2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.beian:hover {
  color: var(--paper);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-1.5%, -1%, 0);
  }
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts,
  .about-layout,
  .project {
    grid-template-columns: 1fr;
  }

  .project-side {
    text-align: left;
    grid-auto-flow: column;
    grid-template-columns: repeat(3, max-content);
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .nav a:not(.nav-cta) {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bar-chart {
    min-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-media img,
  .hero-content,
  .stat,
  .project,
  .skill-fill,
  .year-bar {
    animation: none !important;
    transition: none !important;
  }
}
