/* ==========================================================================
   Ansh Kataria — Pokédex portfolio
   A single stylesheet, built from scratch as a literal Pokédex device:
   red plastic shell -> dark CRT screen -> scrolling content -> control deck.
   ========================================================================== */

/* ---------- Tokens: real, bright Pokédex colors ---------- */
:root {
  --red: #ee1515;
  --red-dark: #b30000;
  --red-light: #ff4b3e;
  --cream: #fff8e8;
  --black: #17130f;
  --charcoal: #17130f;

  --bg: #eaf4fb;
  --bg-2: #ffffff;
  --bg-3: #dcedf9;

  --text: #12202c;
  --text-2: #3c5265;
  --text-3: #75899a;

  --border: rgba(18, 32, 44, 0.14);
  --border-2: rgba(18, 32, 44, 0.26);

  --blue: #1f7bc9;
  --green: #1fa855;
  --amber: #e79a0e;
  --purple: #8a4fd1;
  --pink: #ea3f8f;

  --font-pixel: "Press Start 2P", "VT323", monospace;
  --font-crt: "VT323", "IBM Plex Mono", monospace;

  --radius: 10px;
  --radius-sm: 5px;
  --shadow: 4px 4px 0 var(--black);
  --shadow-lg: 6px 6px 0 var(--black);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}
ul,
ol {
  list-style: none;
}

body {
  background: var(--red);
  color: var(--text);
  font-family: var(--font-crt);
  min-height: 100vh;
  overflow-x: hidden;
}

@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body.cursor-ready,
  body.cursor-ready * {
    cursor: none;
  }
}

/* ---------- Device shell: full-bleed red bezel framing the screen on all sides ---------- */
.device {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(155deg, var(--red-light) 0%, var(--red) 18%, var(--red-dark) 100%);
  padding: 0 clamp(10px, 2vw, 18px);
  display: flex;
  flex-direction: column;
}

.device-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(16px, 3vw, 28px);
}
.lights {
  display: flex;
  align-items: center;
  gap: 9px;
}
.light {
  border-radius: 50%;
  border: 3px solid var(--black);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35);
}
.light-big {
  width: 30px;
  height: 30px;
  background: radial-gradient(circle at 35% 30%, #eafcff, var(--blue) 55%, #0d6fa8 100%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 0 12px rgba(31, 123, 201, 0.75);
}
.light-sm {
  width: 12px;
  height: 12px;
}
.light-red {
  background: var(--red-light);
}
.light-yellow {
  background: var(--amber);
}
.light-green {
  background: var(--green);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 0 8px rgba(31, 168, 85, 0.7);
}
@media (prefers-reduced-motion: no-preference) {
  .light-big,
  .light-green {
    animation: pulse 2.6s ease-in-out infinite;
  }
}
.device-title {
  font-family: var(--font-pixel);
  color: var(--cream);
  font-size: clamp(11px, 1.6vw, 14px);
  letter-spacing: 0.12em;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}
.grille {
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(3, 6px);
  gap: 5px;
}
.grille span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
}
@media (max-width: 640px) {
  .grille {
    display: none;
  }
}

/* ---------- Screen ---------- */
.screen {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 6px solid var(--black);
  box-shadow: inset 0 8px 22px rgba(18, 32, 44, 0.08);
}
.screen > main {
  flex: 1;
}

/* ---------- Nav ---------- */
.screen-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 3px solid var(--black);
}
.brand {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--text);
}
.brand span {
  color: var(--red-light);
}
.sound-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 26px;
  margin-left: auto;
  border: 2px solid var(--black);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.sound-toggle:hover {
  box-shadow: 2px 2px 0 var(--border-2);
  transform: translate(-1px, -1px);
}
.sound-icon {
  position: relative;
  width: 13px;
  height: 10px;
}
.sound-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 6px;
  height: 8px;
  background: var(--text);
  clip-path: polygon(0 25%, 40% 25%, 100% 0, 100% 100%, 40% 75%, 0 75%);
}
.sound-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  width: 6px;
  height: 10px;
  border: 2px solid var(--text);
  border-left: none;
  border-radius: 0 10px 10px 0;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.sound-toggle[aria-pressed="false"] .sound-icon::after {
  opacity: 0.2;
}
.sound-toggle[aria-pressed="false"] .sound-icon::before {
  opacity: 0.55;
}

