:root {
  --paper: #f7edcf;
  --paper-deep: #f0dfad;
  --ink: #191813;
  --muted: #6c6758;
  --orange: #ff7138;
  --yellow: #ffd65a;
  --purple: #b6a0ff;
  --mint: #bce8cf;
  --white: #fffaf0;
  --line: 2px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-small: 4px 4px 0 var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

button,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 3px dashed var(--orange);
  outline-offset: 4px;
}

.site-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: var(--line);
  position: relative;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 700 19px "Space Grotesk", sans-serif;
  letter-spacing: -.7px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--yellow);
  border: var(--line);
  box-shadow: 3px 3px 0 var(--ink);
  font: 700 22px "Space Grotesk", sans-serif;
  transform: rotate(-4deg);
}

.brand-dot {
  font-size: 10px;
  vertical-align: top;
  margin-left: 2px;
}

.topbar-note,
.eyebrow,
.menu-heading,
.menu-foot,
.section-kicker,
.footer,
.mini-label,
.terminal-top,
.editor-label,
.page-number {
  font: 700 10px "Space Grotesk", sans-serif;
  letter-spacing: 1.3px;
}

.topbar-note {
  color: var(--muted);
}

.menu-toggle {
  display: flex;
  width: 48px;
  height: 48px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border: var(--line);
  background: var(--orange);
  box-shadow: var(--shadow-small);
  cursor: pointer;
  position: relative;
  z-index: 30;
  transition: transform .18s, box-shadow .18s;
}

.menu-toggle:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.menu-toggle span {
  width: 21px;
  height: 2px;
  background: var(--ink);
  transition: transform .2s, opacity .2s;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-8px) rotate(-45deg);
}

.site-menu {
  position: fixed;
  z-index: 25;
  top: 18px;
  right: max(20px, calc((100vw - 1160px) / 2));
  width: min(390px, calc(100vw - 40px));
  padding: 78px 22px 22px;
  background: var(--yellow);
  border: var(--line);
  box-shadow: 9px 9px 0 var(--ink);
}

.site-menu[hidden] {
  display: none;
}

.menu-heading {
  display: flex;
  justify-content: space-between;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--ink);
}

.site-menu > a {
  display: grid;
  grid-template-columns: 35px 1fr 20px;
  align-items: center;
  gap: 10px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(25, 24, 19, .35);
  font: 700 23px "Space Grotesk", sans-serif;
}

.site-menu > a:hover {
  color: #9b3517;
  padding-left: 5px;
}

.menu-index {
  font: 700 11px "Space Grotesk", sans-serif;
}

.menu-arrow {
  justify-self: end;
}

.menu-foot {
  margin: 19px 0 0;
}

#app {
  min-height: 60vh;
}

.loading-screen {
  min-height: 60vh;
  display: grid;
  place-content: center;
  justify-items: center;
}

.loading-screen p {
  font: 700 11px "Space Grotesk", sans-serif;
  letter-spacing: 1.4px;
}

.hero {
  padding: 70px 0 74px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 54px;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #3e9a58;
  border: 1px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(62, 154, 88, .15);
}

.hero h1 {
  font: 700 clamp(54px, 8vw, 100px)/.93 "Space Grotesk", sans-serif;
  letter-spacing: -6px;
  margin: 0 0 28px;
}

.hero h1 .highlight {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.hero h1 .highlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: -5px;
  bottom: 3px;
  height: 24%;
  background: var(--yellow);
  z-index: -1;
  transform: rotate(-1.5deg);
}

.hero-copy {
  max-width: 570px;
  font-size: 16px;
  line-height: 1.8;
  color: #4d493e;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: var(--line);
  box-shadow: var(--shadow-small);
  font: 700 12px "Space Grotesk", sans-serif;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}

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

.button-primary {
  background: var(--orange);
}

.button-secondary {
  background: var(--white);
}

.button-purple {
  background: var(--purple);
}

