/* shaurya.fun · pixel theme. All art is original, drawn in scripts/sprites.py. */

@font-face {
  font-family: 'Silkscreen';
  src: url(/fonts/silkscreen-latin-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Silkscreen';
  src: url(/fonts/silkscreen-latin-700-normal.woff2) format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(/fonts/ibm-plex-mono-latin-600-normal.woff2) format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --sky: #cdc2f5;
  --sky-low: #dcd3fa;
  --ink: #2a1466;
  --dusk: #3a1c9a;
  --night: #1e0f52;
  --deep: #160b3d;
  --text: #ece6ff;
  --muted: #b9adeb;
  --pink: #f39ad8;
  --pink-deep: #c95fb4;
  --mint: #5ef2d6;
  --yellow: #ffe066;
  --panel: #d9cff8;
  --panel-ink: #24135c;
  --line: #8f78e6;
  --px: 3;
  --pixel: 'Silkscreen', 'Courier New', monospace;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --wrap: 1040px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--deep);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--mint); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  background: var(--yellow);
  color: var(--ink);
  padding: 8px 12px;
  font-family: var(--pixel);
}
.skip:focus { top: 12px; }

.sprite {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---------- Day scene ---------- */

.scene-day {
  position: relative;
  overflow: hidden;
  background: var(--sky);
  color: var(--ink);
  min-height: 600px;
  padding-top: 20px;
}

.topline {
  position: relative;
  z-index: 3;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 10px;
  border: 2px solid transparent;
}
.nav a:hover { border-color: var(--ink); color: var(--ink); background: var(--panel); }

.hero {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 64px 16px 0;
}

.title {
  margin: 0;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(44px, 9vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}

.pill {
  display: inline-block;
  margin: 22px 0 0;
  padding: 6px 18px;
  font-family: var(--pixel);
  font-size: 15px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 0 0 3px var(--pink) inset;
}

.cloud, .star { position: absolute; z-index: 1; }
.cloud { width: calc(20px * var(--px) * 1.6); }
img.cloud[src$="cloud-small.svg"] { width: calc(12px * var(--px) * 1.6); }
.c1 { left: 4%; top: 70px; }
.c2 { left: 28%; top: 24px; }
.c3 { right: 6%; top: 60px; }
.c4 { right: 30%; top: 150px; }
.star { width: calc(7px * var(--px) * 1.5); }
.s1 { left: 22%; top: 120px; }
.s2 { left: 31%; top: 90px; width: calc(7px * var(--px)); }

.street {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  z-index: 2;
  height: 200px;
  max-width: 1200px;
  margin: 0 auto;
}
.street .sprite { position: absolute; bottom: 0; }
.lamp { left: 4%; width: calc(22px * var(--px) * 1.4); }
.bench { left: calc(4% + 80px); width: calc(34px * var(--px) * 1.4); }
.cat { left: calc(4% + 170px); bottom: calc(9px * var(--px) * 1.4) !important; width: calc(14px * var(--px) * 1.2); }
.b1 { left: 1%; width: calc(20px * var(--px) * 1.6); }
.b2 { right: calc(4% + 170px); width: calc(20px * var(--px) * 1.8); }
.shop { right: 4%; width: calc(52px * var(--px) * 1.15); }

.ground {
  height: 40px;
  background-color: #7b4fe0;
  background-image: url(/img/bricks.svg);
  background-size: 48px 24px;
  image-rendering: pixelated;
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
}
.scene-day .ground { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }

/* ---------- Bands ---------- */

.band { position: relative; overflow: hidden; padding: 72px 0; }
.band-dusk { background: var(--dusk); }
.band-night { background: var(--night); }
.band-city { background: var(--night); padding-bottom: 0; }
.band-deep { background: var(--deep); }

.pixel-h {
  margin: 0 0 20px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.05;
  text-transform: uppercase;
  color: #d8f4ff;
  text-shadow: 3px 3px 0 var(--ink);
}

.body-text { max-width: 54ch; color: var(--text); margin: 0 0 12px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

.aside { position: relative; padding-top: 6px; }
.tag {
  display: inline-block;
  margin: 0 0 14px;
  padding: 2px 10px;
  font-size: 14px;
  color: var(--ink);
  background: #c9f7ef;
  border: 2px solid var(--ink);
}
.monitor { width: calc(18px * var(--px) * 1.8); margin-top: 18px; }

.moon { position: absolute; right: 7%; top: 40px; width: calc(20px * var(--px) * 1.8); z-index: 1; }
.n1 { right: 3%; top: 120px; }
.n2 { left: 6%; top: 34px; }
.n3 { left: 52%; top: 40px; }

/* ---------- Retro window ---------- */

.window {
  position: relative;
  z-index: 2;
  max-width: 760px;
  background: var(--panel);
  color: var(--panel-ink);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.window-bar {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
  font-family: var(--pixel);
  font-size: 13px;
  color: #fff;
  background: var(--dusk);
  border-bottom: 3px solid var(--ink);
}

.projects {
  list-style: none;
  counter-reset: proj;
  margin: 0;
  padding: 6px 18px 8px;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-color: var(--line) var(--panel);
}
.projects li {
  counter-increment: proj;
  padding: 16px 0 14px 34px;
  border-bottom: 2px dashed var(--line);
  position: relative;
}
.projects li:last-child { border-bottom: 0; }
.projects li::before {
  content: counter(proj) '.';
  position: absolute;
  left: 0;
  top: 18px;
  font-family: var(--pixel);
  color: var(--dusk);
}
.proj-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.proj-head h3 { margin: 0; font-family: var(--pixel); font-size: 20px; color: var(--ink); }
.year { margin-left: auto; font-size: 13px; color: #5d4aa8; }
.projects p { margin: 6px 0 0; font-size: 15px; max-width: 62ch; }
.projects .stack { font-size: 13px; color: #5d4aa8; }
.projects .links { display: flex; gap: 16px; font-size: 14px; }
.projects a { color: var(--dusk); font-weight: 600; }
.projects a:hover { color: var(--pink-deep); }

.status {
  font-family: var(--pixel);
  font-size: 11px;
  padding: 1px 8px;
  border: 2px solid var(--ink);
  text-transform: uppercase;
}
.status-live { background: var(--mint); color: var(--ink); }
.status-building { background: var(--yellow); color: var(--ink); }
.status-archived { background: #ece8fb; color: #5d4aa8; }

/* ---------- Socials ---------- */

.socials { list-style: none; display: flex; justify-content: center; gap: 14px; margin: 22px 0 0; padding: 0; }
.social {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--panel);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.social img { width: 32px; }
.social:hover { background: #fff6c2; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.social:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.socials-small { margin: 0; gap: 10px; }
.socials-small .social { width: 44px; height: 44px; box-shadow: 3px 3px 0 var(--ink); }
.socials-small .social img { width: 24px; }

/* ---------- Projects (empty) ---------- */

.empty-slot { padding: 36px 24px; text-align: center; }
.empty-slot p { margin: 0 auto; max-width: 44ch; font-size: 15px; }
.empty-title { font-family: var(--pixel); font-size: 20px; color: var(--ink); margin-bottom: 10px !important; }

/* ---------- Skills ---------- */

.inv-hint { margin: -8px 0 18px; font-family: var(--pixel); font-size: 12px; color: var(--muted); text-transform: uppercase; }
.inventory {
  list-style: none;
  margin: 0 0 72px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
}
.skill {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
  background: var(--panel);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.skill-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #6b58b8; }
.skill-name { font-family: var(--pixel); font-size: 17px; line-height: 1.1; }
.xp { display: flex; gap: 3px; margin-top: 4px; }
.seg { width: 16px; height: 10px; background: #efeaff; border: 2px solid var(--ink); }
.seg.on { background: var(--mint); }
.skill:nth-child(3n+2) .seg.on { background: var(--pink); }
.skill:nth-child(3n) .seg.on { background: var(--yellow); }


.city { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.pills { list-style: none; margin: 8px 0 72px; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.pills li {
  padding: 6px 18px;
  font-family: var(--pixel);
  font-size: 14px;
  text-transform: uppercase;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
}
.pill-pink { background: #e5c3f6; }
.pill-mint { background: var(--mint); }

.skyline { display: flex; align-items: flex-end; gap: 12px; }
.tower-a { width: calc(18px * var(--px) * 1.6); }
.tower-b { width: calc(24px * var(--px) * 1.6); }

/* ---------- Contact ---------- */

.window-light { max-width: 820px; }
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  padding: 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-family: var(--pixel); font-size: 13px; text-transform: uppercase; color: var(--ink); }
.field input, .field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--panel-ink);
  background: #f4f0ff;
  border: 3px solid var(--ink);
  border-radius: 0;
  padding: 10px 12px;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #8a7dbf; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--pink); }
.field input[aria-invalid='true'], .field textarea[aria-invalid='true'] { border-color: #b3261e; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.btn {
  font-family: var(--pixel);
  font-size: 15px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 10px 20px;
  cursor: pointer;
  min-height: 48px;
}
.btn:hover { background: #fff09a; }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn[disabled] { cursor: wait; opacity: 0.7; }
.form-status { margin: 0; font-size: 14px; color: var(--panel-ink); }
.form-status[data-kind='error'] { color: #b3261e; font-weight: 600; }
.form-status[data-kind='ok'] { color: #13715f; font-weight: 600; }
.fine { margin: 0; font-size: 13px; color: #5d4aa8; }
.fine a, .window-light a { color: var(--dusk); font-weight: 600; }

/* ---------- Footer ---------- */

.footer { background: var(--deep); }
.foot-row {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.handle {
  font-family: var(--pixel);
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 2px 14px;
}

/* ---------- Motion ---------- */

@keyframes drift { from { transform: translateX(0); } to { transform: translateX(28px); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.c1, .c3, .n1 { animation: drift 9s steps(7) infinite alternate; }
.c2, .c4, .n2, .n3 { animation: drift 12s steps(7) infinite alternate-reverse; }
.star { animation: twinkle 2.4s steps(3) infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .social:hover { transform: none; }
  .cloud, .star { animation: none; }
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  :root { --px: 2; }
  .topline { flex-wrap: wrap; font-size: 12px; }
  .nav { order: 3; width: 100%; justify-content: flex-start; margin-left: -10px; }
  .scene-day { min-height: 520px; }
  .hero { padding-top: 36px; }
  .street { height: 150px; }
  .bench, .cat, .b2, .c3, .c4, .s1 { display: none; }
  .c1 { top: 110px; }
  .c2 { top: 150px; left: auto; right: 6%; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .band { padding: 56px 0; }
  .wrap, .topline { padding-inline: 16px; }
  .city { grid-template-columns: 1fr; }
  .skyline { justify-content: flex-end; }
  .inventory { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
  .skill-name { font-size: 15px; }
  .contact { grid-template-columns: 1fr; padding: 16px; }
  .projects li { padding-left: 28px; }
  .moon { top: 24px; }
}

/* ---------- Plain pages ---------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}
.page h1 { font-family: var(--pixel); font-size: 34px; margin: 24px 0 8px; color: #d8f4ff; text-shadow: 3px 3px 0 var(--ink); }
.page h2 { font-family: var(--pixel); font-size: 18px; margin: 32px 0 8px; color: var(--yellow); }
.page p, .page li { color: var(--text); max-width: 66ch; }
.page .updated { color: var(--muted); font-size: 14px; }
.page-top { font-family: var(--pixel); font-size: 13px; }
