:root {
  --ink: #eaffdf;
  --paper: #050706;
  --mist: #111b16;
  --line: #2a3c32;
  --acid: #b8ff36;
  --coral: #ff5f3d;
  --blue: #55d7ff;
  --amber: #ffd166;
  --muted: #93a99a;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Courier New", Consolas, monospace;
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(184, 255, 54, 0.035) 0,
      rgba(184, 255, 54, 0.035) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(circle at 78% 12%, rgba(85, 215, 255, 0.16), transparent 28%),
    radial-gradient(circle at 8% 78%, rgba(255, 95, 61, 0.14), transparent 24%),
    var(--paper);
  content: "";
}

body > *:not(.matrix-rain):not(.matrix-streams):not(.banana-pet):not(.cat-pet) {
  position: relative;
  z-index: 2;
}

.matrix-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  background: #050706;
  opacity: 0.92;
  pointer-events: none;
}

.matrix-streams {
  position: fixed;
  inset: -20vh 0 0;
  z-index: 1;
  display: block;
  overflow: hidden;
  color: rgba(126, 255, 95, 0.5);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(126, 255, 95, 0.55);
}

.matrix-streams span {
  position: absolute;
  top: 0;
  display: block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  animation: stream-fall 12s linear infinite;
}

.matrix-streams span:nth-child(2n) {
  color: rgba(85, 215, 255, 0.36);
  animation-duration: 16s;
}

.matrix-streams span:nth-child(3n) {
  color: rgba(184, 255, 54, 0.56);
  animation-duration: 19s;
  animation-delay: -7s;
}

.matrix-streams span:nth-child(4n) {
  animation-delay: -11s;
}

.matrix-streams span:nth-child(5n) {
  animation-duration: 22s;
  animation-delay: -3s;
}

@keyframes stream-fall {
  from {
    transform: translateY(-105vh);
  }

  to {
    transform: translateY(125vh);
  }
}

a {
  color: inherit;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  color: var(--blue);
}

.site-header {
  min-height: 100vh;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(184, 255, 54, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(184, 255, 54, 0.08) 1px, transparent 1px),
    rgba(5, 7, 6, 0.26);
  background-size: 38px 38px;
}

.page-topbar {
  border-bottom: 1px solid var(--line);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 24px;
  background: rgba(5, 7, 6, 0.84);
  backdrop-filter: blur(18px);
}

.monogram {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--acid);
  background: #091109;
  color: var(--acid);
  box-shadow: 0 0 18px rgba(184, 255, 54, 0.38);
  font-weight: 800;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links a {
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  align-items: end;
  gap: 44px;
  max-width: var(--max-width);
  min-height: calc(100vh - 86px);
  margin: 0 auto;
  padding: 52px 24px 70px;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(5.4rem, 17vw, 14.8rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--acid);
  text-shadow:
    2px 0 0 rgba(255, 95, 61, 0.78),
    -2px 0 0 rgba(85, 215, 255, 0.68),
    0 0 28px rgba(184, 255, 54, 0.36);
}

.program {
  display: inline-block;
  margin-bottom: 34px;
  border-top: 1px solid var(--acid);
  border-bottom: 1px solid var(--acid);
  padding: 8px 0;
  color: var(--acid);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lede {
  max-width: 640px;
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  line-height: 1.12;
}

.hero-copy p:not(.eyebrow):not(.program):not(.lede) {
  max-width: 620px;
  color: #cbd9cd;
  font-size: 1.06rem;
}

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

.tag-row span {
  border: 1px solid var(--line);
  background: rgba(9, 17, 9, 0.9);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tag-row span:nth-child(2) {
  background: rgba(184, 255, 54, 0.15);
  border-color: var(--acid);
  color: var(--acid);
}

.tag-row span:nth-child(3) {
  background: rgba(85, 215, 255, 0.13);
  border-color: var(--blue);
  color: var(--blue);
}

.tag-row span:nth-child(4) {
  background: rgba(255, 209, 102, 0.12);
  border-color: var(--amber);
  color: var(--amber);
}

.portrait {
  position: relative;
  margin: 0;
}

.portrait::before {
  position: absolute;
  inset: 22px -18px -18px 18px;
  border: 1px solid var(--acid);
  background: repeating-linear-gradient(
    -45deg,
    rgba(184, 255, 54, 0.28),
    rgba(184, 255, 54, 0.28) 6px,
    rgba(5, 7, 6, 0.8) 6px,
    rgba(5, 7, 6, 0.8) 12px
  );
  content: "";
}

.portrait img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--acid);
  filter: none;
  object-fit: cover;
  object-position: center 38%;
  box-shadow: 0 0 28px rgba(184, 255, 54, 0.18);
}

