@font-face {
  font-family: "Perso";
  src: url(./inconsolata-perso.woff2) format("woff2");
}

:root,
[data-theme="light"] {
  --max-width: 1092px;
  --content-width: 640px;
  --body-gradient: radial-gradient(circle at 2.01% 35.06%, #b64c6d26, transparent 100%), radial-gradient(circle at 97.99% 67.97%, #5fc3e440, transparent 100%), radial-gradient(circle at 50% 50%, #ffffff, #ffffff 100%);
  --heading-color: #f5f5f5;
  --text-color: #f5f5f5;
  --switch-content: '🌚';
  --selection: #c5c5c5;
  --link-color: #5fc3e4;
  --link-color-from: #5fc3e4;
  --link-color-to: #b64c6d;
  --box-shadow-color: rgb(47, 47, 47);
  --box-shadow-spread: 4px;
  --box-shadow-y: -1px;
  --card-background-color: rgba(135, 218, 254, 0.1);
  --card-shadow-color: #d9d9d9;
  --card-shadow-color-hover: #d9d9d9;
}

[data-theme="dark"] {
  --switch-content: '💡';
}

@media (prefers-color-scheme: dark) {
  :root {
    --body-gradient: radial-gradient(circle at 2.01% 35.06%, #1b0b1061, #000000e3 100%), radial-gradient(circle at 97.99% 67.97%, #5fc3e4, #000000f0 100%), radial-gradient(circle at 50% 50%, #000000ed, #000000f0 100%);
    --heading-color: #e9e9e9;
    --text-color: #f6f6f6;
    --switch-content: '💡';
    --selection: #848484;
    --box-shadow-color: white;
    --box-shadow-spread: 6px;
    --box-shadow-y: -6px;
    --card-background-color: rgb(33, 54, 63);
    --card-shadow-color: rgba(2, 2, 3, 0.333) 0.5px 1px 1px 0px;
    --card-shadow-color-hover: rgb(34 59 69) 1px 1px 8px 2px;
  }

  #moon {
    opacity: 0;
  }
}

body,
html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  background: var(--body-gradient);
  overscroll-behavior-y: none;
  --title-stagger: 0deg;
}

body {
  font-size: 18px;
  margin: 0;
  height: 100%;
  font-family: sans-serif;
  background: var(--body-gradient);
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--text-color);
}

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

h1,
h2,
h3,
button,
strong,
a {
  all: unset;
}

.text-blue {
  color: rgb(84, 166, 255);
}

.color-mode-switch {
  display: grid;
  place-content: center;
  cursor: pointer;
  color: white;
}

#moon,
#sun {
  position: absolute;
  transition: opacity 200ms linear;
  color: white;

}

.color-mode-switch-wrapper {
  height: 15px;
  width: 15px;
  margin-right: 0.5rem;
}

.light-switch>#moon {
  opacity: 1;
}

.light-switch>#sun {
  opacity: 0;
}

.dark-switch>#moon {
  opacity: 0;
}

.dark-switch>#sun {
  opacity: 1;
}

.title-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

footer {
  color: var(--heading-color);
  font-size: 0.8rem;
}

footer>div {
  text-align: end;
}

main {
  --scale: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem;
  position: relative;
  transform: scale(var(--scale));
  transition: transform 200ms ease-in-out;
}

.window-container {
  --border-color: 0, 6, 13;
  position: relative;
  padding-block: 0.25rem;
  padding-inline: 0.35rem;
  border-left: 1px solid rgb(var(--border-color));
  border-right: 1px solid rgb(var(--border-color));
  border-bottom: 1px solid rgb(var(--border-color));
  max-height: 80vh;
  overflow-y: auto;
  background-color: rgb(var(--border-color));
  border-radius: 0px 0px 4px 4px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.bar {
  height: 22px;
  background: rgb(0, 6, 13);
  border-radius: 4px 4px 0px 0px;

  width: 100%;
  display: flex;
  align-items: center;
  justify-content: start;
  padding-left: 0.5rem;
  padding-top: 0.4rem;
  gap: 0.4rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.bar ul {
  margin: 0;
  padding: 0;
}

.bar ul li {
  display: inline-block;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bar__button {
  border-radius: 50px;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;

  &>svg {
    opacity: 0;
    transition: opacity 200ms ease-in-out;
  }
}

.bar__button:hover>svg {
  opacity: 1;
}

.bar__close {
  background-color: rgb(252, 96, 91);

  &>svg {
    transform: scale(0.8);
    color: rgb(152, 5, 12)
  }
}


.bar__minimize {
  background-color: rgb(252, 187, 64);
}

.bar__minimize>svg {
  color: rgb(151, 86, 13)
}

.bar__expand {
  background-color: rgb(51, 198, 72);
}

.bar__expand>svg {
  transform: rotate(-45deg) scale(1);
  color: rgb(10, 99, 13)
}

article {
  max-width: var(--content-width);
  padding: 1rem;
  position: relative;
}

.bar__title {
  --opacity: 0;
  opacity: var(--opacity);
  transition: opacity 200ms ease-in-out;
  color: #000;
  font-size: 0.8rem;
  margin-right: auto;
  margin-left: auto;
}

h1 {
  color: var(--heading-color);
  display: block;
  font-weight: 500;
  font-size: 1.5rem;
  font-family: 'Perso';
  margin-bottom: 1rem;
}

strong {
  font-weight: 500;
}

p {
  font-weight: 300;
  color: var(--text-color);
  letter-spacing: 0.020rem;
  line-height: 1.4rem;
}

a,
.fancy-link {
  cursor: pointer;
  text-decoration-color: hsl(0, 0%, 92%);
  text-decoration-line: underline;
  text-decoration-skip-ink: none;
  text-decoration-style: solid;
  text-decoration-thickness: 3px;
  text-underline-offset: 25%;
  transition: text-decoration .3s;
}

a:hover {
  text-decoration-color: hsl(201, 34.2%, 50%);
}

[data-animate] {
  --stagger: 0;
  --delay: 120ms;
  --start: 0ms;
}

@media (prefers-reduced-motion: no-preference) {
  [data-animate] {
    animation: slideIn .5s both;
    animation-delay: calc(var(--stagger) * var(--delay) + var(--start));
    animation-play-state: running;
  }

  .color-mode-switch {
    animation: popIn .2s;
    animation-play-state: running;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    scale: 0;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: none
  }
}