:root {
  /* Catppuccin - Mocha palette */
  --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;

  /* UI/neutral shades */
  --text: #cdd6f4;
  --subtext1: #bac2de;
  --subtext0: #a6adc8;
  --overlay2: #9399b2;
  --overlay1: #7f849c;
  --overlay0: #6c7086;
  --surface2: #585b70;
  --surface1: #45475a;
  --surface0: #313244;
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;

  --padding: 16px;
  --border-radius: 6px;
  --gap: 8px;
  --content-heading-margin-top: calc(-1 * var(--padding));
}

/* Catppuccin theme variants */
:root[data-theme="macchiato"] {
  --rosewater: #f4dbd6;
  --flamingo: #f0c6c6;
  --pink: #f5bde6;
  --mauve: #c6a0f6;
  --red: #ed8796;
  --maroon: #ee99a0;
  --peach: #f5a97f;
  --yellow: #eed49f;
  --green: #a6da95;
  --teal: #8bd5ca;
  --sky: #91d7e3;
  --sapphire: #7dc4e4;
  --blue: #8aadf4;
  --lavender: #b7bdf8;

  --text: #cad3f5;
  --subtext1: #b8c0e0;
  --subtext0: #a5adcb;
  --overlay2: #939ab7;
  --overlay1: #8087a2;
  --overlay0: #6e738d;
  --surface2: #5b6078;
  --surface1: #494d64;
  --surface0: #363a4f;
  --base: #24273a;
  --mantle: #1e2030;
  --crust: #181926;
}

:root[data-theme="frappe"] {
  --rosewater: #f2d5cf;
  --flamingo: #eebebe;
  --pink: #f4b8e4;
  --mauve: #ca9ee6;
  --red: #e78284;
  --maroon: #ea999c;
  --peach: #ef9f76;
  --yellow: #e5c890;
  --green: #a6d189;
  --teal: #81c8be;
  --sky: #99d1db;
  --sapphire: #85c1dc;
  --blue: #8caaee;
  --lavender: #babbf1;

  --text: #c6d0f5;
  --subtext1: #b5bfe2;
  --subtext0: #a5adce;
  --overlay2: #949cbb;
  --overlay1: #838ba7;
  --overlay0: #737994;
  --surface2: #626880;
  --surface1: #51576d;
  --surface0: #414559;
  --base: #303446;
  --mantle: #292c3c;
  --crust: #232634;
}

:root[data-theme="latte"] {
  --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;
}

* {
  box-sizing: border-box;
  text-align: center;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
  margin: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  background: var(--base);
  color: var(--text);
}

a {
  color: var(--mauve);
  text-decoration: none;
}

a:hover {
  color: var(--lavender);
}

header {
  background: var(--mauve);
  color: var(--base);
  padding: var(--padding);
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 700;
}

header p {
  margin: 0.4em 0 0;
  font-size: 1.05rem;
}

nav {
  background: var(--mantle);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--gap);
}

nav a {
  font-weight: 600;
  font-size: 1rem;
  padding: var(--padding);
  border-radius: 0;
  transition: color 220ms ease-in-out, transform 220ms ease-in-out;
  display: inline-block;
  will-change: transform, color;
  transform: translateY(0);
}

nav a:hover {
  color: var(--lavender);
  transform: translateY(-3px);
}

/* Hamburger menu styles */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
  position: absolute;
  left: var(--padding);
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: var(--mauve);
  border-radius: 2px;
}

.hamburger:hover span {
  background: var(--lavender);
}

/* Mobile styles */
@media (max-width: 768px) {
  nav {
    position: relative;
  }

  .hamburger {
    display: flex;
  }

  nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--mantle);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 var(--padding);
    border-bottom: 2px solid transparent;
  }

  nav ul.active {
    max-height: 500px;
    padding: var(--padding);
    border-bottom: 2px solid var(--surface0);
  }

  nav ul li {
    width: 100%;
  }

  nav a {
    display: block;
    width: 100%;
    text-align: center;
  }
}

main {
  flex: 1;
  padding: var(--padding) var(--padding) 0;
  background: transparent;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  gap: var(--gap);
  background: var(--mantle);
  border-radius: var(--border-radius);
  padding: var(--padding);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.container h1 {
  color: var(--mauve);
  font-size: 1.9rem;
  margin: -8px 0 var(--padding) 0;
  text-align: center;
  border-bottom: 2px solid var(--mauve);
  padding-bottom: 0;
}

.container h2 {
  color: var(--mauve);
  font-size: 1.25rem;
  margin: 0.5em 0;
}

.container p {
  margin: 0 0 var(--padding) 0;
}

.container ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.container li {
  background: var(--surface0);
  margin-bottom: 6px;
  padding: var(--padding);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: var(--gap);
  flex-wrap: wrap;
  color: var(--lavender);
  font-weight: bold;
}

.container li:hover {
  background: var(--surface1);
}

footer {
  background: var(--crust);
  color: var(--subtext0);
  text-align: center;
  padding: var(--padding);
  margin-top: var(--padding);
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

.theme-toggle {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 2147483647;
  padding: 6px 12px;
  border-radius: 6px;
  border: 2px solid var(--mauve);
  background: var(--base);
  color: var(--mauve);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transform: none !important;
}

.theme-toggle:hover {
  background: var(--surface0);
  color: var(--lavender);
  border-color: var(--lavender);
}

.theme-toggle:focus {
  outline: none;
}

/* Card grid layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  row-gap: var(--padding);
  column-gap: var(--padding);
  margin: 0;
}

.card-grid li {
  background: var(--surface0);
  padding: var(--padding);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--padding);
  color: var(--text);
  font-weight: normal;
  text-align: center;
  min-height: 180px;
  margin-bottom: 0;
}

.card-grid li:hover {
  background: var(--surface1);
}

.card-grid li a {
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 2px solid var(--mauve);
  padding-bottom: 8px;
  display: block;
  width: 100%;
}

.card-grid li p {
  margin: 0;
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}
