*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #050505;
  overflow: hidden;
  font-family: 'Courier New', monospace;
}

/* canvas */
#scope {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* foreground scroll layer */
#fg {
  position: fixed;
  inset: 0;
  overflow-y: scroll;
  z-index: 3;
  scrollbar-width: thin;
  scrollbar-color: #0d2a0d transparent;
}

/* sections */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem 3rem; /* top clears fixed nav */
}

/* content panel */
.panel {
  background: rgba(5, 5, 5, 0.80);
  border: 1px solid #0d350d;
  max-width: 680px;
  width: 100%;
  padding: 2.5rem;
}

.panel-title {
  font-size: 0.82rem;
  letter-spacing: 0.25em;
  color: #00ff41;
  font-weight: normal;
}

.divider {
  height: 1px;
  background: #0d350d;
  margin: 1.25rem 0;
}

.panel-bio {
  font-size: 0.78rem;
  line-height: 1.85;
  color: #6fc67f;
  letter-spacing: 0.02em;
}

.panel-sub {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: #00bb35;
  font-weight: normal;
  margin-bottom: 1rem;
}

/* facts table */
.facts {
  margin-top: 1.5rem;
  border-collapse: collapse;
  width: 100%;
}

.facts td {
  font-size: 0.73rem;
  padding: 0.28rem 0;
  color: #6fc67f;
  vertical-align: top;
}

.fact-key {
  color: #004420;
  width: 6.5rem;
  letter-spacing: 0.05em;
  padding-right: 1rem;
}

/* experience */
.exp-block {
  margin-bottom: 0.5rem;
}

.exp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.exp-role {
  font-size: 0.78rem;
  color: #00ff41;
  letter-spacing: 0.04em;
}

.exp-date {
  font-size: 0.66rem;
  color: #004420;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.exp-org {
  font-size: 0.70rem;
  color: #00bb35;
  margin: 0.25rem 0 0.6rem;
  letter-spacing: 0.04em;
}

.exp-list {
  list-style: none;
  padding: 0;
}

.exp-list li {
  font-size: 0.72rem;
  color: #6fc67f;
  line-height: 1.65;
  padding-left: 0.9rem;
  position: relative;
}

.exp-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: #00bb35;
}

/* projects */
.proj-list {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.proj-entry {
  border-left: 1px solid #0d350d;
  padding-left: 1rem;
}

.proj-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.proj-name {
  font-size: 0.84rem;
  color: #00ff41;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.12s;
}

.proj-name:hover { color: #ffffff; }

.proj-meta {
  font-size: 0.63rem;
  color: #004420;
  letter-spacing: 0.06em;
}

.proj-desc {
  font-size: 0.72rem;
  color: #6fc67f;
  line-height: 1.7;
}

.inline-link {
  color: #00bb35;
  text-decoration: none;
  transition: color 0.12s;
}

.inline-link:hover { color: #00ff41; }

/* skills */
.skills-table {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.skill-key {
  font-size: 0.65rem;
  color: #004420;
  letter-spacing: 0.08em;
  padding-top: 0.1rem;
}

.skill-val {
  font-size: 0.73rem;
  color: #6fc67f;
  line-height: 1.7;
}

/* links / find me */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.link-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  text-decoration: none;
}

.link-key {
  font-size: 0.65rem;
  color: #004420;
  letter-spacing: 0.08em;
  align-self: center;
}

.link-val {
  font-size: 0.73rem;
  color: #6fc67f;
  align-self: center;
  transition: color 0.12s;
}

.link-row:hover .link-val { color: #00ff41; }

/* fixed site header / nav */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  pointer-events: none;
}

#site-logo {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: #004420;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.5s ease 0.1s;
}

#site-header.visible #site-logo { opacity: 1; }

#site-nav {
  display: flex;
  gap: 0.5rem;
  pointer-events: auto;
}

.nav-btn {
  background: transparent;
  border: 1px solid #0f2e0f;
  color: #00bb35;
  font-family: 'Courier New', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  padding: 0.35em 0.9em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}

#site-header.visible .nav-btn:nth-child(1) { opacity: 1; transition-delay: 0.20s; }
#site-header.visible .nav-btn:nth-child(2) { opacity: 1; transition-delay: 0.32s; }
#site-header.visible .nav-btn:nth-child(3) { opacity: 1; transition-delay: 0.44s; }
#site-header.visible .nav-btn:nth-child(4) { opacity: 1; transition-delay: 0.56s; }

.nav-btn:hover,
.nav-btn.active {
  border-color: #00ff41;
  color: #00ff41;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

/* mini visualizers shared */
.mini-label {
  font-size: 0.48rem;
  letter-spacing: 0.14em;
  color: #004420;
  text-align: center;
  display: block;
}

/* left: vertical waveforms */
#waves-left {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: row;
  gap: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease 0.7s;
}

#waves-left.visible { opacity: 1; }

.vwave-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

#waveL, #waveR {
  width: 36px;
  height: 380px;
  border: 1px solid #0d1f0d;
  display: block;
}

