/* Author: Szymon Jakubowski */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans&family=Ubuntu:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Mono&display=swap');

:root {
  --apricot: #F8BFA7ff;
  --umber: #615043ff;
  /* rgba(97, 80, 67, 1) */
  --blue-gray: #639DD1ff;
  /* rgb(99, 157, 209) */
  --french-gray: #BDC7D5ff;
  /* rgb(189, 199, 213) */
  --rich-black: #13191Fff;
  --image-size: 30vw;
}

::-webkit-scrollbar {
  width: 5px;  
}

::-webkit-scrollbar-track {
  background: none;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--umber);
  border-radius: 5px;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--apricot);
}

html,
body {
  display: grid;
  place-items: center;
  margin: 0 auto;
  font-family: 'DM Sans', sans-serif;
  background-color: var(--rich-black);
  overflow-x: hidden;
  overflow-y: hidden;
  scroll-behavior: smooth;
  min-height: 100vh;
  min-width: 100vw;
}

#main-container {
  display: grid;
  place-items: center;
  margin: 0 auto;
  min-width: 100vw;
  width: 100vw;
}

#nodes {
  display: grid;
  place-items: center;
  margin: 0 auto;
  min-width: 100vw;
  width: 100vw;
}

.leader-line {
  z-index: 50;
}

#mugshot {
  width: var(--image-size);
  height: var(--image-size);
  max-width: 450pX;
  max-height: 450px;
  min-width: 275px;
  min-height: 275px;
  background-image: url("sj.png");
  background-repeat: no-repeat;
  background-size: contain;
  border: 2px solid var(--apricot);
  border-radius: 50%;
  box-shadow: 0px 0px 3px 2px rgba(248, 191, 167, 0.5);
  position: relative;
  margin: 0 auto;
  transition: ease-in-out 0.3s;
 }

#mugshot::after {
  content: "";
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 0px;
  top: 0px;
  border-radius: 50%;
  box-shadow: inset 5px 5px 5px 0px rgba(153, 153, 153, 0.405), inset -5px -5px 5px 0 rgba(0, 0, 0, 0.7);
}

.circular {
  border: 2px solid var(--apricot);
  position: relative;
  border-radius: 50%;
  text-align: center;
  font-size: 0.7rem;
  color: var(--apricot);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(248,191,167,0.2) 0%, rgba(97,80,67,0.2) 100%);
  padding: 5px;
  margin: 10px auto 10px auto;
  width: 8vw;
  height: 8vw;
  max-width: 200px;
  max-height: 200px;
  min-width: 60px;
  min-height: 60px;
  transition: ease-in-out 0.3s;
}

.circular:hover {
  cursor: pointer;
}

*:focus {
    outline: none !important;
}

.circular:nth-of-type(2),
.circular:nth-of-type(3) {
  transform: translateY(50px);
}

#first-layer {
  display: flex;  
  gap: 1rem;
  align-items: center;
  justify-content: center;
  transition: ease-in-out 0.3s;
}

#second-layer {
  transition: ease-in-out 0.3s;
}

.circular::after {
  content: '';
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 0px;
  top: 0px;
  border-radius: 50%;
  box-shadow: inset 3px 3px 3px 0px rgba(153, 153, 153, 0.405), inset -3px -3px 3px 0 rgba(0, 0, 0, 0.7);
}

#content_circle {
  border: 2px solid var(--apricot);
  box-shadow: 0px 0px 3px 2px rgba(248, 191, 167, 0.5);
  position: absolute;
  bottom: 2vh;
  left: 3vw;
  border-radius: 50%;
  text-align: center;
  font-size: 1rem;
  color: var(--apricot);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(circle, rgba(248,191,167,0.2) 0%, rgba(97,80,67,0.2) 100%);
  padding: 5px;
  margin: 10px;
  width: 30vw;
  height: 30vw;
  max-width: 400px;
  max-height: 400px;
  min-width: 250px;
  min-height: 250px;
  transition: ease-in-out 0.3s;
}

#content_circle::after {
  content: '';
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 0px;
  top: 0px;
  border-radius: 50%;
  box-shadow: inset 3px 3px 3px 0px rgba(153, 153, 153, 0.405), inset -3px -3px 3px 0 rgba(0, 0, 0, 0.7);
}

#content_circle img, #content_circle a {
  width: 10vh;
  height: 10vh;
  z-index: 90;
  scale: 1;
  filter: drop-shadow(0px 0px 3px black);
  transition: ease-in-out 0.3s;
}

#content_circle img:focus,
#content_circle a:focus,
#content_circle img:hover {
  cursor: pointer;
  scale: 1.2;
}