.portrait figcaption {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--acid);
  border-top: 0;
  background: #081008;
  color: var(--acid);
  padding: 9px 12px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 76px 24px 32px;
  background: rgba(5, 7, 6, 0.42);
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 5.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
}

.section-heading h1 {
  margin-bottom: 0;
  font-size: clamp(3.3rem, 8vw, 8.8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--acid);
  text-shadow:
    2px 0 0 rgba(255, 95, 61, 0.62),
    -2px 0 0 rgba(85, 215, 255, 0.48),
    0 0 24px rgba(184, 255, 54, 0.28);
}

.page-main {
  min-height: calc(100vh - 88px);
}

.assignments {
  padding: 0 0 82px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: 48px;
  margin-bottom: 30px;
}

.section-heading .section-kicker {
  grid-column: 1;
}

.section-heading h1,
.section-heading h2,
.section-heading p {
  grid-column: 2;
}

.section-heading p {
  max-width: 600px;
  margin-bottom: 0;
  color: #bdd0c1;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--acid);
  box-shadow:
    inset 0 0 28px rgba(184, 255, 54, 0.08),
    0 0 24px rgba(184, 255, 54, 0.12);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: rgba(5, 7, 6, 0.78);
}

caption {
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
  clip: rect(1px, 1px, 1px, 1px);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #0d180f;
  color: var(--acid);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td:first-child,
td:last-child {
  width: 140px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

td:last-child,
th:last-child {
  text-align: right;
}

td a {
  display: inline-block;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

td a::after {
  color: var(--acid);
  content: "  >";
}

tbody tr:hover {
  background: rgba(184, 255, 54, 0.08);
}

.milestone {
  background: rgba(184, 255, 54, 0.16);
}

.milestone td,
.milestone td:first-child,
.milestone td:last-child {
  color: var(--acid);
}

.calculation,
.total {
  background: #b8ff36;
  color: #050706;
}

.calculation td,
.total td,
.calculation td:first-child,
.total td:first-child,
.calculation td:last-child,
.total td:last-child {
  color: #050706;
}

.total {
  font-weight: 900;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 28px 24px 42px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
  }

  .hero,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 36px;
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(4.4rem, 23vw, 8rem);
  }

  .portrait {
    max-width: 480px;
  }

  .section-heading .section-kicker,
  .section-heading h1,
  .section-heading h2,
  .section-heading p {
    grid-column: auto;
  }

  footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 16px;
  }

  .nav-links {
    max-width: 210px;
    font-size: 0.7rem;
  }

  .hero,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding-bottom: 48px;
  }

  .program {
    margin-bottom: 24px;
  }

  .assignments {
    padding: 58px 0;
  }

  th,
  td {
    padding: 12px;
  }

  footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* strict terminal revision */
:root {
  --ink: #dcffe3;
  --paper: #050806;
  --panel: rgba(5, 12, 7, 0.82);
  --panel-strong: rgba(1, 8, 3, 0.9);
  --line: rgba(0, 255, 65, 0.24);
  --line-strong: rgba(0, 255, 65, 0.46);
  --acid: #00ff41;
  --dim: #75a87c;
  --muted: #57805f;
  --max-width: 1180px;
}

html {
  background: #050806;
}

