* {
  margin: 0;
  background-color: transparent;
  user-select: none;
}

html {
  scroll-snap-type: y mandatory;
}

:root {
  --deep-red: #780000;
  --bright-red: #c1121f;
  --light-cream: #fdf0d5;
  --dark-navy: #003049;
  --light-blue: #669bbc;
}

p,
h1,
h2,
h3 {
  background-color: inherit;
}

body {
  background-color: var(--dark-navy);
  width: 100ddvw;
  height: inherit;
  justify-content: flex-start;
  min-height: 80dvh;
}

nav {
  z-index: 99;
  top: 0;
  position: sticky;
  display: flex;
  width: inherit;
  height: 6dvh;
  background-color: transparent;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(-6dvh);
  transition: opacity 0.3s ease, transform 0.5s ease, background-color 0.5s ease,
    color 0.5s ease;
}

nav ul {
  background-color: transparent;
  width: inherit;
  padding: 0;
  display: flex;
  flex-direction: row;
  list-style: none;
  justify-content: right;
}

nav ul li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--light-cream);
  background-color: transparent;
  padding-right: 20px;
}

nav ul li a {
  background-color: transparent;
  color: var(--light-cream);
  text-decoration: none;
  display: block;
  position: relative;
  padding: 0.2em 0;
  overflow: hidden;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.1em;
  background-color: var(--light-blue);
  opacity: 1;
  transform: translate3d(-100%, 0, 0);
  transition: transform 300ms;
}

nav ul li a:hover::after,
nav ul li a:focus::after {
  transform: translate3d(0, 0, 0);
}

nav ul li a:visited {
  color: inherit;
}

nav h1 {
  background-color: transparent !important;
  min-width: 30dvw;
  align-self: center;
  padding-left: 20px;
  color: var(--light-cream);
  background-color: var(--dark-navy);
}

section {
  scroll-snap-align: start;
}

#hero {
  z-index: 99;
  background-color: var(--light-cream);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#hero h1 {
  font-size: 100px;
  background-color: var(--light-cream);
  text-align: center;
}

#hero p {
  font-size: 1.2rem;
  background-color: var(--light-cream);
  text-align: center;
}

.name {
  display: flex;
  flex-direction: row;
  justify-content: center;
  background-color: var(--light-cream);
}

#about {
  overflow: hidden;
  height: 100dvh;
  display: flex;
  flex-direction: row;
  justify-content: center;
  color: var(--light-cream);
  position: relative;
  background: radial-gradient(
    ellipse,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  background-size: cover;
}

#about h1 {
  background-color: transparent;
  padding-top: 6dvh;
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-size: 22dvh;
  position: absolute;
  left: -50px;
}

#about h2 {
  color: var(--light-blue);
  background-color: transparent;
  white-space: nowrap;
  font-size: 12dvh;
  position: absolute;
  right: -20px;
  bottom: 0px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  overflow: hidden;
}

#about h2.scroll-container {
  color: var(--light-blue);
  background-color: transparent;
  white-space: nowrap;
  font-size: 12dvh;
  position: absolute;
  right: -20px;
  bottom: -40px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  overflow: hidden; /* Hide overflowing content */
  height: 100%; /* Ensure height to display one instance at a time */
  display: flex;
  flex-direction: column; /* Stack spans vertically */
  justify-content: flex-start; /* Align text to start */
}

.scrolling-text {
  background-color: inherit;
  display: block;
  animation: scrollVertical 5s linear infinite;
}

@keyframes scrollVertical {
  0% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(-47%);
  }
}

#about-text {
  font-size: 20px;
  padding-left: 160px;
  padding-right: 100px;
  background-color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.learn-more {
  background-color: inherit;
  text-align: end;
  font-style: oblique;
  text-decoration: underline;
}

.learn-more a {
  color: inherit;
  background-color: inherit;
  text-align: end;
  font-style: oblique;
  text-decoration: underline;
}

#project {
  overflow: hidden;
  position: relative;
  background-color: var(--light-cream);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#project-background {
  font-weight: bolder;
  color: var(--light-cream);
  background-color: var(--dark-navy);
  background: radial-gradient(
    circle,
    var(--dark-navy) 30%,
    rgba(0, 0, 0, 1) 75%
  );
  background-size: cover;
  z-index: 1;
}

.ltr-scrolling-text {
  text-wrap: none;
  white-space: nowrap;
  font-size: 6rem;
  background-color: inherit;
  display: block;
  animation: scrollLtr 20s linear infinite;
}

.rtl-scrolling-text {
  text-wrap: none;
  white-space: nowrap;
  font-size: 6rem;
  background-color: inherit;
  display: block;
  animation: scrollRtl 20s linear infinite;
}

@keyframes scrollLtr {
  from {
    transform: translateX(-38.7%);
  }
  to {
    transform: translateX(0%);
  }
}

@keyframes scrollRtl {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-38.7%);
  }
}

#contact {
  background-color: var(--light-cream);
  min-height: 92dvh;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.contact-left,
.contact-right {
  background-color: inherit;
  flex: 1 1 500px; /* Adjusts flex for better responsiveness */
  padding: 30px;
  box-sizing: border-box;
}

.contact-left h1 {
  background-color: inherit;
  font-size: 3rem;
  margin-bottom: 10px;
}

.contact-left h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.contact-left a {
  color: var(--dark-navy);
  font-size: 2rem;
  text-decoration: none;
  padding-right: 15px;
  transition: color 0.3s ease;
}

.contact-left a:hover {
  color: var(--dark-blue); /* Adjusts color on hover */
}

.contact-right h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.form-row {
  margin-bottom: 15px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background-color: #f5f5f5;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Shadow effect */
  transition: box-shadow 0.3s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Focused shadow effect */
}

textarea {
  resize: none;
  height: 100px;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(90deg, #ffa17f, #00223e);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

button:hover {
  background: linear-gradient(90deg, #00223e, #ffa17f);
  transform: translateY(-2px); /* Slight lift on hover */
}

button:active {
  transform: translateY(0); /* Reset position on click */
}

footer {
  display: flex;
  height: 8dvh;
  justify-content: center;
  background-color: var(--dark-navy);
}

footer p {
  color: var(--light-cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: inherit;
}

@media (max-width: 768px) {
  html {
    scroll-snap-type: none;
  }
}
