/* establishing variables */
:root {
  --dark: #203354;
  --light: #B8C7F1;
  --accent: #005D82;
  --darkgray: 83, 83, 83;
}

html {
  height: 100%;
}

/* base settings for the body of the page, with mobile first in mind*/
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-weight: lighter;
  font-size: 18px;
  display: flex;
  flex-flow: column;
  color: var(--dark);
  background-color: var(--light);
}

/* type selectors for some general properties */
header, footer {
  background-color: var(--accent);
  color:var(--light);
}

li {
  text-decoration: none;
  font-size: 1.5em;
  margin: 8px;
  text-align: center;
}

a {
  text-decoration: none;
  color: var(--light);
}

p {
  margin: 10px 20px;
}

img {
  width: 100%;
  height: auto;
}

/* base font-sizes and types for header elements */
h1, h2, h3, h4 {
  font-weight: bolder;
}

h1 {
  font-size: 2.5em;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 1.75em;
}

h4 {
  font-size: 2em;
  margin-bottom: 10px;
  text-align: center;
}

/* selectors ordered by HTML */
/* start of header flex-box */
header {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
}

/* classes to create different options for length of name for H1*/
.small-screen-name, .big-screen-name {
  background-color:var(--light);
  color: var(--accent);
  padding: 15px;
  border-radius: 10px;
}

.big-screen-name {
  display: none;
}

/* pseudo-class enabling underline on hover for links within list items */
li a:hover {
  border-bottom: .1em solid var(--light)
}
/* end header flex-box. children include one of above sections (depending on screen size) and nav (or .header-nav) */

/* start of hero image flexbox */
figure {
  display: flex;
  align-items: flex-end;
  justify-content: right;
}

/* utilizing background image for hero image/avatar */
.hero-image {
  height: 25vw;
  background-image: url("../images/elias_banner.jpeg");
  background-position: center 50%;
  background-repeat: no-repeat;
  background-size: cover;
  margin-bottom: 2%;  
}

/* only child element of figure, used to orient text on image */
.hero-text {
  margin: 0 1% 1% 0;
  padding: 10px;
  background-color: var(--light);
  color: var(--accent);
  border-radius: 20px;
  text-align: center;
}
/* end figure flexbox */

/* start of main flexbox */
main {
  display: flex;
  flex-flow: column;
  align-items: center;
}

/* child elements are #about-me, .content-about-me, #work, and .portfolio-links; not all are selectors here */
.content-about-me {
  border-top: 2px solid black;
  margin: 10px 30px;
}

/* styling for span contact link */
.link-underline a {
  color: var(--dark);
  text-decoration: underline;
}

/* same as above */
.link-underline a:hover {
  background-color: var(--dark);
  color: var(--light);
}

/* child element of main flexbox, and beginning of nested flex-box for Work section */
.portfolio-links {
  border-top: 2px solid black;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  margin: 10px 30px;
}

/* nested child flex element of .portfolio-links. Establishes position relative for .feature-title(-small) formatting*/
.big-feature, .small-features {
  box-sizing: border-box;
  padding: 1.5%;
  background-color: rgb(var(--darkgray));
  border: 1px solid black;
  position: relative;
}

.big-feature {
  margin: 2% 4% 1% 4%;
  flex-basis: 96%;
}

.small-features {
  flex-basis: 42%;
}

/* text boxes overlaid on project images */
.feature-title, .feature-title-small {
  background-color: rgb(var(--darkgray));
  color: var(--light);
  position: absolute;
  bottom: 10%;
  left: 1.5%;
  padding: 1%;
  line-height: 1.25;
  transition: box-shadow .15s;
}

.feature-title {
  left: 1.5%
}

.feature-title-small {
  left: 3%;
}

/* text decoration and dynamic viewport-based text sizing for responsive design*/
.feature-title h3{
  font-size: 6vw;
  font-style: italic;
  text-align: left;
}

