* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer and Edge (legacy) */
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  background-image: url("https://www.transparenttextures.com/patterns/wavecut.png"),
    linear-gradient(to right, bisque, #ffd8b1);
  height: 100%;
}

section {
  display: flex;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding-top: 80px;
  padding-bottom: 80px;
  min-width: 100vw;
}

.section-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  min-width: 100%;
}

nav {
  display: flex;
  position: fixed;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  height: 80px;
  z-index: 999;
  margin-top: 0;
  background-image: url("https://www.transparenttextures.com/patterns/wavecut.png"),
    linear-gradient(to right, bisque, #ffd8b1);
}

nav > * {
  font-size: clamp(1.1rem, 1vw, 40px);
}

body {
  text-align: center;
  font-family: "Poppins", serif;
  font-weight: 500;
  min-width: 100vw;
  min-width: 100dvw;
  height: 100%;
  margin-top: 0;
  background-image: url("https://www.transparenttextures.com/patterns/wavecut.png"),
    linear-gradient(to right, bisque, #ffd8b1);
}

/* Hide scrollbar for all elements */
::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

@font-face {
  font-family: gWeiss;
  src: url(../../assets/fonts/GABRWFFR.woff2) format("woff2");
  font-display: swap;
}

h1 {
  font-family: gWeiss;
  font-size: clamp(48px, 4vw, 4rem);
  margin-top: 0;
  padding-top: 20px;
  margin-bottom: 40px;
  text-shadow: #333 1px 1px 1px;
}

a {
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: transparent;
  outline: none;
}

img {
  border-radius: 20px;
  display: block;
}

svg {
  height: 30px;
  width: 30px;
}

/*
body.loaded .fade-in {
  opacity: 0.2;
  animation: fade-in 1.5s ease-in forwards;
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}
*/

.navigation a {
  text-decoration: none;
  color: inherit;
}

.navigation > li {
  list-style: none;
}

.navigation {
  display: flex;
  text-align: center;
  width: 100%;
  justify-content: space-evenly;
}

/* Fade-slide animation base */
.nav-link {
  opacity: 0;
  display: inline-block; /* allow transform to work smoothly */
  transform: translateX(-100vw); /* move off the screen to the left */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: transform, opacity;
}

/* Apply staggered animation delays based on the parent <li> position */
/* Animate each <li>'s anchor with a delay */
body.loaded .navigation li:nth-child(1) .nav-link {
  animation: fadeSlideIn 0.8s ease-out forwards;
  animation-delay: 0.8s;
}
body.loaded .navigation li:nth-child(2) .nav-link {
  animation: fadeSlideIn 0.8s ease-out forwards;
  animation-delay: 0.6s;
}
body.loaded .navigation li:nth-child(3) .nav-link {
  animation: fadeSlideIn 0.8s ease-out forwards;
  animation-delay: 0.4s;
}
body.loaded .navigation li:nth-child(4) .nav-link {
  animation: fadeSlideIn 0.8s ease-out forwards;
  animation-delay: 0.2s;
}

@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.section-header {
  top: 0;
  display: none;
  text-align: center;
  font-size: 1.5rem;
  padding-bottom: 20px;
  opacity: 0.7;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  display: inline-block; /* Needed to wrap inline spans */
  white-space: nowrap;
}

.section-header span {
  display: inline-block;
  transform: translateX(-100%);
  opacity: 0;
  animation: fadeSlideIn 0.5s ease-out;
  animation-fill-mode: both;
  animation-delay: calc(var(--i) * 0.08s);
  animation-play-state: paused;
}

.section-header.in-view span {
  animation-play-state: running;
}

.bold {
  font-weight: bold;
}

#main-image img {
  width: 100%;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  display: block;

  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

#main-image img.loaded {
  opacity: 1;
}

#main-image {
  aspect-ratio: 3/2;
  border: solid black;
  margin-bottom: 20px;
  border-radius: 20px;
  box-shadow: 5px 5px 5px rgb(0, 0, 0, 0.8);
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  height: auto;
  width: clamp(350px, 55vw, 80vw);
  background-color: #6c747f;

  background-image: url(../images/25310007-min.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  position: relative;

  transition: 0.4s ease-in-out;
}

#main-image:hover {
  box-shadow: 5px 5px 6px black;
}