.nav-toggle {
  display: none;
  margin-left: 10px;
  width: 30px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  margin-left: auto;
}
.nav-links a {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.03em;
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}
.nav-cta {
  background: var(--black) !important;
  color: var(--cream) !important;
  border: 2px solid var(--cream);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.nav-cta:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 20px 20px;
    background: var(--bg-2);
    border-bottom: 3px solid var(--black);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }
  .nav-links.is-open {
    max-height: 420px;
    padding: 14px 20px 20px;
  }
  .nav-links a {
    padding: 8px 0;
    font-size: 11px;
    width: 100%;
  }
  .nav-cta {
    margin-top: 6px;
  }
}

/* ---------- Generic type ---------- */
main {
  padding: 0 clamp(16px, 4vw, 40px);
}
section {
  padding: clamp(48px, 8vw, 90px) 0;
  scroll-margin-top: 84px;
}
h1,
h2,
h3 {
  font-family: var(--font-pixel);
  color: var(--text);
  font-weight: 400;
}
p {
  font-family: var(--font-crt);
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-2);
}
.kicker {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--green);
  border: 2px solid var(--border-2);
  background: var(--bg-2);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}
.section-head h2 {
  margin-top: 10px;
  font-size: clamp(19px, 2.6vw, 27px);
}
.section-link,
.section-sub {
  font-family: var(--font-crt);
  color: var(--blue);
  font-size: 17px;
}
.section-sub {
  color: var(--text-2);
  margin: -14px 0 26px;
}

/* ---------- Buttons ---------- */
.btn[hidden] {
  display: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 13px 18px;
  border: 2px solid var(--black);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn:hover,
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--black);
}
.btn-primary {
  background: var(--blue);
  color: var(--black);
}
.btn-ghost {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--border-2);
}
.btn-scan {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--border-2);
}
.btn-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-sm {
  font-size: 9px;
  padding: 10px 14px;
}
.btn img {
  width: 14px;
  height: 14px;
}
.chev {
  display: inline-block;
  transition: transform 0.2s ease;
}
.entry.is-open .chev {
  transform: rotate(180deg);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
  padding-top: clamp(40px, 7vw, 76px);
}
.eyebrow {
  font-size: 20px;
  color: var(--text-2);
}
h1 {
  font-size: clamp(24px, 4.2vw, 42px);
  line-height: 1.4;
  margin: 16px 0;
}
h1 em {
  font-style: normal;
  color: var(--blue);
}
.hero-desc {
  font-size: 20px;
  color: var(--text-2);
}
.hero-award {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 12px;
  border: 1px solid var(--amber);
  border-radius: var(--radius-sm);
  background: rgba(230, 168, 23, 0.12);
  font-family: var(--font-crt);
  font-size: 14px;
  color: var(--text-2);
  width: fit-content;
}
.hero-degree {
  font-size: 17px;
  color: var(--text-3);
  margin-top: 8px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 2px dashed var(--border);
}
.stat-strip-item span {
  display: block;
  font-family: var(--font-pixel);
  font-size: 7.5px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.stat-strip-item strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-crt);
  font-size: 18px;
  color: var(--text);
  font-weight: 400;
}
.stat-strip-item img {
  height: 14px;
  width: auto;
}

