/* Styles variables */
:root {
  --primary-color: #800000;
  --secondary-color: #228B22;
  --text-light: #FFFFFF;
  --text-dark: #333333;
  --background-light: #F5F5F5;
}

/* General Styles */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
}

/* Navbar */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 10px 0;
  z-index: 1000;
}

#navbar ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
}

#navbar ul li {
  margin: 0 15px;
}

#navbar ul li a {
  color: white;
  text-decoration: none;
}

/* Welcome Section */
#welcome-section {
  height: 100vh;
  background-image: url('https://images.unsplash.com/photo-1605379399642-870262d3d051?q=80&w=2106&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  background-attachment: fixed;
  padding-bottom: 0;
  margin-bottom: 0;
}

#welcome-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

#welcome-section * {
  position: relative;
  z-index: 2;
}

#welcome-section h1 {
  font-size: 2.5rem;
  font-weight: bold;
  animation-delay: 0.5s;
}

#welcome-section p {
  font-size: 1.2rem;
  color: var(--text-light);
  font-weight: 500;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
  animation-delay: 1s;
}

#profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  margin-bottom: 15px;
}

#welcome-section img,
#welcome-section h1,
#welcome-section p {
  opacity: 0;
  animation: fadeIn 1.5s ease-out forwards;
}

/* Projects Section */
#projects {
  position: relative;
  z-index: 2;
  background: var(--background-light);
  margin-bottom: 0;
}

.stack-area {
  width: 100%;
  height: 300vh;
  position: relative;
  background: white;
  display: flex;
}

.left {
  height: 100vh;
  flex-basis: 50%;
  position: sticky;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.left.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.left.show {
  opacity: 1;
  transform: translateY(0);
}

.title {
  width: 420px;
  font-size: 84px;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  line-height: 88px;
}

.title.fade-in {
  animation-delay: 1s;
}

.sub-title.fade-in {
  animation-delay: 1s;
}

.sub-title {
  width: 420px;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  margin-top: 30px;
}

.sub-title button {
  font-family: Poppins, sans-serif;
  font-size: 14px;
  padding: 15px 30px;
  background: black;
  color: white;
  border-radius: 8mm;
  border: none;
  outline: none;
  cursor: pointer;
  margin-top: 20px;
}

button.fade-in {
  animation-delay: 0.6s; 
}

.right {
  height: 100vh;
  flex-basis: 50%;
  position: sticky;
  top: 0;
}

/* Stacked Cards */
.card {
  width: 400px;
  height: 400px;
  border-radius: 25px;
  margin-bottom: 10px;
  position: absolute;
  top: calc(50% - 175px);
  left: calc(50% - 175px);
  transition: 0.5s ease-in-out;
  padding: 35px;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  box-sizing: border-box;
}

.card:nth-child(1) {
  background: rgb(64, 122, 255);
  animation-delay: 0.8s;
}

.card:nth-child(2) {
  background: rgb(221, 62, 88);
  animation-delay: 1s;
}

.card:nth-child(3) {
  background: rgb(186, 113, 245);
  animation-delay: 1.2s;
}

.card:nth-child(4) {
  background: rgb(247, 92, 208);
  animation-delay: 1.4s;
}

.sub {
  font-family: Poppins, sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.content {
  font-family: Poppins, sans-serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 54px;
}

.away {
  transform-origin: bottom left;
}

/* About Me */
#about {
  padding: 60px 20px;
  background-color: white;
  color: var(--primary-color);
  position: relative;
  z-index: 2;
  box-shadow: 0px -5px 10px rgba(0, 0, 0, 0.1);
}

#about h2 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 10px;
}

#about p {
  font-size: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.professional-link {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease-in-out, text-decoration 0.3s ease-in-out;
}

.professional-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .project-container {
    flex-direction: column;
    align-items: center;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px); 
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 3s ease-out forwards;
}