*{
  box-sizing: border-box;
}

body {
  font-family: "Mochiy Pop One", sans-serif;
  padding: 0;
  margin: 0;
  height: 100vh;
  background: #F4E1B3;
  color: #1C1A27;
  overflow-x: hidden;
  scroll-behavior: smooth;
  position: relative;
}

/* Mobile-first responsive design */
header{
  backdrop-filter: blur(20px); 
  border: none;
  z-index: 1000;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  text-align: center;
}

/* Navigation Links - Responsive */
.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0.5rem;
}

.links > a {
  margin: 0 0.5rem;
  font-size: 1rem;
  padding: 0.3rem 0.5rem;
}

a{
  color: #1C1A27;
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
  text-decoration-color: red;
  text-underline-offset: 5px;
}

html {
  scroll-padding-top: 60px;
}

.links a {
  position: relative;
  text-decoration: none;
}

.links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: red;
  transition: width 0.3s ease;
}

.links a:hover::after {
  width: 100%;
}

/* Hero Section - Responsive */
.cont{
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.text{
  position: relative;
  text-align: center;
  padding-top: 100px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

.redmoon{
  position: absolute;
  width: 200px;
  max-width: 80%;
  z-index: 1;
  animation: pulse 5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

/* Text Above Moon */
.text-top {
  font-size: 2.5rem;
  font-weight: bold;
  color: black;
  letter-spacing: 2px;
  z-index: 2;
  animation: fadeIn 1s ease forwards;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.text-top {
  animation: slash 1s steps(20) forwards;
}

@keyframes slash {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* Text Below Moon */
.text-bottom {
  font-size: 1.8rem;
  color: black;
  letter-spacing: 1px;
  z-index: 2;
  animation: fadeIn 1.2s ease forwards;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

/* Ninja/Samurai - Front layer */
.ninja {
  position: relative;
  width: 120px;
  max-width: 80%;
  z-index: 3;
  animation: fadeIn 2s ease forwards;
}

.hero-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Social Icons - Responsive */
.socials {
  display: flex;
  flex-direction: row;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 2rem;
  gap: 1rem;
  z-index: 10;
}
.socials > a > img:hover{
  border-radius: 50%;
box-shadow: 0 0 5px red;
}
.socials > a > img {
  width: 25px;
  height: 25px;
}

/* Skills Section - Responsive */
#skills{
  text-align: center;
  margin-top: 2rem;
  padding: 0 1rem;
  position: relative;
}

.sections{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.wedDev{
  margin: 0;
  border: none;
  padding: 1.5rem;
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  text-align: center;
  background: #ebd49f;
  cursor: pointer;
  flex: 1 1 300px;
  transition: 0.1s ease-in;
}
.wedDev:hover{
transform: translateY(-10px);
}
.wedDev h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.wedDev h2 {
  font-size: 1rem;
  margin: 0.5rem 0;
}

.active{
  color: red;
}

/* Projects Section - Responsive */
#projects{
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
}

.projs{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem;
  gap: 1rem;
}

#backBtn, #nextBtn {
  width: 60px;
  height: 60px;
  transition: .3s ease-in-out;
  cursor: pointer;
}

.projCont{
  border: none;
  box-shadow: 0 0 5px black;
  border-radius: 10px;
  margin: 1rem 0;
  text-align: center;
  padding: 1rem;
  width: 100%;
  max-width: 500px;
}

#screenshot{
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 5px;
}

#title {
  margin-top: 1rem;
  font-size: 1.5rem;
}

/* Contact Section - Responsive */
#contact{
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
}

.email, .subject, .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 1rem;
}

#cont{
  color: red;
  margin-bottom: 0.5rem;
}

#email, #subject, #msg {
  border: none;
  background-color: #ebd49f;
  padding: 0.8rem;
  margin: 0.5rem 0;
  border-radius: 5px;
  width: 100%;
  font-size: 1rem;
}

#msg {
  resize: vertical;
  min-height: 150px;
}

/* Decorative Elements - Responsive */
.kounai45deg, .leaf1, .leaf2, .branfacingleft, .darkmountain, .whitemountain, .redmountainchain {
  position: absolute;
}