body {
  background: #050806;
  color: var(--ink);
  font-family: "SF Mono", "SFMono-Regular", "JetBrains Mono", "Cascadia Code",
    "Cascadia Mono", Consolas, "Courier New", monospace;
  letter-spacing: 0;
}

body::before {
  z-index: 1;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 255, 65, 0.055) 0,
      rgba(0, 255, 65, 0.055) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(90deg, rgba(0, 255, 65, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 255, 65, 0.045) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, transparent 0, rgba(5, 8, 6, 0.12) 48%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.26), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.3));
  content: "";
}

body > *:not(.matrix-rain):not(.matrix-streams):not(.banana-pet):not(.cat-pet) {
  position: relative;
  z-index: 2;
}

a {
  color: var(--acid);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #dcffe3;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

.matrix-rain {
  background: #050806;
  opacity: 0.72;
}

.matrix-streams {
  color: rgba(0, 255, 65, 0.28);
  text-shadow: 0 0 9px rgba(0, 255, 65, 0.38);
}

.matrix-streams span,
.matrix-streams span:nth-child(2n),
.matrix-streams span:nth-child(3n),
.matrix-streams span:nth-child(4n),
.matrix-streams span:nth-child(5n) {
  color: rgba(0, 255, 65, 0.34);
}

.site-header {
  min-height: 100vh;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.topbar {
  max-width: var(--max-width);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 6, 0.88);
  backdrop-filter: blur(10px);
}

.monogram {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(0, 255, 65, 0.08);
  color: var(--acid);
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.22);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

.nav-links {
  gap: 20px;
  color: var(--dim);
  font-size: 0.78rem;
}

.nav-links a::before {
  color: var(--acid);
  content: ">> ";
}

.hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.68fr);
  align-items: center;
  gap: 28px;
  min-height: calc(100vh - 85px);
}

.terminal-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  box-shadow:
    inset 0 0 0 1px rgba(0, 255, 65, 0.045),
    0 0 26px rgba(0, 255, 65, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.terminal-window:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow:
    inset 0 0 0 1px rgba(0, 255, 65, 0.08),
    0 0 28px rgba(0, 255, 65, 0.2);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 20, 6, 0.72);
  padding: 0 10px;
}

.traffic {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.traffic.red {
  color: #ff5f56;
  background: #ff5f56;
}

.traffic.amber {
  color: #ffbd2e;
  background: #ffbd2e;
}

.traffic.green {
  color: #27c93f;
  background: #27c93f;
}

.window-title {
  overflow: hidden;
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-body {
  padding: clamp(18px, 3vw, 32px);
}

.hero-copy {
  max-width: none;
}

.eyebrow,
.section-kicker {
  color: var(--dim);
  font-size: 0.76rem;
}

.eyebrow span,
.prompt,
.section-kicker {
  color: var(--acid);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.55);
}

h1 {
  max-width: none;
  margin-bottom: 22px;
  color: var(--acid);
  font-size: clamp(4.3rem, 11vw, 10.4rem);
  font-weight: 900;
  line-height: 0.82;
  text-shadow: 0 0 13px rgba(0, 255, 65, 0.58);
}

.program {
  border-color: var(--line-strong);
  color: var(--acid);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.45);
}

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

.lede {
  max-width: none;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.7vw, 1.5rem);
  line-height: 1.28;
}

.bio-grid {
  margin-top: 18px;
}

.hero-copy p:not(.eyebrow):not(.program):not(.lede),
.bio-grid p,
.section-heading p {
  color: #a9d9af;
  font-size: 0.96rem;
}

[lang="zh"] {
  color: #c5f5cb;
}

.tag-row span {
  border-color: var(--line);
  border-radius: 3px;
  background: rgba(0, 255, 65, 0.055);
  color: var(--dim);
}

.tag-row span:hover {
  border-color: var(--line-strong);
  color: var(--acid);
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.16);
}

.tag-row span:nth-child(2),
.tag-row span:nth-child(3),
.tag-row span:nth-child(4) {
  border-color: var(--line);
  background: rgba(0, 255, 65, 0.055);
  color: var(--dim);
}