/* ---------- ID card ---------- */
.id-card {
  position: relative;
  background: var(--bg-2);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
}
.id-card::before,
.id-card::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-2);
}
.id-card::before {
  left: 10px;
}
.id-card::after {
  right: 10px;
}
.id-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-3);
}
.id-card-head em {
  display: flex;
  align-items: center;
  gap: 6px;
  font-style: normal;
  color: var(--green);
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
@media (prefers-reduced-motion: no-preference) {
  .dot {
    animation: pulse 2s ease-in-out infinite;
  }
}
.id-card-photo {
  width: 60px;
  height: 60px;
  margin: 18px auto 14px;
  border: 3px solid var(--black);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eafcff, var(--blue) 60%, #0d6fa8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.id-card-photo span {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--black);
}
.id-card-rows div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
}
.id-card-rows dt {
  font-family: var(--font-pixel);
  font-size: 7.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  align-self: center;
}
.id-card-rows dd {
  font-family: var(--font-crt);
  font-size: 17px;
  color: var(--text);
  text-align: right;
}
.id-card-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.stat-bar {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 10px;
}
.stat-bar span {
  font-family: var(--font-pixel);
  font-size: 7.5px;
  color: var(--text-3);
}
.stat-bar .bar {
  height: 10px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--bg-3);
  overflow: hidden;
}
.stat-bar .bar i {
  display: block;
  width: var(--fill, 50%);
  height: 100%;
  background: var(--bar, var(--blue));
  border-radius: 999px;
}
.stat-line {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: baseline;
  gap: 10px;
}
.stat-line span {
  font-family: var(--font-pixel);
  font-size: 7.5px;
  color: var(--text-3);
}
.stat-line strong {
  font-family: var(--font-crt);
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}
.id-card-moves {
  margin-top: 16px;
}
.id-card-label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 7.5px;
  color: var(--text-3);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.move-chips span {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 5px 9px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-crt);
  font-size: 14px;
  color: var(--text-2);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Project entries ---------- */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.entry {
  position: relative;
  background: var(--bg-2);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 3vw, 28px);
}
.entry::before,
.entry::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-2);
}
.entry::before {
  left: 10px;
}
.entry::after {
  right: 10px;
}
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.entry-id {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.entry-no {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--a, var(--blue));
}
.entry-type {
  font-family: var(--font-crt);
  font-size: 15px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-pill {
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 2px solid;
  white-space: nowrap;
}
.status-shipped {
  color: var(--purple);
  border-color: var(--purple);
  background: rgba(138, 79, 209, 0.12);
}
.status-research {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(31, 123, 201, 0.12);
}
.entry h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.entry > p {
  max-width: 74ch;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-crt);
  font-size: 14px;
  color: var(--text-2);
}
.chip img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.entry-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.entry-note {
  font-family: var(--font-crt);
  font-size: 14px;
  color: var(--text-3);
  margin-top: 10px;
}

.entry-scan {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.35s ease;
}
.entry.is-open .entry-scan {
  max-height: 1000px;
  opacity: 1;
  margin-top: 20px;
}
.scan-label {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-3);
  margin: 18px 0 12px;
}
.entry-scan .scan-label:first-child {
  margin-top: 4px;
}
.diagram-frame {
  position: relative;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}
