* {
  margin: 0;
  padding: 0;
}

:root {
  /* Light mode colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #000000;
  --text-secondary: #222222;
  --text-muted: #555555;
  --border-color: #000000;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.1);
  --nav-bg: #ffffff;
  --nav-shadow: rgba(0, 0, 0, 0.1);
  --footer-bg: #000000;
  --footer-text: #ffffff;
  --accent-blue: #1e40af;
  --accent-purple: #474af0;
  --input-bg: #ffffff;
  --input-border: #ccc;
  --gray-bg: rgba(128, 128, 128, 0.214);
}

body.dark-mode {
  /* Dark mode colors */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --text-primary: #e6edf3;
  --text-secondary: #c9d1d9;
  --text-muted: #8b949e;
  --border-color: #30363d;
  --card-bg: #161b22;
  --card-shadow: rgba(0, 0, 0, 0.4);
  --nav-bg: #161b22;
  --nav-shadow: rgba(0, 0, 0, 0.5);
  --footer-bg: #ffffff;
  --footer-text: #000000;
  --accent-blue: #58a6ff;
  --accent-purple: #7d8cf8;
  --input-bg: #0d1117;
  --input-border: #30363d;
  --gray-bg: rgba(48, 54, 61, 0.5);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  scroll-padding-top: 0;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.header-list {
  margin: 15px 20px;
}

.div-list {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.ul-list {
  list-style: none;
  display: flex;
  gap: 3rem;
  background-color: var(--nav-bg);
  box-shadow: 0 2px 8px var(--nav-shadow);
  padding: 10px 25px;
  border-radius: 25px;
  transition: background-color 0.3s ease;
}

.ul-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 25px;
  transition: 0.3s;
}

.ul-list li a {
  font-family: "Montserrat", sans-serif;
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ul-list li a i {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.ul-list li.active {
  background-color: var(--accent-purple);
  padding: 10px 15px;
}

.ul-list li.active a,
.ul-list li.active a i {
  color: white;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  cursor: pointer;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--gray-bg);
  transform: scale(1.1);
}

.theme-toggle-btn i {
  font-size: 18px;
}

/* fine header  */

.home {
  min-height: 105vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 200px;
  scroll-snap-align: start;
}

.home-container {
  display: flex;
  gap: 6rem;
}

.home-p {
  color: var(--text-primary);
  background-color: var(--gray-bg);
  display: inline-block;
  border-radius: 25px;
  padding: 5px 10px;
  margin-bottom: 30px;
}

.home-s {
  font-weight: bold;
  color: green;
}

.info-home h1 {
  font-size: 70px;
  font-family: "Raleway", sans-serif;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.info-home h3 {
  font-size: 40px;
  font-family: "Playfair Display", serif;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.info-p {
  color: var(--text-secondary);
  font-family: "Roboto", sans-serif;
  padding-bottom: 20px;
}

.info-p p {
  padding-bottom: 5px;
}

.info-p2 {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 14px;
  padding-bottom: 20px;
}

.btnn {
  display: flex;
  gap: 1rem;
  padding-bottom: 30px;
}

.btn-home1 {
  background-color: var(--accent-purple);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-home1:hover {
  opacity: 0.9;
}

.btn-home2 {
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 10px 10px;
  cursor: pointer;
  transition: 0.4s;
}

.btn-home2:hover {
  background-color: var(--accent-purple);
  color: #fff;
  border-color: var(--accent-purple);
}

hr {
  width: 90%;
  font-weight: bold;
  color: var(--border-color);
  background-color: var(--border-color);
  border-color: var(--border-color);
}

.hhr {
  padding-bottom: 30px;
}

.follow {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.follow p {
  color: var(--text-primary);
}

.follow ul {
  display: flex;
  gap: 1rem;
  font-size: 20px;
  align-items: center;
}

.follow ul li {
  list-style: none;
}

.follow ul a {
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.follow ul a:hover {
  color: var(--accent-purple);
}

.home img {
  width: 400px;
  border-radius: 10px;
}

/* fine home  */

.about {
  min-height: 100vh;
  padding: 120px 200px 100px 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: center;
}

.about p {
  padding-bottom: 30px;
  font-size: 13px;
  color: var(--text-muted);
}

.about h1 {
  font-family: "Open Sans", sans-serif;
  color: var(--text-primary);
}

.about h2 {
  color: var(--text-primary);
}

.title {
  padding-bottom: 20px;
}

.about .hrrr {
  width: 30%;
  padding-bottom: 40px;
}

.info-about {
  display: flex;
  flex-direction: column;
}

.about-container {
  display: flex;
  gap: 2rem;
}

.about-info p {
  color: var(--text-secondary);
  font-size: 15px;
}

.about img {
  position: relative;
  bottom: 85px;
  width: 400px;
  height: 400px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
}

.about h2 {
  padding-bottom: 30px;
}

.card {
  display: flex;
  gap: 2rem;
}

.c1 {
  display: flex;
  align-content: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border: 2px solid var(--border-color);
  background-color: var(--card-bg);
  padding: 5px 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.c1 h3 {
  padding-top: 10px;
  padding-bottom: 10px;
  color: var(--text-primary);
}

.c1 p {
  color: var(--text-secondary);
}

.c1:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: var(--accent-purple);
  background-color: var(--bg-secondary);
  box-shadow: 0 4px 15px var(--card-shadow);
  cursor: pointer;
}

.project {
  min-height: 100vh;
  padding: 150px 200px 75px 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  scroll-snap-align: start;
}

.project p {
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.project h1 {
  font-family: "Open Sans", sans-serif;
  padding-bottom: 10px;
  color: var(--text-primary);
}

.project hr {
  width: 10%;
}

.info-pro {
  padding-top: 20px;
  padding-bottom: 30px;
}

.info-pro p {
  padding-bottom: 10px;
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: auto;
  margin-top: 20px;
}

.project-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 5px 15px var(--card-shadow);
  transition: 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px var(--card-shadow);
}

.project-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
}

.project-card h3 {
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
  min-height: 65px;
}

.tech-tags {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 40px;
  align-items: flex-start;
}

.tech-tags span {
  display: inline-block;
  background: var(--gray-bg);
  color: var(--accent-blue);
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 6px;
  margin: 3px;
  transition: background 0.3s, color 0.3s;
  cursor: default;
}

.tech-tags span:hover {
  background: var(--accent-purple);
  color: white;
}

.btns {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn {
  background: var(--accent-blue);
  color: white;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 25px;
  font-size: 0.9rem;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: var(--accent-purple);
  border-radius: 25px;
  transform: scale(1.05);
}

.skills {
  margin: 100px 200px 300px 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  scroll-snap-align: center;
}

.skills p {
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.skills h1 {
  font-family: "Open Sans", sans-serif;
  padding-bottom: 10px;
  color: var(--text-primary);
}

.skills hr {
  width: 10%;
}

.skills-container {
  padding-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: auto;
}

.skill-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 5px 15px var(--card-shadow);
  transition: 0.5s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.skill-card img {
  width: 100px;
  margin-bottom: 15px;
  z-index: 1;
  position: relative;
}

.skill-card h3 {
  color: var(--accent-blue);
  margin-bottom: 10px;
  transition: color 0.5s;
  position: relative;
  z-index: 1;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.5s;
  position: relative;
  z-index: 1;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-purple);
  z-index: 0;
  transition: 0.5s;
}

.skill-card:hover::before {
  left: 0;
}

.skill-card:hover h3,
.skill-card:hover p {
  color: #fff;
}

.contact {
  margin: 160px 200px;
  padding-top: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  scroll-snap-align: center;
}

.contact p {
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.contact h1 {
  font-family: "Open Sans", sans-serif;
  padding-bottom: 10px;
  color: var(--text-primary);
}

.contact hr {
  width: 10%;
}

.contact-content {
  padding-top: 50px;
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-info p {
  font-size: 16px;
  margin-bottom: 25px;
  color: var(--text-secondary);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

.contact-item i {
  font-size: 20px;
  color: var(--accent-purple);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 50px;
  height: 50px;
  background: var(--gray-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.social-link i {
  line-height: 1;
}

.social-link:hover {
  transform: translateY(-5px);
  color: #fff;
}

.social-link[href*="github"]:hover {
  background: #000;
}

.social-link[href*="linkedin"]:hover {
  background: #0a66c2;
}

.social-link[href*="wa.me"]:hover {
  background: #25d366;
}

/* Form */
.contact-form {
  flex: 1;
  min-width: 300px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 14px;
  transition: border 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.btn-send {
  background: var(--accent-purple);
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.3s;
}

.btn-send:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Responsive */
@media (max-width: 900px) {
  .contact-content {
    flex-direction: column;
  }
}

.footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px 20px;
  text-align: center;
  overflow-x: hidden;
  scroll-snap-align: end;
  transition: background-color 0.3s ease;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
}

.footer-logo {
  font-family: "Montserrat", sans-serif;
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--footer-text);
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links li a {
  color: var(--footer-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links li a:hover {
  color: var(--accent-purple);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.footer-social a {
  color: var(--footer-text);
  font-size: 18px;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: var(--accent-purple);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

.active-reveal {
  opacity: 1;
  transform: translateY(0);
}

.home-container {
  opacity: 0;
  animation: fadeInHome 1s ease-out forwards;
  animation-delay: 4.5s;
}

@keyframes fadeInHome {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
  color: #00f0ff;
  text-align: center;
}

.hidden {
  opacity: 0;
  transform: translateY(-200px);
}

.fall {
  animation: fall 0.9s forwards;
}

@keyframes fall {
  0% {
    opacity: 0;
    transform: translateY(-200px);
  }
  60% {
    opacity: 1;
    transform: translateY(20px);
  }
  100% {
    transform: translateY(0);
  }
}

.loading-content h1,
.loading-content h2,
.loading-content i {
  margin: 20px 0;
}

.sub-icons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
}

#main-page {
  opacity: 0;
  transition: opacity 1s ease;
}

#main-page.visible {
  opacity: 1;
}

/* Responsive for tablets and phones */
@media (max-width: 1024px) {
  .home,
  .about,
  .project,
  .skills,
  .contact {
    margin: 120px 50px;
  }

  .home-container,
  .about-container {
    flex-direction: column;
    gap: 3rem;
  }

  .home img,
  .about img {
    width: 100%;
    height: auto;
  }

  .ul-list {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 8px 15px;
  }
}

/* Phone layout */
@media (max-width: 768px) {
  header {
    display: none;
  }

  .home,
  .about,
  .project,
  .skills,
  .contact {
    margin: 100px 20px;
  }

  .home-container,
  .about-container,
  .contact-content {
    flex-direction: column;
    gap: 2rem;
  }

  .projects-container,
  .skills-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home img,
  .about img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .btn-home1,
  .btn-home2,
  .btn,
  .btn-send {
    width: 100%;
    text-align: center;
  }

  .follow ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 1024px) {
  header {
    display: none;
  }

  .home,
  .about,
  .project,
  .skills,
  .contact {
    margin: 20px auto;
    padding: 0 15px;
    text-align: center;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .home-container,
  .about-container,
  .skills-container,
  .projects-container,
  .contact-content,
  .card {
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
  }

  .about img {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin-bottom: 20px;
    margin-top: 30px;
    bottom: 0;
    position: relative;
    z-index: 1;
  }

  .card .c1 {
    width: 100%;
    max-width: 300px;
    text-align: center;
    margin: 0 auto;
  }

  .home img,
  .project-card img,
  .skill-card img {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    object-fit: cover;
  }

  .info-home h1 {
    font-size: 26px;
  }
  .info-home h3 {
    font-size: 18px;
  }
  .info-p,
  .info-p2,
  .home-p,
  .about p,
  .project p,
  .skill-card p,
  .contact p {
    font-size: 14px;
  }
  .project-card h3,
  .skill-card h3 {
    font-size: 16px;
  }

  .contact-content {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .contact-info,
  .contact-form {
    width: 100%;
    max-width: 400px;
  }

  html,
  body {
    overflow-x: hidden;
  }
}
