:root {
  color-scheme: light;
  --ink: #111111;
  --paper: #f7f8f2;
  --white: #ffffff;
  --grid: rgba(17, 17, 17, 0.11);
  --green: #0f9d58;
  --red: #e53935;
  --yellow: #f6c945;
  --cyan: #00a7b5;
  --muted: #59605a;
  --line: #111111;
  --shadow: 8px 8px 0 #111111;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(16px, 4vw, 44px);
  border-bottom: 3px solid var(--line);
  background: rgba(247, 248, 242, 0.92);
  backdrop-filter: blur(12px);
}

.brand,
.nav-links,
.hero-actions,
.ticker,
.toolbar-actions,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 28px;
  place-items: center;
  border: 3px solid var(--line);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--line);
}

.nav-links {
  gap: clamp(10px, 2.4vw, 24px);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-links a {
  border-bottom: 3px solid transparent;
}

.nav-links .nav-github {
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--yellow);
  padding: 7px 10px;
  box-shadow: 3px 3px 0 var(--line);
  font-weight: 950;
}

.nav-links a:hover {
  border-color: var(--red);
}

.nav-links .nav-github:hover {
  border-color: var(--line);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.hero {
  position: relative;
  min-height: 74vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 104px clamp(18px, 5vw, 70px) 46px;
  border-bottom: 4px solid var(--line);
}

.hero-image,
.hero-shade,
.hero-grid {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.08);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(247, 248, 242, 0.95), rgba(247, 248, 242, 0.78) 43%, rgba(247, 248, 242, 0.3)),
    linear-gradient(0deg, rgba(247, 248, 242, 0.95), rgba(247, 248, 242, 0.08) 45%);
}

.hero-grid {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mix-blend-mode: multiply;
}

.hero-copy {
  position: relative;
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  max-width: 820px;
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.65rem, 8vw, 6.25rem);
}

h2 {
  font-size: clamp(2rem, 5.5vw, 4.35rem);
}

.hero-lede,
.meme-copy p,
.footer {
  font-size: clamp(0.98rem, 1.6vw, 1.14rem);
  line-height: 1.5;
}

.hero-lede {
  max-width: 640px;
  margin: 16px 0 0;
  color: #202722;
  font-weight: 700;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button,
.mini-button {
  border: 3px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--line);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 16px;
}

.button:hover,
.mini-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.primary,
.run-button {
  background: var(--green);
  color: var(--white);
}

.github-button {
  background: var(--yellow);
  color: var(--ink);
  padding-inline: 22px;
}

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

.ticker {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.ticker span {
  border: 2px solid var(--line);
  background: var(--white);
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.playground-section,
.leetcode-band,
.vocabulary {
  padding: 76px clamp(18px, 5vw, 70px);
}

.section-heading {
  margin-bottom: 30px;
}

.playground-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.editor-panel,
.output-panel {
  min-height: 560px;
  border: 4px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

.panel-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 4px solid var(--line);
  background: var(--yellow);
}

.toolbar-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 950;
}

.toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mini-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.76rem;
}

textarea,
pre {
  width: 100%;
  height: calc(100% - 58px);
  min-height: 498px;
  margin: 0;
  padding: 18px;
  border: 0;
  background: #111111;
  color: #f5f5f5;
  font: 0.96rem/1.55 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
  resize: vertical;
  tab-size: 2;
}

textarea:focus {
  outline: 5px solid var(--cyan);
  outline-offset: -5px;
}

pre {
  overflow: auto;
  white-space: pre-wrap;
}

.output-panel pre.is-error {
  color: #ffb3b3;
}

.leetcode-band {
  border-top: 4px solid var(--line);
  background:
    linear-gradient(90deg, rgba(246, 201, 69, 0.35), transparent),
    var(--paper);
}

.leetcode-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.leetcode-copy {
  display: grid;
  align-content: start;
  gap: 18px;
  border: 4px solid var(--line);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--line);
  padding: 20px;
}

.leetcode-copy p {
  margin: 0;
  color: #202722;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.5;
}

.code-sample {
  min-height: auto;
  height: auto;
  border: 4px solid var(--line);
  box-shadow: var(--shadow);
}

.code-sample code {
  display: inline;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
}

.meme-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: 34px;
  align-items: center;
  padding: 70px clamp(18px, 5vw, 70px);
  border-top: 4px solid var(--line);
  border-bottom: 4px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 167, 181, 0.18), transparent),
    var(--white);
}

.meme-copy p {
  max-width: 720px;
  font-weight: 700;
}

.meme-band img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 4px solid var(--line);
  box-shadow: var(--shadow);
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.vocab-grid article {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 178px;
  padding: 18px;
  border: 4px solid var(--line);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--line);
}

.vocab-grid article:nth-child(2n) {
  background: #eaf8ee;
}

.vocab-grid article:nth-child(3n) {
  background: #e8f8fa;
}

.vocab-grid span {
  font-weight: 950;
  text-transform: uppercase;
}

code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 2px solid var(--line);
  background: #111111;
  color: #ffffff;
  padding: 7px 8px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.footer {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 26px clamp(18px, 5vw, 70px);
  border-top: 4px solid var(--line);
  background: var(--ink);
  color: var(--white);
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--yellow);
  font-weight: 950;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .playground-shell,
  .meme-band,
  .leetcode-grid,
  .vocab-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70vh;
  }
}

@media (max-width: 700px) {
  .topbar {
    position: sticky;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .hero {
    min-height: 68vh;
    padding-top: 42px;
  }

  .hero-shade {
    background: rgba(247, 248, 242, 0.84);
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .panel-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .run-button {
    width: 100%;
  }

  textarea,
  pre {
    height: auto;
    min-height: 420px;
    font-size: 0.9rem;
  }
}
