* {
  padding: 0;
  margin: 0;
  font-family: "Josefin Sans", sans-serif;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-image: url(../images/background.png);
  background-size: cover;
  background-position: center;
  overflow-x: hidden;
  opacity: 0;
  animation: fadeIn 0.8s forwards 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.logo {
  text-decoration: none;
}

.hero {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.windows {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: baseline;
  text-decoration: none;
}

.windows a {
  color: white;
  font-size: 25px;
  text-decoration: none;
  font-weight: bold;
  text-transform: capitalize;
  position: relative;
  padding: 0 5px;
}

.windows a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #c252e1;
  transition: width 0.3s ease;
}

.windows a:hover:after {
  width: 100%;
}

.windows a:hover {
  color: #c252e1;
  transition: color 0.3s ease;
}

nav {
  position: fixed;
  width: 100%;
  height: 120px;
  top: 0;
  padding-top: 10px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 8%;
  padding-right: 8%;
  background-color: rgba(16, 16, 16, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.animation-container {
  margin-top: 0px;
  margin-left: 75px;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  padding-top: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
    color: white;
    font-size: 4.5rem;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);

}

.logo:hover {
  transform: scale(1.05);
  text-shadow: 0 0 15px rgba(241, 241, 241, 0.45);
}

span {
  color: #c252e1;
}

.btn {
  background-color: #c252e1;
  color: white;
  text-decoration: none;
  border: 2px solid transparent;
  font-size: 25px;
  font-weight: bold;
  padding: 17px 35px;
  border-radius: 30px;
  transition: transform 0.4s;
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 0px 15px rgba(206, 120, 230, 0.4);
}

.btn:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:hover:after {
  animation: ripple 0.8s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(50, 50);
    opacity: 0;
  }
}

h1 {
  color: white;
  margin: 20px 0px 20px;
  font-size: 75px;
}

h2 {
  color: white;
  text-transform: capitalize;
  font-size: 3rem;
  text-align: center;
  letter-spacing: 1.2px;
}

h3 {
  color: white;
  font-size: 25px;
  margin-bottom: 50px;
}
h4 {
  color: #fcfc;
  letter-spacing: 2px;
  font-size: 20px;
}
h5 {
  color: white;
  letter-spacing: 2px;
  font-size: 2rem;
  margin-bottom: 15px;
  text-align: center;
}
p {
  color: #fcfc;
  letter-spacing: 1px;
  line-height: 28px;
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
}

section {
  min-height: 100vh;
  padding-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Animation classes */
.section-animated {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-animated.visible {
  opacity: 1;
  transform: translateY(0);
}

.title-animated {
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards 0.3s;
}

.text-animated {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards 0.5s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Projects */
#gamedesign {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: column;
}

.game {
  margin-top: 20px;
  padding: 20px;
  position: relative;
}

.game:after {
  content: '';
  position: absolute;
  width: 200px;
  height: 3px;
  background: #c252e1;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.imgcontainer {
  display: flex;
  flex-wrap: wrap;
  margin-top: 40px;
  gap: 20px;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.writing {
  display: flex;
  flex-wrap: wrap;
  margin-top: 40px;
  margin-bottom: 80px;
  gap: 20px;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

#gamedesign img {
  height: 31vh;
  overflow: hidden;
}

.img1 {
  height: 31vh;
  position: relative;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.img1:nth-child(1) { animation: fadeInUp 0.6s forwards 0.2s; }
.img1:nth-child(2) { animation: fadeInUp 0.6s forwards 0.4s; }
.img1:nth-child(3) { animation: fadeInUp 0.6s forwards 0.6s; }
.img1:nth-child(4) { animation: fadeInUp 0.6s forwards 0.8s; }
.img1:nth-child(5) { animation: fadeInUp 0.6s forwards 1.0s; }

.img1:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(194, 82, 225, 0.3);
}

.img1 img {
  display: block;
  width: 600px;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.img1:hover img {
  transform: scale(1.05);
}

.img1 .overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transition: opacity 0.5s ease, background-color 0.5s ease;
  background: linear-gradient(to bottom, rgba(215, 42, 237, 0.75), rgba(239, 177, 243, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
}

.img1 .caption {
  padding: 20px;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.5s ease;
}

.img1:hover .caption {
  transform: translateY(0);
}

.img1 .caption h5 {
  margin-bottom: 10px;
  transform: translateY(-10px);
  opacity: 0;
  font-size: 40px;
  transition: transform 0.5s ease 0.1s, opacity 0.5s ease 0.1s;
}

.img1 .caption p {
  color: white;
  font-size: 24px;
  font-weight: 400;
  opacity: 0;
  transform: translateY(10px);
  transition: transform 0.5s ease 0.2s, opacity 0.5s ease 0.2s;
}

.img1:hover .overlay {
  opacity: 1;
}

.img1:hover .caption h5,
.img1:hover .caption p {
  opacity: 1;
  transform: translateY(0);
}

/* FOOTER */
footer {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #101010;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
}

footer h3 {
  font-size: 30px;
  color: white;
  margin-bottom: 25px;
  font-weight: bold;
  padding: 0 25%;
  position: relative;
}

footer h3:after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background: #c252e1;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

footer p {
  color: white;
  font-size: 25px;
  width: 100%;
  text-align: center;
  line-height: 35px;
  padding: 0 25%;
}

.social {
  display: flex;
}

.social a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c252e1;
  border-radius: 50%;
  margin: 60px 15px;
  color: white;
  text-decoration: none;
  font-size: 20px;
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.social a:hover {
  transform: scale(1.2);
  background-color: #d370f0;
  box-shadow: 0 0 20px rgba(194, 82, 225, 0.6);
}

.social-icon {
  position: relative;
}

.social-icon i {
  transition: transform 0.3s ease;
}

.social-icon:hover i {
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.end {
  height: 10vh;
  position: absolute;
  color: #c252e1;
  bottom: 5px;
  font-size: 15px; 
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.end:hover {
  opacity: 1;
}

/* reponsive design */
@media(max-width: 1240px) {
  .btn {
    font-size: 20px;
    padding: 11px 30px;
  }

  h2 {
    color: white;
    text-transform: capitalize;
    font-size: 3rem;
    text-align: center;
    letter-spacing: 0.6px;
  }

  .windows a {
    color: white;
    font-size: 20px;
    text-decoration: none;
    font-weight: bold;
    text-transform: capitalize;
  }
}

/* Enhanced mobile responsiveness in style.css */

/* Existing Media Queries - Updated for better responsive design */
@media(max-width: 1240px) {
  .btn {
    font-size: 20px;
    padding: 11px 30px;
  }

  h2 {
    font-size: 3rem;
    letter-spacing: 0.6px;
  }

  .windows a {
    font-size: 20px;
  }
}

/* TABLET SIZE - Enhanced */
@media (max-width: 1024px) {
  .windows {
    display: none;
  }
  
  /* Show mobile menu toggle on tablet */
  .mobile-toggle {
    display: block;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    cursor: pointer;
  }
  
  /* Simplified tablet navigation */
  nav {
    height: 100px;
    padding-top: 0;
    display: flex;
    align-items: center;
  }
  
  /* Tablet-specific content adjustments */
  footer h3 {
    font-size: 25px;
    padding: 0 15%;
  }

  footer p {
    font-size: 20px;
    line-height: 35px;
    padding: 0 15%;
  }

  .img1 {
    height: auto;
  }

  .img1 img {
    width: 100%;
    max-width: 400px;
  }
  
  /* Center content better on tablets */
  section {
    padding: 70px 20px;
  }
  
  h1 {
    font-size: 60px;
  }
  
  /* Adjust gallery layout for tablets */
  .imgcontainer {
    gap: 20px;
  }
  
  /* Improved animation container for tablets */
  .animation-container {
    margin-left: 0;
    margin-top: 100px;
  }
}

/* PHONE SIZE - Completely Redesigned */
@media (max-width: 768px) {
  /* Phone-specific navigation - Logo and Contact only */
  nav {
    height: 80px;
    padding: 0 5%;
    justify-content: space-between;
  }
  
  /* Hide all nav items except logo and contact */
  .windows {
    display: none;
  }
  
  /* Adjust logo size for phone */
  .logo {
    font-size: 2.2rem;
    padding-top: 0;
  }
  
  /* Keep only the contact button visible */
  .btn.contact-btn {
    display: block;
  }
  
  /* Hide other buttons */
  .btn:not(.contact-btn) {
    display: none;
  }
  
  /* Contact button styling for mobile */
  .btn.contact-btn {
    font-size: 15px;
    padding: 8px 20px;
    margin: 0;
  }
  
  /* Content adjustments for phone */
  h2 {
    font-size: 2.5rem;
    letter-spacing: 0.6px;
  }
  
  h1 {
    font-size: 45px;
    text-align: center;
    margin: 15px 0;
  }
  
  h3 {
    font-size: 20px;
    text-align: center;
    margin-bottom: 30px;
  }
  
  /* Vertical gallery layout */
  .img1 {
    width: 90%;
    max-width: 350px;
    margin-bottom: 20px;
  }
  
  /* Center the hero content */
  .animation-container {
    margin-left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 70px;
  }
  
  /* Reduced footer padding */
  footer p {
    padding: 0 10%;
    font-size: 18px;
    line-height: 28px;
  }
  
  /* Social icons in footer */
  .social {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .social a {
    margin: 25px 10px;
    width: 45px;
    height: 45px;
  }
  
  /* Section spacing and sizing */
  section {
    padding: 50px 15px;
  }
  
  /* Fix image scaling */
  #gamedesign img {
    height: auto;
    width: 100%;
  }
  
  /* Adjust caption text for better readability */
  .img1 .caption h5 {
    font-size: 30px;
  }
  
  .img1 .caption p {
    font-size: 18px;
  }
}

/* Small Phone Size */
@media (max-width: 480px) {
  /* Even smaller logo */
  .logo {
    font-size: 1.8rem;
  }
  
  /* Smaller contact button */
  .btn.contact-btn {
    font-size: 14px;
    padding: 7px 18px;
  }
  
  /* Scale down headings */
  h1 {
    font-size: 35px;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 18px;
  }
  
  /* Full width gallery items */
  .img1 {
    width: 95%;
  }
  
  /* Smaller captions */
  .img1 .caption h5 {
    font-size: 25px;
  }
  
  .img1 .caption p {
    font-size: 16px;
  }
  
  /* Smaller footer text */
  footer h3 {
    font-size: 22px;
  }
  
  footer p {
    font-size: 16px;
    line-height: 26px;
  }
  
  /* Smaller social icons */
  .social a {
    width: 40px;
    height: 40px;
    margin: 20px 8px;
  }
  
  /* Position the footer copyright text */
  .end {
    font-size: 14px;
    margin-top: 30px;
  }
}

/* Landscape Mode for Phones */
@media (max-height: 500px) and (orientation: landscape) {
  /* Proper layout for landscape */
  .hero {
    height: auto;
    min-height: 450px;
    padding-top: 80px;
  }
  
  /* Adjust navigation height */
  nav {
    height: 70px;
  }
  
  /* Two column gallery */
  .imgcontainer {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .img1 {
    width: 45%;
    max-width: 300px;
    margin: 10px;
  }
  
  /* Adjust section heights */
  section {
    padding: 40px 20px;
  }
  
  /* Scaled text for landscape */
  h1 {
    font-size: 40px;
    margin: 10px 0;
  }
  
  h3 {
    margin-bottom: 20px;
  }
  
  /* Adjust footer for landscape */
  footer {
    padding: 40px 0;
  }
}

/* Add new mobile menu styles */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(16, 16, 16, 0.97);
  z-index: 999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.active {
  display: flex;
  opacity: 1;
}

.mobile-menu a {
  color: white;
  font-size: 25px;
  margin: 15px 0;
  text-decoration: none;
  position: relative;
}

.mobile-menu a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #c252e1;
  transition: width 0.3s ease;
}

.mobile-menu a:hover:after {
  width: 100%;
}

.mobile-menu a:hover {
  color: #c252e1;
}

.menu-toggle {
  display: none;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  cursor: pointer;
  width: 30px;
  height: 25px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: white;
  margin: 5px 0;
  transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }
}

/* Show menu toggle on mobile */
@media (max-width: 768px) {
  /* Specifically style the navigation for phone */
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Only show logo and contact button */
  nav > *:not(.logo):not(.contact-btn):not(.menu-toggle) {
    display: none;
  }
  
  /* Adjust menu toggle position */
  .menu-toggle {
    right: 15px;
  }
  
  /* Add a contact button class if needed */
  .contact-btn {
    display: block;
  }
}