.hero-art {
  position: relative;
  min-height: 340px;
  display: grid;
  place-items: center;
}

.art-card {
  width: min(100%, 340px);
  aspect-ratio: .88;
  background: var(--purple);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  padding: 22px;
  transform: rotate(3deg);
  position: relative;
  overflow: hidden;
}

.art-card::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 22px rgba(255, 250, 240, .17),
    0 0 0 44px rgba(255, 250, 240, .12);
}

.art-card::after {
  content: "BUILD / BREAK / REPEAT";
  position: absolute;
  left: 20px;
  bottom: 18px;
  font: 700 10px "Space Grotesk", sans-serif;
  letter-spacing: 1.8px;
}

.art-top {
  display: flex;
  justify-content: space-between;
  font: 700 10px "Space Grotesk", sans-serif;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

.art-v {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 clamp(100px, 15vw, 180px)/1 "Space Grotesk", sans-serif;
  letter-spacing: -15px;
  text-shadow: 5px 5px 0 var(--yellow);
  z-index: 1;
}

.sticker {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border: var(--line);
  box-shadow: var(--shadow-small);
  font: 700 11px "Space Grotesk", sans-serif;
}

.sticker-star {
  width: 78px;
  height: 78px;
  right: -3px;
  top: 18px;
  background: var(--orange);
  transform: rotate(10deg);
  font-size: 34px;
}

.sticker-code {
  padding: 12px;
  left: -9px;
  bottom: 43px;
  background: var(--yellow);
  transform: rotate(-8deg);
}

.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-block: var(--line);
  padding: 14px 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-block;
  min-width: max-content;
  animation: marquee 24s linear infinite;
  font: 700 12px "Space Grotesk", sans-serif;
  letter-spacing: 2px;
}

.marquee-track span {
  margin: 0 24px;
  color: var(--yellow);
}

@keyframes marquee {
  to { transform: translateX(-35%); }
}

.section {
  padding: 76px 0;
  border-bottom: var(--line);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 30px;
}

.section-kicker {
  margin-bottom: 12px;
  color: var(--muted);
}

.section-heading h2,
.page-title {
  font: 700 clamp(34px, 5vw, 58px)/1 "Space Grotesk", sans-serif;
  letter-spacing: -2.5px;
  margin: 0;
}

.section-note {
  max-width: 270px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.work-card {
  min-height: 210px;
  padding: 22px;
  border: var(--line);
  box-shadow: var(--shadow-small);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform .2s;
}

.work-card:hover {
  transform: translateY(-5px) rotate(-.5deg);
}

.work-card:nth-child(1) { background: var(--yellow); }
.work-card:nth-child(2) { background: var(--mint); }
.work-card:nth-child(3) { background: var(--purple); }

.card-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: var(--line);
  background: var(--white);
  font-size: 21px;
  margin-bottom: 28px;
}

.work-card h3 {
  font: 700 22px "Space Grotesk", sans-serif;
  margin-bottom: 9px;
}

.work-card p {
  color: #4d493e;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.card-tag {
  margin-top: auto;
  padding: 6px 8px;
  border: 1px solid var(--ink);
  font: 700 9px "Space Grotesk", sans-serif;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, .32);
}

.skills-layout {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 55px;
  align-items: start;
}

.skills-intro {
  max-width: 350px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.skill-list {
  display: grid;
  gap: 22px;
}

.skill-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.skill-name,
.skill-value {
  font: 700 13px "Space Grotesk", sans-serif;
}

.skill-value {
  font-size: 12px;
}

.skill-track {
  grid-column: 1 / -1;
  height: 13px;
  border: 1.5px solid var(--ink);
  background: var(--white);
  padding: 2px;
}

.skill-fill {
  height: 100%;
  width: var(--skill);
  background: var(--orange);
  transform-origin: left;
  animation: fillbar 1s ease both;
}

.skill-row:nth-child(2) .skill-fill { background: var(--purple); }
.skill-row:nth-child(3) .skill-fill { background: #75bd90; }

@keyframes fillbar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  background: var(--paper-deep);
  border: var(--line);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 46px);
}

