/* Styles for index.html */
@import 'global.css';

main {
  align-items: center;
  display: flex;
  flex-direction: column;
}

section {
  padding: 0 1em 5em 1em;
  width: 100%;
}

h2 {
  text-align: center;
}

h1,
h2 {
  color: white;
  margin: 3.5em 0 1em 0;
}

/* Add partial border to bottom of h2 */
h2:after {
  border-bottom: 1px solid white;
  content: ""; /* Necessary to create pseudo element */
  display: block; /* Puts border on its own line */
  margin: 0 auto;
  max-width: 200px;
  padding: 10px 0 0 0;
  width: 25%;
}

/* Button styles */
.button {
  background-color: var(--background-dark);
  border: 2px solid white;
  border-radius: 0;
  color: white;
  height: 50px;
  width: 150px;
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
}

.button:hover {
  background-color: var(--primary-color);
  cursor: pointer;
  transition: 500ms;
}

.button:active {
  background-color: var(--primary-color-light);
  border: 2px solid var(--primary-color-light);
}

.button:focus {
  outline: var(--primary-color-dark);
}


/* ------------DROP MENU------------ */
/* Dropdown Button */
#drop-btn {
  background-color: black;
  border: 1px solid gray;
  color: var(--text-dark);
  font-weight: bold;
  margin: .5em;
  padding: 16px;
}

#drop-btn:hover {
  border: 1px solid var(--primary-color-light);
  color: var(--primary-color-light);
  cursor: pointer;
}

#drop-btn:focus {
  outline-color: white;
}

/* The container <div> -- needed to position the dropdown content */
#dropdown {
  text-align: right;
  width: 100vw;
}

/* Dropdown Content (Hidden by Default) */
#dropdown-content {
  background-color: black;
  display: none;
  position: fixed;
  text-align: center;
  width: 100%;
  z-index: 9999;
}

/* Links inside the dropdown */
#dropdown-content a {
  border-top: 1px solid var(--text-dark);
  color: var(--text-light);
  display: block;
  font-weight: bold;
  padding: 12px 16px;
  text-decoration: none;
}

/* Change color of dropdown links on hover */
#dropdown-content a:hover {
  color: var(--primary-color-light);
}

/* ------------NAV BAR------------ */
header {
  background-color: black;
  display: flex;
  height: 70px;
  justify-content: center;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 500;
}

/* Nav bar for larger screens */
#main-nav {
  align-items: center;
  display: none;
  flex-direction: row;
}

.nav-link {
  margin: 0 1em;
}

/* ------------WELCOME SECTION------------ */
#welcome {
  align-items: center;
  background-color: var(--background-dark);
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
}

#welcome-container {
  align-items: flex-start;
  background-color: var(--background-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 1em 0 1em;
  max-width: 900px;
  padding-bottom: 2em;
  position: relative;
  top: 15px;
  width: 90vw;
  z-index: 1;
}

/* Focal point: "Hello..." */
#greeting {
  color: white;
  font-size: 1.8em;
  font-weight: bold;
  margin: 1em 0;
}

/* Text under greeting */
#blurb {
  align-self: flex-start;
  line-height: 2;
  text-align: left;
}

#welcome .button {
  align-self: center;
  margin: 4em 0 0 0;
}

/* Background code */
.welcome-code {
  font-family: monospace;
  opacity: 15%;
  position: absolute;
  font-size: 0.9em;
  color: white;
}

.welcome-code:hover {
  opacity: 70%;
  transition: 700ms;
}

/* Appears when screen larger than 898px */
.js-code {
  top: 8em;
  left: 10%;
}

.code-comment {
  color: #d1d1d1;
}

/* Appears at 1400px */
.css-code {
  bottom: 40%;
  display: none;
  left: 7%;
  color: var(--code-yellow);
}

.code-blue {
  color: var(--code-blue);
}

.code-purple {
  color: var(--code-purple);
}

.code-yellow {
  color: var(--code-yellow);
}

.code-green {
  color: var(--code-green);
}

/* Appears when window is 1111px */
.html-code {
  display: none;
  position: absolute;
  left: 65%;
  bottom: 55%;
  z-index: 2;
}

/* Appears when window is 1100px */
.react-code {
  display: none;
  position: absolute;
  bottom: 5%;
  right: 20%;
  z-index: 2;
}

.node-code {
  position: absolute;
  bottom: 5%;
  left: 20%;
}

.filler-code-top {
  display: none;
  position: absolute;
  top: 15%;
  left: 40%;
}

.filler-code-bottom {
  display: none;
  position: absolute;
  bottom: 25%;
  left: 40%;
}


/* ------------About section------------ */
#about {
  background-color: var(--background-light);
  color: var(--text-light);
  height: auto;
}

#about-container {
  margin: 0 auto;
  max-width: 45em;
}

#profile-pic {
  display: none;
  max-width: 200px;
  min-width: 150px;
  width: 33%;
  border-radius: 50%;
  float: left;
  margin: 1em 2em 1em 1em;
}