/* right: EQ + spectrogram */
#scopes-right {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease 0.7s;
}

#scopes-right.visible { opacity: 1; }

.hscope-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#spectrum, #spectrogram, #polar {
  width: 150px;
  height: 150px;
  border: 1px solid #0d1f0d;
  display: block;
}

/* piano keyboard */
#keyboard-wrap {
  position: fixed;
  bottom: 2.6rem;
  right: 1.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease 0.7s;
}

#keyboard-wrap.visible { opacity: 1; }

#keyboard {
  width: 196px;
  height: 30px;
  border: 1px solid #0d1f0d;
  display: block;
}

/* volume control */
#vol-ctrl {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  user-select: none;
}

#vol-track {
  position: relative;
  width: 2px;
  height: 80px;
  background: #0d1f0d;
  cursor: pointer;
}

#vol-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #00bb35;
  pointer-events: none;
  transition: background 0.2s;
}

#vol-handle {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 7px;
  height: 7px;
  background: #00ff41;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
  pointer-events: none;
  transition: background 0.2s, box-shadow 0.2s;
}

#vol-label {
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  color: #004420;
  transition: color 0.2s;
}

#vol-ctrl.muted #vol-fill   { background: #0d1f0d; }
#vol-ctrl.muted #vol-handle { background: #1a3a1a; box-shadow: none; }
#vol-ctrl.muted #vol-label  { color: #1a2a1a; }

/* site footer */
#site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#site-footer.visible {
  opacity: 1;
}

.footer-text {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: #00a038;
}

.footer-sep {
  font-size: 0.58rem;
  color: #007a2c;
}

.footer-btn {
  font-family: 'Courier New', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: #00bb35;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.12s;
}

.footer-btn:hover { color: #00ff41; }

/* enter overlay */
#enterOverlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(0);
  transition: transform 0.75s cubic-bezier(0.4, 0, 1, 1);
}

#enterOverlay.slide-up {
  transform: translateY(-100%);
  pointer-events: none;
}

.enter-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.enter-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #004420;
}

#enterBtn {
  background: transparent;
  border: 1px solid #00bb35;
  color: #00bb35;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  padding: 0.7em 2em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
  animation: pulse-border 2s ease-in-out infinite;
}

.enter-warning {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: #004420;
  text-align: center;
}

#enterBtn:hover {
  color: #00ff41;
  border-color: #00ff41;
  box-shadow: 0 0 16px rgba(0, 255, 65, 0.4);
  animation: none;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 4px rgba(0, 187, 53, 0.2); }
  50%       { box-shadow: 0 0 14px rgba(0, 187, 53, 0.5); }
}

/* HC toggle button */
#hc-btn {
  background: transparent;
  border: 1px solid #0f2e0f;
  color: #004420;
  font-family: 'Courier New', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding: 0.35em 0.7em;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

#hc-btn:hover { border-color: #00ff41; color: #00ff41; }

/* high contrast overrides */
body.hc { background: #000; }

body.hc .panel                        { background: rgba(0,0,0,0.97); border-color: #00ff41; }
body.hc .divider                      { background: #00ff41; }
body.hc .proj-entry                   { border-left-color: #00ff41; }

body.hc .panel-bio,
body.hc .facts td,
body.hc .exp-list li,
body.hc .proj-desc,
body.hc .skill-val,
body.hc .link-val,
body.hc .panel-sub,
body.hc .exp-org,
body.hc .exp-role,
body.hc .inline-link,
body.hc .fact-key,
body.hc .exp-date,
body.hc .proj-meta,
body.hc .skill-key,
body.hc .link-key,
body.hc #site-logo,
body.hc .mini-label,
body.hc #vol-label,
body.hc .footer-text,
body.hc .footer-sep,
body.hc .footer-btn,
body.hc .enter-label,
body.hc .enter-warning               { color: #00ff41; }

body.hc .exp-list li::before         { color: #00ff41; }
body.hc .link-row:hover .link-val    { color: #fff; }
body.hc .proj-name:hover             { color: #fff; }
body.hc .footer-btn:hover            { color: #fff; }

body.hc .nav-btn                     { border-color: #00ff41; color: #00ff41; }
body.hc .nav-btn:hover,
body.hc .nav-btn.active              { color: #fff; border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.2); }

body.hc #hc-btn                      { border-color: #00ff41; color: #00ff41; }

body.hc #waveL, body.hc #waveR,
body.hc #spectrum, body.hc #spectrogram,
body.hc #polar                       { border-color: #00ff41; }

body.hc #vol-track                   { background: #003300; }
body.hc #vol-fill                    { background: #00ff41; }
body.hc #vol-ctrl.muted #vol-fill    { background: #003300; }
body.hc #vol-ctrl.muted #vol-handle  { background: #00ff41; box-shadow: none; opacity: 0.3; }
body.hc #vol-ctrl.muted #vol-label   { color: #003300; }

body.hc #enterBtn                    { border-color: #00ff41; color: #00ff41; }
body.hc #enterOverlay                { background: #000; }
body.hc #keyboard                    { border-color: #00ff41; }