.feature-title p {
  font-size: 2.5vw;
  margin: 0;
  text-align: left;
}

.feature-title-small h3{
  font-size: 2.75vw;
  font-style: italic;
  text-align: left;
}

.feature-title-small p {
  font-size: 2vw;
  text-align: left;
  margin: 0;
}

/* pseudo-class for hovering on image for image and project title text */
.project-links img:hover {
  Opacity: 50%;
}

.feature-title:hover, .feature-title-small:hover {
  box-shadow: 0px 0px 20px rgb(var(--darkgray), 1);
}

/* sets up footer flex-box. children: #contact-me and .bottom-nav */
footer {
  display: flex;
  flex-flow: column;
  padding: 2% 0;
}

/* establishes a flexbox to structure its child ul */
.bottom-nav {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--light);
  margin: 0 30px;
} 

.bottom-nav-list li {
  font-size: 1em;
  color:var(--light);
}

.special:hover a {
  color:white;
}

/* media queries for tablet */

/* change of border location, reconfigures flex boxes */

@media screen and (min-width:650px) {
  /* first restructure several flexboxes to flex row */
  header {
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    height: 125px;
  }
  
  main {
    display: flex;
    flex-flow: row wrap;
    align-items: start;
  }
  
  footer {
    display: flex;
    flex-flow: row;
  }

  /* with flex row, new formatting needed */
  .header-nav {
    align-self: flex-end;
  }
  /* creates flexbox to reorient nav bar */
  .header-nav-list {
    display:flex;
    flex-flow:row;
  }

  li {
    margin: 8px 10px;
  }

  /* new font-size for new screen */
  .hero-text {
    font-size: 125%;
  }

  /* reorients border bar, new convention for structuring the main flexbox with unevenly split columns in this selector and the following one */
  .content-about-me, .portfolio-links {
    border-left: 2px solid black;
    border-top: 0;
    width: 77%;
    flex-basis: 77%;
    margin: 1% 0;
  }

  #about-me, #work {
    width: 17%;
    flex-basis: 17%;
    text-align: right;
    margin: 1% 2%;
  }

  .content-about-me p {
    padding: 0 2%;
  }

  /* feature title font sizing adjusted for screen size */
  .feature-title h3{
    font-size: 4.75vw;
  }

  .feature-title p {
    font-size: 2vw;
  }

  .feature-title-small h3{
    font-size: 2vw;
  }
  
  .feature-title-small p {
    font-size: 1.25vw;
  }

  /* adjust border bar in footer, begins mirror footer flexbox to reflect main flexbox in next two selectors */
  .bottom-nav {
    border-left: 2px solid var(--light);
    border-top: 0;
    margin: 0;
    width: 77%;
    flex-basis: 77%;
    justify-content: center;
  }
  
  #contact-me {
    width: 17%;
    flex-basis: 17%;
    margin: 2% 2% 2% 2%;
  }

  /* establishes flex row flexbox for bottom nav for horizontal alignment */
  .bottom-nav-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
  }
  
  /* new header formatting */
  h4 {
    font-size: 1.75em;
    text-align: right;
    margin: 1% 2%;
  }

  /* formatting for bottom nav list items */
  .bottom-nav-list li {
    font-size: 1.25em;
    color:var(--light);
  }
}

/* media queries for desktop */
@media screen and (min-width:1100px) {
  /* additional formatting for largeer screens */
  header {
    height: 150px;
  }
  
  .header-nav-list li {
    margin: 8px 30px;
  }

  /* switch to using full last name */
  .big-screen-name {
    display: block;

  }
  .small-screen-name {
    display: none;
  }

  /* further text-sizing updates to featured project titles */
  .feature-title h3{
    font-size: 4.5vw;
  }

  .feature-title p {
    font-size: 1.75vw;
  }

  .feature-title-small h3{
    font-size: 1.75vw;
  }
  
  .feature-title-small p {
    font-size: 1vw;
  }
}
