@font-face {
  font-family: "LXGW WenKai Screen Latin";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("/fonts/lxgwwenkaiscreen-english.woff2") format("woff2");
  unicode-range: U+0020-007E;
}

:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --surface: #ffffff;
  --border-strong: #d4d4d4;

  --esap-yellow: #ffd93d;
  --esap-yellow-dark: #ffc107;
  --esap-pink: #ff69b4;
  --esap-pink-dark: #ff1493;
  --esap-blue: #4da6ff;
  --esap-blue-dark: #2e8fff;

  --color-primary: var(--esap-yellow);
  --color-amber: var(--esap-yellow);
  --color-text: var(--foreground);
  --color-muted: var(--muted-foreground);
  --color-soft: var(--muted);
  --color-surface: var(--surface);
  --color-border: var(--border);
  --color-border-strong: var(--border-strong);

  --header-bg: rgba(255, 255, 255, 0.9);
  --panel-bg: rgba(255, 255, 255, 0.92);
  --soft-panel-bg: rgba(245, 245, 245, 0.84);
  --mesh-yellow: rgba(255, 217, 61, 0.16);
  --mesh-blue: rgba(77, 166, 255, 0.12);
  --wash-start: rgba(255, 255, 255, 0.95);
  --wash-end: rgba(245, 245, 245, 0.8);
  --shadow-sm: 0 8px 24px rgba(10, 10, 10, 0.08);
  --shadow-md: 0 18px 45px rgba(10, 10, 10, 0.14);
  --radius: 8px;
}

:root[class~="dark"] {
  --background: #0a0a0a;
  --foreground: #ededed;
  --muted: #1a1a1a;
  --muted-foreground: #a3a3a3;
  --border: #262626;
  --surface: #111111;
  --border-strong: #333333;

  --esap-yellow: #ffd93d;
  --esap-yellow-dark: #ffed4e;
  --esap-pink: #ff69b4;
  --esap-pink-dark: #ff85c8;
  --esap-blue: #4da6ff;
  --esap-blue-dark: #66b3ff;

  --header-bg: rgba(10, 10, 10, 0.92);
  --panel-bg: rgba(17, 17, 17, 0.9);
  --soft-panel-bg: rgba(26, 26, 26, 0.82);
  --mesh-yellow: rgba(255, 217, 61, 0.1);
  --mesh-blue: rgba(77, 166, 255, 0.08);
  --wash-start: rgba(10, 10, 10, 0.96);
  --wash-end: rgba(17, 17, 17, 0.82);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.46);
}

@media (prefers-color-scheme: dark) {
  :root:not([class~="light"]) {
    --background: #0a0a0a;
    --foreground: #ededed;
    --muted: #1a1a1a;
    --muted-foreground: #a3a3a3;
    --border: #262626;
    --surface: #111111;
    --border-strong: #333333;

    --esap-yellow: #ffd93d;
    --esap-yellow-dark: #ffed4e;
    --esap-pink: #ff69b4;
    --esap-pink-dark: #ff85c8;
    --esap-blue: #4da6ff;
    --esap-blue-dark: #66b3ff;

    --header-bg: rgba(10, 10, 10, 0.92);
    --panel-bg: rgba(17, 17, 17, 0.9);
    --soft-panel-bg: rgba(26, 26, 26, 0.82);
    --mesh-yellow: rgba(255, 217, 61, 0.1);
    --mesh-blue: rgba(77, 166, 255, 0.08);
    --wash-start: rgba(10, 10, 10, 0.96);
    --wash-end: rgba(17, 17, 17, 0.82);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.38);
    --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.46);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-text);
  font-family:
    "LXGW WenKai Screen Latin", "LXGW WenKai Screen", "LXGW WenKai", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", Inter, ui-sans-serif, system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--background);
  background-image:
    linear-gradient(var(--mesh-yellow) 1px, transparent 1px),
    linear-gradient(90deg, var(--mesh-blue) 1px, transparent 1px);
  background-size: 32px 32px;
  transition:
    background-color 200ms ease,
    color 200ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, var(--wash-start), var(--wash-end)),
    linear-gradient(90deg, rgba(255, 217, 61, 0.08), rgba(255, 105, 180, 0.06), rgba(77, 166, 255, 0.08));
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--color-primary);
  color: #0a0a0a;
  font-weight: 700;
  text-decoration: none;
  transition: top 180ms ease;
}

.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
  background: var(--header-bg);
  box-shadow: 0 2px 20px rgba(10, 10, 10, 0.06);
}

.navbar {
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-link,
.button {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--color-surface);
}

.brand-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 10px 12px;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--esap-yellow), var(--esap-pink), var(--esap-blue));
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--color-text);
}

.theme-toggle {
  min-height: 38px;
  min-width: 72px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--color-soft);
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 800;
}

.theme-toggle:hover,
.theme-toggle:focus {
  border-color: var(--esap-blue);
}

.theme-icon {
  display: none;
}

:root[class~="light"] .theme-toggle .light-icon,
:root:not([class~="dark"]) .theme-toggle .light-icon {
  display: inline;
}