.portrait {
  border-radius: 3px;
}

.portrait::before {
  display: none;
}

.portrait img {
  border: 0;
  filter: none;
  box-shadow: none;
}

.portrait figcaption {
  border: 0;
  border-top: 1px solid var(--line);
  background: rgba(0, 20, 6, 0.72);
  color: var(--acid);
}

.page-main {
  max-width: var(--max-width);
  padding-top: 44px;
  background: transparent;
}

.section-heading {
  display: block;
  margin-bottom: 22px;
}

.section-heading h1 {
  margin: 0 0 22px;
  color: var(--acid);
  font-size: clamp(2.7rem, 7vw, 7rem);
  line-height: 0.95;
  text-shadow: 0 0 13px rgba(0, 255, 65, 0.5);
}

.section-heading h1 span {
  display: block;
  color: #a9d9af;
  font-size: clamp(1rem, 2vw, 1.8rem);
  line-height: 1.2;
}

.command-panel {
  margin-bottom: 24px;
}

.table-window {
  background: rgba(3, 9, 5, 0.84);
}

.table-shell {
  border: 0;
  box-shadow: none;
}

table {
  background: transparent;
}

th,
td {
  border-color: rgba(0, 255, 65, 0.16);
}

th {
  background: rgba(0, 255, 65, 0.065);
  color: var(--acid);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.45);
  white-space: nowrap;
}

td:first-child,
td:last-child {
  color: var(--dim);
}

td a {
  color: #e1ffe5;
}

td a::before {
  color: var(--acid);
  content: ">> ";
}

td a::after {
  color: var(--acid);
  content: " _";
}

tbody tr:hover {
  background: rgba(0, 255, 65, 0.075);
}

.milestone {
  background: rgba(0, 255, 65, 0.095);
}

.milestone td,
.milestone td:first-child,
.milestone td:last-child {
  color: var(--acid);
}

.calculation,
.total {
  background: rgba(0, 255, 65, 0.18);
  color: var(--ink);
}

.calculation td,
.total td,
.calculation td:first-child,
.total td:first-child,
.calculation td:last-child,
.total td:last-child {
  color: var(--ink);
}

footer {
  border-top: 1px solid var(--line);
  color: var(--dim);
}

.cursor {
  color: var(--acid);
  animation: cursor-blink 1s steps(2, start) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .bilingual-grid {
    grid-template-columns: 1fr;
  }

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

.banana-pet {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: clamp(96px, 10vw, 150px);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 0 10px rgba(0, 255, 65, 0.34));
  transform: translate3d(32px, 130px, 0);
  transition: filter 160ms ease;
  --pet-face: 1;
}

body > .banana-pet {
  position: fixed !important;
  z-index: 9999 !important;
}

.banana-pet:hover {
  filter: drop-shadow(0 0 16px rgba(0, 255, 65, 0.72));
}

.banana-pet img {
  display: block;
  width: 100%;
  height: auto;
  animation: pet-run 0.38s steps(2, end) infinite;
  user-select: none;
  -webkit-user-drag: none;
}

.pet-bubble {
  position: absolute;
  right: auto;
  left: 78%;
  bottom: 78%;
  min-width: 180px;
  max-width: min(280px, 72vw);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(3, 9, 5, 0.92);
  color: var(--acid);
  padding: 8px 10px;
  font-family: "SF Mono", "SFMono-Regular", "JetBrains Mono", "Cascadia Code",
    "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.62);
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.banana-pet.bubble-left .pet-bubble {
  right: 78%;
  left: auto;
}

.banana-pet.is-speaking .pet-bubble {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pet-run {
  0%,
  100% {
    transform: scaleX(var(--pet-face)) translateY(0) rotate(-4deg);
  }

  50% {
    transform: scaleX(var(--pet-face)) translateY(-8px) rotate(4deg);
  }
}

@media (max-width: 560px) {
  .banana-pet {
    width: 92px;
  }

  .pet-bubble {
    right: auto;
    left: 62%;
    min-width: 165px;
  }
}
