/* Import google fonts: 'Raleway', 'Montserrat', 'Poppins' */
@import url('https://fonts.googleapis.com/css2?family=Montserrat&family=Poppins:wght@200;400&family=Raleway&display=swap');

/* Global Variables */

:root{
  --background-nav: rgba(243, 240, 240, 0.85);
  --background-nav-hov: rgba(138, 138, 138, 0.75);
  --text-nav: rgba(47, 47, 47, 1);
}

/* Overall properties */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

p {
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
}

h2, h3, h4, h5 {
  text-transform: lowercase;
}

/* Navigation */
/* Navbar */

nav {
  background-color: var(--background-nav);
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  box-shadow: 0 0 8px 0px rgb(0 0 0 / 49%);
}

.subnavbar-list {
  justify-content: flex-start;
  background-color: var(--background-nav-hov);
}

nav ul {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

nav ul li {
  padding: 0.5em;
  font-size: 1.5rem;
  font-family: "Montserrat", sans-serif;
  text-transform: lowercase;
}

.navlink {
  color: var(--text-nav);
}

.navlink, .sublink {
  position: relative;
  text-decoration: none;
}

/*to use the same animation for hover and focus -- apply all hover styles to focus as well*/
.navlink:focus-within, .sublink:focus-within {
  outline: none;
}

/*Nav bar underline animation*/
.navlink::before, .sublink::before {
  content: "";
  position: absolute;
  height: 0.05rem;
  width: 80%;
  bottom: -0.1rem;
  left: 10%;

  transform: scaleX(0);
  transition: transform 250ms ease-in;
}

.navlink::before {
  background-color: var(--text-nav);
}

.sublink::before {
  background-color: whitesmoke;
}

nav ul li:hover .navlink::before,
nav ul li:focus-within .navlink::before {
  transform: scaleX(1);
  background-color: whitesmoke;
}

nav ul li:hover .sublink::before,
nav ul li:focus-within .sublink::before {
  transform: scaleX(1);
  background-color: var(--text-nav);
}

.navbar-list li:hover,
.navbar-list li:focus-within {
  background-color: var(--background-nav-hov);
  box-shadow: 2px 2px 20px 2px rgb(116 120 128 / 51%);
}

nav ul li:hover .navlink,
nav ul li:focus-within .navlink {
  color: whitesmoke;
}

.navlink:visited {
  color:var(--text-nav);
}

.sublink {
  color: whitesmoke;
}

.subnavbar:hover,
.subnavbar:focus-within {
  background-color: var(--background-nav);
  box-shadow: 2px 2px 20px 2px rgb(116 120 128 / 51%);
}

.subnavbar:hover > *,
.subnavbar:focus-within > * {
  color: var(--text-nav);
}
/*END OF NAVBAR*/

/* Header */

#portfolio-header {
  scroll-snap-align: start;
  height: 100vh;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #868686;
  background-blend-mode: multiply;
}

#title {
  font-size: 6rem;
  font-family: "Raleway", sans-serif;
  text-align: center;
  margin: 0;
  color: #f3f0f0;
}

#subtitle {
  font-size: 1.7rem;
  font-family: "Montserrat", sans-serif;
  text-align: center;
  color: #d8caca;
}

/*TYPOGRAPHY*/

.section-header {
  font-family: "Montserrat", sans-serif;
  font-size: 1.7rem;
}

.section-lead {
  font-size: 1.2rem;
  line-height: 2rem;
  text-align: justify;
}

.photo-title {
  font-family: "Raleway", sans-serif;
  font-size: 2.5rem;
  padding-bottom: 2em;
}

.photo-description {
  font-weight: 200;
  font-size: 1.2rem;
  line-height: 2em;
  padding-bottom: 1em;
}

.photo-date, .technical {
  font-weight: 200;
  text-align: end;
}

.photo-date {
  font-size: 1rem;
  padding-bottom: 1em;
}

.technical {
  font-size: 0.7rem;
}

/* Layout */
main {
  height: 100vh;
  scroll-snap-type: y proximity;
  overflow-y: scroll;
  scroll-padding: 3.5rem;
}

section {
  display: flex;
  flex-direction:column;
}

article {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin: 10vh 0;
}

.section-intro {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section-intro > * {
  width: 50%;
  max-width: 50ch;
}

.text-container {
  flex-shrink: 2;
  max-width: 70ch;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: 5rem;
}

.text-container > * {
  margin:0;
}

.photo-container {
  align-self: center;
  flex-shrink: 1;
}

.photo-container > * {
  object-fit: contain;
}

.img-square {
  max-width: 100vw;
  height: auto;
}

.img-landscape {
  max-width: 100vw;
  height: auto;
}

.img-portrait {
  max-height: 60vh;
  max-width: 100vw;
}

/*Default view, desktop*/
@media (min-width: 1200px) {
  main {
    scroll-snap-type: y mandatory;
  }

  #portfolio-header {
    scroll-snap-align: start;
  }

  article {
    height: 100vh;
    flex-direction: row;
  }

  .reverse {
    flex-direction: row-reverse;
  }

  .img-square {
    max-width: 50vw;
    height: auto;
  }

  .img-landscape {
    max-width: 50vw;
    height: auto;
  }

  .img-portrait {
    max-height: 85vh;
    max-width: 50vw;
  }
}


/*Differing images for different screens*/

@media (min-width: 1921px) {
  #portfolio-header {
    background-image: url("../assets/web_large_4928 x 326420200516_Yashica_B_Product_Flash_0012.jpg");
  }
}

@media (min-width: 1025px) and (max-width: 1920px) {
  #portfolio-header {
    background-image: url("../assets/web4928 x 326420200516_Yashica_B_Product_Flash_0012.jpg");
  }
}


@media (max-width: 1024px) {

  #portfolio-header {
    background-image: url("../assets/web_small_4928 x 326420200516_Yashica_B_Product_Flash_0012.jpg");
    background-size: cover;
  }

  .section-intro > * {
    width: 90%;
  }

  nav ul {
    justify-content: space-between;
  }

  main {
    scroll-padding: 6rem;
  }
}
