@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --bg-color: #ffffff;
  --text-color: #0f0f0f;
  --primary-color: #4e9f3d;
  --secondary-color: #f0f0f0;
  --card-bg: #eee;
  --footer-bg: #090b20;
}

body.dark-mode {
  --bg-color: #0f0f0f;
  --text-color: #ffffff;
  --primary-color: #4e9f3d;
  --secondary-color: #1a1a1a;
  --card-bg: #1e1e1e;
  --footer-bg: #0a0a0a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

header {
  background-color: var(--secondary-color);
  position: fixed;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  padding: 10px 150px;
}

header a {
  text-decoration: none;
  color: var(--primary-color);
}

.name a {
  font-weight: bold;
  font-size: 24px;
  text-transform: uppercase;
  word-spacing: 5px;
  color: var(--primary-color);
}

nav a {
  font-weight: 600;
  padding: 10px;
  font-size: 20px;
  transition: 0.7s ease;
  box-shadow: 1px var(--primary-color);
  border-radius: 10px;
  color: var(--primary-color);
}

nav a:hover {
  color: var(--text-color);
  transform: scale(1.1);
  box-shadow: 1px 0px 3px rgb(73, 108, 22);
  background: var(--primary-color);
}

nav button {
  border: none;
  color: var(--primary-color);
  font-size: 1.3rem;
  cursor: pointer;
}

nav .them{
  padding: 5px;
  border-radius: 10px;
  background-color: #eee; 
}
body.dark-mode nav .them{
  background-color: #1e1e1e;  
}

section {
  padding: 150px;
}

.main {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: url(images/finaledit.jpg) no-repeat;
  background-size: cover;
  background-position: center;
  padding-top: 100px;
}

.main-content {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.main .image img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--primary-color);
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5);
}

.main .text {
  max-width: 600px;
  color: var(--text-color);
  margin-top: 20px;
}

.main h2 {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: bold;
}

.main h2 span {
  margin-top: 8px;
  font-size: 45px;
  font-weight: bold;
}

.main h3 {
  color: var(--text-color);
  font-size: 22px;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 30px;
}
.main h3{
  color: #f0f0f0;
}

.stats {
  display: flex;
  gap: 50px;
  margin-top: 25px;
  color: var(--text-color);
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.stat {
  text-align: center;
}

.stat h2 {
  font-size: 40px;
  font-weight: 800;
  color: var(--primary-color);
}

.stat p {
  font-size: 16px;
  font-weight: 500;
  margin-top: 5px;
  color: #ccc;
}

.btn {
  color: #fff;
  background-color: var(--primary-color);
  font-size: 18px;
  font-weight: 400;
  transition: 0.7s ease;
  border-radius: 15px;
  padding: 10px 25px;
  text-decoration: none;
  display: inline-block;
  margin: 20px auto;
  text-align: center;
}

.btn:hover {
  background-color: rgb(4, 192, 4);
  transform: scale(1.1);
}

.social-icons {
  margin-top: 20px;
}

.social-icons a {
  color: var(--primary-color);
  font-size: 28px;
  padding-right: 30px;
  transition: 0.7s ease;
}

.social-icons a:hover {
  color: var(--text-color);
  transform: scale(1.1);
}

.title {
  display: flex;
  justify-content: center;
  color: var(--primary-color);
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 30px;
}

.content {
  display: flex;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
}

.card {
  background-color: var(--card-bg);
  width: 340px;
  min-width: 220px;
  padding: 25px;
  margin: 15px;
  transition: 0.7s ease;
  border-radius: 10px;
  box-shadow: 0px 5px rgba(1 1 1 / 15%);
}

.card:hover {
  transform: scale(1.1);
}

.card .icon {
  color: var(--primary-color);
  font-size: 100px;
  text-align: center;
}

.info {
  text-align: center;
}

.info h3 {
  color: var(--primary-color);
  font-size: 22px;
  margin: 10px;
}

.projects {
  background: url(images/finaledit.jpg) no-repeat center center/cover;
  padding: 100px 50px;
}

.projects .title {
  text-align: center;
  color: var(--primary-color);
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 50px;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.project-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  padding-bottom: 20px;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.project-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 50%;
}

.cer-container {
  display: grid;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.cer-img {
  border-radius: 10px;
  overflow: hidden;
}

.cer-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; 
}


.project-info {
  padding: 15px;
}

.project-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color);
  margin: 15px 0 8px 0;
}

.project-tech {
  font-size: 16px;
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 15px;
}

.go-to-project {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  background: var(--primary-color);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: 0.3s ease;
}

.go-to-project:hover {
  background: rgb(4, 192, 4);
  transform: scale(1.05);
}

