/* =========================
    Base Styles & Resets
    ========================= */
html {
  font-size: 100%; /* 16px default for accessibility */
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-color: #8e8e8e #fff;
  scrollbar-width: thin;
}

body {
  background: #fff;
  font-family: "Poppins", sans-serif;
  color: #222;
  margin: 0;
  padding: 0;
  font-size: 1rem;
}

/* =========================
    Typography
    ========================= */
h2,
h3,
h4,
footer h3 {
  color: #2d2e32;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.hero-content h2,
.about-section h3,
.projects-section h2,
.skills-section h2,
#contact h2,
footer h3 {
  font-size: 2rem;
}

.about-section h4,
.project-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #6c63ff;
  margin-bottom: 0.7rem;
  line-height: 1.5;
}

.hero-content p,
.about-section p,
.project-item p,
#contact label,
#contact input,
#contact textarea {
  font-size: 1rem;
}

@media (max-width: 600px) {
  .hero-content h2,
  .about-section h3,
  .projects-section h2,
  .skills-section h2,
  #contact h2,
  footer h3 {
    font-size: 1.25rem;
  }
  .about-section h4,
  .project-item h3 {
    font-size: 1.1rem;
  }
}

/* =========================
    Navigation
    ========================= */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.09);
  font-size: 1.125rem;
  padding: 2.5rem 4rem 2.5rem 5rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
}

.logo {
  color: #2d2e32;
  cursor: pointer;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav ul a {
  color: #2d2e32;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.23s;
  font-size: 1.125rem;
}

nav ul a:hover {
  color: #6c63ff;
}

@media (max-width: 768px) {
  nav {
    display: none;
  }
}

/* =========================
    Container
    ========================= */
.container {
  margin: 0 auto;
  max-width: 107rem;
  padding: 0 4rem;
}

/* =========================
    Hero Section
    ========================= */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  background: linear-gradient(120deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 8rem 0 4rem 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.2rem;
  background: #fff;
  padding: 48px 36px 40px 36px;
  border-radius: 20px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
  max-width: 420px;
}

.hero-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
  margin-bottom: 1.2rem;
}

.cta-button {
  display: inline-block;
  background: #6c63ff;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  padding: 13px 34px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.08);
  transition: background 0.3s, transform 0.2s;
  margin-top: 0.5rem;
}

.cta-button:hover {
  background: #5548c8;
  transform: translateY(-2px) scale(1.04);
}

@media (max-width: 600px) {
  .hero-section {
    padding: 6rem 0 2rem 0;
  }
  .hero-content {
    padding: 32px 12px 28px 12px;
    max-width: 98vw;
  }
  .hero-image {
    width: 90px;
    height: 90px;
  }
  .cta-button {
    font-size: 1rem;
    padding: 11px 22px;
  }
}

/* =========================
    About Me Section
    ========================= */
.about-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  max-width: 520px;
  margin: 60px auto 0 auto;
  padding: 44px 32px 38px 32px;
  text-align: center;
  gap: 1.6rem;
}

.about-me-image {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.09);
  margin-bottom: 1.1rem;
}

@media (max-width: 600px) {
  .about-section {
    padding: 28px 10px 22px 10px;
    max-width: 98vw;
  }
  .about-me-image {
    width: 78px;
    height: 78px;
  }
}

/* =========================
    Projects Section
    ========================= */
