:root {
  --ink: #050914;
  --bg-deep: #08101f;
  --bg-mid: #142747;
  --panel: #16253d;
  --panel-alt: #213458;
  --text: #ecf0f7;
  --muted: #a8b4c7;
  --gold: #eed94e;
  --olive: #738b2c;
  --navy: #123f78;
  --skin: #efad79;
  --border-bright: #f6f9ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "VT323", "Courier New", monospace;
  font-size: 23px;
  line-height: 1.06;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(237, 212, 77, 0.16), transparent 30%),
    radial-gradient(circle at 76% 26%, rgba(18, 63, 120, 0.28), transparent 32%),
    linear-gradient(160deg, var(--bg-mid), var(--bg-deep));
  position: relative;
  padding: 26px;
  display: grid;
  justify-items: center;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.15;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.12) 0,
    rgba(255, 255, 255, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
}

.hud {
  width: min(100%, 1040px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 14px;
  color: var(--gold);
  background: rgba(5, 9, 20, 0.9);
  border: 3px solid var(--gold);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.pixel-button {
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--gold);
  color: var(--ink);
  padding: 8px 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
}

.pixel-button:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}

.resume-sheet {
  width: min(100%, 1040px);
  background: linear-gradient(180deg, rgba(8, 16, 31, 0.86), rgba(15, 24, 45, 0.94));
  border: 4px solid var(--gold);
  box-shadow:
    0 0 0 4px var(--ink),
    10px 10px 0 rgba(5, 9, 20, 0.65);
  padding: 20px;
  display: grid;
  gap: 14px;
}

.pixel-panel {
  background: linear-gradient(160deg, var(--panel), var(--panel-alt));
  border: 3px solid var(--ink);
  box-shadow:
    inset 0 0 0 2px rgba(246, 249, 255, 0.2),
    5px 5px 0 rgba(5, 9, 20, 0.8);
}