.diagram-frame img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 760px) {
  .diagram-frame {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .diagram-frame img {
    width: 1300px;
    max-width: none;
  }
}
.diagram-placeholder {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  font-family: var(--font-crt);
  font-size: 14px;
  color: var(--text-3);
  text-align: center;
  padding: 24px;
}
.diagram-frame.diagram-missing img {
  display: none;
}
.diagram-frame.diagram-missing .diagram-placeholder {
  display: flex;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.metric-row-sm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metric-row div {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.metric-row strong {
  display: block;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--text);
  margin-bottom: 6px;
}
.metric-row span {
  font-family: var(--font-crt);
  font-size: 13px;
  color: var(--text-3);
}
@media (max-width: 760px) {
  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Playground / lab ---------- */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.lab-item {
  background: var(--bg-2);
  border: 2px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.lab-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lab-no {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-3);
}
.lab-row strong {
  font-family: var(--font-crt);
  font-size: 19px;
  color: var(--text);
  font-weight: 400;
}
.lab-tag {
  margin-left: auto;
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--green);
  border: 1px solid var(--border-2);
  padding: 4px 7px;
  border-radius: 999px;
}
.lab-stack {
  margin-top: 8px;
  font-family: var(--font-crt);
  font-size: 14px;
  color: var(--text-3);
}
@media (max-width: 760px) {
  .lab-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Skills / stats panel ---------- */
.stats-panel {
  position: relative;
  background: var(--bg-2);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 3vw, 30px);
}
.stats-panel::before,
.stats-panel::after,
.uplink-card::before,
.uplink-card::after,
.resume-card::before,
.resume-card::after,
.contact-panel::before,
.contact-panel::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-2);
}
.stats-panel::before,
.uplink-card::before,
.resume-card::before,
.contact-panel::before {
  left: 10px;
}
.stats-panel::after,
.uplink-card::after,
.resume-card::after,
.contact-panel::after {
  right: 10px;
}
.radar-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0 22px;
}
#radar {
  width: min(100%, 420px);
  height: auto;
}
.radar-grid {
  fill: none;
  stroke: var(--border-2);
  stroke-width: 1;
}
.radar-shape {
  fill: color-mix(in srgb, var(--blue) 18%, transparent);
  stroke: var(--blue);
  stroke-width: 2;
}
.radar-dot {
  fill: var(--blue);
  stroke: var(--bg-2);
  stroke-width: 2;
}
.radar-label {
  font-family: var(--font-crt);
  font-size: 13px;
  fill: var(--text-2);
  text-anchor: middle;
}
.stat-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1000px) {
  .stat-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.stat-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color 0.2s ease;
}
.stat-col.is-focused {
  border-color: var(--blue);
}
.stat-col-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.tech-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.tech-list span {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-crt);
  font-size: 16px;
  color: var(--text-2);
}
.tech-list img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.tool-strip {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-family: var(--font-crt);
  font-size: 15px;
  color: var(--text-3);
}
.tool-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tool-strip img {
  width: 14px;
  height: 14px;
}
@media (max-width: 760px) {
  .stat-cols {
    grid-template-columns: 1fr;
  }
}

/* ---------- Timeline / log ---------- */
.log {
  display: flex;
  flex-direction: column;
}
.log-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 20px;
}
.log-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.log-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--black);
  background: var(--text-3);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.log-dot-work {
  background: var(--green);
  box-shadow: 0 0 8px rgba(31, 168, 85, 0.6);
}
.log-dot-studio {
  background: var(--purple);
}
.log-dot-eng {
  background: var(--blue);
}
.log-dot-edu {
  background: var(--amber);
}
.log-dot-research {
  background: var(--red);
}
.log-line {
  flex: 1;
  width: 2px;
  background: var(--border-2);
  margin-top: 6px;
  min-height: 30px;
}
.log-body {
  padding-bottom: 36px;
}
.log-date {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-3);
  margin-bottom: 10px;
}
.log-org {
  display: flex;
  align-items: center;
  gap: 12px;
}
.log-org img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--cream);
  padding: 3px;
}
.log-org strong {
  font-family: var(--font-crt);
  font-size: 21px;
  color: var(--text);
  font-weight: 400;
}
.log-body > p {
  margin-top: 6px;
}
.log-eyebrow {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--purple);
  margin-top: 6px;
  letter-spacing: 0.04em;
}
.log-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.log-panel {
  background: var(--bg-2);
  border: 2px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.log-course {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-3);
}
.log-panel h3,
.log-body h3 {
  font-family: var(--font-crt);
  font-size: 21px;
  color: var(--text);
  margin-top: 8px;
  font-weight: 400;
}
.log-project {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--blue);
  margin-top: 8px;
}
.log-panel > p,
.log-body > .log-project + p {
  margin-top: 8px;
  font-size: 17px;
}
.step-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.step-chain span {
  font-family: var(--font-crt);
  font-size: 13px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-3);
}
.entry-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-crt);
  font-size: 16px;
  color: var(--blue);
}
@media (max-width: 760px) {
  .log-dual {
    grid-template-columns: 1fr;
  }
}