.scrollable {
  overflow: auto;
  dislay: block;
  poistion: relative;
  text-align: left;
  z-index: 90;
  width: 82%;
  height: 55%;
  padding: 5px;
  line-height: 1.8;
  transition: ease-in-out 0.2s;
}

.scrollable a,
.scrollable a:visited {
  text-decoration: none;
  color: var(--french-gray);
}

.scrollable a:active,
.scrollable a:focus,
.scrollable a:hover {
  text-decoration: none;
  color: var(--blue-gray);
}

#popout li {
  padding: 5px;
}

.keybind {
  color: var(--rich-black);
  font-family: 'Space Mono', monospace;
  background: linear-gradient(to right, #e5e2e1, #f5f3f1, #e5e2e1);
  padding: 2px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  position: relative;
}

#info {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 2px solid var(--french-gray);
  border-radius: 50%;
  text-align: center;
  font-size: 3rem;
  font-family: 'Space Mono', monospace;
  color: var(--french-gray);
  display: flex;
  align-items: center;
  background: radial-gradient(circle, rgba(99,157,209,0.1) 0%, rgba(189,199,213,0.1) 100%);
  justify-content: center;
  box-shadow: 0px 0px 3px 2px rgba(99, 157, 209, 0.5);
  padding: 5px;
  width: 10vw;
  height: 10vw;
  max-width: 75px;
  max-height: 75px;
  transition: ease-in-out 0.3s;
}

#info::after {
  content: "";
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 0px;
  top: 0px;
  border-radius: 50%;
  box-shadow: inset 3px 3px 3px 0px rgba(153, 153, 153, 0.405), inset -3px -3px 3px 0 rgba(0, 0, 0, 0.7);
}

.pulse {
  animation: pulse-animation 3s infinite;
}

#info:hover,
#info:focus {
  cursor: pointer;
}

@keyframes pulse-animation {
  0% {
    box-shadow: 0px 0px 0px 0px rgba(99, 157, 209, 0.7);
  }
  100% {
    box-shadow: 0px 0px 0px 25px rgba(99, 157, 209, 0);
  }
}

#page-heading {
  position: absolute;
  top: 2vh;
  left: 25%;
  border: 2px solid var(--apricot);
  border-radius: 50%;
  text-align: center;
  font-size: 1rem;
  color: var(--apricot);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(248,191,167,0.2) 0%, rgba(97,80,67,0.2) 100%);
  box-shadow: 0px 0px 3px 2px rgba(248, 191, 167, 0.5);
  padding: 5px;
  width: 10vw;
  height: 10vw;
  max-width: 200px;
  max-height: 200px;
  min-width: 100px;
  min-height: 100px;
  transition: ease-in-out 0.3s;
}

#page-heading::after {
  content: "";
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 0px;
  top: 0px;
  border-radius: 50%;
  box-shadow: inset 3px 3px 3px 0px rgba(153, 153, 153, 0.405), inset -3px -3px 3px 0 rgba(0, 0, 0, 0.7);
}

#popout {
  position: relative;
  width: 40vw;
  height: 33vh;
  font-size: 0.7rem;
  text-align: left;
  border: 2px solid var(--apricotcot);
  box-shadow: 0px 0px 2px 2px rgba(248, 191, 167, 0.5);
  color: var(--apricot);
  background-color: rgba(97, 80, 67, 0.8); 
  border-radius: 25px;
  padding-top: 2vh;
  padding-bottom: 2vh;
  padding-left: 2vw;
  padding-right: 40px;
  max-width: 350px;
  max-height: 230px;
  z-index: 80;
  overflow: hidden;
  transition: ease-in-out 0.3s;
}

#email_popout {
  position: relative;
  width: 300px;
  height: 20px;
  text-align: center;
  font-size: 1rem;
  border: 2px solid var(--apricotcot);
  box-shadow: 0px 0px 2px 2px rgba(248, 191, 167, 0.5);
  color: var(--apricot);
  background-color: rgba(97, 80, 67, 0.8); 
  border-radius: 25px;
  z-index: 80;
  overflow: hidden;
  transition: ease-in-out 0.3s;
}

#email_popout p {
  display: inline;
  position: relative;
  z-index: 85;
  cursor: text;
}

#popout::after,
#email_popout::after {
  content: "";
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 0px;
  top: 0px;
  border-radius: 25px;
  box-shadow: inset 2px 2px 2px 0px rgba(153, 153, 153, 0.405), inset -2px -2px 2px 0 rgba(0, 0, 0, 0.7);
  z-index: 81;
}

#popout::backdrop,
#email_popout::backdrop {
  background-color: rgba(0, 0, 0, 0.7);
}

