/* Global attributes */
* {
  padding: 0;
  margin: 0;
}
body {
  background-color: black;
  font-family: arial;
  animation: fade-in 0.5s forwards;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Safari */
  -khtml-user-select: none;    /* Konqueror HTML */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Standard syntax */
}
p,a,h1,h2,h3,span {
  text-decoration: none;
  color: white;
  font-size: 1em;
}
/* Text Attributes */
.a {
  cursor: pointer;
  transition: color 0.15s ease;
}
.a:hover {
  color: grey;
  transition: color 0.15s ease;
}
.a:active {
  color: grey;
}
.aactive {
  color: grey;
  text-decoration: none;
  cursor: pointer;
}

/* Desktop Navigation Sidebar */
.sidebar {
  display: block;
  position: fixed;
  height: 100%;
  width: 280px;
  background-color: black;
}
.sidebar-logo {
  margin-left: 55px;
  margin-top: 50px;
  font-size: 1.8em;
}
.sidebar-nav {
  margin-left: 55px;
  margin-top: 50px;
  position: absolute;
}
.sidebar a,span {
  line-height: 1.85;
}
.sidebar-tray-icon {
  margin-left: 10px;
  display: inline-block;
  transform: scale(1.3, 1.3) rotate(0deg);
}
.sidebar-tray {
  display: none;
  margin-left: 45px;
  width: 100%;
}
.sidebarSubheader {
  width: 70%;
  position: absolute;
  bottom: 0;
}
.sidebarSubheader p {
  font-size: 0.6em;
}

/* Mobile Navigation Bar */
.topbar {
  display: none;
}

/* Page contents */
.main {
  position: static;
  height: 10000px;
  width: calc(100% - 280px);
  margin-left: 280px;
  opacity: 1;
}
.mainText {
  margin-top: 300px;
  width: 600px;
  padding-left: 10px;
}
.mainText h2 {
  font-size: 1.8em;
  padding-bottom: 30px;
}
.mainText h3 {
  font-size: 1.4em;
  padding-bottom: 30px;
}
.mainText div {
  height: 100px;
}

.email {
  text-decoration: underline;
  user-select: all;
  padding: 5px;
}
.social {
  text-decoration: underline;
  padding: 5px;

}
/* Image Gallary */
.gallery {
  columns: 500px;
  grid-column-gap: 5px;
  padding: 5px;
}
.image {
  height: auto;
  width: 100%;
  pointer-events: none;
  margin-bottom: 2px;
  animation: fade-in 1s forwards; /* Apply the 'fade-in' animation for 1 second, staying at the end state */
  transition: transform 0.5s ease-in-out;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Safari */
  -khtml-user-select: none;    /* Konqueror HTML */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Standard syntax */
}
/* Relative Attributes */
.centreY {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}
.centreX {
    position: absolute;
    left: 50%; /* relative to nearest positioned ancestor or body element */
    transform: translate(-50%, -50%); /* relative to element's height & width */
}
/* Animation */
@keyframes fade-in {
  0% {
    opacity: 0; /* Start completely transparent */
  }
  100% {
    opacity: 1; /* End completely opaque */
  }
}

/* Smaller Window Attributes */
@media only screen and (max-width: 1580px) {
  .gallery {
    columns: 300px;
  }
}
@media only screen and (max-width: 949px) {
  /* Hides Navigation Menu */
  .sidebar {
    transition: left 0.2s ease;
    width: 80%;
    z-index: 9999;
    left: 100%;

  }
  /* Mobile Navigation Meny Attributes */
  .sidebar-nav {
    margin-left: 55px;
    top: 20%;
    position: absolute;
  }
  .sidebar a,span {
    line-height: 2.5;
  }
  .sidebarSubheader {
    width: 90%;
  }
  .sidebarSubheader p {
    font-size: 0.7em;
    text-align: center;
  }
  /* Mobile Navigation Bar */
  .topbar {
    display: flex;
    position: fixed;
    height: 55px;
    width: 100%;
    background-color: black;
    z-index: 9999;
  }
  .topbar p {
    font-size: 20px;
    color: white;
    padding-left: 6px;
  }
  .topbar label {
    top: 20px;
    font-size: 35px;
    float: right;
    color: white;
    cursor: pointer;
    margin-right: 6px;
  }
  .topbar label:hover {
    color: grey;
  }
  .topbar label:active {
    color: #737373;
  }
  .topnav-l {
    width: 90%;
  }
  .topnav-r {
    float: right;
    width: 10%;
    min-width: 60px;
  }
  /* Page Contents */
  .main {
    margin-left: 0px;
    padding-top: 55px;
    width: 100%;
    transition: opacity 0.2s linear;
  }
  .mainText {
    margin-top: 30vh;
    width: 80%;
  }
  /* Image Gallary */
  .gallery {
    columns: 240px;
    padding-top: 0px;
  }
  /* Relative Attributes */
  .mobile-hide {
    visibility: hidden;
  }
  /* Navigation Checkbox Attributes */
  #myNav:checked ~ .sidebar {
    left: 20%;
  }
  #myNav:checked ~ .main {
    opacity: 0.7;
  }
  /* myWork Checkbox Attributes */
  #myWork:checked ~ .sidebar-tray {
    display: inline;
  }
  #myWork:checked ~ .sidebar-tray-icon {
    transform: scale(1.5, 1.5) rotate(-45deg);
  }
}
@media only screen and (max-width: 616px) {
  .gallery {
    columns: 200px;
  }
}
@media only screen and (max-width: 418px) {
  .gallery {
    columns: 150px;
  }
}
@media only screen and (max-width: 318px) {
  .gallery {
    columns: 100px;
  }
}