/* ---------- Activity uplink ---------- */
.uplink-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.uplink-card {
  position: relative;
  background: var(--bg-2);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
}
.uplink-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.uplink-icon {
  width: 20px;
  height: 20px;
}
.uplink-head h3 {
  font-size: 13px;
}
.live-pill {
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 4px 7px;
  border-radius: 999px;
}
.uplink-head a {
  margin-left: auto;
  font-family: var(--font-crt);
  font-size: 15px;
  color: var(--blue);
}
.heatmap {
  overflow-x: auto;
  padding-bottom: 4px;
}
.loading-text {
  font-size: 14px;
  color: var(--text-3);
}
.uplink-meta {
  display: flex;
  gap: 26px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.uplink-meta strong {
  display: block;
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--text);
  font-weight: 400;
}
.uplink-meta span {
  font-family: var(--font-crt);
  font-size: 13px;
  color: var(--text-3);
}
@media (max-width: 760px) {
  .uplink-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Resume ---------- */
.resume-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  background: var(--bg-2);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}
.resume-left {
  display: flex;
  align-items: center;
  gap: 18px;
}
.resume-icon {
  width: 46px;
  height: 56px;
  border: 2px solid var(--border-2);
  border-radius: 5px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
  flex-shrink: 0;
}
.resume-icon span {
  height: 2px;
  background: var(--text-3);
}
.resume-left h3 {
  font-size: 13px;
}
.resume-left p {
  font-size: 15px;
  color: var(--text-3);
  margin-top: 6px;
}
.resume-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Contact ---------- */
.contact-panel {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  background: var(--bg-2);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px;
}
.contact-info .id-card-rows {
  margin-bottom: 18px;
  min-width: 260px;
}
.contact-info .id-card-label {
  margin-bottom: 10px;
}
.interest-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.interest-list li {
  display: flex;
  gap: 12px;
  font-size: 16px;
  color: var(--text-2);
}
.interest-list span {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-3);
}
.contact-cta {
  font-size: 11px;
}
.link-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.link-card {
  display: block;
  background: var(--bg-2);
  border: 2px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 18px;
  transition: border-color 0.15s ease;
}
.link-card:hover {
  border-color: var(--blue);
}
.link-card span {
  display: block;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-3);
  margin-bottom: 10px;
}
.link-card strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-crt);
  font-size: 18px;
  color: var(--text);
  font-weight: 400;
}
@media (max-width: 760px) {
  .contact-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .link-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.screen-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px clamp(16px, 4vw, 40px) 32px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-3);
}
.screen-footer a {
  color: var(--text-2);
}

/* ---------- Device control deck ---------- */
.device-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(16px, 3vw, 28px) 24px;
}
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  grid-template-rows: repeat(3, 28px);
  gap: 2px;
}
.dpad button {
  background: var(--black);
  color: var(--cream);
  border: 2px solid rgba(0, 0, 0, 0.5);
  font-size: 10px;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}
.dpad [data-dpad="up"] {
  grid-column: 2;
  grid-row: 1;
  border-radius: 4px 4px 0 0;
}
.dpad [data-dpad="left"] {
  grid-column: 1;
  grid-row: 2;
  border-radius: 4px 0 0 4px;
}
.dpad [data-dpad="right"] {
  grid-column: 3;
  grid-row: 2;
  border-radius: 0 4px 4px 0;
}
.dpad [data-dpad="down"] {
  grid-column: 2;
  grid-row: 3;
  border-radius: 0 0 4px 4px;
}
.speaker {
  display: grid;
  grid-template-columns: repeat(6, 5px);
  grid-template-rows: repeat(2, 5px);
  gap: 4px;
}
.speaker span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
}
.ab-buttons {
  display: flex;
  gap: 10px;
}
.ab-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--black);
  color: var(--cream);
  border: 2px solid rgba(0, 0, 0, 0.5);
  font-family: var(--font-pixel);
  font-size: 11px;
  cursor: default;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
  opacity: 1;
}
@media (max-width: 640px) {
  .speaker {
    display: none;
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 12px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--red);
  border: 2px solid var(--black);
}

