* { box-sizing: border-box; }

html { background: #000; }

body {
  font-family: 'Courier New', Courier, monospace;
  max-width: 850px;
  margin: 0 auto;
  padding: 20px 16px;
  line-height: 1.35;
  color: #d0d0d0;
  background: transparent;
  font-size: 14px;
}

::selection { background: #fff; color: #000; }

pre.banner {
  margin: 0 0 10px;
  color: #fff;
  font-size: 14px;
  line-height: 1.1;
  overflow: hidden;
}
/* outline fades from white to gray going down, over a dark offset echo */
pre.banner .r0, pre.banner .r1 { color: #fff; }
pre.banner .r2 { color: #ddd; }
pre.banner .r3 { color: #b4b4b4; }
pre.banner .r4 { color: #8c8c8c; }
pre.banner .s { color: #2b2b2b; }


nav a {
  display: inline-block;
  margin: 0 10px 4px 0;
  color: #d0d0d0;
  text-decoration: none;
}
nav a::before { content: "["; }
nav a::after { content: "]"; }
nav a:hover,
nav a[aria-current="page"] {
  background: #fff;
  color: #000;
  text-decoration: none;
}

.rule {
  white-space: nowrap;
  overflow: hidden;
  color: #555;
  margin: 18px 0;
  user-select: none;
}
.rule::before {
  content: "+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------";
}

h1, h2 {
  font-size: 14px;
  font-weight: normal;
  margin: 0 0 5px;
}

h1 {
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 14px;
}
h1::before { content: "==[ "; color: #777; }
/* each section's tab sits two "=" further right than the one before */
#education h1::before { content: "====[ "; }
#experience h1::before { content: "======[ "; }
#projects h1::before { content: "========[ "; }
#contact h1::before { content: "==========[ "; }
h1::after {
  content: " ]========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================";
  color: #777;
}

h2 { color: #fff; }
h2::before { content: "> "; color: #777; }

p { margin: 4px 0; }

.block,
.education,
.experience,
.project {
  padding: 4px 0 4px 18px;
  margin-bottom: 18px;
  position: relative;
}
.block::before,
.education::before,
.experience::before,
.project::before {
  content: "|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|";
  white-space: pre;
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  overflow: hidden;
  color: #555;
  line-height: 1.35;
}

p.bullet {
  padding-left: 4ch;
  text-indent: -2ch;
}
p.bullet::before { content: "> "; color: #777; }

#about p.bullet { padding-left: 2ch; }
#about p.bullet.sub { padding-left: 4ch; }

.date { color: #888; padding-left: 2ch; }

a { color: #fff; }
a:visited { color: #bbb; }
a:hover { background: #fff; color: #000; text-decoration: none; }

.next-hint {
  color: #555;
  margin: 24px 0 0;
}

footer {
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  margin-top: 30px;
  user-select: none;
}

@media (max-width: 480px) {
  pre.banner { font-size: 10px; }
}

a.home,
a.home:hover { background: none; color: inherit; text-decoration: none; }

/* pixel-art cursors */
html, body { cursor: url("/cursor.svg") 1 1, default; }
a, a *, button, [role="button"], label, summary { cursor: url("/cursor-pointer.svg") 6 1, pointer; }
/* second sprite frame, toggled by cursor.js */
html.cursor-alt, html.cursor-alt body { cursor: url("/cursor-2.svg") 1 1, default; }
html.cursor-alt a, html.cursor-alt a *, html.cursor-alt button, html.cursor-alt [role="button"],
html.cursor-alt label, html.cursor-alt summary { cursor: url("/cursor-pointer-2.svg") 6 1, pointer; }

/* drifting ascii splotches behind everything, drawn by backdrop.js */
canvas.backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* crossfade between pages instead of a hard reload flash (chrome, edge, safari) */
@view-transition { navigation: auto; }
header { view-transition-name: header; }
canvas.backdrop { view-transition-name: backdrop; }
::view-transition-group(*) { animation-duration: 0.18s; }

/* ---------------------------------------------------------------------------
   v2: stanleyzhou.vercel.app (stanleyzhou.cv keeps everything above as is).
   full-width terminal in one ice hue, matching the intro montage.
   ------------------------------------------------------------------------ */
html.v2 { background: #050608; }
html.v2 body { max-width: none; padding: 20px 28px; color: #8fb8d8; }
html.v2 ::selection { background: #cfe9ff; color: #000; }
html.v2 pre.banner .r0, html.v2 pre.banner .r1 { color: #e6f4ff; }
html.v2 pre.banner .r2 { color: #bfe2ff; }
html.v2 pre.banner .r3 { color: #93c3e6; }
html.v2 pre.banner .r4 { color: #6a98bb; }
html.v2 pre.banner .s { color: #1d2c38; }
html.v2 nav a { color: #8fb8d8; }
html.v2 nav a:hover, html.v2 nav a[aria-current="page"] { background: #cfe9ff; color: #000; }
html.v2 .rule { color: #3a5266; }
html.v2 h1, html.v2 h2 { color: #e6f4ff; }
html.v2 h1::before, html.v2 h1::after, html.v2 h2::before, html.v2 p.bullet::before { color: #5e7f99; }
html.v2 .block::before, html.v2 .education::before, html.v2 .experience::before, html.v2 .project::before { color: #3a5266; }
html.v2 .date { color: #6a8ba5; }
html.v2 a { color: #e6f4ff; }
html.v2 a:visited { color: #b5d6ef; }
html.v2 a:hover { background: #cfe9ff; color: #000; }
html.v2 .next-hint, html.v2 footer { color: #3a5266; }
html.v2 footer { white-space: normal; }
html.v2 footer a.replay { color: #5e7f99; }

/* the intro (v2 home page only): the page stays laid out underneath, hidden, until the montage lands on it */
html.intro { overflow: hidden; }
html.intro body > *:not(.intro-ui) { opacity: var(--intro-o, 0); }
.intro-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 19; pointer-events: none; display: block; }
.intro-scroll { position: fixed; inset: 0; z-index: 20; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.intro-scroll::-webkit-scrollbar { display: none; }
.intro-skip {
  position: fixed; z-index: 21; top: 14px; right: 18px;
  font: inherit; color: #5e7f99; background: transparent; border: 1px solid #22313d; padding: 3px 10px;
}
.intro-skip:hover, .intro-skip:focus-visible { background: #cfe9ff; color: #000; outline: none; }
.intro-hint { position: fixed; z-index: 21; left: 50%; bottom: 18px; transform: translateX(-50%); color: #5e7f99; pointer-events: none; transition: opacity .4s; }
