:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #090b0a;
  --panel-2: #0d1210;
  --green: #00ff66;
  --green-dim: #00a84a;
  --green-mute: #0f4c28;
  --cyan: #00e5ff;
  --red: #ff3158;
  --amber: #ffd166;
  --text: #d9ffe7;
  --muted: #7aa88b;
  --line: #126b36;
  --line-soft: rgba(0, 255, 102, 0.22);
  --shadow-green: 0 0 12px rgba(0, 255, 102, 0.45);
  --shadow-cyan: 0 0 12px rgba(0, 229, 255, 0.38);
  --shadow-red: 0 0 16px rgba(255, 49, 88, 0.44);
  --mono: "Courier New", "SFMono-Regular", Consolas, ui-monospace, monospace;
  --scanline-alpha: 0.2;
  --glow-scale: 0.62;
  --matrix-opacity: 0.22;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(0, 255, 102, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto;
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: geometricPrecision;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.72));
  z-index: 20;
}

a {
  color: inherit;
}

pre,
code,
input,
button {
  font: inherit;
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 980px;
  color: var(--cyan);
  font-size: clamp(46px, 6.6vw, 78px);
  line-height: 1.02;
  text-shadow:
    0 0 4px rgba(0, 229, 255, 0.95),
    0 0 22px rgba(0, 229, 255, 0.42),
    3px 3px 0 rgba(0, 255, 102, 0.13);
}

h1 span {
  color: var(--green);
  text-shadow:
    0 0 4px rgba(0, 255, 102, 0.95),
    0 0 24px rgba(0, 255, 102, 0.48),
    -2px 2px 0 rgba(255, 49, 88, 0.12);
}

h2 {
  color: var(--cyan);
  font-size: 34px;
  text-shadow: var(--shadow-cyan);
}

h2::before {
  content: "> ";
  color: var(--green);
}

h3 {
  color: var(--cyan);
  font-size: 20px;
  text-shadow: var(--shadow-cyan);
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 19;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, var(--scanline-alpha)) 3px 4px);
  mix-blend-mode: multiply;
}

#matrix {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: var(--matrix-opacity);
  pointer-events: none;
}

body.matrix-off #matrix {
  display: none;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 255, 102, 0.1), transparent 28rem),
    #000;
  color: var(--green);
  transition: opacity 650ms ease, visibility 650ms ease;
}

.boot-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 255, 102, 0.05) 0 1px, transparent 1px 4px);
  opacity: 0.7;
}

.boot-hide {
  opacity: 0;
  visibility: hidden;
}

.boot-window {
  position: relative;
  width: min(860px, calc(100% - 32px));
  min-height: 470px;
  padding: 22px;
  border: 2px solid var(--green);
  background: rgba(0, 0, 0, 0.88);
  box-shadow:
    0 0 0 1px rgba(0, 255, 102, 0.25) inset,
    0 0 44px rgba(0, 255, 102, 0.32);
}

.boot-window::before {
  content: "system boot";
  position: absolute;
  top: -13px;
  left: 18px;
  padding: 0 10px;
  background: #000;
  color: var(--cyan);
  text-shadow: var(--shadow-cyan);
}

.boot-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--green-mute);
  color: var(--cyan);
  text-transform: uppercase;
  text-shadow: var(--shadow-cyan);
}

.boot-window pre {
  min-height: 350px;
  max-height: 58vh;
  margin: 0;
  overflow: hidden;
  white-space: pre-wrap;
  color: var(--green);
  text-shadow: var(--shadow-green);
  font-size: 14px;
  line-height: 1.35;
}

.boot-progress {
  height: 12px;
  border: 1px solid var(--green-mute);
  background: #020402;
  overflow: hidden;
}

.boot-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  box-shadow: var(--shadow-cyan);
  transition: width 160ms linear;
}

.wrap {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--green-mute);
  background: rgba(0, 0, 0, 0.94);
  color: var(--muted);
  font-size: 13px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}

.top-setting {
  border: 1px solid var(--green-mute);
  background: #000;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 8px;
  font: inherit;
}

.top-setting:hover,
.top-setting[aria-expanded="true"] {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: var(--shadow-cyan);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 34px;
  flex-wrap: wrap;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: var(--shadow-green);
  animation: blink 1.6s step-end infinite;
}

.sep,
.dim {
  color: var(--muted);
}

.accent {
  color: var(--cyan);
  text-shadow: var(--shadow-cyan);
}

.cyan {
  color: var(--cyan);
}

.warn {
  color: var(--amber);
}

.spacer {
  flex: 1;
}

.header {
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--green);
  background:
    radial-gradient(circle at 16% 18%, rgba(0, 229, 255, 0.13), transparent 22rem),
    radial-gradient(circle at 78% 8%, rgba(255, 49, 88, 0.11), transparent 20rem),
    linear-gradient(180deg, rgba(0, 255, 102, 0.08), transparent 45%),
    rgba(5, 5, 5, 0.96);
  padding: 28px 0 0;
}

.header::before,
.header::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.header::before {
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 102, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.06) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(180deg, black, transparent 85%);
}

