:root {
  --bg: #080b12;
  --panel: #101722;
  --panel2: #0b111b;
  --text: #edf2f7;
  --muted: #9ba7b7;
  --accent: #62d9ff;
  --purple: #9b8cff;
  --green: #6ee7b7;
  --border: #202a3a;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 85% 5%, rgba(22, 34, 61, 0.9) 0, transparent 34%),
    radial-gradient(circle at 10% 45%, rgba(19, 47, 64, 0.22) 0, transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(98, 217, 255, 0.1), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(155, 140, 255, 0.14), transparent 25%),
    #05070b;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.boot-screen--closing {
  opacity: 0;
  visibility: hidden;
}

.boot-window {
  width: min(680px, 100%);
  position: relative;
  padding: clamp(22px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(98, 217, 255, 0.25);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(18, 30, 45, 0.92), rgba(7, 12, 20, 0.97));
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.6),
    0 0 70px rgba(98, 217, 255, 0.08);
  color: #d7e4ee;
  font: 14px/1.9 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.boot-window::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(110deg, transparent 20%, rgba(98, 217, 255, 0.1), transparent 80%);
  transform: translateX(-100%);
  animation: boot-scan 4s ease-in-out infinite;
}

.boot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(98, 217, 255, 0.12);
}

.boot-dots {
  display: inline-flex;
  gap: 5px;
  margin-right: 12px;
  vertical-align: middle;
}

.boot-dots i {
  width: 7px;
  height: 7px;
  background: #33475e;
  border-radius: 50%;
}

.boot-dots i:first-child {
  background: #ff6b81;
}

.boot-dots i:nth-child(2) {
  background: #ffc857;
}

.boot-dots i:last-child {
  background: var(--green);
}

.boot-command {
  color: #64758a;
}

.boot-prompt {
  color: var(--accent);
}

.boot-skip {
  padding: 6px 11px;
  color: #b7c8d8;
  background: rgba(98, 217, 255, 0.06);
  border: 1px solid rgba(98, 217, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.boot-skip span {
  color: var(--accent);
}

.boot-skip:hover,
.boot-skip:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  outline: none;
}

.boot-title {
  margin-bottom: 2px;
  color: #edf2f7;
  font-weight: 600;
}

.boot-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 26px 0 20px;
}

.boot-logo {
  color: var(--text);
  font: 700 clamp(2.4rem, 8vw, 4.5rem)/0.85 "Space Grotesk", sans-serif;
  letter-spacing: -5px;
}

.boot-logo span {
  color: var(--accent);
}

.boot-subtitle {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.8px;
}

.boot-log {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  background: rgba(3, 7, 12, 0.42);
  border: 1px solid rgba(98, 217, 255, 0.12);
  border-radius: 12px;
}

.boot-line {
  opacity: 0;
  transform: translateX(-8px);
  color: var(--muted);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.boot-line--visible {
  opacity: 1;
  transform: translateX(0);
}

.boot-line span {
  margin-right: 8px;
  color: var(--green);
}

.boot-progress {
  height: 4px;
  margin-top: 20px;
  overflow: hidden;
  background: #142334;
  border-radius: 999px;
}

@media (max-width: 600px) {
  .boot-screen {
    padding: 14px;
  }

  .boot-command {
    display: none;
  }

  .boot-brand {
    gap: 14px;
  }

  .boot-logo {
    font-size: 3rem;
  }

  .boot-log {
    padding: 14px;
    font-size: 12px;
  }
}

.boot-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--accent), var(--green));
  border-radius: inherit;
  box-shadow: 0 0 14px rgba(98, 217, 255, 0.75);
  transition: width 0.45s ease;
}

.boot-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: #718198;
  font-size: 11px;
}

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

@keyframes boot-scan {
  50%,
  100% {
    transform: translateX(100%);
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--max), 92%);
  margin: auto;
}

nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(8, 11, 18, 0.82);
  border-bottom: 1px solid var(--border);
}

nav .container {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 850;
  letter-spacing: 0.6px;
  font-size: 1.1rem;
}

.logo span {
  color: var(--accent);
}

.links {
  display: flex;
  gap: 27px;
  color: var(--muted);
  font-size: 0.94rem;
}

.links a:hover {
  color: var(--text);
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 70px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 72px;
  align-items: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.7px;
  margin-bottom: 16px;
}

h1 {
  max-width: 800px;
  font-size: clamp(3rem, 7vw, 5.9rem);
  line-height: 0.94;
  letter-spacing: -4px;
}

h1 span {
  color: var(--accent);
}

.hero h2 {
  margin-top: 20px;
  color: #d8e0e9;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 650;
}

.hero p {
  max-width: 690px;
  margin: 22px 0 30px;
  color: var(--muted);
  font-size: 1.06rem;
}

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 750;
  transition: 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.primary {
  background: var(--accent);
  color: #061018;
  border-color: var(--accent);
}

.terminal {
  overflow: hidden;
  padding: 21px;
  background: rgba(11, 16, 25, 0.94);
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.34);
  font: 13px/1.85 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal-command-dock {
  display: none;
}

