/* Parakh Jaggi — personal site. Plain CSS, no build step. */

:root {
  --bg: #15173a;
  --panel: #1d2050;
  --line: #f4f4fb;
  --text: #f4f4fb;
  --muted: #a7abd3;
  --yellow: #ffd93d;
  --blue: #6ad1ff;
  --green: #5ff07d;
  --red: #ff5c7a;
  --ink: #07081c;
  --rack: #2c306e;
  --rack-hi: #4a4f9a;
  --slot: #0f1130;
  --ground: #23265c;
  --pixel: "Press Start 2P", "Courier New", monospace;
  --px: 4px;
  --px-c: var(--line);
}

/* Konami code swaps the palette for the original Game Boy's four greens. */
.gameboy {
  --bg: #0f380f;
  --panel: #306230;
  --line: #9bbc0f;
  --text: #9bbc0f;
  --muted: #8bac0f;
  --yellow: #9bbc0f;
  --blue: #9bbc0f;
  --green: #9bbc0f;
  --red: #8bac0f;
  --ink: #0f380f;
  --rack: #306230;
  --rack-hi: #8bac0f;
  --slot: #0f380f;
  --ground: #306230;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "VT323", "Courier New", monospace;
  font-size: 1.35rem;
  line-height: 1.35;
  -webkit-font-smoothing: none;
}

/* CRT scanlines, kept faint so body text stays easy to read. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 2px, transparent 2px 4px);
}

::selection { background: var(--yellow); color: var(--bg); }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

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

h1, h2, h3, .hero nav a, .badge, .btn, .tag, .start, .lbl, #toast {
  font-family: var(--pixel);
  text-transform: uppercase;
  line-height: 1.7;
  font-weight: normal;
}

/* Pixel border: four hard shadows, no diagonals, so the corners come out notched. */
.px {
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--px-c),
    0 var(--px) 0 0 var(--px-c),
    calc(var(--px) * -1) 0 0 0 var(--px-c),
    var(--px) 0 0 0 var(--px-c);
}

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1rem; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--yellow);
  color: var(--bg);
  padding: .5rem 1rem;
  z-index: 30;
}
.skip:focus { top: 1rem; }

/* ---------- hero ---------- */

.hero {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' shape-rendering='crispEdges' fill='white'><rect x='12' y='20' width='2' height='2' opacity='.9'/><rect x='70' y='8' width='2' height='2' opacity='.5'/><rect x='130' y='40' width='2' height='2' opacity='.8'/><rect x='40' y='90' width='2' height='2' opacity='.4'/><rect x='100' y='120' width='2' height='2' opacity='.7'/><rect x='150' y='140' width='2' height='2' opacity='.5'/><rect x='24' y='140' width='2' height='2' opacity='.6'/><rect x='88' y='64' width='2' height='2' opacity='.35'/></svg>");
  background-size: 160px 160px;
}