#bird {
  position: absolute;
  top: -10%;
  left: -100px;
  opacity: 1;
}

.fly {
  transform: scale(0.075);
  animation: fly-across 14s linear forwards;
}

@keyframes fly-across {
  0% {
    left: -60%;
    opacity: 1;
  }
  100% {
    left: 120%;
    opacity: 0.8;
  }
}

#home-section {
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#about-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-direction: row;
  flex-wrap: wrap;
  height: 100vh;
}

#about-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-direction: row;
  flex-wrap: wrap;
}

#about-content h2 {
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

#photos-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-direction: row;
  flex-wrap: wrap;
  height: 100vh;
}

#photos-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-direction: row;
  flex-wrap: wrap;
}

#projects-section {
  flex-direction: column;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  justify-items: center;
  max-height: 100%;
}

.project-tile {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
  max-width: 50%;
  width: auto;
  min-width: 335px;
  height: auto;
  border: solid black;
  border-radius: 20px;
  margin: 20px;
  padding: 20px;
  box-shadow: 5px 5px 5px rgb(0, 0, 0, 0.8);
  background: none;
  background-color: bisque;
  background-image: url("https://www.transparenttextures.com/patterns/wavecut.png");

  transition: 0.4s ease-in-out;
}

.project-tile span {
  font-weight: bold;
}

.project-tile:hover {
  box-shadow: 5px 5px 6px black;
}

.project-tile img {
  height: 160px;
  object-fit: cover;
  width: 100%;
  border: 2px dashed black;
  margin-bottom: 20px;
}

.project-tile h3 {
  font-family: gWeiss;
  margin-bottom: 20px;
}

.project-tile a {
  margin-top: 20px;
}

.project-tile p {
  font-size: clamp(0.9rem, 1.15rem, 1.25rem);
}

.project-image {
  object-fit: contain;
}

.text {
  max-width: 30%;
  font-size: clamp(0.9rem, 1.15rem, 1.25rem);
  text-align: left;
}

.main-font {
  font-style: italic;
  font-family: gWeiss;
}

.text a,
.project-tile a {
  color: brown;
  text-decoration: none;
}

.about-image {
  aspect-ratio: 3/2;
  max-width: 40%;
  max-height: 100%;
  background-color: #6c747f;
  border-radius: 20px;
}

.about-image img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 5px 5px 5px rgb(0, 0, 0, 0.8);
  border: solid black;

  transition: 0.4s ease-in-out;
}

.about-image img:hover {
  box-shadow: 5px 5px 6px black;
}

#socials,
.links {
  display: inline-flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
}

#socials a,
.project-tile a {
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.1));
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.pulse {
  display: inline-block;
  animation: pulse 1.5s infinite ease-in-out;
}

.grow {
  display: inline-block;
  transition: transform 0.3s ease, fill 0.3s ease;
}

.grow:hover,
.grow.touch-hover {
  transform: scale(1.2);
}

.project-tile.grow:hover,
.project-tile.touch-hover {
  transform: scale(1.1);
}

.underline-slide {
  position: relative;
  text-decoration: none;
}

.underline-slide::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.underline-slide:hover::after,
.underline-slide.touch-hover::after {
  width: 100%;
}

/* Disable hover on touch devices 
@media (hover: none) and (pointer: coarse) {
  .grow:hover {
    transform: none;
  }
  .underline-slide:hover::after {
    width: 0%;
  }
}
*/

.carousel-container {
  display: flex;
  border: solid black;
  box-shadow: 5px 5px 5px rgb(0, 0, 0, 0.8);
  display: inline-block;
  max-width: 40%;
  position: relative;
  overflow: hidden;
  border-radius: 20px;

  transition: 0.4s ease-in-out;
}

.carousel-container:hover {
  box-shadow: 5px 5px 6px black;
}

.carousel {
  display: flex;
  transition: transform 0.8s ease-in-out;
}

.slide {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slide img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #5e5e5e;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
}

