:root {
  color-scheme: light;
  --ink: #1d292c;
  --ink-soft: #eef3f1;
  --paper: #f7f5f1;
  --muted: #65716f;
  --line: rgba(29, 41, 44, 0.13);
  --acid: #2f686b;
  --coral: #8a6b56;
  --blue: #526f73;
  --gold: #b4976e;
  --shadow: 0 18px 45px rgba(47, 60, 58, 0.1);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

::selection {
  background: var(--acid);
  color: var(--ink);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-120%);
  background: var(--acid);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 28px;
  background: rgba(247, 245, 241, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  transition:
    background 220ms ease,
    border-color 220ms ease,
    min-height 220ms ease;
}

.site-header.is-scrolled {
  min-height: 62px;
  background: rgba(247, 245, 241, 0.95);
  border-color: var(--line);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--acid);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
  line-height: 1.1;
}

.brand-lockup strong {
  font-size: 15px;
}

.brand-lockup small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(47, 60, 58, 0.08);
}

.site-nav a {
  min-width: 76px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: var(--acid);
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: 84svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 118px 28px 32px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(
      90deg,
      rgba(247, 245, 241, 0.98) 0%,
      rgba(247, 245, 241, 0.95) 42%,
      rgba(247, 245, 241, 0.5) 70%,
      rgba(247, 245, 241, 0.18) 100%
    ),
    linear-gradient(0deg, rgba(247, 245, 241, 1) 0%, rgba(247, 245, 241, 0.08) 42%),
    url("/assets/images/ruiqi-regional-integration-presentation.jpg");
  background-position: center, center, 64% 72%;
  background-repeat: no-repeat;
  background-size: cover, cover, cover;
}

.hero::after {
  display: none;
}

.hero-content,
.hero-signal,
.section-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.hero-content {
  padding-top: 32px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--acid);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin: 0;
  color: var(--ink);
  font-size: 82px;
  line-height: 0.96;
}

.hero-role {
  margin: 20px 0 0;
  color: var(--acid);
  font-size: 24px;
  font-weight: 900;
}

.hero-copy {
  max-width: 650px;
  margin: 18px 0 0;
  color: #3d4948;
  font-size: 19px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.button,
.icon-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-2px);
}

.button {
  padding: 0 18px;
}

.button-primary {
  border-color: var(--acid);
  background: var(--acid);
  color: #ffffff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.button-secondary:hover,
.icon-button:hover {
  border-color: var(--acid);
  background: var(--acid);
  color: #ffffff;
}

.icon-button {
  width: 48px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.hero-signal {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 52px;
}

.hero-signal div {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.hero-signal strong {
  display: block;
  color: var(--acid);
  font-size: 36px;
  line-height: 1;
}

.hero-signal span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.signal-band {
  background: #ffffff;
  color: var(--ink);
}

.signal-grid {
  display: grid;
  grid-template-columns: 170px minmax(0, 1.1fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: start;
  padding: 56px 28px;
}

.signal-band .section-kicker {
  color: var(--coral);
}

.signal-grid h2,
.section-heading h2,
.education-grid h2,
.contact-grid h2 {
  margin: 0;
  font-size: 44px;
  line-height: 1.05;
}

.signal-copy p {
  margin: 0;
  color: #495552;
  font-size: 17px;
  line-height: 1.65;
}

.capability-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 82px 28px;
}

.capability-card,
.skill-card,
.project-card,
.education-card,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.capability-card {
  min-height: 294px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-index {
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
}

.capability-card h3,
.timeline-body h3,
.skill-card h3,
.project-card h3 {
  margin: 0;
  font-size: 24px;
}

.capability-card p,
.skill-card p,
.project-card p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.resume-section,
.skills-section,
.projects-section,
.contact-section {
  padding: 92px 28px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 36px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.timeline-date {
  color: var(--acid);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-body h3 span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.timeline-body ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: #3d4948;
  line-height: 1.7;
}

.timeline-body li + li {
  margin-top: 8px;
}

.education-strip {
  background: var(--ink-soft);
  color: var(--ink);
}

.education-grid {
  display: grid;
  grid-template-columns: 1.1fr minmax(220px, 0.7fr) minmax(220px, 0.7fr);
  gap: 16px;
  align-items: stretch;
  padding: 70px 28px;
}

.education-grid .section-kicker {
  color: var(--blue);
}

.education-card {
  padding: 20px;
  background: #ffffff;
  border-color: var(--line);
  box-shadow: none;
}

.education-card span {
  display: block;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.education-card strong {
  display: block;
  margin-top: 14px;
  font-size: 20px;
  line-height: 1.2;
}

.education-card p {
  margin: 18px 0 0;
  color: #535852;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.skill-card {
  min-height: 204px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
}

.meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 104, 107, 0.12);
}

.meter span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--acid);
  transition: transform 900ms ease;
}

.is-visible .meter span {
  transform: scaleX(1);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--ink-soft);
}

.project-card div {
  padding: 18px;
}

.project-card span {
  color: var(--acid);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-card h3 {
  margin-top: 12px;
}

.project-card a {
  display: inline-flex;
  margin-top: 20px;
  min-height: 38px;
  align-items: center;
  color: var(--acid);
  font-weight: 900;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.archive-link {
  margin-top: 18px;
}

.contact-section {
  background: #ffffff;
  color: var(--ink);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 30px;
  align-items: start;
}

.contact-grid .section-kicker {
  color: var(--coral);
}

.contact-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--paper);
  border-color: var(--line);
  box-shadow: none;
}

.contact-panel a {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.contact-panel a:hover {
  background: var(--acid);
  color: #ffffff;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

[data-reveal].is-visible,
.is-visible[data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 112px;
    padding: 12px 18px;
  }

  .site-header.is-scrolled {
    min-height: 102px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .site-nav a {
    min-width: 68px;
  }

  .hero {
    min-height: 82svh;
    padding: 140px 18px 24px;
  }

  h1 {
    font-size: 64px;
  }

  .signal-grid,
  .capability-section,
  .education-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .signal-grid,
  .capability-section,
  .education-grid,
  .resume-section,
  .skills-section,
  .projects-section,
  .contact-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hero::before {
    background-image:
      linear-gradient(0deg, rgba(247, 245, 241, 1) 0%, rgba(247, 245, 241, 0.86) 66%, rgba(247, 245, 241, 0.72) 100%),
      linear-gradient(90deg, rgba(247, 245, 241, 0.96) 0%, rgba(247, 245, 241, 0.48) 100%),
      url("/assets/images/ruiqi-regional-integration-presentation.jpg");
    background-position: center, center, 62% 58%;
    background-size: cover, cover, cover;
  }

  h1 {
    font-size: 46px;
    line-height: 0.98;
  }

  .hero-role {
    font-size: 20px;
  }

  .hero-copy {
    font-size: 16px;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .button {
    flex: 1 1 156px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .hero-signal {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 10px) / 2);
    grid-template-columns: none;
    overflow-x: auto;
    margin-top: 28px;
    padding-bottom: 4px;
  }

  .signal-grid {
    padding-top: 16px;
  }

  .hero-signal div {
    min-height: 86px;
  }

  .signal-grid h2,
  .section-heading h2,
  .education-grid h2,
  .contact-grid h2 {
    font-size: 32px;
    line-height: 1.12;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .resume-section,
  .skills-section,
  .projects-section,
  .contact-section {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .site-nav a {
    min-width: 64px;
    font-size: 12px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .hero {
    padding-top: 132px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-signal strong {
    font-size: 30px;
  }
}