.terminal.is-visible {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: block;
  width: min(390px, calc(100vw - 32px));
  padding: 16px;
  border-color: rgba(98, 217, 255, 0.45);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5), 0 0 28px rgba(98, 217, 255, 0.12);
  animation: terminal-dock-in 0.35s ease both;
}

@keyframes terminal-dock-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.terminal-output {
  max-height: 285px;
  overflow-y: auto;
  scrollbar-color: #2b4259 transparent;
}

.terminal-note {
  margin-top: 8px;
  color: #778397;
  font-size: 11px;
}

.terminal-help-heading {
  margin-top: 8px;
  padding-bottom: 7px;
  color: var(--text);
  border-bottom: 1px solid rgba(98, 217, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.terminal-help-list {
  display: grid;
  gap: 0;
  margin-top: 5px;
  padding: 2px 0;
}

.terminal-help-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 2px 7px;
  border-left: 2px solid transparent;
  line-height: 1.35;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.terminal-help-row:hover {
  background: rgba(98, 217, 255, 0.06);
  border-left-color: var(--accent);
}

.terminal-help-command {
  color: var(--accent);
  font-weight: 700;
}

.terminal-help-description {
  color: #9fb0c0;
}

.terminal-form {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--green);
}

.terminal-form input {
  width: 100%;
  min-width: 0;
  padding: 2px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
}

.terminal-form input::placeholder {
  color: #526071;
}

.terminal-command {
  margin-top: 8px;
  color: #9fb0c0;
}

.terminal-command .prompt {
  color: var(--green);
}

.terminal-error {
  color: #ff8497;
}

.terminal-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dots {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.dot {
  width: 10px;
  height: 10px;
  background: #526071;
  border-radius: 50%;
}

.prompt {
  color: var(--green);
}

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

.purple {
  color: #a99cff;
}

.terminal-status {
  color: var(--green);
}

.subnet-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 50%, rgba(98, 217, 255, 0.08), transparent 28%),
    radial-gradient(circle at 90% 25%, rgba(155, 140, 255, 0.08), transparent 30%),
    #0b0e17;
}

.subnet-page-section {
  min-height: calc(100vh - 68px);
  padding-top: 70px;
}

.subnet-page-intro {
  position: relative;
  z-index: 1;
}

.subnet-back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--accent);
  font: 11px "JetBrains Mono", ui-monospace, monospace;
}

.subnet-back-link:hover,
.subnet-back-link:focus-visible {
  color: var(--text);
  outline: none;
}

.game-menu {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.game-menu a {
  padding: 8px 11px;
  color: var(--muted);
  background: rgba(98, 217, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 7px;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
  transition: 0.2s ease;
}

.game-menu a:hover,
.game-menu a:focus-visible,
.game-menu a[aria-current="page"] {
  color: var(--accent);
  border-color: rgba(98, 217, 255, 0.5);
  outline: none;
}

.subnet-arena {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 36px);
  background: linear-gradient(145deg, rgba(16, 29, 44, 0.95), rgba(7, 13, 22, 0.98));
  border: 1px solid rgba(98, 217, 255, 0.18);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.subnet-arena::before {
  position: absolute;
  top: -110px;
  right: -100px;
  width: 280px;
  height: 280px;
  content: "";
  background: rgba(98, 217, 255, 0.08);
  border-radius: 50%;
  filter: blur(35px);
}

.subnet-arena-header,
.subnet-arena-grid,
.subnet-result-heading,
.subnet-challenge-top,
.subnet-binary-header,
.subnet-challenge-actions {
  position: relative;
  z-index: 1;
}

.subnet-arena-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.subnet-kicker {
  color: var(--accent);
  font: 10px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 1.2px;
}

.subnet-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green);
}

.subnet-arena-header h3 {
  margin-top: 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.subnet-scoreboard {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.subnet-scoreboard strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 1rem;
}

.subnet-arena-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
}

.subnet-controls,
.subnet-results {
  min-width: 0;
  padding: 20px;
  background: rgba(5, 11, 19, 0.48);
  border: 1px solid rgba(98, 217, 255, 0.12);
  border-radius: 14px;
}

.subnet-controls > label {
  display: block;
  margin-bottom: 8px;
  color: #dce8f2;
  font: 11px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.8px;
}

.subnet-input-row {
  display: flex;
  gap: 8px;
}

.subnet-input-row input,
.subnet-answer-grid input {
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  background: #080f19;
  border: 1px solid #26384d;
  border-radius: 8px;
  outline: none;
  font: 12px "JetBrains Mono", ui-monospace, monospace;
  transition: 0.2s ease;
}

.subnet-input-row input:focus,
.subnet-answer-grid input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(98, 217, 255, 0.1);
}

.subnet-action {
  padding: 10px 13px;
  color: #061018;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  font: 700 11px "Space Grotesk", sans-serif;
  white-space: nowrap;
  transition: 0.2s ease;
}

.subnet-action:hover:not(:disabled),
.subnet-action:focus-visible:not(:disabled) {
  box-shadow: 0 0 18px rgba(98, 217, 255, 0.25);
  outline: none;
  transform: translateY(-2px);
}

.subnet-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.subnet-hint {
  margin: 9px 0 22px;
  color: var(--muted);
  font-size: 0.75rem;
}

