/* General Body */
body {
  margin: 0;
  padding: 0;
  font-family: "Comfortaa", sans-serif;
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #406d43;
  flex-direction: row-reverse;
}


/* Menu */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav ul li a {
  display: block;
  color: white;
  padding: 14px 16px;
  text-decoration: underline;
  font-size: 1.1rem;
}

nav ul li a:hover {
  background-color: #1b3d29;
}

/* Logo */
.avatar1 {
  display: flex;
  align-items: center;
  margin-left: 16px;
}

.avatar1 img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  padding: 10px;
}


/* HEADINGS */

h1 {
  display: flex;
  justify-content: center;
  font-weight: 800;
  font-size: 46px;
  margin-top: 40px;
}

h2 {
  font-size: x-large;
  text-align: center;
  line-height: 1.5;
  font-weight: 600;
}

/* Title and subtitle to projects */
h5 {
  display: flex;
  justify-content: center;
  font-weight: 800;
  font-size: xx-large;
  margin-top: 20px;
  margin-bottom: 4px; /* 👈 added */
}

h6 {
  font-size: 1.8rem;
  font-weight: 500;
  text-align: center;
  margin-top: 4px;     /* 👈 reduced */
  margin-bottom: 10px;
  line-height: 1.4;
}

/* INTRO TEXT (TOP SECTION) */

.text-box p {
  font-size: large;
  padding: 5px;
  line-height: 1.6;
  text-align: center;
}

.text-box {
  max-width: 400px;
  text-align: center;
}

/* Top Section */
.wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.avatar {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


/* Divider Image */
section img {
  display: block;
  max-width: 68%;
  height: auto;
  margin: 30px auto;
}

/* Grid container */
.box-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 100px auto;
  padding: 0 20px;
}

.image-item {
  text-align: center;
  margin-top: 10px;
}

.image-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border: 2px solid black;
  border-radius: 10px;
  display: block;
}

.image-item.tall img {
  height: 560px;        /* a bit taller */
  width: 75%;           /* slightly less wide */
  object-fit: cover;
  margin: 0 auto;       /* keeps it centered */
}

.image-item.Romeo img {
  width: 385px;
  height: 320px;
  object-fit: cover;
  border: 2px solid black;
  border-radius: 10px;
  display: block;
  margin: -1px auto 0 auto; /* keeps centering */
  margin-left: 95px;        /* move right */
}

/* Text under images */
.image-item p {
  margin-top: 10px;
  font-size: 1.05rem;   /* slightly bigger */
  font-weight: 600;    /* a bit thicker */
  color: #333;
  line-height: 1.5;
}


/* Animation Container */
.animate-box {
  position: relative;
  width: 385px;
  height: 320px;
  border: 2px solid black;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

/* Box 1 */
.box1 {
  width: 100px;
  height: 100px;
  background-color: rgb(86, 187, 49);
  position: absolute;
  top: 0;
  left: 0;
}

/* Box 2 */
.box2 {
  width: 100px;
  height: 100px;
  background-color: rgb(187, 49, 58);
  position: absolute;
  top: 0;
  left: 0;
}

/* Hover-triggered animations */
.animate-box:hover .box1 {
  animation: movebox 4s linear 1;
}

.animate-box:hover .box2 {
  animation: movebox2 4s linear 1;
}

/* Keyframes */
@keyframes movebox {
  0% {
    transform: translateX(0px) translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateX(200px) translateY(0px) rotate(90deg);
  }
  50% {
    transform: translateX(200px) translateY(200px) rotate(180deg);
  }
  75% {
    transform: translateX(0px) translateY(200px) rotate(270deg);
  }
  100% {
    transform: translateX(0px) translateY(0px) rotate(360deg);
  }
}

@keyframes movebox2 {
  0% {
    transform: translateX(0px) translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateX(0px) translateY(200px) rotate(90deg);
  }
  50% {
    transform: translateX(200px) translateY(200px) rotate(180deg);
  }
  75% {
    transform: translateX(200px) translateY(0px) rotate(270deg);
  }
  100% {
    transform: translateX(0px) translateY(0px) rotate(360deg);
  }
}


/* Footer */
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #406d43;
  padding: 8px 12px;
  color: white;
  font-size: 1.2rem;
  text-align: center;
}

/* Mobile / Responsive Scaling (no burger menu) */
@media (max-width: 768px) {
  /* General scaling */
  body {
    font-size: 14px; /* slightly smaller for mobile */
  }

  /* Top Section */
  .wrapper {
    flex-direction: column; /* stack avatar + text vertically */
    align-items: center;
    gap: 20px;
    max-width: 95%;
    margin: 0 auto;
  }

  .avatar {
    width: 180px;
    height: 180px;
  }

  .avatar1 img {
    width: 80px;
    height: 80px;
  }

  .text-box {
    max-width: 90%;
    padding: 10px;
  }

  /* Headings */
  h1 {
    font-size: 32px;
    margin-top: 20px;
  }

  h2 {
    font-size: 1.5rem;
  }

  h5 {
    font-size: 1.5rem;
  }

  h6 {
    font-size: 1.2rem;
  }

  /* Divider Image */
  section img {
    max-width: 90%;
    margin: 20px auto;
  }

  /* Grid container */
  .box-container {
    grid-template-columns: 1fr; /* single column */
    gap: 20px;
    margin: 50px auto;
    padding: 0 10px;
  }

  /* Images */
  .image-item img {
    width: 100%;
    height: auto;
  }

  .image-item.tall img {
    width: 100%;
    height: auto;
  }

  .image-item.Romeo img {
    width: 100%;
    height: auto;
    margin-left: 0;
  }

  /* Animation boxes */
  .animate-box {
    width: 100%;
    height: auto;
  }

  .box1, .box2 {
    width: 50px;
    height: 50px;
  }

  /* Footer */
  footer {
    font-size: 1rem;
    padding: 6px 8px;
  }
}