.about-strip h2 {
  font: 700 clamp(30px, 4vw, 45px)/1.05 "Space Grotesk", sans-serif;
  letter-spacing: -2px;
  margin-bottom: 14px;
}

.about-strip p {
  margin: 0;
  color: #514b3e;
  line-height: 1.8;
  font-size: 14px;
}

.about-bubble {
  background: var(--white);
  border: var(--line);
  padding: 22px;
  transform: rotate(2deg);
  box-shadow: var(--shadow-small);
  font: 600 14px/1.8 "Space Grotesk", sans-serif;
}

.terminal-card {
  background: #22221d;
  color: #f8efcf;
  border: var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  background: #34332b;
  border-bottom: 1px solid #666052;
  color: #f8efcf;
}

.terminal-lights {
  display: flex;
  gap: 6px;
}

.terminal-lights i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
}

.terminal-lights i:nth-child(2) { background: var(--yellow); }
.terminal-lights i:nth-child(3) { background: var(--mint); }

.terminal-body {
  padding: 23px;
  min-height: 170px;
  font: 13px/1.9 ui-monospace, monospace;
}

.terminal-line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.terminal-input-row {
  display: flex;
  gap: 10px;
  padding: 0 23px 22px;
}

.terminal-input {
  flex: 1;
  min-width: 0;
  background: #34332b;
  color: white;
  border: 1px solid #8d8777;
  padding: 12px;
}

.terminal-run {
  border: 1px solid var(--paper);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  padding: 0 15px;
  cursor: pointer;
}

.page-hero {
  padding: 72px 0 45px;
}

.page-title {
  font-size: clamp(48px, 8vw, 88px);
  margin: 16px 0 20px;
}

.page-intro {
  max-width: 680px;
  font-size: 16px;
  line-height: 1.8;
  color: #4d493e;
}

.page-label {
  display: inline-block;
  border: var(--line);
  background: var(--yellow);
  padding: 7px 10px;
  font: 700 10px "Space Grotesk", sans-serif;
  letter-spacing: 1px;
  box-shadow: 3px 3px 0 var(--ink);
}

.playground-wrap {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 22px;
  padding-bottom: 80px;
}

.editor-card,
.output-card {
  border: var(--line);
  box-shadow: var(--shadow);
  background: var(--white);
  min-width: 0;
}

.editor-head,
.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: var(--line);
  background: var(--yellow);
}

.editor-label {
  letter-spacing: 1px;
}

.editor-area {
  width: 100%;
  min-height: 330px;
  display: block;
  resize: vertical;
  border: 0;
  border-radius: 0;
  padding: 19px;
  background: #23231f;
  color: #e8f3c8;
  font: 13px/1.8 ui-monospace, monospace;
  tab-size: 2;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-top: var(--line);
}

.editor-actions .button {
  min-height: 41px;
}

.output-head {
  background: var(--mint);
}