.header::after {
  left: -10%;
  right: -10%;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--green), var(--red), transparent);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.7);
}

.header .container {
  position: relative;
  z-index: 1;
}

.console-bay {
  position: relative;
  min-height: 174px;
  margin-bottom: 22px;
  padding: 12px;
  border: 2px solid var(--green);
  background:
    linear-gradient(180deg, rgba(0, 255, 102, 0.055), transparent 58%),
    rgba(0, 0, 0, 0.86);
  box-shadow:
    0 0 0 1px rgba(0, 255, 102, 0.12) inset,
    0 0 32px rgba(0, 255, 102, 0.12);
}

.console-bay::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(0, 255, 102, 0.2);
  pointer-events: none;
}

.bay-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.logo-card {
  position: relative;
  width: min(565px, calc(100% - 28px));
  margin-left: 16px;
  padding: 17px 18px 13px;
  border: 1px solid var(--green);
  background:
    repeating-linear-gradient(to bottom, rgba(0, 255, 102, 0.08) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 18% 18%, rgba(0, 255, 102, 0.2), transparent 12rem),
    #000;
  box-shadow:
    0 0 0 1px rgba(0, 255, 102, 0.2) inset,
    0 0 18px rgba(0, 255, 102, 0.35),
    0 0 42px rgba(0, 255, 102, 0.12);
}

.logo-card::before,
.logo-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.logo-card::before {
  inset: -4px;
  border: 1px solid rgba(0, 255, 102, 0.35);
}

.logo-card::after {
  left: 0;
  right: 0;
  top: 34%;
  height: 16px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 102, 0.2), transparent);
  filter: blur(6px);
}

.brand-word {
  position: relative;
  display: block;
  margin: 0;
  color: var(--green);
  font-family: var(--mono);
  font-size: clamp(12px, 1.55vw, 20px);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: 0;
  white-space: pre;
  overflow-x: auto;
  transform: none;
  text-shadow:
    0 0 calc(2px + 4px * var(--glow-scale)) rgba(0, 255, 102, 0.92),
    0 0 calc(8px + 18px * var(--glow-scale)) rgba(0, 255, 102, 0.38);
}

.brand-cmd {
  position: relative;
  margin-top: 10px;
  color: var(--green);
  font-size: 14px;
  text-shadow: var(--shadow-green);
}

body.wordmark-crt .brand-word {
  color: #39ff7a;
  filter: blur(0.15px);
  text-shadow:
    1px 0 0 rgba(0, 229, 255, 0.32),
    -1px 0 0 rgba(255, 49, 88, 0.18),
    0 0 calc(6px + 22px * var(--glow-scale)) rgba(0, 255, 102, 0.75);
}

body.wordmark-crt .brand-word::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 255, 102, 0.18) 0 1px, transparent 1px 5px);
  pointer-events: none;
}

body.wordmark-plain .brand-word {
  text-shadow: none;
  filter: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding: 17px 0 18px;
  border-top: 1px solid rgba(0, 255, 102, 0.24);
  font-size: 14px;
}

.nav a {
  color: var(--green);
  text-decoration: none;
}

.nav a:hover,
.nav .hire {
  color: var(--red);
  text-shadow: 0 0 10px rgba(255, 49, 88, 0.55);
}

body.hero-wide .console-bay {
  min-height: 230px;
}

body.hero-wide .logo-card {
  width: min(690px, calc(100% - 28px));
}

body.hero-wide .brand-word {
  font-size: clamp(14px, 1.8vw, 24px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 62px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 38%),
    radial-gradient(circle at 16% 18%, rgba(0, 255, 102, 0.12), transparent 28rem),
    radial-gradient(circle at 82% 22%, rgba(0, 229, 255, 0.1), transparent 26rem);
}

.hero::before {
  content: "01 / public profile";
  position: absolute;
  right: clamp(16px, 5vw, 64px);
  top: 24px;
  color: rgba(0, 255, 102, 0.28);
  font-size: 13px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 102, 0.4), transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 42px;
  align-items: start;
}

.prompt {
  color: var(--green);
  margin-bottom: 16px;
  text-shadow: var(--shadow-green);
}

.lead {
  max-width: 760px;
  color: var(--text);
  font-size: 19px;
  text-shadow: 0 0 16px rgba(217, 255, 231, 0.12);
}

.actions,
.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 2px solid var(--green);
  background: #000;
  color: var(--green);
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(0, 255, 102, 0.14);
  box-shadow: var(--shadow-green);
}

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

.btn.cyan:hover {
  box-shadow: var(--shadow-cyan);
}

.btn.danger {
  border-color: var(--red);
  color: var(--red);
}

.btn.danger:hover {
  box-shadow: 0 0 16px rgba(255, 49, 88, 0.5);
}

.portrait,
.terminal,
.skills-file,
.network-card,
.contact-box {
  border: 2px solid var(--line);
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 0 24px rgba(0, 255, 102, 0.1);
}

.portrait {
  position: relative;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.12), transparent 18rem),
    #000;
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.12) inset,
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(0, 255, 102, 0.12);
}