.subnet-hint code {
  color: var(--accent);
}

.subnet-challenge-card {
  padding: 16px;
  background: rgba(98, 217, 255, 0.04);
  border: 1px solid rgba(98, 217, 255, 0.14);
  border-radius: 12px;
}

.subnet-challenge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subnet-timer {
  color: var(--green);
  font: 700 16px "JetBrains Mono", ui-monospace, monospace;
}

.subnet-timer.is-running {
  color: #ffb86b;
  animation: timer-pulse 1s ease-in-out infinite;
}

@keyframes timer-pulse {
  50% { text-shadow: 0 0 12px rgba(255, 184, 107, 0.75); }
}

.subnet-challenge-card > p {
  min-height: 38px;
  margin: 12px 0;
  color: #c5d2df;
  font-size: 0.8rem;
}

.subnet-answer-grid {
  display: grid;
  gap: 8px;
}

.subnet-answer-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.subnet-challenge-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.subnet-submit {
  color: var(--accent);
  background: transparent;
}

.subnet-feedback {
  min-height: 18px;
  margin: 12px 0 0 !important;
  color: var(--muted) !important;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.subnet-feedback.is-success {
  color: var(--green) !important;
}

.subnet-feedback.is-error {
  color: #ff8497 !important;
}

.subnet-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.subnet-result-cidr {
  color: #c5d2df;
  font: 11px "JetBrains Mono", ui-monospace, monospace;
}

.subnet-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.subnet-stats div {
  padding: 13px;
  background: rgba(16, 27, 41, 0.75);
  border: 1px solid #1d3044;
  border-radius: 9px;
}

.subnet-stats span,
.subnet-binary-header,
.subnet-bit-labels {
  color: #76899e;
  font: 9px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.8px;
}

.subnet-stats strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text);
  font: 600 clamp(0.82rem, 2vw, 1rem) "JetBrains Mono", ui-monospace, monospace;
}

.subnet-binary {
  margin-top: 14px;
  padding: 14px;
  background: #080f19;
  border: 1px solid #1d3044;
  border-radius: 9px;
}

.subnet-binary-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.subnet-binary-row {
  display: flex;
  gap: 3px;
  min-height: 31px;
}

.subnet-octet {
  display: flex;
  flex: 1;
  gap: 2px;
}

.subnet-bit {
  display: grid;
  flex: 1;
  place-items: center;
  min-width: 0;
  color: #aab9c8;
  background: #122234;
  border-radius: 3px;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.subnet-bit.network {
  color: var(--accent);
  background: rgba(98, 217, 255, 0.18);
}

.subnet-bit.host {
  color: #ffb86b;
  background: rgba(255, 184, 107, 0.16);
}

.subnet-bit-separator {
  width: 5px;
}

.subnet-bit-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.subnet-bit-labels span:last-child {
  color: #ffb86b;
}

.subnet-explanation {
  margin-top: 14px;
  color: #b6c5d4;
  font-size: 0.8rem;
}

.server-challenge-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 50%, rgba(255, 107, 129, 0.07), transparent 28%),
    #080c14;
}

.server-challenge {
  padding: clamp(22px, 4vw, 36px);
  background: linear-gradient(145deg, rgba(28, 22, 32, 0.95), rgba(8, 13, 21, 0.98));
  border: 1px solid rgba(255, 107, 129, 0.18);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.server-challenge-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.server-alert-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: #ff6b81;
  border-radius: 50%;
  box-shadow: 0 0 12px #ff6b81;
  animation: timer-pulse 1.4s ease-in-out infinite;
}

.server-challenge-header h3 {
  margin-top: 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.server-scoreboard {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font: 10px "JetBrains Mono", ui-monospace, monospace;
  text-align: right;
}

.server-scoreboard strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 1rem;
}

.server-challenge-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(300px, 1.3fr);
  gap: 14px;
}

.server-incident-panel,
.server-terminal-panel,
.server-diagnosis-panel {
  min-width: 0;
  padding: 18px;
  background: rgba(5, 10, 17, 0.58);
  border: 1px solid rgba(255, 107, 129, 0.13);
  border-radius: 12px;
}

.server-clues {
  display: grid;
  gap: 10px;
  margin: 15px 0 18px;
  padding: 0;
  color: #c8d4df;
  list-style: none;
  font-size: 0.8rem;
}

.server-clues li {
  position: relative;
  padding-left: 17px;
}

.server-clues li::before {
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 6px;
  height: 6px;
  content: "";
  background: #ffb86b;
  border-radius: 50%;
}

.server-objective {
  padding-top: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
}

.server-objective strong {
  display: block;
  margin-bottom: 5px;
  color: #dce8f2;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.server-terminal-panel {
  grid-column: 2;
  grid-row: span 2;
  background: #060a10;
}

.server-terminal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  color: #75879a;
  border-bottom: 1px solid #1b2939;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.server-terminal-bar > span:first-child {
  display: flex;
  gap: 4px;
}

.server-terminal-bar i {
  width: 7px;
  height: 7px;
  background: #33475e;
  border-radius: 50%;
}