.hero {
  display: grid;
  grid-template-columns: 176px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.avatar-wrap {
  position: relative;
  border: 3px solid var(--gold);
  padding: 6px;
  background: rgba(7, 13, 26, 0.9);
  min-height: 176px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  image-rendering: pixelated;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.avatar-caption {
  position: absolute;
  top: 10px;
  left: 10px;
  margin: 0;
  padding: 2px 4px;
  border: 2px solid var(--ink);
  background: rgba(115, 139, 44, 0.95);
  color: var(--ink);
  font-family: "Press Start 2P", monospace;
  font-size: 7px;
  line-height: 1.2;
}

.avatar-level {
  position: static;
  margin: 0;
  padding: 5px 6px 5px;
  border: 2px solid rgba(238, 217, 78, 0.45);
  background: rgba(5, 9, 20, 0.88);
}

.avatar-level__label {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: var(--skin);
}

.avatar-level__value {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.02;
}

.identity {
  display: grid;
  align-content: start;
  gap: 4px;
}

.chip {
  margin: 0;
  justify-self: start;
  padding: 4px 8px;
  border: 2px solid var(--ink);
  background: var(--olive);
  color: var(--ink);
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  line-height: 1.35;
  color: var(--gold);
}

h1 {
  font-size: clamp(20px, 3vw, 30px);
}

.title {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(9px, 1.35vw, 12px);
  color: var(--skin);
}

.tagline,
.contact {
  margin: 0;
  color: var(--text);
}

.contact {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.section {
  padding: 14px 14px 10px;
}

.section h2 {
  font-size: 13px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(238, 217, 78, 0.45);
}

.stats-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
}

.stats-grid div {
  border: 2px solid rgba(238, 217, 78, 0.35);
  padding: 8px;
  background: rgba(5, 9, 20, 0.4);
}

.stats-grid dt {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  color: var(--skin);
  margin-bottom: 4px;
}

.stats-grid dd {
  margin: 0;
}

.stats-products {
  margin: 4px 0 0;
  padding-left: 14px;
}

.stats-products li {
  margin: 1px 0;
}

.quest-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quest-list article {
  border: 2px solid rgba(246, 249, 255, 0.16);
  background: rgba(5, 9, 20, 0.35);
  padding: 8px;
}

h3 {
  font-size: 11px;
  margin-bottom: 4px;
}

.project-link {
  margin: 0 0 4px;
  color: var(--muted);
}

.project-link a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px dotted rgba(238, 217, 78, 0.7);
}

.project-link a:hover {
  color: #fff8bf;
}

ul {
  margin: 6px 0 0;
  padding-left: 16px;
}

li {
  margin: 2px 0;
}

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

.experience-card {
  border: 2px solid rgba(246, 249, 255, 0.18);
  background: rgba(5, 9, 20, 0.35);
  padding: 8px;
}

.experience-card h3 {
  font-size: 11px;
  margin-bottom: 4px;
}

.experience-meta {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.experience-card ul {
  margin-top: 4px;
}

.experience-label {
  margin: 7px 0 2px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: var(--gold);
}

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

.skill-node {
  border: 2px solid rgba(238, 217, 78, 0.3);
  background: rgba(5, 9, 20, 0.35);
  padding: 7px;
}

.skill-node h4 {
  font-size: 9px;
  margin-bottom: 4px;
  color: var(--skin);
}

.skill-node ul {
  margin-top: 0;
  padding-left: 14px;
}

.skill-node li {
  margin: 1px 0;
}

@media (max-width: 920px) {
  body {
    padding: 14px;
  }

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

  .avatar-wrap {
    width: min(240px, 100%);
    justify-self: center;
    min-height: auto;
  }

  .quest-list,
  .experience-grid,
  .skill-columns {
    grid-template-columns: 1fr;
  }

  .contact {
    font-size: 18px;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0.16in;
  }

  body {
    background: #08101f;
    padding: 0;
    font-size: 10.4px;
    line-height: 1.05;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body::before {
    display: none;
  }

  .no-print {
    display: none;
  }

  .resume-sheet {
    width: 100%;
    border-width: 2px;
    box-shadow: none;
    padding: 6px;
    gap: 5px;
    display: grid;
    grid-template-columns: 1.42fr 1fr;
    align-items: stretch;
  }

  .resume-sheet > .hero {
    grid-column: 1;
    align-self: stretch;
    min-height: 132px;
  }

  .resume-sheet > section:nth-of-type(2) {
    grid-column: 2;
    align-self: stretch;
    min-height: 132px;
    display: grid;
    grid-template-rows: auto 1fr;
  }

  .resume-sheet > section:nth-of-type(n + 3) {
    grid-column: 1 / -1;
  }

  .pixel-panel {
    box-shadow: inset 0 0 0 2px rgba(246, 249, 255, 0.15);
    break-inside: avoid;
  }

  .hero {
    grid-template-columns: 104px 1fr;
    align-items: center;
    gap: 6px;
    padding: 6px;
    height: 100%;
  }

  .avatar-wrap {
    padding: 3px;
    min-height: auto;
    gap: 2px;
  }

  .avatar-caption {
    display: none;
  }

  .avatar-level {
    display: block;
    position: static;
    margin: 0;
    padding: 2px 3px;
  }

  .avatar-level__label {
    font-size: 6px;
  }

  .avatar-level__value {
    font-size: 9px;
    margin-top: 1px;
  }

  .section {
    padding: 5px;
  }

  .section h2 {
    font-size: 10px;
    margin-bottom: 3px;
    padding-bottom: 2px;
  }

  .resume-sheet > section:nth-of-type(2) .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    height: 100%;
    align-content: stretch;
  }

  .resume-sheet > section:nth-of-type(2) .stats-grid > div {
    min-height: 40px;
  }

  .quest-list,
  .experience-grid,
  .skill-columns {
    gap: 5px;
  }

  .quest-list,
  .experience-grid {
    align-content: start;
  }

  .stats-grid {
    gap: 4px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stats-grid div,
  .quest-list article,
  .experience-card,
  .skill-node {
    padding: 3px;
    break-inside: avoid;
  }

  .stats-grid dt {
    font-size: 7px;
    margin-bottom: 1px;
  }

  h1 {
    font-size: 16px;
    line-height: 1.08;
  }

  .chip {
    font-size: 6px;
    padding: 2px 4px;
  }

  .title {
    font-size: 8.4px;
  }

  .tagline {
    display: block;
    font-size: 9px;
  }

  h3 {
    font-size: 9.6px;
    margin-bottom: 2px;
  }

  .project-link {
    margin: 0 0 2px;
    font-size: 8.2px;
  }

  .quest-list article,
  .experience-card {
    font-size: 9.8px;
    line-height: 1.07;
  }

  .quest-list article li,
  .experience-card li {
    margin: 1px 0;
  }

  .experience-card h3 {
    font-size: 9.6px;
  }

  .experience-label {
    font-size: 7.2px;
    margin: 3px 0 1px;
  }

  .skill-node h4 {
    font-size: 8.4px;
    margin-bottom: 2px;
  }

  .resume-sheet > section:last-of-type {
    padding-top: 4px;
    padding-bottom: 2px;
  }

  .resume-sheet > section:last-of-type h2 {
    margin-bottom: 2px;
  }

  .resume-sheet > section:last-of-type .skill-columns {
    gap: 3px;
    align-content: start;
  }

  .resume-sheet > section:last-of-type .skill-node {
    padding: 2px;
  }

  .resume-sheet > section:last-of-type .skill-node ul {
    margin-top: 1px;
    padding-left: 10px;
  }

  ul {
    margin: 3px 0 0;
    padding-left: 12px;
  }

  li {
    margin: 0;
  }

  body,
  .contact,
  .experience-meta {
    font-size: 9.5px;
    line-height: 1.04;
  }
}
