/* Color Variables */
:root {
  --dark-purple: #643d85;
  --black: black;
  --silver: #f0f0f0;
  --light-gray: #e0e0e0;

  --contact-color: #2e0c37; /*Darker purple*/
  --primary-background: #593196; /*Dark purple*/
  --accent-color: #ffd700; /*Bright gold*/
}

/*Normalize CSS rules by targeting all elements*/
* {
  margin: 0;
  padding: 0;
  /*border: 1px solid black; /*Test element sizes*/
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  /*Element's width and height include the padding and border*/
  box-sizing: border-box;
  /*Sets default font size to 10px (browser default is 16px)*/
  /*This makes it easier to work with rem units later, as 2rem is 20px*/
  font-size: 62.5%;
}

/*Header Font (for headings and titles): Playfair Display*/
h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
}

/*Navigation and Button Font: Montserrat*/
a {
  text-decoration: none;
  font-weight: bold;
}

section {
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
}

/*Divider*/
.section-divider {
  width: 100%;
  height: 5px;
  background: black;
}

/*****NAVBAR*****/
.banner-wrap {
  background: var(--dark-purple);

  /*Fix navbar to top of screen*/
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10; /*Ensure no elements overlap it*/

  /*Align child elements in a row, centered, and spaced to opposite ends*/
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%; /*Take up entire viewport width*/
  padding-bottom: 0.1rem;

  border-bottom: 2px solid black; /*Distinguish from overlapping elements*/
}
/*Name*/
.banner-wrap h1 a {
  letter-spacing: 0.2rem;
  font-size: 2.7rem;
  margin-left: 2rem;
  padding: 2rem;
}
.banner-wrap h1 a:hover {
  transform: scale(1.08);
}
/*Nav*/
.navbar ul {
  display: flex; /*Align links in a row*/
  list-style: none; /*Remove bullet points*/
}
.navbar a {
  letter-spacing: 0.1rem;
  font-size: 2.3rem;

  margin-right: 2rem;
  padding: 2.3rem;
}
/* On hover, scale the size of the text */
.navbar a:hover {
  transform: scale(1.15);
}
/*Links*/
.banner-wrap a {
  display: inline-block;
  color: var(--accent-color);
  transition: transform 0.3s ease-in-out;
}

/*****WELCOME SECTION*****/
.welcome-section {
  background: linear-gradient(135deg, var(--black), var(--primary-background));

  /*Align child elements in a row, centered, and spaced evenly*/
  display: flex;
  align-items: center;
  justify-content: space-evenly;

  width: 100%;
  height: 100vh;
}
.welcome-image,
.welcome-text {
  flex: 0 0 50%;
  max-width: 50%;
}
/*Image*/
.welcome-image {
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-image img {
  max-width: 100%;
  border-radius: 50%; /*Circle image*/
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /*Light shadow*/
}
/*Text*/
.welcome-text h1 {
  font-size: 5rem;
  color: var(--silver);
  text-shadow: 2px 2px 4px #00000080;
}
.accent-text {
  color: var(--accent-color);
  white-space: nowrap;
}
.welcome-text h2 {
  line-height: 2;
  font-size: 3rem;
  color: var(--silver);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.welcome-text p {
  line-height: 1.5;
  font-size: 2.2rem;
  color: var(--silver);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.welcome-text a {
  display: block;
  font-size: 2.2rem;
  color: var(--accent-color);
  text-decoration: none;
  margin-top: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s;
}
.welcome-text a:hover {
  transform: translateY(4px);
  text-decoration: underline;
}

/*****PROJECTS*****/
.project-section {
  background: linear-gradient(135deg, rgb(50, 50, 50), rgb(54, 54, 109));

  width: 100%;
  padding: 6rem 2rem;
}
/*Header*/
.project-section h2 {
  color: white;

  line-height: 2;
  text-decoration: underline;
  text-underline-offset: 10px;

  margin-bottom: 3rem;
  font-size: 3.5rem;
  text-align: center;
  letter-spacing: 0.2rem;
}
.project-section h3 {
  color: white;

  line-height: 2;
  text-decoration: none;

  margin-top: 2rem;
  margin-bottom: 2rem;

  font-size: 3rem;
  text-align: center;
  letter-spacing: 0.2rem;
}

/*Grid*/
.projects-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(210px, 1fr)
  ); /*Fit grid to width*/
  grid-gap: 5rem; /*Space out grid elements*/
  width: 100%;
  max-width: 1300px;

  padding: 0 5rem;
  margin: 0 auto; /*Center grid*/
}
/*Grid tile*/
.project-tile {
  width: 100%;
  background: var(--light-gray);
  text-align: center;

  transition: 0.4s; /*Change hover size increase time*/
}
.project-tile:hover {
  transform: scale(1.1); /* Hover effect to increase size*/
}
.project-tile p {
  color: var(--dark-purple);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.5rem;
  padding: 1rem;
  height: 25%;
}
.project-tile img {
  width: 100%;
  height: 75%;
}
.project-notification p {
  color: white;

  margin-top: 3rem;
  font-size: 3.5rem;
  text-align: center;
  letter-spacing: 0.2rem;
}
.project-notification a {
  color: var(--accent-color);
}
.project-notification a:hover {
  text-decoration: underline;
}

/*****LINKS*****/
.links {
  background: linear-gradient(
    135deg,
    var(--contact-color),
    var(--primary-background)
  );

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100vh;
}
/*Header*/
.links h1 {
  color: var(--silver);

  max-width: 100vw;
  display: block;
  text-align: center;
  letter-spacing: 0.1rem;
  font-size: 5rem;
  padding-bottom: 5rem;
}
.contacts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
}
/*Link Buttons*/
.contact-btn {
  color: var(--silver);
  font-size: 3.5rem;
  transition: transform 0.4s ease-in-out;
}
.contact-btn:hover {
  transform: translateY(5px);
}

/*Change welcome section on smaller viewport heights*/
@media (max-height: 650px) {
  .welcome-section img {
    max-height: 350px;
  }
}
@media (max-height: 550px) {
  .welcome-section img {
    max-height: 250px;
  }
}
@media (max-height: 450px) {
  .welcome-section img {
    max-height: 200px;
  }
}

/*Change font size on smaller viewports, change image*/
@media (max-width: 1200px) {
  html {
    font-size: 50%;
  }
  .welcome-section img {
    max-height: 250px;
  }
}
@media (max-width: 900px) {
  html {
    font-size: 40%;
  }
  .welcome-section img {
    max-height: 250px;
  }
}
@media (max-width: 500px) {
  .banner-wrap h1 a {
    font-size: 1.8rem;
  }
  .navbar a {
    font-size: 1.8rem;
    margin-right: 1rem;
    padding: 2rem;
  }
}

/*Change layout*/
@media (max-width: 700px) {
  .welcome-section,
  .contacts {
    /*Align child elements in a row, centered, and spaced evenly*/
    flex-direction: column;
  }
  .welcome-image img {
    max-height: 200px;
    margin-bottom: -10rem;
  }
  .welcome-text {
    max-width: 90%;
  }
}
