@import url("https://fonts.cdnfonts.com/css/jetbrains-mono");

/* ── Reset ─────────────────────────────────────────────────────────── */

:root {
  --font-mono:
    "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;

  /* Catppuccin Latte palette (Light)*/

  --rosewater: #dc8a78;
  --flamingo: #dd7878;
  --pink: #ea76cb;
  --mauve: #8839ef;
  --red: #d20f39;
  --maroon: #e64553;
  --peach: #fe640b;
  --yellow: #df8e1d;
  --green: #40a02b;
  --teal: #179299;
  --sky: #04a5e5;
  --sapphire: #209fb5;
  --blue: #1e66f5;
  --lavender: #7287fd;
  --text: #4c4f69;
  --subtext1: #5c5f77;
  --subtext0: #6c6f85;
  --overlay2: #7c7f93;
  --overlay1: #8c8fa1;
  --overlay0: #9ca0b0;
  --surface2: #acb0be;
  --surface1: #bcc0cc;
  --surface0: #ccd0da;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --crust: #dce0e8;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Catppuccin Mocha (Dark) */
    --rosewater: #f5e0dc;
    --flamingo: #f2cdcd;
    --pink: #f5c2e7;
    --mauve: #cba6f7;
    --red: #f38ba8;
    --maroon: #eba0ac;
    --peach: #fab387;
    --yellow: #f9e2af;
    --green: #a6e3a1;
    --teal: #94e2d5;
    --sky: #89dceb;
    --sapphire: #74c7ec;
    --blue: #89b4fa;
    --lavender: #b4befe;
    --text: #cdd6f4;
    --subtext1: #bac2de;
    --subtext0: #a6adc8;
    --overlay2: #9399b2;
    --overlay1: #7f849c;
    --overlay0: #6c7086;
    --surface2: #585b70;
    --surface1: #45475a;
    --surface0: #313244;
    --base: #1e1e2e;
    --mantle: #181825;
    --crust: #11111b;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  background: var(--base);
  color: var(--text);
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

a:focus-visible,
button:focus-visible {
  outline-offset: 3px;
  outline: 2px solid currentColor;
}

a:hover {
  color: var(--subtext0);
}

/* ── Utilities ─────────────────────────────────────────────────────────── */

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: auto;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.stack > * {
  margin-block: 0;
}

.stack > * + * {
  margin-block-start: var(--space, 1.5rem);
}

/* ── Button ─────────────────────────────────────────────────────────── */

button,
.button {
  border: none;
  font: inherit;
  text-decoration: none;
  background-color: var(--blue);
  color: var(--base);

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;

  transition: background-color 0.1s linear;

  &:hover {
    color: var(--base);
    background-color: color-mix(in srgb, var(--blue), var(--text) 20%);
  }

  &:focus-visible {
    outline-offset: 3px;
    outline: 2px solid var(--blue);
  }
}

/* ── Nav ─────────────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--mantle);
  border-bottom: 0.0625rem solid var(--surface0);
  flex-shrink: 0;
}

.nav-back {
  text-decoration: none;
  display: flex;
  align-items: center;
  min-block-size: 44px;
}

/* ── Github link ─────────────────────────────────────────────────────────── */

.gh-logo {
  width: 24px;
  height: auto;
}

.gh-link {
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