body.has-hover .carousel-btn:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.92);
}

@keyframes bounce-back {
  0% {
    transform: translateY(-50%) scale(0.9);
  }
  50% {
    transform: translateY(-50%) scale(1.05);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}

.carousel-btn.bounce {
  animation: bounce-back 300ms ease-out;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.prev,
.next {
  color: rgba(255, 255, 255, 0.8);
  opacity: 0.7;
}

.prev:hover,
.next:hover {
  color: rgba(0, 0, 0, 0.8);
}

.caption,
.caption-text {
  opacity: 1;
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
  text-align: left;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

.caption.invisible,
.caption-text.invisible {
  transform: scale(0.98);
  opacity: 0.1;
  text-align: left;
}

.down-arrow {
  display: none;
  padding-top: 35px;
  font-size: 3rem;
  opacity: 0.7;
  color: inherit;
  font-family: Arial, Helvetica, sans-serif;
  animation: floatDown 1.5s ease-in-out infinite;
  text-decoration: none;
}

@keyframes floatDown {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
  100% {
    transform: translateY(0);
  }
}

.shine {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.shine::before {
  border-radius: inherit;
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 2;
}

.shine.animate::before {
  animation: shine 1s;
}

@keyframes shine {
  0% {
    left: -75%;
  }
  100% {
    left: 125%;
  }
}

.portrait {
  display: none;
}

@media (min-width: 1024px) {
  .section-header {
    display: none !important;
  }
}

/* tablets and mobile */
@media (max-width: 1023px) {
  nav {
    display: none;
  }
  .section-header {
    display: inline-block;
  }
  .section-header span {
    display: inline-block;
  }
  section {
    padding-top: 20px;
  }
  #projects-section,
  #photos-section,
  #about-section {
    gap: 0px;
    margin-top: 80px;
  }
  /* disable hover effects on touch devices */
  .grow:hover {
    transform: none;
  }
  .underline-slide:hover::after {
    width: 0%;
  }
  html {
    scroll-snap-type: none;
  }
  #home-section {
    justify-content: start;
  }
  .down-arrow {
    display: inline-block;
  }
  .text {
    font-size: 1rem;
  }
  svg {
    height: 25px;
    width: 25px;
  }
  #projects-content h2 {
    font-size: 1.2rem;
  }
  .project-tile.grow:hover,
  .project-tile.touch-hover {
    transform: none;
  }
  .project-tile p {
    font-size: 1rem;
  }
  .project-grid {
    gap: 10px;
  }
}

/* tablet only*/
@media (min-width: 768px) and (max-width: 1023px) {
  .portrait {
    display: flex;
    align-items: center;
    justify-content: right;
    max-width: 35%;
  }
  .portrait img {
    max-width: 100%;
    max-height: 100%;
  }
  /*
  .landscape {
    display: none;
  }
    */
  .text {
    display: flex;
    flex-direction: column;
    max-width: 50%;
  }
  #photos-content,
  #about-content {
    flex-direction: column;
  }
  .carousel-container,
  .about-image {
    max-width: 65vw;
  }
  #photos-content .text,
  #about-content .text {
    max-width: 65vw;
  }
  #main-image {
    min-width: 70vw;
  }
  #about-section .section-header {
    padding-bottom: 40px;
  }
}

/* mobile */
@media (max-width: 767px) {
  #about-content {
    gap: 4rem;
    flex-direction: column;
    padding-bottom: 20px;
  }
  .about-image {
    max-width: 100%;
  }
  .text {
    min-width: 100%;
  }
  section {
    padding-left: 20px;
    padding-right: 20px;
  }
  .carousel-container {
    width: 90vw;
    max-width: 100%;
    margin-bottom: 30px;
  }
  .carousel-btn {
    height: 30px;
    width: 30px;
  }
  #photos-content {
    gap: 4rem;
    flex-direction: column;
    padding-bottom: 20px;
  }
  #main-image {
    height: auto;
  }
  #projects-content {
    padding-bottom: 20px;
  }
  #socials,
  .links {
    gap: 20px;
  }
  #projects-section {
    height: auto;
    padding-bottom: 60px;
  }
}