.server-terminal-bar i:first-child { background: #ff6b81; }
.server-terminal-bar i:nth-child(2) { background: #ffb86b; }
.server-terminal-bar i:last-child { background: var(--green); }

.server-command-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.server-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  color: #b7c8d8;
  background: #0c141f;
  border: 1px solid #1d3044;
  border-radius: 7px;
  cursor: pointer;
  font: 11px "JetBrains Mono", ui-monospace, monospace;
  text-align: left;
  transition: 0.2s ease;
}

.server-command:hover,
.server-command:focus-visible,
.server-command.is-selected {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
  transform: translateX(3px);
}

.server-command span {
  color: #5f7389;
  font-size: 9px;
}

.server-output {
  min-height: 130px;
  margin: 14px 0 0;
  padding: 13px;
  overflow: auto;
  color: #a9bdcc;
  background: #03070c;
  border: 1px solid #172536;
  border-radius: 7px;
  white-space: pre-wrap;
  font: 11px/1.6 "JetBrains Mono", ui-monospace, monospace;
}

.server-diagnosis-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.server-progress {
  color: #ffb86b;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.server-diagnoses {
  display: grid;
  gap: 7px;
  margin: 15px 0;
}

.server-diagnosis {
  padding: 9px 10px;
  color: #b7c8d8;
  background: #0c141f;
  border: 1px solid #1d3044;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.75rem;
  text-align: left;
  transition: 0.2s ease;
}

.server-diagnosis:hover,
.server-diagnosis:focus-visible,
.server-diagnosis.is-selected {
  color: var(--text);
  border-color: #ffb86b;
  outline: none;
  background: rgba(255, 184, 107, 0.08);
}

.server-diagnosis.is-correct {
  color: var(--green);
  border-color: var(--green);
}

.server-diagnosis.is-wrong {
  color: #ff8497;
  border-color: #ff6b81;
}

.server-challenge-actions {
  grid-column: 1 / -1;
}

.server-challenge-actions .subnet-submit {
  color: #061018;
  background: var(--accent);
}

.server-challenge-actions [hidden] {
  display: none !important;
}

.packet-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(98, 217, 255, 0.08), transparent 30%),
    #090d16;
}

.packet-lab {
  padding: clamp(22px, 4vw, 36px);
  background: linear-gradient(145deg, rgba(13, 30, 43, 0.96), rgba(7, 13, 22, 0.98));
  border: 1px solid rgba(98, 217, 255, 0.18);
  border-radius: 20px;
}

.packet-lab-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.packet-lab-header h3 {
  margin-top: 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.packet-controls {
  display: flex;
  align-items: end;
  gap: 8px;
}

.packet-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.packet-controls input {
  width: 190px;
  padding: 10px 11px;
  color: var(--text);
  background: #080f19;
  border: 1px solid #26384d;
  border-radius: 8px;
  outline: none;
  font: 12px "JetBrains Mono", ui-monospace, monospace;
}

.packet-controls input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(98, 217, 255, 0.1);
}

.packet-route {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin-top: 32px;
}

.packet-stage {
  padding: 10px 8px;
  color: #8294a8;
  background: rgba(8, 15, 25, 0.8);
  border: 1px solid #1d3044;
  border-radius: 8px;
  cursor: pointer;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
  text-align: center;
  transition: 0.25s ease;
}

.packet-stage:hover,
.packet-stage:focus-visible,
.packet-stage.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(98, 217, 255, 0.1);
  outline: none;
  box-shadow: 0 0 18px rgba(98, 217, 255, 0.12);
}

.packet-stage small {
  display: block;
  margin-bottom: 4px;
  color: #526a82;
  font-size: 9px;
}

.packet-stage.is-complete {
  color: var(--green);
  border-color: rgba(110, 231, 183, 0.45);
}

.packet-visual {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 35px 0 24px;
}

.packet-device {
  display: grid;
  gap: 4px;
  min-width: 115px;
  padding: 13px;
  color: var(--accent);
  background: #0a1622;
  border: 1px solid rgba(98, 217, 255, 0.35);
  border-radius: 10px;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
  text-align: center;
}

.packet-device strong {
  color: var(--text);
  font-size: 11px;
}

.packet-server {
  color: #9b8cff;
  border-color: rgba(155, 140, 255, 0.4);
}

.packet-wire {
  position: relative;
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #9b8cff);
  box-shadow: 0 0 12px rgba(98, 217, 255, 0.35);
}

.packet-beam {
  position: absolute;
  top: -4px;
  left: 0;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 15px 5px var(--accent);
  opacity: 0;
}

.packet-beam.is-moving {
  opacity: 1;
  animation: packet-travel 2.2s ease-in-out;
}

@keyframes packet-travel {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100% - 10px)); }
}

.packet-detail {
  min-height: 155px;
  padding: 18px;
  background: #060b12;
  border: 1px solid #1d3044;
  border-radius: 10px;
}

.packet-detail-empty {
  color: #718198;
  font: 11px "JetBrains Mono", ui-monospace, monospace;
}

.packet-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.packet-detail-kicker {
  color: var(--accent);
  font: 10px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 1px;
}

