/********** CSS RESET **********/

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

/* prevent font size inflation */
html {
  scroll-behavior: smooth;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

a {
  color: currentColor;
  text-decoration: none;

  &:visited {
    color: currentColor;
  }
}

ul {
  list-style: none;
  padding-inline-start: 0;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Outfit', sans-serif;
  height: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* more natural line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

p, h1, h2,
h3, h4 {
  overflow-wrap: break-word;
}

img, picture, svg {
  max-width: 100%;
  display: block;
}

input, button,
textarea, select {
  font: inherit;
}

/* make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/********** VARIABLES **********/

/* variables */
:root {
  --background-color: #223957;
  --text-color: #eee8cf;
  --white-color: #FAFAFA;
  --semi-transparent-white-color: rgba(250, 250, 250, 0.875);
  --black-color: black;
  --green-color: #2E8B57;
  --red-color: #FF414D;
}

/********** HERO SECTION **********/

.hero-section {
  height: 100svh;
  position: relative;
}

.hero-section__heading-display-control {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-section__heading-container {
  height: 15%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.hero-section__primary-heading {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.hero-section__secondary-heading {
  font-size: 1.27rem;
  display: flex;
  justify-content: center;
  gap: .5rem;
  align-items: center;
}

/* Ticker */

.hero-section__ticker {
  background-color: var(--white-color);
  border-top: 2px solid var(--black-color);
  border-bottom: 2px solid var(--black-color);
  color: var(--black-color);
  display: flex;
  font-size: calc(1rem + .3vw);
  overflow: hidden;
  padding: 5px;
  position: absolute;
  bottom: 7.5rem;
  white-space: nowrap;
  width: 100%;
  z-index: -1;
}

.hero-section__ticker-content {
  animation: scrollTicker 10s linear infinite;
  display: flex;
  padding-right: 3.125rem;
  padding-left: 5%;
}

@keyframes scrollTicker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Hero CTA */

.hero-section__cta-container {
  text-align: center;
  position: relative;
  bottom: 5rem;
}

.hero-section__cta {
  color: var(--text-color);
  font-size: calc(1rem + .5vw);
  font-weight: 500;
}

/********** NAV **********/

.nav-container {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
}

.nav-container__sticky-nav {
  position: sticky;
}

.nav-container__nav-ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .7rem;
  font-size: calc(.8rem + .3vw);
  margin-top: 1rem;
}

.scrolled {
  border-bottom: 1px solid;
  color: var(--text-color);
  width: fit-content;
  margin: 1rem auto 0 auto;
}

/********** ABOUT SECTION **********/

.about-section {
  height: 100vh;
  position: relative;
}

.about-section__display-control {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  width: 95%;
  margin: 0 auto;
}

.about-section__main-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem;
}

.about-section__img-container {
  display: flex;
  justify-content: center;
  align-items: end;
  width: 60%;
  margin: 0 auto;
}

.about-section__img {
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
  height: 100%;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
}

.about_section-work-link {
  text-decoration: underline;
}

.about-section__contact-link {
  margin-right: 1rem;
}

.about-section__main-cta {
  font-weight: 600;
}

/********** PROJECTS SECTION **********/

.projects-section {
  height: 100%;
}

.projects-section__display-control {
  width: 70%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.projects-section__project1 {
  height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.projects-section__project1-left-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  width: 80%;
}

.projects-section__project1-left-side-main-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.projects-section__project1-desktop-img {
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  cursor: pointer;
}

.projects-section__project1-desktop-img:hover {
  opacity: 0.85;
}

.projects-section__project1-small-text {
  display: flex;
  justify-content: center;
  align-items: center;
}

.projects-section__live-site {
  color: var(--green-color);
}

.projects-section__project1-cta-btn {
  background-color: var(--background-color);
  border: 0;
  color: var(--text-color);
  cursor: pointer;
}

.projects-section__project1-right-side {
  display: none;
  justify-content: center;
  align-items: center;
  width: 60%;
}

.projects-section__project1-right-img-container {
  width: 55%;
}

.projects-section__project1-cta-btn {
  font-weight: 500;
}

/* project 1 modal */

.projects-section__project1-modal {
  width: 90vw;
  height: auto;
  max-height: 90dvh;
  background-color: var(--background-color);
  overflow-y: auto;
  padding: 2.2rem 2rem 2rem 2rem;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  visibility: hidden;
  z-index: 3;
}

.projects-section__close-project1-modal-btn {
  background-color: transparent;
  border: 0;
  color: var(--text-color);
  cursor: pointer;
  font-weight: 500;
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
}

.carousel-container {
  max-width: 316px;
  position: relative;
  margin: auto;
  overflow: hidden;
}

.carousel-slide {
  width: 100%;
  height: 400px;
  display: flex;
  transition: all 0.5s;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projects-section__carousel-btns-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  margin-top: 6px;
  margin-bottom: 2rem;
}

.projects-section__carousel-btn {
  background-color: transparent;
  border: 0;
  color: var(--text-color);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
}

.projects-section__project1-modal-info {
  display: flex;
  flex-direction: column;
  line-height: 1.7;
  text-align: left;
}

.projects-section__project1-link {
  text-decoration: underline;
  text-align: center;
  margin-inline: auto;
}

.projects-section__project1-modal-info p {
  margin-top: 2.75rem;
}

.projects-section__project1-icon-presenter-text {
  display: inline-block;
  margin: 2.75rem 0 1rem 0;
}

.projects-section__project1-modal-icons-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.projects-section__project1-overlay {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  z-index: 2;
}

/* Project 2 */

.projects-section__project2 {
  height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.projects-section__project2-left-side {
  display: none;
  justify-content: center;
  align-items: center;
  width: 60%;
}

.projects-section__project2-left-img-container {
  width: 55%;
}

.projects-section__project2-right-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  width: 80%;
}

.projects-section__project2-right-side-main-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.projects-section__project2-desktop-img {
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  cursor: pointer;
}

.projects-section__project2-desktop-img:hover {
  opacity: 0.85;
}

.projects-section__project2-small-text {
  display: flex;
  justify-content: center;
  align-items: center;
}

.projects-section__project2-cta-btn {
  background-color: var(--background-color);
  border: 0;
  color: var(--text-color);
  cursor: pointer;
  font-weight: 500;
}

/* project 2 modal */

.projects-section__project2-modal {
  width: 90vw;
  height: auto;
  max-height: 90dvh;
  background-color: var(--background-color);
  overflow-y: auto;
  padding: 2.2rem 2rem 2rem 2rem;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  visibility: hidden;
  z-index: 3;
}

.projects-section__close-project2-modal-btn {
  background-color: transparent;
  border: 0;
  color: var(--text-color);
  cursor: pointer;
  font-weight: 500;
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
}

.projects-section__project2-carousel-container {
  max-width: 298px;
  position: relative;
  margin: auto;
  overflow: hidden;
}

.projects-section__project2-carousel-slide {
  width: 100%;
  height: 400px;
  display: flex;
  transition: all 0.5s;
}

.projects-section__project2-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projects-section__project2-carousel-btns-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  margin-top: 6px;
  margin-bottom: 2rem;
}

.projects-section__project2-carousel-btn {
  background-color: transparent;
  border: 0;
  color: var(--text-color);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
}

.projects-section__project2-modal-info {
  display: flex;
  flex-direction: column;
  line-height: 1.7;
  text-align: left;
}

.projects-section__project2-link {
  text-decoration: underline;
  text-align: center;
  margin-inline: auto;
}

.projects-section__project2-modal-info p {
  margin-top: 2.75rem;
}

.projects-section__project2-icon-presenter-text {
  display: inline-block;
  margin: 2.75rem 0 1rem 0;
}

.projects-section__project2-modal-icons-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.projects-section__project2-overlay {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  z-index: 2;
}

/********** SKILLS **********/

.skills-section {
  height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.skills-section__display-control {
  height: 95%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.skills-section__content-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 5rem;
}

.skills-section__skills-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.skills-section__ticker {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  width: 8.3%;
  margin-inline: auto;
  z-index: -1;
}

.skills-section__ticker-content ul {
  animation: scrollTicker 20s linear infinite;
  display: flex;
}

.skills-section__skill-icon {
  margin-inline: 2.5rem;
  transform: translateZ(0);
}

/********** CONTACT FORM **********/

.contact-section__display-control {
  width: 80%;
  margin-inline: auto;
}

.contact-section__contact-heading {
  margin-bottom: 3rem;
}

.contact-section__email-input {
  margin-bottom: .2rem;
}

.contact-section__email-input,
.contact-section__textarea {
  background-color: var(--white-color);
  border: none;
  outline-color: var(--text-color);
  width: 100%;
}

.contact-section__textarea {
  height: 12rem;
}

.message-success {
  color: var(--green-color);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 1rem 0;
  width: 100%;
}

.message-error {
  color: var(--red-color);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 1rem 0;
  width: 100%;
}

.contact-section__form-btn {
  background-color: var(--background-color);
  border: 0;
  border-bottom: 2px solid var(--text-color);
  color: var(--text-color);
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

/********** FOOTER **********/

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5rem;
}

/********** MEDIA QUERIES **********/

/* XX Small */
@media (min-width: 320px) {
  .hero-section__primary-heading {
    gap: calc(5rem + 2vw);
  }
  /* return to default h1 font-size */
  .hero-section__secondary-heading {
    font-size: 1.5rem;
    gap: calc(1rem + 2vw);
  }
  .nav-container__nav-ul {
    font-size: 1rem;
    gap: 1rem;
  }
  .skills-section__skills-container {
    font-size: calc(1rem + .5vw);
  }
  .contact-section__display-control {
    width: 65%;
  }
}

/* X Small */
@media (min-width: 380px) {
  .hero-section__heading-container {
    height: calc(15% + 15vw);
    justify-content: space-around;
  }
  .about-section, .projects-section {
    font-size: calc(1rem + .3vw);
  }
  .about-section__main-content {
    width: 70%;
  }
  .about-section__img-container {
    width: 86%;
    max-width: 360.66px;
  }
  .skills-section__content-container {
    gap: 5rem;
  }
  .skills-section__skills-container {
    gap: 3rem;
  }
  .skills-section__ticker {
    bottom: 7.5rem;
    width: 9.5%;
  }
}

/* Small */
@media (min-width: 576px) {
  .hero-section__heading-container {
    justify-content: space-between;
  }
  .hero-section__primary-heading,
  .hero-section__secondary-heading {
    font-size: calc(1.5rem + 3vw);
  }
  .hero-section__primary-heading {
    gap: calc(5rem + 10vw);
  }
  .projects-section__project1-left-side,
  .projects-section__project2-right-side {
    width: 60%;
  }
  .skills-section__skills-container {
    gap: calc(3rem + 10vw);
  }
  .skills-section__ticker {
    width: calc(10% + 12vw);
  }
  .contact-section__display-control {
    width: 50%;
    max-width: 680px;
  }
  .contact-section__textarea {
    height: 15rem;
  }
}

/* Medium */
@media (min-width: 768px) {
  .hero-section__primary-heading,
  .hero-section__secondary-heading {
    font-size: calc(1.5rem + 5vw);
  }
  .hero-section__primary-heading {
    gap: calc(5rem + 14vw);
  }
  .about-section__main-content,
  .about-section__main-cta,
  .projects-section__project1-modal-info,
  .projects-section__project2-modal-info {
    font-size: calc(1rem + .4vw);
  }
  .about-section__img-container {
    width: 47%;
  }
  .projects-section {
    font-size: calc(1rem + .5vw);
  }
  .projects-section__project1-left-img-container,
  .projects-section__project2-right-img-container,
  .projects-section__project1-info-text,
  .projects-section__project2-info-text {
    width: 80%;
  }
  .contact-section__contact-heading {
    font-size: 2rem;
  }
}

/* Large */
@media (min-width: 992px) {
  .hero-section__primary-heading {
    gap: calc(5rem + 23vw);
  }
  .hero-section__secondary-heading {
    gap: calc(1rem + 10vw);
  }
  .nav-container {
    position: absolute;
    top: 150vh;
    right: 5px;
    left: auto;
  }
  .nav-container__sticky-nav {
    top: 50vh;
    transform: translateY(-50%);
  }
  .nav-container__nav-ul {
    flex-direction: column;
    font-size: calc(1rem + .3vw);
    align-items: center;
    gap: 2rem;
    list-style: decimal-leading-zero;
    margin-top: 0;
    text-decoration: underline;
    text-underline-offset: 7px;
  }
  .scrolled {
    background-color: var(--background-color);
    border-bottom: 0;
    border-radius: 0;
    margin: 0;
  }
  .about-section__main-content {
    max-width: 1135px;
  }
  .about-section__about-text {
    width: 100%;
  }
  .projects-section__display-control {
    gap: min(3rem + 1vw);
  }
  .projects-section__project1-modal,
  .projects-section__project2-modal {
    padding-block: 6rem;
  }
  .projects-section__project1-modal-display-control,
  .projects-section__project2-modal-display-control {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .carousel-desktop-control-container,
  .projects-section__project2-carousel-desktop-control-container {
    width: 50%;
  }
  .projects-section__carousel-btns-container,
  .projects-section__project2-carousel-btns-container {
    margin-bottom: 0;
  }
  .projects-section__project1-modal-info,
  .projects-section__project2-modal-info {
    width: 50%;
    margin-top: 0;
  }
  .projects-section__project1-modal-icons-container,
  .projects-section__project2-modal-icons-container {
    gap: 1rem;
  }
}

/* X Large */
@media (min-width: 1200px) {
  .about-section__main-content {
    flex-direction: row;
    gap: 4rem;
  }
  .about-section__img-container {
    width: 86%;
  }
  .projects-section__display-control {
    gap: 0;
  }
  .projects-section__project1-right-side,
  .projects-section__project2-left-side {
    display: flex;
  }
  .projects-section__project1-modal,
  .projects-section__project2-modal {
    max-width: 1400px;
  }
  .projects-section__project1-modal-icons-container,
  .projects-section__project2-modal-icons-container {
    margin-right: auto;
  }
  .skills-section {
    margin-bottom: 7rem;
  }
  .skills-section__ticker {
    bottom: 5rem;
    width: calc(10% + 14.5vw);
  }
  footer img {
    width: 125px;
  }
}

/* Ultra Wide */
@media (min-width: 1921px) {
  /* contain every section to 1920px */
  section, footer {
    max-width: 1920px;
  }
  /* Todo: fonts--I have some font sizes calculated based on vw */
  /* Todo: same as above for gap property in hero section */
}

/* Mobile Orientation: Landscape */
@media screen and (orientation: landscape) and (max-width: 932px) and (max-height: 500px) {
  section {
    height: 100%;
    margin-bottom: 9rem;
  }
  .hero-section__ticker {
    bottom: 3.7rem;
    font-size: 1rem;
    padding: 0;
  }
  .hero-section__cta-container {
    bottom: 3rem;
  }
  .projects-section__display-control {
    gap: 2rem;
  }
  .projects-section__project1,
  .projects-section__project2 {
    height: 100%;
  }
  .projects-section__project1-left-side-main-content {
    margin-bottom: 1.5rem;
  }
  .skills-section {
    height: auto;
  }
  footer {
    margin-top: 0;
  }
}

@media (min-width: 455px) and (max-width: 934px) and (min-height: 501px) and (max-height: 730px) {
  .hero-section {
    margin-bottom: 7rem;
  }
  .about-section {
    margin-bottom: 14rem;
  }
  .projects-section {
    margin-bottom: 12rem;
  }
  .projects-section__project1 {
   margin-bottom: 15rem;
  }
  .skills-section {
    margin-bottom: 7rem;
  }
}

/* Tablet Orientation: Landscape & some medium browser sizes */
@media screen and (orientation: landscape) and (min-width: 935px) and (max-width: 1199px) and (max-height: 820px) {
  body {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  section {
    height: 100%;
    margin-bottom: 9rem;
  }
  .hero-section__ticker {
    bottom: 3.7rem;
    font-size: 1rem;
    padding: 0;
  }
  .hero-section__cta-container {
    bottom: 3rem;
  }
  .projects-section__display-control {
    gap: 2rem;
  }
  .projects-section__project1,
  .projects-section__project2 {
    height: 100%;
  }
  .projects-section__project1-left-side-main-content {
    margin-bottom: 1.5rem;
  }
  .skills-section {
    height: auto;
  }
  footer {
    margin-top: 0;
  }
}