.hero nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
}
.hero nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.hero nav a { font-size: .7rem; color: var(--text); text-decoration: none; }
.hero nav a:hover { color: var(--yellow); }
.power {
  --px: 3px;
  --px-c: var(--yellow);
  width: 2.4rem;
  height: 2.4rem;
  padding: .5rem;
  border: 0;
  background: var(--yellow);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.power svg { width: 100%; height: 100%; shape-rendering: crispEdges; fill: var(--bg); }
.power:hover { --px-c: var(--line); background: var(--line); }

.title { text-align: center; padding: 3.5rem 0 3rem; }

h1 {
  margin: 0 0 .75rem;
  font-size: clamp(1.4rem, 6vw, 2.75rem);
  color: var(--yellow);
  text-shadow: 4px 4px 0 var(--ink);
}
.role {
  margin: 0 0 .5rem;
  font-family: var(--pixel);
  text-transform: uppercase;
  font-size: clamp(.6rem, 2.3vw, .8rem);
  line-height: 1.8;
}
.loc { margin: 0 0 2.25rem; color: var(--muted); font-size: 1.4rem; }

.start {
  display: inline-block;
  font-size: .8rem;
  color: var(--text);
  text-decoration: none;
  padding: .5rem .25rem;
  animation: blink 1.1s step-end infinite;
}
.start::before {
  content: "";
  display: inline-block;
  width: .8em;
  height: .8em;
  margin-right: .6em;
  vertical-align: -.05em;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges' fill='%23ffd93d'><rect x='1' y='0' width='2' height='1'/><rect x='1' y='1' width='4' height='1'/><rect x='1' y='2' width='6' height='1'/><rect x='1' y='3' width='7' height='2'/><rect x='1' y='5' width='6' height='1'/><rect x='1' y='6' width='4' height='1'/><rect x='1' y='7' width='2' height='1'/></svg>") no-repeat;
  background-size: contain;
}
.start:hover { animation: none; color: var(--yellow); }

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

/* Data-center skyline. Rack art is inline SVG in index.html; colors live here. */
.skyline { display: block; width: 100%; height: auto; min-height: 7.5rem; shape-rendering: crispEdges; }
.rk { fill: var(--rack); }
.rkh { fill: var(--rack-hi); }
.sl { fill: var(--slot); }
.gnd { fill: var(--ground); }
.gndh { fill: var(--rack-hi); }
.g { fill: var(--green); }
.y { fill: var(--yellow); }
.r { fill: var(--red); }
.b1 { animation: led 1.6s step-end infinite; }
.b2 { animation: led 2.3s step-end infinite .7s; }
.b3 { animation: led 1.1s step-end infinite .3s; }
.b4 { animation: led 3.1s step-end infinite 1.4s; }
@keyframes led { 50% { opacity: .15; } }

/* ---------- sections ---------- */

section { padding: 3rem 0 0; }
section:last-of-type { padding-bottom: 3rem; }

h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(.85rem, 3vw, 1.05rem);
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--ink);
}

/* RPG dialog box with a speaker tag on the border. */
.dialog {
  position: relative;
  background: var(--panel);
  padding: 1.6rem 1.5rem 1.3rem;
  margin-top: 1.75rem;
}
.tag {
  position: absolute;
  top: -.7rem;
  left: 1rem;
  background: var(--bg);
  color: var(--yellow);
  font-size: .6rem;
  line-height: 1.4;
  padding: 0 .5rem;
}
.dialog p { margin: 0 0 1rem; }
.dialog p:last-child { margin: 0; }

/* Level select. */
.map ol {
  list-style: none;
  margin: 0;
  padding: 3rem 0 0;
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  position: relative;
}
.map ol::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: calc(3rem + 1.25rem - 2px);
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--rack-hi) 0 8px, transparent 8px 16px);
}
.map li { flex: 1; text-align: center; position: relative; }
.map a { display: block; color: var(--text); text-decoration: none; position: relative; }
.node {
  --px: 3px;
  --px-c: var(--yellow);
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto .8rem;
  background: var(--yellow);
  color: var(--bg);
  font-family: var(--pixel);
  font-size: .8rem;
  line-height: 2.5rem;
}
.map a:hover .node { background: var(--line); --px-c: var(--line); }
.map .here .node { background: var(--green); --px-c: var(--green); }
.map .name { display: block; font-family: var(--pixel); text-transform: uppercase; font-size: .5rem; line-height: 1.6; }
.map .yr { display: block; color: var(--muted); font-size: 1.1rem; }
.player {
  position: absolute;
  left: 50%;
  bottom: calc(100% - .5rem);
  width: 2rem;
  height: auto;
  margin-left: -1rem;
  shape-rendering: crispEdges;
  animation: bob 1s step-end infinite;
}
@keyframes bob { 50% { transform: translateY(-4px); } }
.map .hint { margin: 1.25rem 0 0; text-align: center; color: var(--muted); font-size: 1.1rem; }
@media (hover: none) { .map .hint { display: none; } }

