:root {
  color-scheme: dark;
  --bg: #171711;
  --panel: #211f18;
  --panel-soft: #29271e;
  --ink: #f3efe4;
  --muted: #aaa48f;
  --line: #454131;
  --yellow: #e5b94a;
  --olive: #78815a;
  --brown: #8a6648;
  --paper: #eee7d8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }

.topbar {
  width: min(1180px, calc(100% - 40px));
  height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font: 500 .88rem "DM Mono"; letter-spacing: .02em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--yellow);
  color: #171711;
  font-weight: 700;
}
nav { display: flex; gap: 28px; margin-left: auto; color: var(--muted); font-size: .9rem; }
nav a { border-bottom: 1px solid transparent; }
nav a:hover { color: var(--ink); border-color: var(--yellow); }

main { overflow: hidden; }
.hero {
  width: min(1180px, calc(100% - 40px));
  min-height: 650px;
  margin: 0 auto;
  padding: 78px 0 68px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 72px;
  align-items: center;
}
.eyebrow { margin: 0 0 24px; color: var(--yellow); font: 500 .78rem "DM Mono"; letter-spacing: .1em; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--olive); }
h1 { margin-bottom: 30px; font-size: clamp(4rem, 8vw, 7.6rem); line-height: .86; letter-spacing: -.08em; }
h1 span { color: var(--yellow); }
.role-line { max-width: 680px; margin-bottom: 14px; color: var(--ink); font-size: 1.2rem; font-weight: 650; line-height: 1.5; }
.intro { max-width: 680px; color: #cbc4b2; font-size: 1.08rem; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; margin-top: 38px; }
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-height: 50px;
  padding: 0 20px;
  background: var(--yellow);
  color: #171711;
  font: 600 .84rem "DM Mono";
  box-shadow: 5px 5px 0 var(--brown);
}
.primary-button:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--brown); }

