/* Typography ****************************** */

html {
  font-size: 62.5%;
}

body {
  --accent-color: orangered;
  --background-color: white;
  --text-color: black;
  --button-text-color: var(--background-color);
  --transition-delay: 1.5s;
  font-family: "Ubuntu", sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.4;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  transition: var(--transition-delay);
  background-color: var(--background-color);
  color: var(--text-color);
}

.wave {
  animation-name: wave-animation;
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
  transform-origin: 70% 70%;
  display: inline-block;
  animation-delay: 1s;
}

@keyframes wave-animation {
  0% {
    transform: rotate(0deg);
  }

  10% {
    transform: rotate(14deg);
  }

  20% {
    transform: rotate(-8deg);
  }

  30% {
    transform: rotate(14deg);
  }

  40% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(10deg);
  }

  60% {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(0deg);
  }
}

/* Dark Mode styles */
body.dark {
  color: #eee;
  background: #2e373d;
  --accent-color: #d0d066;
  --background-color: #333;
  --text-color: white;
}

body.dark a {
  color: #527dfd;
}

.watermark {
  font-size: 14vw;
  display: block;
  text-align: center;
  font-weight: lighter;
  line-height: 1;
  position: absolute;
  bottom: 0;
  width: 100%;
  margin-bottom: 10px;
  z-index: -1;
}

.btn-toggle {
  position: absolute;
  top: 32px;
  right: 32px;
  text-align: right;
  background-color: transparent;
  background-repeat: no-repeat;
  border: none;
  cursor: pointer;
  overflow: hidden;
}
.checkbox {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 28px;
  height: 28px;
  margin: 0;
  opacity: 0;
}

.checkbox:focus-visible ~ .btn-toggle {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -100;
}

.sun-moon-container {
  --rotation: 0;
  margin-top: 1rem;
  left: 2rem;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 0;
  height: 200vmin;
  transform: rotate(calc(var(--rotation) * 1deg));
  transition: transform var(--transition-delay);
}

.sun,
.moon {
  position: absolute;
  transition: opacity var(--transition-delay), fill var(--transition-delay);
  width: 30px;
  height: 30px;
  fill: var(--accent-color);
}

.sun {
  top: 0.05rem;
  opacity: 1;
}
.dark .sun {
  opacity: 0;
}
.moon {
  bottom: 0.05rem;
  opacity: 0;
  transform: rotate(180deg);
}

.dark .moon {
  opacity: 1;
}

p {
  display: block;
  margin-bottom: 1em;
}

em {
  font-style: italic;
}

strong {
  font-weight: 700;
}

a {
  color: inherit;
  position: relative;
}

h2 {
  line-height: 1.25;
  margin-bottom: 1.2rem;
}

/* Layout ****************************** */

main {
  margin: 10vh 10vw;
  width: min(600px, calc(100% - 20vw));
  max-width: 600px;
}

main .para {
  overflow: auto;
  max-height: 60vh;
  max-width: 100%;
}

::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

.social {
  margin-top: 1.2rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.4rem);
  white-space: nowrap;
}

.social a {
  white-space: nowrap;
}

.social a + a {
  padding-left: clamp(0.6rem, 1vw, 1rem);
  border-left: 1px solid rgba(127, 127, 127, 0.35);
}

.txt-rotate > .wrap {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  body {
    font-size: 1.4rem;
    line-height: 1.45;
  }

  .btn-toggle,
  .checkbox {
    top: 16px;
    right: 16px;
  }

  .sun-moon-container {
    left: 1rem;
  }

  main {
    margin: 7rem 1.6rem 1.6rem;
    width: auto;
    max-width: 100%;
  }
}