.kounai45deg {
  top: 50px;
  right: 20px;
  animation: rotate 1.5s linear infinite;
  width: 40px;
  display: none; /* Hide on small screens */
}

.leaf1, .leaf12, .leaf13, .leaf14, .leaf15, .leaf16, .leaf3 {
  position: absolute;
  width: 60px;
  max-width: 15vw;
  animation: fall 10s linear infinite;
  opacity: 0.8;
}

@keyframes fall {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.leaf1 {
  top: 20px;
  left: 20px;
  transform: rotate(15deg);
}

.leaf12 {
  top: 100px;
  right: 30px;
  transform: rotate(-40deg);
}

.leaf13 {
  bottom: 50px;
  left: 30px;
  transform: rotate(70deg);
}

.leaf15 {
  top: 50px;
  right: 30px;
  transform: rotate(70deg);
}

.leaf16 {
  bottom: 50px;
  left: 30px;
  transform: rotate(70deg);
}

.leaf14 {
  bottom: 50px;
  right: 30px;
  transform: rotate(70deg);
}

.leaf2 {
  width: 40px;
  opacity: 0.8;
  top: 200px;
  left: 10px;
}

.leaf23 {
  width: 60px;
  opacity: 0.8;
  top: 50px;
  right: 10px;
}

.branfacingleft {
  width: 40px;
  top: 90%;
  left: 0;
}

/* Shuriken Animation */
.shuriken {
  position: fixed;
  top: 0;
  left: 0;
  animation: shuriken 6s linear infinite;
  opacity: 0.2;
  width: 60px;
  display: none; /* Hide on small screens for performance */
}

@keyframes shuriken {
  0% { transform: translate(-10vw, -10vh) rotate(0deg); }
  100% { transform: translate(110vw, 110vh) rotate(1080deg); }
}

@keyframes rotate {
  0%{
    transform: rotate(0deg);
  }
  100%{
    transform: rotate(1080deg);
  }
}

/* Scroll Animation */
div {
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 40%;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0px);
  }
}

/* Media Queries for Larger Screens */
@media (min-width: 768px) {
  header {
    height: 80px;
  }
  
  html {
    scroll-padding-top: 80px;
  }
  
  .links > a {
    margin: 0 1.5rem;
    font-size: 1.2rem;
  }
  
  .text {
    padding-top: 150px;
  }
  
  .redmoon {
    width: 250px;
  }
  
  .text-top {
    font-size: 3.5rem;
  }
  
  .text-bottom {
    font-size: 2.2rem;
  }
  
  .ninja {
    width: 150px;
  }
  
  .socials {
    flex-direction: column;
    left: 3%;
    top: 30%;
    transform: none;
    bottom: auto;
  }
  
  .wedDev {
    margin: 1rem;
    flex: 0 1 calc(50% - 2rem);
  }
  
  .projs {
    flex-direction: row;
    gap: 2rem;
  }
  
  #backBtn, #nextBtn {
    width: 80px;
    height: 80px;
  }
  
  .kounai45deg, .shuriken {
    display: block;
  }
  
  .leaf1, .leaf12, .leaf13, .leaf14, .leaf15, .leaf16, .leaf3 {
    width: 80px;
  }
  
  .email, .subject {
    flex-direction: row;
  }
  
  #email, #subject {
    margin: 0 50px;
  }
}

@media (min-width: 1024px) {
  .wedDev {
    flex: 0 1 calc(33.333% - 2rem);
  }
  
  .projCont {
    max-width: 600px;
  }
  
  #screenshot {
    max-width: 500px;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .text-top {
    font-size: 2rem;
  }
  
  .text-bottom {
    font-size: 1.5rem;
  }
  
  .links > a {
    font-size: 0.9rem;
    margin: 0 0.3rem;
  }
  
  .wedDev h1 {
    font-size: 1.2rem;
  }
  
  .wedDev h2 {
    font-size: 0.9rem;
  }
  
  .leaf1, .leaf12, .leaf13, .leaf14, .leaf15, .leaf16, .leaf3 {
    width: 40px;
  }
}