/* Jobs as levels. */
.job { background: var(--panel); padding: 1.3rem 1.5rem 1.2rem; margin-top: 2rem; scroll-margin-top: 1.5rem; }
.job header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem .8rem;
  margin-bottom: .9rem;
}
.job h3 { margin: 0; font-size: .85rem; }
.badge {
  --px: 2px;
  --px-c: var(--yellow);
  background: var(--yellow);
  color: var(--bg);
  font-size: .5rem;
  line-height: 1;
  padding: .35rem .4rem .3rem;
}
.badge.now { --px-c: var(--green); background: var(--green); }
.meta {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: .1rem 1.25rem;
  color: var(--muted);
  font-size: 1.25rem;
}
.meta b { font-weight: normal; color: var(--text); }
.mission { margin: 0 0 1.25rem; }
.lbl { margin: 0 0 .5rem; font-size: .6rem; color: var(--text); }

/* Arcade high-score table. */
.scores { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.scores li {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  padding: .45rem 0;
  border-top: 2px solid var(--slot);
}
.scores li::before { font-family: var(--pixel); font-size: .5rem; color: var(--muted); min-width: 2.2rem; }
.scores li:nth-child(1)::before { content: "1ST"; }
.scores li:nth-child(2)::before { content: "2ND"; }
.scores li:nth-child(3)::before { content: "3RD"; }
.scores li:nth-child(4)::before { content: "4TH"; }
.scores b {
  font-family: var(--pixel);
  font-size: .8rem;
  color: var(--yellow);
  min-width: 6.2rem;
  text-shadow: 2px 2px 0 var(--ink);
}

/* Quest objectives with pixel checkboxes. */
.quest { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.quest li { position: relative; padding-left: 1.6rem; margin: .45rem 0; }
.quest li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: .7em;
  height: .7em;
  box-shadow: 0 0 0 2px var(--line);
  background: transparent;
}
.quest .done::before { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.quest em { font-style: normal; color: var(--yellow); }

/* Full resume bullets, collapsed. */
.job details { margin-top: .25rem; }
.job summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--pixel);
  text-transform: uppercase;
  font-size: .55rem;
  color: var(--blue);
  padding: .4rem 0;
  width: max-content;
}
.job summary::-webkit-details-marker { display: none; }
.job summary::before { content: "+ "; }
.job details[open] summary::before { content: "- "; }
.job summary:hover { color: var(--yellow); }
.job details ul { margin: .5rem 0 0; padding: 0; list-style: none; }
.job details li { position: relative; padding-left: 1.1rem; margin: .4rem 0; color: var(--muted); }
.job details li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: .4em;
  height: .4em;
  background: var(--rack-hi);
}

/* Skills as a terminal session. */
.term { --px-c: var(--rack-hi); background: var(--ink); margin-top: 1.75rem; }
.term .bar { background: var(--rack-hi); color: var(--ink); font-size: 1.05rem; padding: .15rem .75rem; }
.term pre {
  margin: 0;
  padding: 1rem 1.25rem 1.1rem;
  max-height: 56rem;
  overflow: auto;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--green);
}
.term .prompt { color: var(--yellow); }
.term .cmd { color: var(--text); }
.term .hd { color: var(--muted); }
.term .warn { color: var(--yellow); }
#cli {
  font: inherit;
  color: var(--text);
  background: none;
  border: 0;
  outline: 0;
  padding: 0;
  margin: 0;
  width: 24ch;
  max-width: 60%;
  caret-color: var(--text);
}
#cli::placeholder { color: var(--muted); }

/* Achievements. */
.ach { display: grid; gap: 1.5rem; }
.ach article {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--panel);
  padding: 1rem 1.25rem;
}
.ach svg { flex: none; width: 2.6rem; height: 2.6rem; margin-top: .15rem; shape-rendering: crispEdges; }
.ach h3 { margin: 0 0 .3rem; font-size: .7rem; }
.ach p { margin: 0; color: var(--muted); }
.ach p b { font-weight: normal; color: var(--text); }

/* Contact. */
.btns { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: .25rem 0 .5rem .25rem; }
.btn {
  --b: var(--yellow);
  display: inline-block;
  background: var(--b);
  color: var(--bg);
  text-decoration: none;
  font-size: .72rem;
  line-height: 1;
  padding: 1rem 1.1rem .9rem;
  border: 0;
  cursor: pointer;
  box-shadow: 0 -4px 0 0 var(--b), 0 4px 0 0 var(--b), -4px 0 0 0 var(--b), 4px 0 0 0 var(--b), 4px 4px 0 0 var(--ink), 8px 8px 0 0 var(--ink);
}
.btn:hover { --b: var(--line); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 -4px 0 0 var(--b), 0 4px 0 0 var(--b), -4px 0 0 0 var(--b), 4px 0 0 0 var(--b); }
.btn.red { --b: var(--red); }
.btn.red:hover { --b: var(--line); }

