/*■■■■■■■■ Prefences ■■■■■■■■*/
:root {
  /* Padding */
  --padding: 1rem;

  /* Colors */
  --color-main: #013;
  --color-bg: rgb(250,250,250);
  --color-bg-glass: rgba(0, 255, 187, 0.3);
  --color-text: #111;
  --color-shadow: rgba(0, 0, 0, .1);
  --color-heightlight: rgba(255, 255, 255, .5);

  /* Normal text */
  --font-title: Courier, monospace;
  --font-body: Times, serif;
  font-family: var(--font-body);
  color: var(--color-text);
  
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--color-main);
  background-color: var(--color-bg-glass);
  padding: .3rem;
  box-shadow: 0px 0px 8px 4px var(--color-shadow);
  backdrop-filter: blur( 4px );
  -webkit-backdrop-filter: blur( 4px );
  border: 1px solid var(--color-heightlight);
}

a {
  font-family: var(--font-title);
  text-decoration: none;
}

/*■■■■■■■■ Background ■■■■■■■■*/
body {
  margin: auto; /* FIX white border edge */
  animation: onload .5s ease-in-out;
  display: flex;
  flex-flow: column;
  height: 100%;
} 

svg {
	position: absolute;
  z-index: -1;
	width: 100%;
  height: 100%;
}
/*■■■■■■■■ Navigation Content ■■■■■■■■*/
a[icon]:not(address a)::before {
  content: attr(icon); /* Media links */
} a[icon]:not(:empty, address a)::before {
  content: attr(icon) " "; /* Navigation links */
}

a[icon] {
  display: inline-block;
  background-color: #FFF;
  padding: calc(var(--padding)/2) var(--padding);
  border-radius: 9rem;

  white-space: nowrap;
  overflow: hidden;
  
} a[icon]:empty {
  padding: calc(var(--padding)/2);
}

/*■■■■■■■■ Header & Footer ■■■■■■■■*/
header nav, footer {
  display: flex;
  gap: .5rem;
} 

header, footer {
  margin: .5rem;
  width: calc(100% - 1rem);
  position: fixed;
  z-index: 1;
}

@media screen and (max-width: 300px) {
  nav {
    background-color: #013;
  }
  a::before {
    white-space: pre;
    content: attr(icon) "\9";
  }
  a {
    width: 1rem;
  }
}



footer {
  bottom: 0;
}

address a[icon]::after {
  content: " " attr(icon);
}

footer address {
  margin-left: auto;
}

/*■■■■■■■■ Main Content ■■■■■■■■*/
iframe {border: 0;} /* Remove border from iframe */

html, body, main {
  height: 100%;
}

main {
  margin-top: 0px;
}

::-webkit-scrollbar {
  width: 16px;
  border: 5px solid white;

}

::-webkit-scrollbar-thumb {
  background-color: #b0b0b0;
  background-clip: padding-box;
  border: 0.05em solid #eeeeee;
}

::-webkit-scrollbar-track {
  background-color: #bbbbbb;
}
/* Buttons */
::-webkit-scrollbar-button:single-button {
  background-color: #bbbbbb;
  display: block;
  border-style: solid;
  height: 13px;
  width: 16px;
}

/* Up */
::-webkit-scrollbar-button:single-button:vertical:decrement {
  height: 130px;
  border-width: 0 8px 8px 8px;
  border-color: transparent transparent #555555 transparent;
}

::-webkit-scrollbar-button:single-button:vertical:decrement:hover {
  border-color: transparent transparent #777777 transparent;
}
/* Down */
::-webkit-scrollbar-button:single-button:vertical:increment {
  border-width: 8px 8px 0 8px;
  border-color: #555555 transparent transparent transparent;
}

::-webkit-scrollbar-button:vertical:single-button:increment:hover {
  border-color: #777777 transparent transparent transparent;
}

iframe, .homepage {
  width: 100%;
  height: 100%;
	position: absolute;
  border: none;
}

iframe:target, .homepage {
  margin-top: 0%; opacity: 1;
  transition-property:  margin, opacity;
  transition-delay:     0.5s,   0.5s;
  transition-duration:  0s,     0.5s;
  transition-timing-function: ease-in;
}

/* Select all iframe and all .homepage inside main that has a iframe:target */
iframe, main:has(> iframe:target) .homepage {
  margin-top: -1000%;  opacity: 0;
  /* This can't be done without the iframes being loaded... 
  transition-property:  margin, opacity;
  transition-delay:     0.5s,   0s;
  transition-duration:  0s,     0.5s;
  transition-timing-function: ease-out;
  */
} iframe {margin-top: -1000%;}

/*■■■■■■■■ Media Queries ■■■■■■■■*/
@media (prefers-color-scheme: dark) {
  /* Standard Colors */
  :root {
    --color-main: #0FB;
    --color-bg: #001;
    --color-bg-glass: rgba(0, 0, 0, 0.1);
    --color-text: #CCC;
    --color-shadow: rgba(0, 0, 0, .9);
    --color-heightlight: rgba(255, 255, 255, .1);
  }

  /* Background */
  svg {filter: brightness(38%) contrast(300%);}
}

/* "coarse" = Touch */
@media (pointer: coarse) {
  :root {
    --padding: 1.5rem;
  }
} 

/* This will brake the layout in the iframes
@media (orientation: landscape) {
  body {
    flex-direction: row;
  }
}
*/ 
/*■■■■■■■■ Animations ■■■■■■■■*/

@keyframes onload {
  from {opacity: 0;}
  to {opacity: 1;}
}