:root {
  --bgcolor: rgba(0, 0, 0, 1);
  --bgcolor1: rgba(0, 0, 0, 0.7);
  --bgcolor2: rgba(0, 0, 0, 0.3);
  --fgcolor: rgba(255, 255, 255, 1);
  --fgcolor1: rgba(255, 255, 255, 0.7);
  --fgcolor2: rgba(255, 255, 255, 0.3);
  --shcolor: rgba(0, 0, 0, 0.8);
  --emcolor: hsl(50, 100%, 50%);
  --emcolor2: hsl(50, 100%, 75%);
  --emcolor1: hsla(230, 100%, 50%, 0.5);
  --blursize: 2rem;
  --ttime: 0.2s;
}

:root.light-theme {
  --bgcolor: rgba(255, 255, 255, 1);
  --bgcolor1: rgba(255, 255, 255, 0.7);
  --bgcolor2: rgba(255, 255, 255, 0.3);
  --fgcolor: rgba(0, 0, 0, 1);
  --fgcolor1: rgba(0, 0, 0, 0.7);
  --fgcolor2: rgba(0, 0, 0, 0.3);
  --shcolor: rgba(255, 255, 255, 0.5);
  --emcolor: hsl(230, 100%, 50%);
  --emcolor2: hsl(230, 100%, 75%);
  --emcolor1: hsla(50, 100%, 50%, 0.5);

}

* {
  transition-property: all;
  transition-duration: var(--ttime);
  transition-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.335);
  box-sizing: border-box;
}

.no-transition * {
  transition: none !important;
}

body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  margin: 0;
  padding: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  background-size: cover;
  height: 100vh;
  overflow-x: hidden;
  color: var(--fgcolor);
  text-shadow: 1px 1px 2px var(--shcolor);
}

#theme-toggle,
#theme-toggle:hover {
  color: var(--fgcolor);
}

header {
  padding: 1rem 0;
  background: var(--bgcolor1);
  border-bottom: 1px solid var(--fgcolor1);
  box-shadow: 0 0 1rem var(--fgcolor2);
  margin: 0 0 1rem 0;
  backdrop-filter: blur(var(--blursize));
}

header>div {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  flex-flow: row wrap;
}

header>div>h1 {
  margin: 0;
}

header>div>nav>ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-flow: row wrap;
  gap: 2rem;
}

header>div>nav>ul>li>a {
  display: inline-block;
  vertical-align: middle;
  line-height: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  text-shadow: 1px 1px 2px var(--emcolor1);
}

a:hover {
  color: var(--emcolor);
}

section {
  padding: 2rem 0;
  text-align: center;
}

section>div {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 2rem;
  background: var(--bgcolor1);
  border-radius: 1rem;
  border: 1px solid var(--fgcolor2);
  box-shadow: 0 0 1rem var(--fgcolor2);
  backdrop-filter: blur(var(--blursize));
}

h2 {
  text-align: center;
  margin-bottom: 1rem;
}

#aboutcontainer {
  overflow: auto;
}

#aboutpicture {
  float: left;
  margin-right: 1rem;
  width: 150px;
  height: 150px;
  border-radius: 2rem;
  background-color: var(--fgcolor2);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-loader {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: conic-gradient(#0000 10%, var(--emcolor));
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
  animation: s3 0.5s infinite linear;
}

@keyframes s3 {
  to {
    transform: rotate(1turn)
  }
}


#aboutcontainer p {
  text-align: justify;
}

#aboutcontainer p:first-of-type {
  margin-top: 0;
}

#aboutcontainer p:last-of-type {
  text-align: center;
  margin-bottom: 0.2rem;
}

#projectcontainer {
  display: flex;
  flex-flow: column nowrap;
  margin: 2rem 0;
  gap: 1rem;
  align-items: stretch;
  justify-content: center;
}

#projectcontainer>div {
  background: var(--bgcolor2);
  padding: 0.5rem 1rem 1rem 1rem;
  border-radius: 5px;
  box-shadow: 0 0 10px var(--bgcolor2);
  border: 1px solid var(--fgcolor2);
  box-shadow: 0 0 10px var(--fgcolor2);
  text-align: center;
}

#projectcontainer>div>p {
  text-align: justify;
  margin: 0.5rem;
}