footer { padding: 2rem 0 4rem; color: var(--muted); font-size: 1.1rem; text-align: center; }
footer p { margin: .25rem 0; }
footer .btn { margin-top: 1.25rem; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 20;
  background: var(--panel);
  color: var(--yellow);
  font-size: .65rem;
  padding: 1rem 1.25rem;
  white-space: nowrap;
}

/* Incident mode. */
body.incident::after {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .35) 0 2px, transparent 2px 4px);
  animation: flicker .1s step-end infinite;
}
@keyframes flicker { 50% { opacity: .5; } }
.incident .led { fill: var(--red); animation: led .25s step-end infinite; }
.incident .b2, .incident .b4 { animation-delay: .12s; }
#status {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  padding: .6rem 1rem;
  text-align: center;
  font-family: var(--pixel);
  text-transform: uppercase;
  font-size: .6rem;
  line-height: 1.6;
  background: var(--red);
  color: var(--ink);
}
#status.ok { background: var(--green); }
#pager {
  --px-c: var(--red);
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 25;
  width: 17rem;
  max-width: calc(100vw - 2rem);
  background: var(--ink);
  padding: 1rem 1.1rem 1.4rem;
  font-size: 1.15rem;
  line-height: 1.3;
  animation: pagein .3s steps(4);
}
@keyframes pagein { from { transform: translateY(130%); } }
#pager .sev { display: flex; justify-content: space-between; margin: 0 0 .6rem; font-family: var(--pixel); font-size: .6rem; color: var(--red); }
#pager p { margin: 0 0 1rem; }
#pager .btn { font-size: .6rem; padding: .7rem .8rem .6rem; }

/* Power button: CRT off, standby screen, boot. */
#screen.crt-off { animation: crt-off .6s steps(8) forwards; }
#screen.crt-on { animation: crt-on .45s steps(8); }
#off {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  display: grid;
  place-items: center;
}
#off .standby { display: flex; align-items: center; gap: 1.25rem; }
html.booting #off { display: grid !important; }
html.booting #off .boot { display: block !important; }
html.booting #off .standby { display: none !important; }
html.booting body { overflow: hidden; }
#off .power { --px-c: var(--rack-hi); background: var(--rack-hi); }
#off .power svg { fill: var(--ink); }
#off .power:hover { --px-c: var(--yellow); background: var(--yellow); }
#off .led { width: 8px; height: 8px; background: var(--red); animation: pulse 2s step-end infinite; }
@keyframes pulse { 50% { opacity: .15; } }
#off .boot { margin: 0; width: min(90vw, 26rem); font-size: 1.35rem; line-height: 1.3; color: var(--green); white-space: pre; }
@keyframes crt-off {
  0% { transform: scale(1, 1); filter: brightness(1); }
  60% { transform: scale(1, .01); filter: brightness(3); }
  100% { transform: scale(0, .01); filter: brightness(3); }
}
@keyframes crt-on {
  0% { transform: scale(1, .01); filter: brightness(3); }
  100% { transform: scale(1, 1); filter: brightness(1); }
}

/* 404. */
.over { text-align: center; padding: 18vh 1rem 4rem; }
.over h1 { color: var(--red); }
.over #n { font-family: var(--pixel); font-size: 1.4rem; color: var(--yellow); }
.over .btn { margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .start, .b1, .b2, .b3, .b4, .player, .incident .led, body.incident::after, #pager, #off .led { animation: none; }
}

@media (max-width: 480px) {
  .hero nav { flex-direction: column; align-items: flex-start; }
  .term pre { font-size: 1.05rem; }
  .scores b { min-width: 5rem; font-size: .7rem; }
  .job, .dialog, .ach article { padding-left: 1rem; padding-right: 1rem; }
}