.output-body {
  padding: 18px;
  min-height: 330px;
  overflow: auto;
  font: 13px/1.8 ui-monospace, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.output-placeholder { color: #777264; }
.output-error { color: #bb3b22; }

.playground-tip {
  margin: 0 0 70px;
  padding: 17px 20px;
  border-left: 5px solid var(--purple);
  background: rgba(182, 160, 255, .2);
  color: #4d493e;
  font-size: 13px;
  line-height: 1.8;
}

.telegram-panel {
  margin: 0 0 85px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  padding: clamp(25px, 6vw, 55px);
  border: var(--line);
  background: var(--mint);
  box-shadow: var(--shadow);
}

.telegram-symbol {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border: var(--line);
  background: var(--white);
  box-shadow: var(--shadow-small);
  font-size: 49px;
  transform: rotate(-5deg);
}

.telegram-panel h2 {
  font: 700 clamp(30px, 4vw, 48px)/1.05 "Space Grotesk", sans-serif;
  letter-spacing: -2px;
  margin: 15px 0;
}

.telegram-panel p {
  color: #4d493e;
  font-size: 14px;
  line-height: 1.8;
  max-width: 520px;
}

.telegram-handle {
  font: 700 18px "Space Grotesk", sans-serif;
  margin: 0 0 23px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  min-height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .8px;
}

.footer-brand {
  color: var(--ink);
  font-size: 11px;
}

.footer a:last-child {
  color: var(--ink);
}

.not-found {
  padding: 90px 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 780px) {
  .site-shell {
    width: min(100% - 28px, 600px);
  }

  .topbar { min-height: 72px; }
  .topbar-note { display: none; }

  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 52px 0 60px;
  }

  .hero h1 {
    letter-spacing: -3.5px;
    font-size: clamp(56px, 15vw, 88px);
  }

  .hero-art { min-height: 310px; }
  .art-card { width: min(78%, 310px); }
  .working-grid { grid-template-columns: 1fr; }
  .work-card { min-height: 180px; }

  .skills-layout,
  .about-strip,
  .playground-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .section { padding: 56px 0; }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .section-note { max-width: 440px; }

  .telegram-panel { grid-template-columns: 1fr; }

  .telegram-symbol {
    width: 76px;
    height: 76px;
    font-size: 36px;
  }

  .footer {
    padding: 22px 0;
    align-items: flex-start;
    flex-direction: column;
    line-height: 1.7;
  }

  .page-hero { padding: 52px 0 35px; }
  .editor-area { min-height: 270px; }
  .output-body { min-height: 180px; }
}

@media (max-width: 400px) {
  .site-shell { width: calc(100% - 22px); }
  .brand { font-size: 17px; }
  .hero h1 { font-size: 53px; }
  .button { padding-inline: 13px; }

  .site-menu {
    right: 11px;
    width: calc(100vw - 22px);
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.pixel-toggle {
  border: 2px solid #171717;
  background: #f5d96b;
  color: #171717;
  padding: 11px 13px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pixel-toggle:hover {
  background: #171717;
  color: #f7edcf;
  transform: translateY(-2px);
}

.pixel-toggle:focus-visible {
  outline: 3px solid #8d64d8;
  outline-offset: 4px;
}

body.pixel-mode,
body.pixel-mode * {
  font-family: "Silkscreen", monospace !important;
}

body.pixel-mode {
  line-height: 1.8;
}

body.pixel-mode button,
body.pixel-mode input,
body.pixel-mode textarea,
body.pixel-mode select {
  font-family: "Silkscreen", monospace !important;
}

@media (max-width: 600px) {
  .topbar-actions {
    gap: 7px;
  }

  .pixel-toggle {
    max-width: 145px;
    padding: 9px 8px;
    font-size: 8px;
    line-height: 1.6;
  }

  .topbar-note {
    display: none;
  }
}


.hero-thumbnail {
  position: relative;
  display: block;
  width: 100%;
  max-width: 460px;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 3px solid #171717;
  background: #f5d96b;
  box-shadow: 10px 10px 0 #171717;
}

.hero-thumbnail .thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-thumbnail .thumbnail-label {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  background: #171717;
  color: #f7edcf;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.thumbnail-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  color: #171717;
}

.thumbnail-fallback[hidden] {
  display: none;
}

.thumbnail-fallback span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 90px;
  font-weight: 800;
}

.thumbnail-fallback p,
.thumbnail-fallback small {
  margin: 0;
}

@media (max-width: 700px) {
  .hero-thumbnail {
    max-width: 100%;
    aspect-ratio: 4 / 3;
    box-shadow: 6px 6px 0 #171717;
  }
}
