:root {
  --bg: #0a0a0a;
  --bg-elevated: #0d130d;
  --panel: rgba(9, 16, 9, 0.92);
  --primary: #33ff00;
  --secondary: #ffb000;
  --muted: #1f521f;
  --accent: #33ff00;
  --error: #ff3333;
  --border: #1f521f;
  --text: #33ff00;
  --text-dim: #7acb67;
  --ink-invert: #071007;
  --glow: 0 0 5px rgba(51, 255, 0, 0.5);
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: "JetBrains Mono", "Fira Code", "VT323", monospace;
  background: radial-gradient(circle at 10% 6%, #102410 0%, var(--bg) 36%),
    linear-gradient(180deg, #050705 0%, var(--bg) 66%, #050705 100%);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.45;
  text-shadow: var(--glow);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0) 4px
  );
  opacity: 0.14;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 199;
  background: radial-gradient(circle at center, rgba(51, 255, 0, 0.08) 0%, rgba(0, 0, 0, 0) 58%);
}

a {
  color: var(--text);
}

a:focus-visible,
button:focus-visible {
  outline: 1px dashed var(--secondary);
  outline-offset: 3px;
}

.site-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}

#tubesCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -3;
}

.backdrop-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(51, 255, 0, 0.15) 0%, rgba(0, 0, 0, 0) 38%),
    radial-gradient(circle at 88% 84%, rgba(255, 176, 0, 0.12) 0%, rgba(0, 0, 0, 0) 32%);
}

.cursor-aura {
  --aura-x: 50vw;
  --aura-y: 50vh;
  --aura-scale: 1;
  position: fixed;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 30;
  transform: translate3d(calc(var(--aura-x) - 10px), calc(var(--aura-y) - 10px), 0) scale(var(--aura-scale));
  border: 1px solid rgba(51, 255, 0, 0.76);
  background: rgba(51, 255, 0, 0.2);
  transition: transform 100ms linear;
  animation: blink 1s steps(2, end) infinite;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem clamp(0.7rem, 2.2vw, 1.4rem);
  border-bottom: 1px solid var(--border);
  background: rgba(5, 11, 5, 0.86);
}

.brand,
.prompt,
.label,
.card-header,
h1,
h2,
h3,
.btn,
.resume-link,
.home-link,
.interaction-hint,
.cmd,
.status-chip {
  letter-spacing: 0.04em;
}

.brand {
  font-size: 0.88rem;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.resume-link,
.home-link,
.btn,
.visit-link {
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.44rem 0.64rem;
  background: rgba(51, 255, 0, 0.05);
  color: var(--text);
  transition: background-color 120ms steps(2, end), color 120ms steps(2, end), border-color 120ms steps(2, end);
  text-transform: uppercase;
  font-size: 0.78rem;
  display: inline-block;
}

.resume-link::before,
.home-link::before,
.btn::before,
.visit-link::before {
  content: "[ ";
}

.resume-link::after,
.home-link::after,
.btn::after,
.visit-link::after {
  content: " ]";
}

.resume-link:hover,
.home-link:hover,
.btn:hover,
.visit-link:hover {
  background: var(--primary);
  color: var(--ink-invert);
  border-color: var(--primary);
  text-shadow: none;
}

.content,
.page {
  width: min(1120px, 94vw);
  margin: 1.1rem auto 2.5rem;
  display: grid;
  gap: 0.85rem;
}

.card,
.hero,
.project-card,
.video-shell,
.note,
.pane {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 0;
  box-shadow: none;
}

.card,
.hero,
.video-shell,
.note,
.pane {
  padding: clamp(0.8rem, 2vw, 1.2rem);
}

.card-header,
.panel-header,
.project-meta,
.window-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.45rem;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.card-header::before,
.panel-header::before,
.window-title::before {
  content: "+--";
  color: var(--secondary);
}

.card-header::after,
.panel-header::after,
.window-title::after {
  content: "--+";
  color: var(--secondary);
}

.hero {
  display: grid;
  gap: 0.9rem;
}

.hero-profile {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.avatar {
  width: 86px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border);
}

.prompt {
  color: var(--secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.22;
}

h1 {
  font-size: clamp(1.14rem, 4vw, 2rem);
  max-width: 24ch;
}

h2 {
  font-size: clamp(0.96rem, 2.4vw, 1.15rem);
}

h3 {
  font-size: 0.88rem;
}

p,
.summary,
.note,
.status-log,
li,
small {
  color: var(--text-dim);
  font-size: 0.86rem;
}

.typewriter {
  overflow: hidden;
  white-space: nowrap;
  border-right: 0.6ch solid var(--primary);
  animation: typing 2.9s steps(38, end), blink 1s steps(2, end) infinite;
}

.grid-section,
.focus-grid,
.projects-grid {
  display: grid;
  gap: 0.85rem;
}

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

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

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--ink-invert);
  text-shadow: none;
}

.btn-warn {
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-warn:hover {
  background: var(--secondary);
  color: #231400;
  border-color: var(--secondary);
}

.pill-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.pill-list li {
  border: 1px dashed var(--border);
  padding: 0.4rem 0.5rem;
}

.status-log {
  list-style: none;
  display: grid;
  gap: 0.32rem;
  margin-top: 0.35rem;
}

.status-chip {
  color: var(--secondary);
}

.bar {
  display: block;
  color: var(--primary);
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.divider {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}

.interaction-hint {
  position: fixed;
  right: 0.8rem;
  bottom: 0.8rem;
  border: 1px solid var(--border);
  background: rgba(6, 15, 6, 0.86);
  color: var(--text);
  padding: 0.44rem 0.55rem;
  font-size: 0.7rem;
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transform: translateY(9px);
  transition: opacity 320ms steps(4, end), transform 320ms steps(4, end);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.page {
  padding-top: 0.3rem;
}

.hero-copy {
  display: grid;
  gap: 0.42rem;
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
  overflow: hidden;
}

.project-meta {
  padding: 0.7rem 0.8rem;
  margin: 0;
}

.project-title {
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  word-break: break-all;
}

.project-frame {
  width: 100%;
  border: 0;
  display: block;
  aspect-ratio: 16 / 10;
  background: #060a06;
  border-top: 1px solid var(--border);
}

.error-chip {
  display: inline-block;
  margin-top: 0.65rem;
  border: 1px solid #7e221f;
  background: rgba(255, 51, 51, 0.15);
  color: var(--error);
  padding: 0.3rem 0.45rem;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.note {
  font-size: 0.78rem;
}

.video-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.video-shell {
  width: min(1100px, 95vw);
  display: grid;
  gap: 0.75rem;
}

.video-shell video {
  width: 100%;
  border: 1px solid var(--border);
  background: #000;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
}

.cmd {
  color: var(--secondary);
  font-size: 0.78rem;
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

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

  .pill-list {
    grid-template-columns: 1fr;
  }
}

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

  .interaction-hint {
    right: 0.6rem;
    left: 0.6rem;
    text-align: left;
  }

  .typewriter {
    white-space: normal;
    border-right: 0;
    animation: none;
  }

  .hero-profile {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .typewriter,
  .cursor-aura,
  .reveal {
    animation: none;
    transition: none;
  }
}