.panel-title {
  position: absolute;
  top: -13px;
  left: 14px;
  padding: 0 9px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
}

.portrait pre {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  line-height: 1.25;
  overflow-x: auto;
  text-shadow: var(--shadow-green);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 44px;
}

.stats article,
.card {
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(0, 255, 102, 0.055), transparent),
    var(--panel);
  padding: 18px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stats article:hover,
.card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: var(--shadow-green);
}

.stats strong {
  display: block;
  color: var(--cyan);
  font-size: 32px;
  line-height: 1;
  text-shadow: var(--shadow-cyan);
}

.stats span,
.section-head span,
.card p,
.timeline p,
.contact-box p {
  color: var(--muted);
}

.section {
  padding: 70px 0;
  border-top: 1px dashed var(--green-mute);
}

.section-head {
  margin-bottom: 28px;
}

.section-head p,
.tag {
  margin-bottom: 8px;
  color: var(--green-dim);
  font-size: 14px;
}

.terminal {
  overflow: hidden;
}

.term-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--green-mute);
  background: #050505;
}

.term-chrome span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.red {
  background: var(--red);
}

.yellow {
  background: var(--amber);
}

.green {
  background: var(--green);
}

.term-chrome strong {
  margin-left: 8px;
  color: var(--muted);
  font-size: 14px;
}

.term-body {
  min-height: 300px;
  max-height: 470px;
  overflow-y: auto;
  padding: 20px;
}

.term-body p {
  margin: 0 0 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--green-mute);
}

.term-input label {
  color: var(--cyan);
  white-space: nowrap;
}

.term-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--green);
  caret-color: var(--green);
}

.file-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--green-mute);
  color: var(--muted);
  font-size: 14px;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
}

.skill-group h3 {
  border-bottom: 1px dashed var(--green-mute);
  padding-bottom: 8px;
}

.skill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 42px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.skill-row span {
  color: var(--text);
}

.skill-row b {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

meter {
  width: 100%;
  height: 12px;
}

meter::-webkit-meter-bar {
  border: 1px solid var(--green-mute);
  background: #000;
}

meter::-webkit-meter-optimum-value {
  background: var(--cyan);
  box-shadow: var(--shadow-cyan);
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline article {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  border-left: 2px solid var(--green-mute);
  padding: 16px 0 16px 20px;
  background: rgba(0, 255, 102, 0.025);
}

.timeline article:hover {
  border-left-color: var(--green);
  background: rgba(0, 255, 102, 0.06);
}

.timeline .current {
  border-left-color: var(--red);
}

.timeline time {
  color: var(--green-dim);
}

.timeline h3 {
  margin-bottom: 4px;
}

.timeline span {
  color: var(--amber);
  font-size: 13px;
}

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.card h3::before {
  content: "> ";
  color: var(--green);
}

.network-card {
  padding: 20px;
  position: sticky;
  top: 54px;
}

.network-card dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  margin: 0;
}

.network-card dt {
  color: var(--green);
}

.network-card dd {
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.contact-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-color: var(--red);
}

.footer {
  border-top: 2px solid var(--green);
  background: #000;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.settings-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  width: min(300px, calc(100% - 32px));
  border: 2px solid var(--cyan);
  background: rgba(0, 0, 0, 0.94);
  box-shadow: var(--shadow-cyan);
  display: none;
}

.settings-panel.open {
  display: block;
}

.settings-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--green-mute);
  color: var(--cyan);
  text-shadow: var(--shadow-cyan);
}

.settings-panel header button,
.option {
  border: 1px solid var(--green-mute);
  background: #000;
  color: var(--green);
  cursor: pointer;
  font: inherit;
}

.settings-panel header button {
  width: 26px;
  height: 24px;
}

.settings-body {
  display: grid;
  gap: 16px;
  padding: 14px;
}

.settings-body label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.settings-body input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.option-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.option {
  min-height: 30px;
  padding: 4px 10px;
}

.option.active,
.option:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  text-shadow: var(--shadow-cyan);
}

.option.replay {
  width: 100%;
  color: var(--amber);
}

.cursor {
  color: var(--green);
  animation: blink 1s step-end infinite;
}

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

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

@media (max-width: 940px) {
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

  .hero-grid,
  .lab-grid,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .skill-groups {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .network-card {
    position: static;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 34px;
  }

  .container {
    width: min(100% - 20px, 1200px);
  }

  .console-bay {
    min-height: 150px;
  }

  .logo-card {
    width: calc(100% - 12px);
    margin-left: 6px;
    padding: 14px 12px 10px;
  }

  .brand-word {
    font-size: clamp(10px, 2.8vw, 13px);
  }

  .brand-cmd {
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  .stats,
  .cards,
  .timeline article {
    grid-template-columns: 1fr;
  }

  .skill-row {
    grid-template-columns: 1fr;
  }

  .skill-row b {
    text-align: left;
  }

  .term-input {
    align-items: flex-start;
    flex-direction: column;
  }

  .term-input input {
    width: 100%;
  }
}