.skills {
  position: relative;
  padding: 100px 50px;
  text-align: center;
  color: var(--text-color);
  overflow: hidden;
  background: var(--bg-color);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.skill-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 25px 15px;
  transition: 0.3s ease;
  text-align: center;
}

.skill-card img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 12px;
  transition: 0.3s ease;
}

.skill-card p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
}

.skill-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.1);
}

.skill-card:hover img {
  transform: scale(1.2) rotate(5deg);
  filter: drop-shadow(0 0 8px var(--primary-color));
}

.contact .card {
  min-width: 340px;
}

footer {
  background-color: var(--footer-bg);
}

footer p {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 20px;
  text-align: center;
  padding: 10px;
  margin-bottom: 10px;
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 15px;
}

.social-icons a {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 800;
  transition: 0.7s ease;
}

.social-icons a:hover {
  color: var(--secondary-color);
  transform: scale(1.1);
}

#Backtotop {
  background-color: #4a4a4a;
  color: white;
  border-radius: 50%;
  padding: 3px 20px;
  position: fixed;
  z-index: 100;
  border: none;
  cursor: pointer;
  bottom: 15px;
  right: 15px;
  font-size: 30px;
  display: none;
  box-shadow: 0 0 2px green;
}

#Backtotop:hover {
  border: 1px solid green;
  color: var(--primary-color);
}

.social-icons .face:hover {
  color: blue;
}

.social-icons .lin:hover {
  color: rgb(36, 97, 253);
}

.social-icons .you:hover {
  color: red;
}

.social-icons .git:hover {
  color: white;
}

#typing {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 36px;
  border-right: 2px solid var(--primary-color);
  padding-right: 5px;
  white-space: nowrap;
  overflow: hidden;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  color: var(--primary-color);
  cursor: pointer;
  background-color: var(--secondary-color);
  padding: 8px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
  .main-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
  }

  .main .image img {
    width: 250px;
    height: 250px;
    margin-bottom: 20px;
  }

  .main .text {
    max-width: 100%;
  }

  .stats {
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
  }

  .social-icons {
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column !important;
    align-items: center;
    padding: 20px;
    text-align: center;
  }

  .main .image img {
    width: 200px !important;
    height: 200px !important;
    margin-bottom: 20px;
  }

  .projects-container {
    grid-template-columns: repeat(1 , 1fr);
  }

  .projects .content {
    display: grid;
    grid-template-rows: 1fr !important;
    gap: 25px;
    justify-items: center;
    width: 100%;
  }

  .project-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .main .text {
    max-width: 100% !important;
    color: var(--text-color);
  }

  .stats {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .stats .stat h2 {
    font-size: 24px;
  }

  .stats .stat p {
    font-size: 13px;
  }

  section.main {
    padding: 100px 20px 60px 20px !important;
  }

  .btn {
    font-size: 16px;
    padding: 10px 20px;
    margin: 20px auto;
  }
}

@media (max-width: 480px) {
  .main .image img {
    width: 150px;
    height: 150px;
  }

  .stats .stat h2 {
    font-size: 20px;
  }

  .stats .stat p {
    font-size: 12px;
  }

  .btn {
    font-size: 14px;
    padding: 8px 16px;
    margin: 15px auto;
  }

  .social-icons {
    gap: 10px;
    margin-left: 20px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 10px 20px;
  }

  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 20px;
    background: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
    padding: 15px;
    gap: 10px;
  }

  nav.active {
    display: flex;
  }

  nav a {
    color: var(--primary-color);
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 8px;
  }

  nav a:hover {
    background: var(--primary-color);
    color: #fff;
  }

  .menu-toggle {
    display: block;
  }
}

@media (min-width: 769px) {
  nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    box-shadow: none;
    padding: 0;
  }

  .menu-toggle {
    display: none;
  }
}

.floating-icons {
  position: fixed;
  left: 0;
  width: 100%;
  height: calc(100% - 120px);
  overflow: hidden;
  z-index: 999;
  pointer-events: none;
}

.floating-icons i {
  position: absolute;
  font-size: 30px;
  color: var(--primary-color);
  animation: float 10s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}
@media (max-width: 768px) {
  .cer-img img {
    object-fit: contain; 
    height: auto;        
  }
}

.floating-icons i:nth-child(1) { left: 10%; animation-duration: 12s; font-size: 25px; }
.floating-icons i:nth-child(2) { left: 30%; animation-duration: 15s; font-size: 35px; }
.floating-icons i:nth-child(3) { left: 50%; animation-duration: 18s; font-size: 28px; }
.floating-icons i:nth-child(4) { left: 70%; animation-duration: 14s; font-size: 40px; }
.floating-icons i:nth-child(5) { left: 90%; animation-duration: 20s; font-size: 30px; }