/* ------------Projects section------------ */
#projects {
  background-color: var(--background-dark);
  color: var(--white);
}

#projects p {
  margin: 0 auto;
  max-width: 35em;
  margin-bottom: 1.5em;
}

#projects p a {
  color: var(--primary-color-light);
}

#projects a:hover {
  text-decoration: underline;
}

/* Container div for project tiles */
#project-grid {
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto;
  max-width: 75vw;
  width: 100%;
}

.project-tile {
  border: 1px solid white;
  margin: 5px;
}

/* Slacker News */
.project-1 {
  background-image: url(../images/slacker-news.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

/* Portfolio Website */
.project-2 {
  background-image: url(../images/portfolio.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

/* Drum Kit */
.project-3 {
  background-image: url(../images/drum-kit.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

/* Book List (unfinished) */
.project-4 {
  background-image: url(../images/book-list.jpg);
  background-repeat: no-repeat;
  background-size: cover;
}

.project-info {
  display: flex;
  flex-direction: column;
  justify-content: cover;
}

/* On hover: appears on top */
.project-cover .project-info {
  background-color: rgba(255, 255, 255, .85);
  color: black;
  height: 300px;
  padding: 35px 10px;
  text-align: center;
  visibility: hidden;
  width: 300px;
}

.project-cover:hover .project-info {
  visibility: visible;
}

.project-name {
  font-weight: bold;
}

.project-description {
  font-size: .8em;
  padding: 1em;
}

.project-links {
  margin: 1em 0 0 0;
}

.project-description a {
  color: var(--primary-color-dark);
}

/* ------------Contact form------------ */
#contact {
  background-color: var(--background-light);
  color: white;
}

#contact p {
  max-width: 35em;
  margin: 0 auto 1em auto;
  text-align: center;
}

#contact-form {
  margin: 0 auto;
  max-width: 500px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

label {
  display: inline-block;
  text-align: right;
  width: 85px;
  margin: 1em 0.5em 0 0;
}

.text-box {
  background-color: var(--background-dark);
  border: none;
  color: var(--light-grey);
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  padding: 10px 15px;
  margin: 10px 0 0 0;
  width: 100%;
}

textarea {
  height: 15em;
  font-size: 0.9em;
  vertical-align: top;
}

#contact .button {
  margin: 10px 0 0 auto;
}

.text-box:focus {
  outline: 1px solid var(--secondary-color);
}

/* Form validation */
.text-box:invalid {
  box-shadow: none;
}

.error {
  justify-content: flex-start;
  align-items: flex-start;
  color: var(--error);
  font-size: 0.8em;
  margin: 0 0 0 85px;
}

#name-error {
  display: none;
}

#email-error {
  display: none;
}

#message-error {
  display: none;
}

/* ------------ Footer section ------------*/
#footer {
  align-items: center;
  background-color: var(--background-dark);
  color: var(--light-grey);
  display: flex;
  flex-direction: column;
  font-size: .8em;
  height: 200px;
  justify-content: space-around;
}

#social-grid {
  display: flex;
}

.social-link {
  border-right: 1px solid var(--light-grey);
  padding: 1em;
}

.social-link:last-child {
  border-right: none;
}

#copyright {
  color: var(--secondary-color);
}

/* ------------ BREAK POINTS ------------*/

/* Handles landscape mobile */
@media screen and (max-height: 536px) {
  #welcome {
    height: auto;
  }

  #welcome-container {
    margin-top: 3.5em;
  }
}

/* Handles larger widths */
@media screen and (min-width: 600px) {
  #main-nav {
    display: flex;
  }

  #dropdown {
    display: none;
  }

  #greeting {
    font-size: 2em;
  }

  #welcome .button {
    align-self: flex-start;
  }

  .nav-link {
    font-size: 1.2em;
  }

  #about-container {
    flex: none;
  }

  /* Photo appears */
  #profile-pic {
    display: block;
  }

  #description {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media screen and (min-width: 700px) {
  .welcome-code {
    font-size: 1em;
  }
}

@media screen and (min-width: 900px) {

  /* Makes project tiles bigger */
  /* .project-cover .project-info {
    height: 375px;
    width: 375px;
  } */

  /* .project-description {
    font-size: 1em;
  } */

  #contact-form {
    max-width: 600px;
  }

  textarea {
    height: 23em;
  }
}

@media screen and (min-width: 1000px) {
  .node-code {
    left: 10%;
  }
  .react-code {
    display: block;
  }
}

@media screen and (min-width: 1111px) {
  .html-code {
    display: block;
  }
}

@media screen and (min-width: 1400px) {
  .css-code {
    display: block;
  }
  .filler-code-top {
    display: block;
  }
  .filler-code-bottom {
    display: block;
  }
}

/* All code in welcome section should remain basically where they are */
@media screen and (min-width: 1650px) {
  .js-code {
    left: 25em;
  }

  .html-code {
    left: 85em;
  }

  .react-code {
    left: 80em;
  }

  .node-code {
    left: 20%;
    bottom: 8%;
  }

  .css-code {
    left: 15em;
  }
}