.packet-detail h4 {
  margin: 7px 0;
  color: var(--text);
  font-size: 1.25rem;
}

.packet-detail p {
  color: #b7c8d8;
  font-size: 0.82rem;
}

.packet-headers {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #0c141f;
  border-radius: 7px;
  font: 10px/1.5 "JetBrains Mono", ui-monospace, monospace;
}

.packet-headers span {
  color: var(--muted);
}

.packet-headers strong {
  color: var(--accent);
  font-weight: 500;
}

.infrastructure-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(155, 140, 255, 0.08), transparent 34%),
    #0b0e17;
}

.infrastructure-lab {
  padding: clamp(22px, 4vw, 36px);
  background: linear-gradient(145deg, rgba(20, 24, 45, 0.96), rgba(7, 13, 22, 0.98));
  border: 1px solid rgba(155, 140, 255, 0.2);
  border-radius: 20px;
}

.infrastructure-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.infrastructure-header h3 {
  margin-top: 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.infra-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b7c8d8;
  cursor: pointer;
  font: 11px "JetBrains Mono", ui-monospace, monospace;
}

.infra-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.infra-toggle-track {
  position: relative;
  width: 38px;
  height: 20px;
  background: #172235;
  border: 1px solid #334964;
  border-radius: 20px;
  transition: 0.25s ease;
  pointer-events: none;
}

.infra-toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  background: #7890a9;
  border-radius: 50%;
  content: "";
  transition: 0.25s ease;
}

.infra-toggle input:checked + .infra-toggle-track {
  background: rgba(98, 217, 255, 0.2);
  border-color: var(--accent);
}

.infra-toggle input:checked + .infra-toggle-track::after {
  transform: translateX(18px);
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.infra-toggle input:focus-visible + .infra-toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.infra-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 28px 18px;
  min-height: 310px;
  margin-top: 32px;
  padding: 44px 20px 25px;
  background: rgba(5, 11, 19, 0.7);
  border: 1px solid #1d3044;
  border-radius: 12px;
}

.infra-flow-label {
  position: absolute;
  top: 17px;
  left: 20px;
  color: #61758d;
  font: 9px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 1.4px;
}

.infra-node {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 105px;
  padding: 13px 8px;
  color: #aac0d5;
  background: #0c1724;
  border: 1px solid #29415b;
  border-radius: 10px;
  cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  text-align: center;
  transition: 0.25s ease;
}

.infra-node:hover,
.infra-node:focus-visible,
.infra-node.is-active {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(98, 217, 255, 0.16);
}

.infra-node-icon {
  color: #9b8cff;
  font-size: 21px;
}

.infra-node strong {
  color: inherit;
  font-size: 11px;
}

.infra-node small {
  color: #718198;
  font-size: 9px;
}

.infra-internet { grid-column: 1 / 3; grid-row: 1; }
.infra-nsg { grid-column: 3 / 5; grid-row: 1; }
.infra-vm { grid-column: 5 / 7; grid-row: 1; }
.infra-firewalld { grid-column: 7 / 9; grid-row: 1; }
.infra-nginx { grid-column: 9 / 11; grid-row: 1; }
.infra-https { grid-column: 11 / 13; grid-row: 1; }
.infra-ssh { grid-column: 7 / 9; grid-row: 2; }

.infra-flow-line {
  position: absolute;
  z-index: 0;
  top: 50%;
  height: 2px;
  background: #29415b;
  transition: 0.25s ease;
}

.infra-flow-line::after {
  position: absolute;
  top: -4px;
  right: -1px;
  color: #29415b;
  content: "›";
  font-size: 15px;
}

.infra-flow-line.is-active {
  background: linear-gradient(90deg, var(--accent), #9b8cff);
  box-shadow: 0 0 10px rgba(98, 217, 255, 0.45);
}

.infra-flow-line.is-active::after {
  color: var(--accent);
}

.infra-flow-line-one { left: 16%; width: 7%; }
.infra-flow-line-two { left: 32%; width: 7%; }
.infra-flow-line-three { left: 48%; width: 7%; }
.infra-flow-line-four { left: 64%; width: 7%; }
.infra-flow-line-five { left: 80%; width: 7%; }

.infra-map.show-redirect::before {
  position: absolute;
  right: 28px;
  bottom: 17px;
  color: var(--green);
  content: "HTTP :80  →  301  →  HTTPS :443";
  font: 10px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.5px;
}

.infra-map.show-redirect .infra-nginx,
.infra-map.show-redirect .infra-https {
  border-color: var(--green);
  box-shadow: 0 0 22px rgba(110, 231, 183, 0.16);
}

.infra-detail {
  min-height: 180px;
  margin-top: 18px;
  padding: 18px;
  background: #060b12;
  border: 1px solid #1d3044;
  border-radius: 10px;
}

.infra-detail-empty {
  color: #718198;
  font: 11px "JetBrains Mono", ui-monospace, monospace;
}

.infra-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.infra-detail h4 {
  margin: 7px 0;
  color: var(--text);
  font-size: 1.25rem;
}

.infra-detail p {
  color: #b7c8d8;
  font-size: 0.82rem;
}

.infra-flow-copy {
  margin-top: 14px;
}

.infra-flow-copy strong {
  color: var(--accent);
}

.infra-ports {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.infra-port {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 10px;
  background: #0c141f;
  border-radius: 6px;
  font: 10px/1.4 "JetBrains Mono", ui-monospace, monospace;
}

.infra-port strong {
  color: var(--accent);
  white-space: nowrap;
}

.infra-port span {
  color: #9aacc0;
  text-align: right;
}

.skill-tree-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(98, 217, 255, 0.06), transparent 34%),
    #0b0e17;
}