:root[class~="dark"] .theme-toggle .dark-icon {
  display: inline;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.section-band {
  border-bottom: 1px solid var(--color-border);
  background:
    linear-gradient(135deg, var(--wash-start), var(--wash-end)),
    linear-gradient(90deg, rgba(255, 217, 61, 0.11), rgba(255, 105, 180, 0.09), rgba(77, 166, 255, 0.11));
}

.hero {
  padding: 92px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 40px;
  align-items: center;
}

.hero-copy h1,
.page-hero h1 {
  max-width: 840px;
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 0.98;
}

.hero-subtitle {
  margin: 18px 0 0;
  color: var(--esap-pink);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 800;
}

.hero-text,
.page-hero p,
.section-heading p,
.text-block p,
.feature-card p,
.compact-card p,
.timeline-item p {
  color: var(--color-muted);
  line-height: 1.7;
}

.hero-text {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--esap-blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 18px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

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

.button.primary {
  border-color: var(--color-text);
  background: var(--color-text);
  color: var(--background);
  box-shadow: 0 12px 26px rgba(10, 10, 10, 0.16);
}

.button.primary:hover,
.button.primary:focus {
  border-color: var(--esap-pink);
  opacity: 0.92;
}

.button.secondary {
  border-color: var(--color-border);
  background: var(--color-soft);
  color: var(--color-text);
}

.button.secondary:hover,
.button.secondary:focus {
  border-color: var(--esap-blue);
  background: var(--color-surface);
}

.profile-panel,
.feature-card,
.compact-card,
.info-item,
.timeline-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--shadow-sm);
}

.profile-panel {
  padding: 24px;
}

.avatar {
  width: 156px;
  height: 156px;
  margin: 0 auto 24px;
  border: 4px solid var(--color-surface);
  border-radius: 50%;
  box-shadow: 0 18px 38px rgba(10, 10, 10, 0.18);
  object-fit: cover;
}

.profile-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.profile-facts div {
  display: grid;
  gap: 4px;
}

.profile-facts dt,
.info-label {
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0;
  font-weight: 800;
}

.content-section {
  padding: 64px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2,
.text-block h2 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.card-grid {
  display: grid;
  gap: 18px;
}

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.compact-card {
  padding: 22px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.feature-card {
  border-top: 4px solid var(--color-primary);
}

.feature-card:hover,
.compact-card:hover,
.timeline-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-card.accent-cyan {
  border-top-color: var(--esap-pink);
}

.feature-card.accent-amber {
  border-top-color: var(--color-amber);
}

.feature-card.accent-green {
  border-top-color: var(--esap-blue);
}

.card-kicker {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--esap-yellow-dark);
  font-weight: 900;
}

.feature-card.accent-cyan .card-kicker {
  color: var(--esap-pink-dark);
}

.feature-card.accent-green .card-kicker {
  color: var(--esap-blue-dark);
}

.card-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration-color: var(--esap-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.feature-card:hover .card-link,
.card-link:hover,
.card-link:focus {
  color: var(--esap-pink-dark);
}

.feature-card h3,
.compact-card h3,
.timeline-item h3 {
  margin: 0 0 10px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 36px;
  align-items: start;
}

.project-list,
.info-stack,
.timeline-list {
  display: grid;
  gap: 16px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--soft-panel-bg);
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.page-hero {
  padding: 76px 0 44px;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 1.04rem;
}

.text-block {
  max-width: 720px;
}

.info-item {
  padding: 18px;
}

.info-item dd {
  display: block;
  margin-top: 6px;
  margin-left: 0;
  font-weight: 800;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 18px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.timeline-marker {
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--color-amber);
  box-shadow: 0 0 0 5px rgba(255, 217, 61, 0.18);
}

.timeline-marker.cyan {
  background: var(--esap-pink);
  box-shadow: 0 0 0 5px rgba(255, 105, 180, 0.16);
}

.timeline-marker.green {
  background: var(--esap-blue);
  box-shadow: 0 0 0 5px rgba(77, 166, 255, 0.16);
}

.timeline-marker.blue {
  background: var(--esap-blue-dark);
  box-shadow: 0 0 0 5px rgba(77, 166, 255, 0.16);
}

.inline-link {
  color: var(--color-text);
  text-decoration-color: var(--esap-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition:
    color 180ms ease,
    text-decoration-color 180ms ease;
}

.inline-link:hover,
.inline-link:focus {
  color: var(--esap-pink-dark);
}

.repo-meta {
  margin: 10px 0 0;
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--header-bg);
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--esap-yellow), var(--esap-pink), var(--esap-blue));
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0;
  color: var(--color-muted);
}

.footer-inner p {
  margin: 0;
}

.footer-inner .footer-note {
  margin-top: 6px;
  font-size: 0.9rem;
}

:focus-visible {
  outline: 3px solid rgba(77, 166, 255, 0.75);
  outline-offset: 3px;
}

@media (max-width: 940px) {
  .hero-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .three-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .navbar {
    width: min(calc(100% - 24px), 1120px);
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-actions {
    position: absolute;
    top: 64px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
  }

  .nav-actions.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    padding: 12px;
  }

  .theme-toggle {
    width: 100%;
  }

  .hero,
  .page-hero {
    padding-top: 56px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.5rem;
  }

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

  .content-section {
    padding: 46px 0;
  }

}

@media (max-width: 420px) {
  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.15rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 1ms;
  }

}
