/* ===== Color Variables ===== */
:root {
  /* Accents */
  --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 */
  --text: #cdd6f4;
  --subtext1: #bac2de;
  --subtext0: #a6adc8;

  /* Surfaces */
  --overlay2: #9399b2;
  --overlay1: #7f849c;
  --overlay0: #6c7086;

  --surface2: #585b70;
  --surface1: #45475a;
  --surface0: #313244;

  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
}

@font-face {
  font-family: jetbrains-mono;
  src: url('/assets/fonts/JetBrainsMonoNerdFont-Regular.ttf');
}   

/* ===== Base Layout ===== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: jetbrains-mono, system-ui, sans-serif;
  background: var(--base);
  color: var(--text);
  line-height: 1.6;
}

/* ===== Typography ===== */

h1 {
  color: var(--red);
}

h2 {
  color: var(--mauve);
}

h3 {
  color: var(--pink);
}

h4 {
  color: var(--peach);
}

h5 {
  color: var(--yellow);
}

h6 {
  color: var(--green);
}

p {
  color: var(--sky);
}

small {
  color: var(--subtext0);
}

/* ===== Images ===== */

img {
  width:100%;
  max-width: 20em;
  border-radius: 1em;
  display: block;
  margin: 0 auto;
}

@media (min-width: 48em) {
  img {
    margin: 0;
  }
}


/* ===== Links ===== */

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--sky);
  text-decoration: underline;
}

a:visited {
  color: var(--lavender);
}

/* ===== Layout Elements ===== */

header {
  background: var(--mantle);
  border-bottom: 1px solid var(--surface0);
  padding: 1rem 2rem;
}

main {
  padding: 2rem;
  max-width: 900px;
  margin: auto;
}

footer {
  background: var(--mantle);
  border-top: 1px solid var(--surface0);
  padding: 1rem 2rem;
  color: var(--subtext0);
}

/* ===== Cards ===== */

.card {
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ===== Buttons ===== */

button {
  background: var(--blue);
  color: var(--crust);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

button:hover {
  background: var(--sapphire);
}

button.secondary {
  background: var(--surface1);
  color: var(--text);
}

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

/* ===== Forms ===== */

input,
textarea,
select {
  background: var(--surface0);
  color: var(--text);
  border: 1px solid var(--surface1);
  padding: 0.5rem;
  border-radius: 6px;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
}

/* ===== Tables ===== */

table {
  width: 100%;
  max-width: 32em;
  border-collapse: separate;
  border-spacing: 1em 0.2em;
  background: var(--base);
}

th {
  background: var(--surface0);
  color: var(--text);
  border-radius: 0.5em;
}

td {
  padding: 0.1em 0.8em;
}

/* ===== Alerts ===== */

.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert.success {
  background: rgba(166, 227, 161, 0.15);
  border-left: 4px solid var(--green);
}

.alert.warning {
  background: rgba(249, 226, 175, 0.15);
  border-left: 4px solid var(--yellow);
}

.alert.error {
  background: rgba(243, 139, 168, 0.15);
  border-left: 4px solid var(--red);
}

/* ===== Blockquotes ===== */

blockquote {
  border-left: 4px solid var(--mauve);
  padding-left: 1rem;
  margin-left: 0;
  color: var(--subtext1);
  font-style: italic;
}

/* ===== Code Blocks ===== */

code {
  color: var(--subtext0);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

pre {
  background: var(--mantle);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--surface0);
}

/* ===== Text Emphasis ===== */

strong {
  color: var(--maroon);
}

em {
  color: var(--mauve);
}

mark {
  background: var(--yellow);
  color: var(--crust);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

/* ===== Lists ===== */

li {
  color: var(--sapphire);
}

/* ===== Utility Classes ===== */

.text-muted {
  color: var(--subtext0);
}

.bg-surface {
  background: var(--surface0);
}

.border {
  border: 1px solid var(--surface1);
}

#header {
  padding: 0 2rem;
}

#footer {
  margin-top: 25%;
  padding-left: 8%;
  padding-bottom: 10%;
}

#footer * {
  color: var(--surface1);
}

#content {
  background: var(--base);
  width: 100%;
  padding: 0 2rem;
}

@media (min-width: 48em) {
  #header {
    display: block;
    margin: 0 auto;
    width: 50%;
  }

  #content {
    display: block;
    margin: 0 auto;
    width: 50%;
  }
}

.tendrils {
  position: absolute;
  height: 100%;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 101;
}

#t1 {
  background-color: var(--red);
  animation: leftTransition 1.6s ease-in forwards;
}
#t2 {
  background-color: var(--blue);
  animation: leftTransition 1.4s ease-in forwards;
}

#t3 {
  background-color: var(--flamingo);
  animation: leftTransition 1.2s ease-in forwards;
}

#t4 {
  background-color: var(--base);
  animation: leftTransition 1s ease-in forwards;
}

@keyframes leftTransition {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

@keyframes rightTransition {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}