.skill-tree-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.35;
  background-image: linear-gradient(rgba(98, 217, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(98, 217, 255, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

.skill-tree-toolbar,
.skill-tree-layout {
  position: relative;
  z-index: 1;
}

.skill-tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  color: var(--muted);
  font: 12px "JetBrains Mono", ui-monospace, monospace;
}

.tree-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--green);
}

.tree-reset {
  padding: 8px 12px;
  color: #b9c9d8;
  background: rgba(98, 217, 255, 0.05);
  border: 1px solid rgba(98, 217, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  transition: 0.2s ease;
}

.tree-reset span {
  margin-left: 5px;
  color: var(--accent);
  font-size: 16px;
}

.tree-reset:hover,
.tree-reset:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  outline: none;
  transform: translateY(-2px);
}

.skill-tree-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
}

.skill-tree-stage {
  position: relative;
  min-height: 820px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle, rgba(17, 29, 48, 0.7), rgba(7, 11, 19, 0.25) 63%);
  border: 1px solid rgba(98, 217, 255, 0.13);
  border-radius: 20px;
}

.skill-tree-stage::after {
  position: absolute;
  inset: 12%;
  z-index: -1;
  content: "";
  border: 1px dashed rgba(98, 217, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(98, 217, 255, 0.05);
}

.skill-tree-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.skill-tree-lines line {
  stroke: rgba(98, 217, 255, 0.2);
  stroke-width: 1;
  transition: 0.25s ease;
}

.skill-tree-lines line.branch-line {
  stroke: var(--branch-color, rgba(98, 217, 255, 0.2));
  stroke-dasharray: 4 5;
}

.skill-tree-lines line.is-active {
  stroke: var(--branch-color, var(--accent));
  stroke-width: 2;
  filter: drop-shadow(0 0 5px var(--branch-color, var(--accent)));
}

.skill-tree-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 144px;
  height: 144px;
  place-content: center;
  text-align: center;
  background: linear-gradient(145deg, #172b3b, #0b1826);
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(98, 217, 255, 0.05), 0 0 35px rgba(98, 217, 255, 0.35);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.core-orbit {
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(98, 217, 255, 0.3);
  border-radius: inherit;
  animation: tree-pulse 2.8s ease-out infinite;
}

.core-kicker,
.core-hint {
  color: var(--accent);
  font: 9px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 1px;
}

.core-hint {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0;
}

.skill-tree-core strong {
  margin: 4px 0;
  color: var(--text);
  font: 700 18px/1.05 "Space Grotesk", sans-serif;
}

@keyframes tree-pulse {
  0% { opacity: 0.8; transform: scale(0.94); }
  70%, 100% { opacity: 0; transform: scale(1.16); }
}

.tree-category {
  --category-color: var(--accent);
  position: absolute;
  z-index: 2;
  width: 190px;
  transform: translateX(-50%);
}

.tree-category[data-category="networking"] { --category-color: #62d9ff; left: 16%; top: 4%; }
.tree-category[data-category="systems"] { --category-color: #6ee7b7; left: 16%; top: 52%; }
.tree-category[data-category="cloud"] { --category-color: #9b8cff; left: 50%; top: 3%; }
.tree-category[data-category="security"] { --category-color: #ff6b81; left: 84%; top: 4%; }
.tree-category[data-category="automation"] { --category-color: #72a8ff; left: 84%; top: 52%; }
.tree-category[data-category="learning"] { --category-color: #ffb86b; left: 50%; top: 78%; }

.tree-category-button {
  position: relative;
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--category-color) 20%, #101722), #0c131e);
  border: 1px solid color-mix(in srgb, var(--category-color) 70%, transparent);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  cursor: pointer;
  text-align: left;
  transition: 0.25s ease;
}

.tree-category-button:hover,
.tree-category-button:focus-visible,
.tree-category.is-active .tree-category-button {
  background: linear-gradient(135deg, color-mix(in srgb, var(--category-color) 34%, #101722), #111b29);
  box-shadow: 0 0 22px color-mix(in srgb, var(--category-color) 25%, transparent);
  outline: none;
  transform: translateY(-3px);
}

.tree-category-button small {
  display: block;
  margin-bottom: 3px;
  color: var(--category-color);
  font: 9px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 1px;
}

.tree-category-button strong {
  display: block;
  font: 700 12px "Space Grotesk", sans-serif;
}

.tree-category-button span {
  position: absolute;
  top: 11px;
  right: 12px;
  color: var(--category-color);
  font-size: 12px;
}

.tree-skills {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
}

.tree-skill {
  padding: 5px 8px;
  overflow: hidden;
  color: #9eafbf;
  background: rgba(8, 13, 22, 0.88);
  border: 1px solid rgba(136, 158, 180, 0.16);
  border-radius: 5px;
  cursor: pointer;
  font: 10px/1.3 "JetBrains Mono", ui-monospace, monospace;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: 0.2s ease;
}

.tree-skill:hover,
.tree-skill:focus-visible,
.tree-skill.is-selected,
.tree-category.is-active .tree-skill {
  color: var(--text);
  border-color: color-mix(in srgb, var(--category-color) 65%, transparent);
  outline: none;
}

.tree-category:not(.is-active) .tree-skill {
  opacity: 0.72;
}

.tree-category.is-dimmed {
  opacity: 0.35;
  filter: saturate(0.55);
}

.tree-category.is-dimmed:hover,
.tree-category.is-dimmed:focus-within {
  opacity: 0.7;
}

.skill-tree-panel {
  align-self: center;
  min-height: 310px;
  padding: 22px;
  background: linear-gradient(145deg, rgba(16, 23, 34, 0.96), rgba(8, 13, 21, 0.96));
  border: 1px solid rgba(98, 217, 255, 0.14);
  border-radius: 16px;
}

.tree-panel-empty,
.tree-panel-content {
  display: grid;
  align-content: center;
  min-height: 266px;
}

.panel-terminal {
  margin-bottom: 18px;
  color: var(--accent);
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.skill-tree-panel h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.skill-tree-panel p {
  color: var(--muted);
  font-size: 0.84rem;
}

.tree-panel-kicker {
  color: var(--category-color, var(--accent));
  font: 10px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 1px;
}

.tree-panel-status {
  display: inline-block;
  width: max-content;
  margin: 15px 0 12px;
  padding: 4px 8px;
  color: var(--category-color, var(--accent));
  background: color-mix(in srgb, var(--category-color, var(--accent)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--category-color, var(--accent)) 35%, transparent);
  border-radius: 999px;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
}

.tree-panel-meta {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
}

.tree-panel-meta strong {
  display: block;
  margin-bottom: 2px;
  color: #dce8f2;
  font-size: 0.7rem;
}

section {
  padding: 92px 0;
}

h1,
h2,
h3,
.logo,
.btn,
.hero h2 {
  font-family: "Space Grotesk", Inter, ui-sans-serif, sans-serif;
}

h1,
h2,
h3 {
  font-weight: 700;
}

.hero h2 {
  letter-spacing: -0.45px;
}

.section-title {
  font-weight: 700;
}

.section-sub,
.hero p,
.about-card p,
.skill-card p,
.project p,
.bullets,
.edu p {
  font-family: "Inter", ui-sans-serif, sans-serif;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 34px;
}

.section-title {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -1px;
}

.section-sub {
  margin-top: 7px;
  color: var(--muted);
}

.section-kicker {
  color: var(--accent);
  font: 11px "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 1.4px;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 18px;
}

.about-card,
.focus-card,
.card {
  background: linear-gradient(145deg, rgba(16, 23, 34, 0.97), rgba(11, 16, 25, 0.97));
  border: 1px solid var(--border);
  border-radius: 16px;
}

.about-card {
  padding: 29px;
}

.about-card p {
  max-width: 900px;
  color: #c5cfdb;
}

.focus-card {
  padding: 24px;
}

.focus-title {
  margin-bottom: 17px;
  font-weight: 800;
}

.focus-list {
  display: grid;
  gap: 12px;
}

.focus-item {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.focus-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.skill-card {
  position: relative;
  min-height: 205px;
  overflow: hidden;
  padding: 21px;
}

.skill-card::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 100px;
  height: 100px;
  background: rgba(98, 217, 255, 0.055);
  border-radius: 50%;
}

.skill-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 11px;
  font: 700 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.skill-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.skill-card p {
  min-height: 52px;
  color: var(--muted);
  font-size: 0.86rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.tag {
  padding: 4px 9px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.73rem;
}

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

.project {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 0;
  overflow: hidden;
  transition: 0.2s;
}

.project:hover {
  transform: translateY(-4px);
  border-color: #304057;
}

.project-visual {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #0c1522, #111a2a);
  border-bottom: 1px solid var(--border);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 23px;
}

.project .num {
  margin-bottom: 9px;
  color: var(--accent);
  font: 11px "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 1px;
}

.project h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.project p {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-points {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding-left: 17px;
  color: #c5cfdb;
  font-size: 0.84rem;
}

.project .tags {
  margin-top: auto;
  padding-top: 17px;
}

.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
}

.node {
  padding: 7px 10px;
  color: #cbd5e1;
  background: #0b111b;
  border: 1px solid #2b3a50;
  border-radius: 8px;
  font: 10px "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.node.hot {
  color: var(--accent);
  border-color: #356276;
}

.arrow {
  color: #607086;
  font-size: 12px;
}

.server-stack {
  display: flex;
  align-items: end;
  gap: 9px;
}

.server {
  position: relative;
  width: 62px;
  height: 65px;
  padding: 8px;
  background: #0b111b;
  border: 1px solid #2b3a50;
  border-radius: 7px;
}

.server::before,
.server::after {
  display: block;
  height: 5px;
  margin-bottom: 7px;
  content: "";
  border: 1px solid #33445a;
  border-radius: 2px;
}

.server-label {
  color: #778397;
  font: 8px "JetBrains Mono", ui-monospace, monospace;
}

.switch {
  position: relative;
  width: 82px;
  height: 35px;
  background: #0b111b;
  border: 1px solid #35506a;
  border-radius: 7px;
}

.switch i {
  position: absolute;
  top: 14px;
  display: block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.switch i:nth-child(1) { left: 10px; }
.switch i:nth-child(2) { left: 23px; }
.switch i:nth-child(3) { left: 36px; }
.switch i:nth-child(4) { left: 49px; }
.switch i:nth-child(5) { left: 62px; }

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

.edu {
  padding: 25px;
}

.edu-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
}

.edu-year {
  color: var(--accent);
  font: 11px ui-monospace, monospace;
  white-space: nowrap;
}

.edu h3 {
  font-size: 1.08rem;
}

.edu p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact {
  padding-bottom: 105px;
  text-align: center;
}

.contact p {
  max-width: 650px;
  margin: 10px auto 25px;
  color: var(--muted);
}

.contact-actions {
  justify-content: center;
}

footer {
  padding: 24px 0;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}

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

@media (max-width: 950px) {
  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 40px;
  }
}

@media (max-width: 800px) {
  .hero-grid,
  .project-grid,
  .edu-grid {
    grid-template-columns: 1fr;
  }

  .subnet-arena-grid {
    grid-template-columns: 1fr;
  }

  .server-challenge-grid {
    grid-template-columns: 1fr;
  }

  .server-terminal-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .hero-grid {
    gap: 40px;
  }

  .section-head {
    display: block;
  }

  .section-kicker {
    margin-top: 10px;
  }

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

  .skill-tree-stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
    padding: 18px;
    overflow: visible;
    background: none;
  }

  .skill-tree-stage::after,
  .skill-tree-lines {
    display: none;
  }

  .skill-tree-core {
    position: relative;
    top: auto;
    left: auto;
    grid-column: 1 / -1;
    width: 126px;
    height: 126px;
    margin: 0 auto 10px;
    transform: none;
  }

  .tree-category {
    position: relative;
    top: auto !important;
    left: auto !important;
    width: auto;
    transform: none;
  }

  .tree-category.is-dimmed {
    opacity: 0.35;
  }

  .tree-category-button:hover,
  .tree-category-button:focus-visible,
  .tree-category.is-active .tree-category-button {
    transform: none;
  }

  .skill-tree-panel {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .links {
    display: none;
  }

  section {
    padding: 72px 0;
  }

  .hero {
    padding: 55px 0;
  }

  h1 {
    font-size: 3.2rem;
    letter-spacing: -2.5px;
  }

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

  .about-card,
  .focus-card {
    padding: 21px;
  }

  .project-visual {
    height: 105px;
  }

  .terminal.is-visible {
    right: 16px;
    bottom: 16px;
  }

  .subnet-arena-header,
  .subnet-result-heading {
    display: block;
  }

  .subnet-scoreboard {
    margin-top: 16px;
  }

  .subnet-result-cidr {
    display: block;
    margin-top: 8px;
  }

  .subnet-input-row,
  .subnet-challenge-actions,
  .server-challenge-actions {
    flex-direction: column;
  }

  .subnet-action {
    width: 100%;
  }

  .server-challenge-header {
    display: block;
  }

  .server-scoreboard {
    margin-top: 16px;
    text-align: left;
  }

  .packet-lab-header,
  .packet-controls {
    display: block;
  }

  .packet-controls {
    margin-top: 18px;
  }

  .packet-controls label {
    margin-bottom: 8px;
  }

  .packet-controls input {
    width: 100%;
  }

  .packet-controls .subnet-action {
    width: 100%;
    margin-top: 8px;
  }

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

  .packet-visual {
    gap: 8px;
  }

  .packet-device {
    min-width: 88px;
    padding: 10px 6px;
  }

  .packet-detail-grid {
    grid-template-columns: 1fr;
  }

  .infrastructure-header {
    display: block;
  }

  .infra-toggle {
    margin-top: 18px;
  }

  .infra-map {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    gap: 12px;
    min-height: 0;
    padding: 45px 12px 45px;
  }

  .infra-node,
  .infra-internet,
  .infra-nsg,
  .infra-vm,
  .infra-firewalld,
  .infra-nginx,
  .infra-https,
  .infra-ssh {
    grid-column: auto;
    grid-row: auto;
  }

  .infra-flow-line {
    display: none;
  }

  .infra-map.show-redirect::before {
    right: 12px;
    bottom: 14px;
    font-size: 8px;
  }

  .infra-detail-grid {
    grid-template-columns: 1fr;
  }

  .infra-port {
    display: grid;
    gap: 3px;
  }

  .infra-port span {
    text-align: left;
  }

  .subnet-binary {
    padding: 10px 8px;
  }

  .subnet-bit {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-screen,
  .boot-line {
    transition: none;
  }

  .boot-cursor {
    animation: none;
  }

  .boot-window::before {
    animation: none;
  }
}