.view-doc {
  color: inherit;
  text-decoration: none;
  background: var(--bgcolor2);
  border: 1px solid var(--fgcolor2);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-align: right;
  vertical-align: middle;
  display: inline-block;
  margin-top: 0.5rem;
}

#projectcontainer a:hover {
  background: var(--bgcolor1);
  color: var(--emcolor);
}

.projectheader {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto;
  grid-gap: 1rem;
  align-items: center;
  justify-content: stretch;
  padding: 0;
  margin: 0;
}

.projectheader>div:first-of-type {
  text-align: left;
  cursor: default;
  color: black;
  font-size: 1.8rem;
  text-shadow: 0 0 2px var(--fgcolor1);
  vertical-align: middle;
  grid-column: 1 / 2;
  grid-row: 1;
}

.projectheader>div:nth-of-type(2) {
  font-weight: bold;
  text-decoration: underline;
  font-size: 1.2rem;
  grid-column: 2 / 3;
  grid-row: 1;
}

.projectheader>div:nth-of-type(3) {
  text-align: right;
  grid-column: 3 / 4;
  grid-row: 1;
}

.projectheader img {
  height: 2rem;
  vertical-align: middle;
  filter: drop-shadow(0 0 2px var(--fgcolor2));
}

.project_pic {
  float: right;
  margin: 0.75rem 0.5rem 0 0.5rem;
  border-radius: 0.5rem;
  border: 2px solid var(--fgcolor);
}

form {
  display: flex;
  justify-items: stretch;
  flex-flow: row wrap;
}

form>div {
  display: flex;
  flex-flow: column nowrap;
  box-sizing: border-box;
  padding: 0.5rem;
}

#namecontainer,
#emailcontainer {
  flex: 1 1 20rem;
}

#messagecontainer,
#submitcontainer {
  flex: 1 1 100%;
}

#submitcontainer {
  display: flex;
  align-items: center;
}

form label {
  margin-top: 1rem;
}

form input,
form textarea,
form button {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--bgcolor2);
  color: inherit;
  font-family: inherit;
  text-shadow: inherit;
  border: 1px solid var(--fgcolor2);
  border-radius: 5px;
  font-size: inherit;
}

form textarea {
  resize: none;
}

form button {
  padding: 0.5rem 1rem;
  cursor: pointer;
}

form button:hover {
  background: var(--bgcolor1);
  color: var(--emcolor);
}

footer {
  padding: 1rem 0;
  background: var(--bgcolor1);
  border-top: 1px solid var(--fgcolor1);
  box-shadow: 0 0 1rem var(--fgcolor2);
  margin: 1rem 0 0 0;
  backdrop-filter: blur(var(--blursize));
  text-align: center;
  font-size: small;
}

footer p {
  max-width: 768px;
  margin: 0px auto;
}

@media (max-width: calc(1080px + 2rem)) {
  section {
    padding: 1rem 0;
  }

  section>div {
    padding: 1rem;
    margin: 0 1rem;
  }

  #projectcontainer {
    margin: 1rem 0;
  }
}

@media (max-width: 768px) {
  .projectheader {
    display: grid;
    gap: 0 1rem;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    width: 100%
  }

  .projectheader>div:first-of-type {
    grid-column: 1 / 2;
    grid-row: 2;
    text-align: right;
  }

  .projectheader>div:nth-of-type(2) {
    grid-column: 1 / 3;
    grid-row: 1;
    margin-bottom: 0.5rem;
  }

  .projectheader>div:nth-of-type(3) {
    text-align: right;
    grid-column: 2 / 3;
    grid-row: 2;
    text-align: left;
  }

  header>div {
    flex-direction: column;
    justify-content: center;
  }
}

#legalcontainer {
  text-align: justify;
}

#legalcontainer summary {
  margin: 1rem;
}

#legalcontainer p {
  margin: 1rem 2rem;
}

#legalcontainer ul {
  margin: 1rem 2rem;
}

#legal summary>* {
  display: inline;
}

#legal summary {
  cursor: pointer;
  text-align: center;
}

#legal summary:hover {
  color: var(--emcolor);
}

#legal details {
  counter-reset: section-counter;
}

#legal h4::before {
  content: counter(section-counter) ". ";
  counter-increment: section-counter;
  font-weight: bold;
}