.hero-console {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid #b9af98;
  color: #1c1b16;
  box-shadow: 14px 14px 0 var(--brown);
  transform: rotate(-1deg);
}
.window-bar {
  min-height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #b9af98;
}
.window-bar p, .window-bar small { margin: 0; font: 500 .76rem "DM Mono"; letter-spacing: .08em; }
.window-bar small { color: #756e5e; }
.console-body { padding: 28px 24px 20px; font: .84rem/2.15 "DM Mono"; }
.console-body p { margin: 0; display: grid; grid-template-columns: 30px 94px 1fr; gap: 6px; }
.console-body i { color: #9a8f77; font-style: normal; }
.console-body b { color: #59613e; font-weight: 600; }
.console-sprite { display: block; width: 116px; height: 116px; object-fit: contain; image-rendering: pixelated; margin: -5px 20px 22px auto; }

.snapshot {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
.snapshot div {
  min-height: 154px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
.snapshot div:last-child { border-right: 0; background: var(--olive); color: #11120d; }
.snapshot span { margin-bottom: auto; color: var(--muted); font: .76rem "DM Mono"; letter-spacing: .08em; }
.snapshot div:last-child span, .snapshot div:last-child small { color: #292d1e; }
.snapshot strong { font-size: 1.2rem; line-height: 1.3; }
.snapshot small { margin-top: 4px; color: var(--muted); font-size: .82rem; }

.work-section, .education-section, .garden-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 130px 0 30px; }
.section-heading { margin-bottom: 54px; display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 36px; align-items: start; }
.section-heading .eyebrow { padding-top: 10px; }
.section-heading h2 { font-size: clamp(2.8rem, 5vw, 5rem); line-height: 1; letter-spacing: -.06em; }
.section-heading > p:last-child { color: var(--muted); font-size: 1rem; }
.timeline { border-top: 1px solid var(--line); }
.job { padding: 54px 0; display: grid; grid-template-columns: 140px 98px 1fr; gap: 32px; border-bottom: 1px solid var(--line); }
.job-year, .mini-job > p { padding-top: 10px; color: var(--muted); font: .8rem "DM Mono"; }
.pixel-logo { width: 82px; height: 82px; display: grid; place-items: center; background: transparent; color: var(--yellow); font: 700 .92rem "DM Mono"; }
.official-logo { overflow: visible; }
.official-logo img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.sprite {
  background-image: url("./assets/company-pixel-sprites.png");
  background-size: 400% 200%;
  background-repeat: no-repeat;
  background-color: #11110d;
  border: 1px solid var(--line);
  image-rendering: pixelated;
}
.sprite-golden { background-position: 0% 100%; }
.sprite-huali { background-position: 33.333% 100%; }
.sprite-csesoc { background-position: 66.666% 100%; }
.sprite-alpaca { background-position: 100% 100%; }
.job-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.job-title h3 { margin-bottom: 8px; font-size: 2rem; letter-spacing: -.04em; }
.job-title span { color: var(--muted); font-size: .96rem; }
.company-link {
  display: inline-block;
  margin: -2px 0 10px;
  color: var(--yellow);
  font: 500 .82rem "DM Mono";
  border-bottom: 1px solid rgba(229, 185, 74, .45);
}
.company-link:hover { border-color: var(--yellow); }
.job-body > p { max-width: 800px; margin: 8px 0 22px; color: #c6bfad; font-size: 1.02rem; line-height: 1.75; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 5px 10px; border: 1px solid var(--line); color: var(--muted); font: .76rem "DM Mono"; }

.earlier-grid { margin-top: 54px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.mini-job { min-height: 300px; padding: 26px; background: var(--panel); border-right: 1px solid var(--line); }
.mini-job:last-child { border-right: 0; }
.mini-job .pixel-logo { margin-bottom: 42px; }
.mini-job h3 { margin-bottom: 8px; font-size: 1.16rem; }
.mini-job > span { color: var(--muted); font-size: .9rem; line-height: 1.65; }

.section-heading.compact { grid-template-columns: 1fr 2fr 1fr; margin-bottom: 50px; }
.degree-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.degree-grid article {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 34px;
  background: var(--paper);
  border: 1px solid #b9af98;
  color: #1c1b16;
}
.degree-grid article:last-child { background: var(--panel-soft); border-color: var(--line); color: var(--ink); }
.degree-grid p { color: #6e754f; font: .78rem "DM Mono"; }
.degree-grid h3 { max-width: 440px; margin: 70px 0 12px; font-size: 1.6rem; line-height: 1.2; }
.degree-grid span { color: #756e5e; font-size: .9rem; }
.degree-grid article:last-child span { color: var(--muted); }
.degree-grid strong { position: absolute; right: -8px; bottom: -42px; color: rgba(138, 102, 72, .14); font: 800 10rem "DM Mono"; }

.garden-section { padding-bottom: 120px; }
.garden-card {
  padding: 58px;
  display: grid;
  grid-template-columns: 1.5fr .5fr;
  gap: 50px;
  align-items: center;
  background: var(--brown);
  color: var(--paper);
  box-shadow: 12px 12px 0 var(--olive);
}
.garden-card .eyebrow { color: #f3d27d; }
.garden-card h2 { max-width: 680px; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.04; letter-spacing: -.055em; }
.garden-card > div:first-child > p:not(.eyebrow) { max-width: 650px; color: #eee4d4; }
.garden-pixel { display: flex; flex-direction: column; align-items: center; text-align: center; font: .76rem/1.5 "DM Mono"; }
.garden-pixel img { width: 150px; height: 150px; object-fit: contain; image-rendering: pixelated; margin-bottom: 12px; }
.garden-pixel .legacy-pixel { width: 70px; height: 70px; margin: 18px 0 0; border: 3px solid var(--paper); }

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 45px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: .76rem "DM Mono";
}
footer p { display: flex; gap: 18px; margin: 0; }
footer span { color: #77715f; }

@media (max-width: 880px) {
  nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 56px; padding-top: 70px; }
  .hero-console { max-width: 560px; }
  .section-heading, .section-heading.compact { grid-template-columns: 1fr; gap: 6px; }
  .section-heading > p:last-child { max-width: 520px; }
  .job { grid-template-columns: 96px 82px 1fr; gap: 18px; }
  .earlier-grid { grid-template-columns: 1fr 1fr; }
  .mini-job:nth-child(2) { border-right: 0; }
  .mini-job:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .garden-card { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .topbar, .hero, .snapshot, .work-section, .education-section, .garden-section, footer { width: min(100% - 28px, 1180px); }
  .topbar { height: 70px; }
  h1 { font-size: 3.45rem; }
  .hero { min-height: auto; padding: 64px 0 80px; }
  .console-body { padding: 20px 14px; font-size: .76rem; overflow: hidden; }
  .console-body p { grid-template-columns: 24px 78px 1fr; }
  .snapshot { grid-template-columns: 1fr; }
  .snapshot div { border-right: 0; border-bottom: 1px solid var(--line); }
  .snapshot div:last-child { border-bottom: 0; }
  .work-section, .education-section, .garden-section { padding-top: 95px; }
  .job { grid-template-columns: 64px 1fr; }
  .job-year { grid-column: 1 / -1; }
  .job-body { grid-column: 2; }
  .job-title { display: block; }
  .earlier-grid, .degree-grid { grid-template-columns: 1fr; }
  .mini-job { border-right: 0; border-bottom: 1px solid var(--line); }
  .mini-job:last-child { border-bottom: 0; }
  .garden-card { padding: 32px 24px; box-shadow: 7px 7px 0 var(--olive); }
  footer { flex-direction: column; gap: 10px; }
}

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