/* ---------- Poké Ball cursor ---------- */
.poke-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  display: none;
}
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .poke-cursor {
    display: block;
  }
}
.pc-top,
.pc-bottom {
  position: absolute;
  left: 0;
  width: 24px;
  height: 12px;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pc-top {
  top: 0;
  border-radius: 24px 24px 0 0;
}
.pc-bottom {
  bottom: 0;
  border-radius: 0 0 24px 24px;
}
.pc-top::before {
  content: "";
  position: absolute;
  inset: 0 0 -12px 0;
  border-radius: 50%;
  background: #ef3b2d;
  border: 2px solid #171512;
}
.pc-bottom::before {
  content: "";
  position: absolute;
  inset: -12px 0 0 0;
  border-radius: 50%;
  background: #f6f4ef;
  border: 2px solid #171512;
}
.pc-band {
  position: absolute;
  left: -1px;
  right: -1px;
  top: 10px;
  height: 4px;
  background: #171512;
  z-index: 2;
}
.pc-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #f6f4ef;
  border: 2px solid #171512;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.poke-cursor.opening .pc-top {
  transform: translate(-3px, -7px) rotate(-18deg);
}
.poke-cursor.opening .pc-bottom {
  transform: translate(3px, 7px) rotate(18deg);
}
.poke-cursor.opening .pc-band {
  opacity: 0;
}

.poke-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3b0 0%, rgba(255, 224, 102, 0.6) 45%, rgba(255, 224, 102, 0) 75%);
  box-shadow: 0 0 0 2px rgba(23, 19, 15, 0.12);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99998;
  animation: pokeFlash 0.5s ease-out forwards;
}
.poke-spark {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  animation: pokeSpark 0.55s ease-out forwards;
}

@keyframes pokeFlash {
  0% {
    width: 10px;
    height: 10px;
    opacity: 0.9;
  }
  100% {
    width: 90px;
    height: 90px;
    opacity: 0;
  }
}
@keyframes pokeSpark {
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3);
  }
}

/* ---------- Intro: device opens on load ---------- */
html.intro-lock,
html.intro-lock body {
  overflow: hidden;
  height: 100%;
}
.intro-cover {
  position: fixed;
  inset: 0;
  z-index: 9999;
  perspective: 2600px;
  pointer-events: none;
}
.intro-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(155deg, var(--red-light) 0%, var(--red) 18%, var(--red-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.2);
}
.intro-door-l {
  left: 0;
  transform-origin: left center;
}
.intro-door-r {
  right: 0;
  transform-origin: right center;
}
.intro-emblem {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eafcff, var(--blue) 55%, #0a4e7d 100%);
  border: 4px solid var(--black);
}
.intro-door-l .intro-emblem {
  margin-right: -28px;
}
.intro-door-r .intro-emblem {
  margin-left: -28px;
}
@keyframes introOpenLeft {
  to {
    transform: rotateY(-100deg);
    opacity: 0;
  }
}
@keyframes introOpenRight {
  to {
    transform: rotateY(100deg);
    opacity: 0;
  }
}
.intro-cover.is-opening .intro-door-l {
  animation: introOpenLeft 0.9s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
.intro-cover.is-opening .intro-door-r {
  animation: introOpenRight 0.9s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
.intro-cover.is-done {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .intro-cover {
    display: none;
  }
}

/* ---------- Motion helpers ---------- */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