#popout_close {
  border: none;
  background: none;
  position: absolute;
  opacity: 0.5;
  top: 12px;
  right: 7px;
  z-index: 82;
  transition: ease-in-out 0.3s;
}

#email_popout_close {
  border: none;
  background: none;
  position: absolute;
  opacity: 0.5;
  top: 10px;
  right: 7px;
  z-index: 82;
  transition: ease-in-out 0.3s;
}

#popout_close img,
#email_popout_close img {
  width: 25px;
  height: 25px;
}

#email_popout_close:hover,
#popout_close:hover {
  cursor: pointer;
  opacity: 1;
}

#popout[open],
#popout[open]::backdrop,
#email_popout[open],
#email_popout[open]::backdrop {
  animation: show_dialog_animation 0.2s ease-in-out;
}

#popout.popout_closing,
#email_popout.popout_closing {
  animation: hide_dialog_animation 0.2s ease-in-out;
}

.new_circle {
  animation: show_dialog_animation 0.2s ease-in-out;
}

.remove_circle {
  animation: hide_dialog_animation 0.2s ease-in-out;
}

@keyframes show_dialog_animation {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes hide_dialog_animation {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media screen and (max-width: 768px) {
  #first-layer {
    gap: 0;
  }
  .circular {
    margin: 2px;
    width: 7vw;
    height: 7vw;
    min-width: 60px;
    min-height: 60px;
  }
  #page-heading {
    font-size: 1rem;
    left: 10%;
  }
  #popout {
    width: 75vw;
    height: 35vh;
    max-width: 350px;
    max-height: 230px;
  }
  #content_circle {
    font-size: 0.8rem;
  }
  #content_circle img, #content_circle a {
    width: 12vh; 
    height: 12vh;
  }
}

@media screen and (max-height: 610px) {
  #mugshot {
    min-width: 250px;
    min-height: 250px;
  }
  #page-heading {
    font-size: 0.9rem;
    min-width: 75px;
    min-height: 75px;
  }
  #content_circle {
    min-width: 200px;
    min-height: 200px;
  }
  #content_circle img, #content_circle a {
    width: 12vh; 
    height: 12vh;
  }
}

@media screen and (max-height: 550px) {
  #popout {
    height: 50vh;
    max-height: 260px;
    min-height: 260px;
  }
}

@media screen and (min-width: 950px), (min-height: 900px) {
  .circular {
    font-size: 1rem;
  }
  #content_circle {
    left: 20vw;
    width: 25vw;
    height: 25vw;
  }
  #page-heading {
    font-size: 1.25rem;
  }
  #popout {
    font-size: 1rem;
    height: 41vh;
    min-width: 500px;
    max-width: 600px;
    min-height: 300px;
    max-height: 300px;
  }
  #content_circle img, #content_circle a {
    width: 15vh; 
    height: 15vh;
  }
}

@media screen and (min-height: 850px) {
  #content_circle {
    width: 30vw;
    height: 30vw;
  }
}

@media screen and (min-height: 800px) and (orientation: portrait) {
  #mugshot {
    min-width: 350px;
    min-height: 350px;
  }
  #content_circle {
    min-width: 350px;
    min-height: 350px;
    left: 5%;
  }
  #page-heading {
    font-size: 1.25rem;
    min-width: 125px;
    min-height: 125px;
  }
  .circular {
    font-size: 1.25rem;
    min-width: 125px;
    min-height: 125px;
  }
  #content_circle img, #content_circle a {
    width: 12vh; 
    height: 12vh;
  }
}

@media screen and (min-width: 1200px) {
  .circular {
    font-size: 1.25rem;
  }
}

@media screen and (max-height: 450px) and (orientation: landscape) {
  #info {
    font-size: 2rem;
    width: 5vw;
    height: 5vw;
  }
  #mugshot {
    min-width: 75px;
    min-height: 75px;
    max-width: 125px;
    max-height: 125px;
  }
  #page-heading {
    font-size: 0.7rem;
    top: 7vh;
    min-width: 50px;
    min-height: 50px;
    max-width: 75px;
    max-height: 75px;
  }
  #content_circle {
    font-size: 0.7rem;
    min-width: 200px;
    min-height: 200px;
  }
  #content_circle img, #content_circle a {
    width: 12vw; 
    height: 12vw;
  }
  #popout {
    font-size: 0.7rem;
    width: 80vw;
    height: 75vh;
    max-height: 250px;
    min-height: 250px;
  }
  .circular {
    font-size: 0.7rem;
    margin: 2px;
    width: 5vw;
    height: 5vw;
    min-width: 50px;
    min-height: 50px;
  }
  .circular:nth-of-type(2),
  .circular:nth-of-type(3) {
    transform: translateY(30px);
  }
}