@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Text&family=Nunito+Sans&family=Parkinsans&display=swap');

html {
  scroll-behavior: smooth;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

body {
  margin-left: auto;
  margin-right: auto;
  font: "Dm Serif Text";
  font-family: 'DM Serif Text';
  background-image: url('images/blue-bg.avif');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

section {
  scroll-snap-align: center;
  margin-top: 50vh;
}

#header {
  color: #DCE6D3;
  font-size: 5em;
  text-align: center;
  font: 'Parkinsans';
  font-family: 'Parkinsans';
}

.secondHeader {
  color: #DCE6D3;
  font-size: 2.5em;
  text-align: center;
  font: 'Parkinsans';
  font-family: 'Parkinsans';
}

#subheader {
  color: #DCE6D3;
  font-size: 2em;
  text-align: center;
  font-family: 'Parkinsans';
}

p {
  color: white;
  font-family: 'Nunito Sans';
  font-weight: bolder;
  font-size: 18px;
  font-size: clamp(10px, calc(15px + (40 - 20) * (90vw - 768px)/(1920 - 768)), 28px);
}

.topnav {
  display: flex;
  position: sticky;
  top: 0;
  margin-top: -10px;
  padding: 10px;
  font-size: 30px;
  background-color: #1e6ccd;
  z-index: 1;

}

.topnav li {
  list-style: none;
}

.topnav .left {
  margin-left: 1%;
  margin-right: auto; /* keeps home on the left, rest on the right */
}

.topnav .right {
  margin-right: 2%;
}

li a {
  color: white;
  text-decoration: none;
  display: inline-block;
  position: relative;
}

.topnav li a::after {
  content: '';  /* create pseudo-element */
  position: absolute;
  width: 100%;
  transform: scaleX(0);  /* start hidden */
  height: 3px;  /* underline thickness */
  bottom: 0;
  left: 0;
  background-color: #ffffff;  /* underline color */
  transform-origin: bottom center;
  transition: transform 0.25s ease-out;
}

.topnav li a:hover::after {
  transform: scaleX(1);  /* expand underline */
  transform-origin: bottom center;
}

.projectPicture {
  max-width: 40%; 
  padding-left: 2%;
}

.photoTextSide {
  display: flex;
  gap: 2rem;           /* space between text and image */
  align-items: center; /* vertically align when side by side */
  justify-content: center;
  text-align: center;
}

#aboutMe {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  margin-left: 10%;
  margin-right: 10%;
}

.greyBackground {
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 25px;
  max-width: 90%;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex-wrap: wrap;     /* allows items to wrap to next line */
}

#wrapText {
  flex: 1 1 60%;       /* takes 60% of width, but flexible */
  min-width: 200px;    /* if smaller than this, wrap occurs */
  font-size: 24px;
}

#headshot {
  max-width: 100%;
  width: 400px;
  display: flex;
  border-radius: 8px;
}

.photoWrapper {
  flex: 0 0 350px;  /* keep ~350px column for the image */
  max-width: 100%;     /* responsive image */
  height: auto;
  display: block;
}

#homepage{
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 25px;
  max-width: 1000px;
  margin: 0 auto;
  margin-top: 10%;
  padding: 2rem 1rem;
}

.button{
  color:#1e6ccd;
  border-radius: 25px;
  font-family: 'Parkinsans';
  padding: 15px 32px;
  text-decoration: none;
  font-size: 32px;
  border-style: solid;
  border-color: #DCE6D3;
  border-width: 2px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.5) 50%, #DCE6D3 50%) right;
  background-size: 200%;
  transition: .5s ease-out;
}

.button:hover{
  color: black;
  font-size: 35px;
  background-position: left;
}

.projects-again {
  background: #ffffff00;
  margin-top: -3%;
}

.project-cell {
  width: 66%;
  height: 450px;
  text-align: center;
  margin-right: 10px;
  background: rgba(0, 0, 0, 0.5) 50%;
  border-radius: 25px;
  padding: 2% 2% 0% 2%;
}

#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 10%;
}

#contact .button {
  margin-top: 2%;
}