.projects-section {
  max-width: 1100px;
  margin: 70px auto;
  padding: 48px 0 60px 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.projects-section h2 {
  text-align: center;
  margin-bottom: 2.8rem;
  letter-spacing: 0.5px;
}

.projects-list {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.project-item {
  background: #f8f9fa;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 28px 22px 24px 22px;
  max-width: 320px;
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.3s, transform 0.2s;
}

.project-item:hover {
  box-shadow: 0 6px 28px rgba(108, 99, 255, 0.13);
  transform: translateY(-4px) scale(1.03);
}

.project-item figure {
  margin: 0 0 1.2rem 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-item img {
  width: 100%;
  max-width: 220px;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  margin-bottom: 0.5rem;
  background: #e9ecef;
}

.project-item figcaption {
  font-size: 1rem;
  color: #6c63ff;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.project-item h3 {
  margin-bottom: 0.7rem;
  text-align: center;
}

.project-item p {
  margin-bottom: 1.2rem;
  text-align: center;
  line-height: 1.6;
}

.project-item a {
  display: inline-block;
  background: #6c63ff;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  padding: 10px 26px;
  border-radius: 7px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.08);
  transition: background 0.3s, transform 0.2s;
  margin-top: auto;
}

.project-item a:hover {
  background: #5548c8;
  transform: translateY(-2px) scale(1.04);
}

@media (max-width: 900px) {
  .projects-list {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .project-item {
    max-width: 98vw;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .projects-section {
    padding: 24px 0 16px 0;
  }
  .projects-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
  }
  .project-item {
    padding: 16px 6px 14px 6px;
  }
  .project-item img {
    max-width: 98vw;
    height: 90px;
  }
  .project-item a {
    font-size: 0.98rem;
    padding: 8px 16px;
  }
}

/* =========================
    Skills Section
    ========================= */
.skills-section {
  max-width: 700px;
  margin: 60px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  padding: 44px 32px 38px 32px;
  text-align: center;
}

.skills-section h2 {
  margin-bottom: 2.2rem;
  letter-spacing: 0.5px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skills-list li {
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: box-shadow 0.3s, transform 0.2s, background 0.3s;
}

.skills-list li:hover {
  background: #6c63ff;
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 6px 18px rgba(108, 99, 255, 0.13);
}

.skills-list li img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  transition: filter 0.3s;
}

@media (max-width: 700px) {
  .skills-section {
    padding: 28px 10px 22px 10px;
    max-width: 98vw;
  }
  .skills-section h2 {
    font-size: 1.3rem;
  }
  .skills-list {
    gap: 16px;
  }
  .skills-list li {
    padding: 12px 10px;
  }
  .skills-list li img {
    width: 36px;
    height: 36px;
  }
}

/* =========================
    Contact Section
    ========================= */
#contact {
  max-width: 520px;
  margin: 60px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  padding: 44px 32px 38px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

#contact h2 {
  margin-bottom: 1.5rem;
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

#contact label {
  font-weight: 600;
  text-align: left;
  margin-bottom: 0.3rem;
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e9ecef;
  border-radius: 8px;
  font-family: inherit;
  background: #f8f9fa;
  color: #222;
  transition: border 0.2s, box-shadow 0.2s;
  resize: none;
}

#contact input:focus,
#contact textarea:focus {
  border-color: #6c63ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.08);
}

.error-message {
  color: #e74c3c;
  font-size: 0.9em;
  margin-bottom: 8px;
  display: block;
}

#contact button[type="submit"] {
  background: #6c63ff;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  padding: 13px 34px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.08);
  transition: background 0.3s, transform 0.2s;
  margin-top: 0.5rem;
}

#contact button[type="submit"]:hover {
  background: #5548c8;
  transform: translateY(-2px) scale(1.04);
}

@media (max-width: 600px) {
  #contact {
    padding: 28px 10px 22px 10px;
    max-width: 98vw;
  }
  #contact h2 {
    font-size: 1.3rem;
  }
  #contact input,
  #contact textarea {
    font-size: 0.98rem;
    padding: 10px 8px;
  }
  #contact button[type="submit"] {
    font-size: 1rem;
    padding: 11px 22px;
  }
}

/* =========================
    Footer
    ========================= */
footer {
  background: #2d2e32;
  padding: 5rem 0;
  width: 100%;
}

.footerb {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer h3 {
  color: #fff;
  font-size: 1.7rem;
  flex: 1;
}

.footerb__socials {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: center;
  margin-top: 1rem;
}

.footerb__socials a {
  color: #fff;
  font-size: 2.3rem;
  transition: all 0.2s ease-in-out;
}

.footerb__socials a:hover {
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .footerb {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
}
