/*==================== VARIABLES ====================*/
:root {
  --header-height: 3.5rem;

  /* Color palette */
  --first-color: #0a66c2; /* e.g., LinkedIn Blue, or pick your brand color */
  --text-color: #333333;
  --text-color-light: #777777;
  --body-color: #f6f6f6;
  --container-color: #ffffff;

  /* Font and typography */
  --body-font: "Poppins", sans-serif;
  --big-font-size: 2rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;

  /* Margins and padding */
  --mb-1: 1rem;
  --mb-2: 1.5rem;
  --mb-3: 2rem;
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*==================== BASE ====================*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

/* Reusable container */
.container {
  max-width: 968px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}
.section {
  padding: 2rem 0 2rem;
}
.section__title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: var(--mb-1);
}
.section__subtitle {
  display: block;
  font-size: var(--small-font-size);
  margin-bottom: var(--mb-3);
  color: var(--text-color-light);
  text-align: center;
}

/*==================== HEADER ====================*/
.header {
  width: 100%;
  position: fixed;
  top: 0;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: var(--z-fixed);
}
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav__logo {
  font-weight: 600;
  color: var(--first-color);
  font-size: 1.2rem;
}
.nav__menu {
  display: flex;
}
.nav__list {
  display: flex;
  gap: 2rem;
}
.nav__link {
  color: var(--text-color);
  text-decoration: none;
  font-size: var(--normal-font-size);
  position: relative;
}
.nav__link:hover {
  color: var(--first-color);
}
.active-link {
  color: var(--first-color);
}
.nav__toggle {
  display: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* For mobile screens */
@media (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
    display: block;
    padding: 2rem;
    transition: 0.3s;
  }
  .nav__list {
    flex-direction: column;
    gap: 1.5rem;
  }
  .nav__toggle {
    display: block;
  }
  .show-menu {
    right: 0;
  }
}

/*==================== HOME SECTION ====================*/
.home {
  margin-top: var(--header-height);
  display: flex;
  align-items: center;
}
.home__container {
  row-gap: 2rem;
}
.home__content {
  flex: 1;
}
.home__title {
  font-size: 2.5rem;
  color: var(--first-color);
  margin-bottom: 0.5rem;
}
.home__subtitle {
  display: block;
  font-size: var(--normal-font-size);
  margin-bottom: 1rem;
  color: var(--text-color-light);
}
.home__description {
  line-height: 1.6;
  margin-bottom: var(--mb-2);
}
.button {
  display: inline-flex;
  align-items: center;
  background-color: var(--first-color);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s;
}
.button:hover {
  background-color: #004080; /* darker shade of first color */
}
.button__icon {
  margin-left: 0.5rem;
  font-size: 1.25rem;
}
.home__img img {
  max-width: 100%;
  display: block;
}

/*==================== ABOUT ====================*/
.about__container {
  column-gap: 2rem;
  align-items: center;
}
.about__img {
  width: 280px;
  height: 240px;
  border-radius: 1rem;
  object-fit: cover;
  margin-bottom: 1rem;
}
.about__data {
  max-width: 500px;
}
.about__description {
  margin-bottom: 1rem;
  line-height: 1.6;
}
.about__container__headder {
  display: flex;
  gap: 2rem;
}

/*==================== SKILLS ====================*/
.skills__container {
  row-gap: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}
.skills__content {
  background-color: var(--container-color);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-height: none;
  transition: all 0.3s ease-out;
  margin-bottom: 1rem;
  opacity: 1;
  transform: translateY(0);
  border: 1px solid rgba(10, 102, 194, 0.1);
}
.skills__content:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.skills__open {
  max-height: none;
}
.skills__header {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 1rem;
}
.skills__icon {
  font-size: 1.5rem;
  color: var(--first-color);
}
.skills__title__container {
  text-align: center;
}
.skills__title {
  font-size: var(--h3-font-size);
}
.skills__subtitle {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}
.skills__arrow {
  font-size: 1.5rem;
}
.skills__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.skills__data {
  display: flex;
  align-items: center;
  column-gap: 0.75rem;
  padding: 0.75rem;
  background-color: rgba(10, 102, 194, 0.05);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}
.skills__data:hover {
  background-color: rgba(10, 102, 194, 0.1);
  transform: translateX(4px);
}
.skills__data i {
  color: var(--first-color);
  font-size: 1.5rem;
  min-width: 24px;
}
.skills__name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.skills__level {
  font-size: 0.8rem;
  color: var(--text-color-light);
  font-weight: 500;
}

/*==================== HOME STATS ====================*/
.home__stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.home__stat {
  text-align: center;
  padding: 1rem;
  background-color: rgba(10, 102, 194, 0.1);
  border-radius: 0.75rem;
  min-width: 120px;
}
.home__stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--first-color);
}
.home__stat-label {
  font-size: 0.8rem;
  color: var(--text-color-light);
  font-weight: 500;
}

/*==================== ABOUT ACHIEVEMENTS ====================*/
.about__achievements {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.achievement {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: rgba(10, 102, 194, 0.05);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}
.achievement:hover {
  background-color: rgba(10, 102, 194, 0.1);
  transform: translateX(4px);
}
.achievement i {
  color: var(--first-color);
  font-size: 1.25rem;
}
.achievement span {
  font-weight: 500;
  font-size: 0.9rem;
}

/*==================== PROJECTS ====================*/
.projects__filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.projects__item {
  cursor: pointer;
  color: var(--text-color-light);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: background 0.3s;
  border-radius: 0.5rem;
}
.projects__item:hover {
  background-color: #eaeaea;
}
.active-project {
  background-color: var(--first-color);
  color: #fff;
}

.projects__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.projects__card {
  background-color: var(--container-color);
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(10, 102, 194, 0.1);
}
.projects__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}
.projects__img {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.projects__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.projects__card:hover .projects__img img {
  transform: scale(1.05);
}
.projects__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(10, 102, 194, 0.9), rgba(10, 102, 194, 0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.projects__card:hover .projects__overlay {
  opacity: 1;
}
.projects__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tech-tag {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.projects__data {
  padding: 1.5rem;
}
.projects__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}
.projects__description {
  font-size: 0.9rem;
  color: var(--text-color-light);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.projects__metrics {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: rgba(10, 102, 194, 0.05);
  border-radius: 0.5rem;
}
.metric {
  text-align: center;
}
.metric__value {
  display: block;
  font-weight: 700;
  color: var(--first-color);
  font-size: 1rem;
}
.metric__label {
  font-size: 0.75rem;
  color: var(--text-color-light);
  font-weight: 500;
}
.projects__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.projects__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: 1px solid var(--first-color);
  color: var(--first-color);
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}
.projects__button:hover {
  background-color: var(--first-color);
  color: white;
  transform: translateY(-2px);
}

/*==================== BLOG ====================*/
.blog__container {
  display: grid;
  row-gap: 1rem;
  column-gap: 2rem;
}
.blog__content {
  background-color: var(--container-color);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s;
}
.blog__content:hover {
  transform: translateY(-4px);
}
.blog__img-box img {
  width: 100%;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.blog__title {
  font-size: var(--normal-font-size);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.blog__description {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  margin-bottom: 1rem;
}
.blog__button {
  color: var(--first-color);
  text-decoration: none;
  font-weight: 500;
}
.blog__button:hover {
  text-decoration: underline;
}
.blog__icon {
  margin-left: 0.25rem;
  font-size: 1rem;
}

/*==================== CONTACT ====================*/
.contact__container {
  row-gap: 2rem;
  column-gap: 2rem;
}
.contact__content {
  background-color: var(--container-color);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}
.contact__form {
  background-color: var(--container-color);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}
.contact__title {
  font-size: var(--h3-font-size);
  margin-bottom: 1rem;
}
.contact__info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.contact__card {
  background-color: #f9f9f9;
  padding: 1rem;
  border-radius: 1rem;
  text-align: center;
  flex: 1 1 150px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.contact__card-icon {
  font-size: 1.5rem;
  color: var(--first-color);
  margin-bottom: 0.5rem;
}
.contact__card-title {
  font-size: var(--small-font-size);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.contact__card-data {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  margin-bottom: 0.5rem;
}
.contact__button {
  font-size: var(--small-font-size);
  color: var(--first-color);
  text-decoration: none;
  font-weight: 500;
}

.contact__form-div {
  margin-bottom: 1rem;
}
.contact__form-tag {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}
.contact__form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  font-size: var(--normal-font-size);
}
.contact__form-area textarea {
  resize: none;
}
.button--flex {
  display: inline-flex;
  align-items: center;
}
.contact__button-icon {
  margin-left: 0.5rem;
  font-size: 1.25rem;
}

/*==================== FOOTER ====================*/
.footer {
  background-color: var(--container-color);
  padding: 2rem 0;
  margin-top: 3rem;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}
.footer__container {
  text-align: center;
}
.footer__title {
  font-size: var(--h3-font-size);
  color: var(--first-color);
  margin-bottom: 0.5rem;
}
.footer__subtitle {
  font-size: var(--small-font-size);
  margin-bottom: 1rem;
  color: var(--text-color-light);
}
.footer__socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.footer__social {
  font-size: 1.25rem;
  color: var(--first-color);
  text-decoration: none;
  transition: color 0.3s;
}
.footer__social:hover {
  color: #004080;
}
.footer__copy {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

/*==================== SCROLL UP BUTTON ====================*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -20%;
  background-color: var(--first-color);
  opacity: 0.8;
  padding: 0.75rem;
  border-radius: 0.5rem;
  display: flex;
  z-index: var(--z-tooltip);
  transition: 0.4s;
}
.scrollup__icon {
  font-size: 1.25rem;
  color: #fff;
}
.show-scroll {
  bottom: 1.5rem;
}

/*==================== MEDIA QUERIES ====================*/

/* Mobile First - Small devices */
@media (max-width: 426px) {
  .home__stats {
    flex-direction: column;
    gap: 1rem;
  }
  .home__stat {
    min-width: 100px;
  }
  .about__container {
    display: flex;
    flex-direction: column;
  }
  .about__container__headder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .skills__container {
    grid-template-columns: 1fr;
  }
  .skills__list {
    grid-template-columns: 1fr;
  }
  .projects__container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .projects__metrics {
    flex-direction: column;
    gap: 0.5rem;
  }
  .projects__buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .skills__container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .skills__list {
    grid-template-columns: 1fr;
  }
  .projects__container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  .home__stats {
    gap: 1.5rem;
  }
}

/* Large tablets and small desktops */
@media (max-width: 992px) {
  .home__container {
    grid-template-columns: 1fr;
    row-gap: 3rem;
  }
  .about__container {
    grid-template-columns: 1fr;
  }
  .skills__container {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
  .projects__container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
  .blog__container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  .contact__container {
    grid-template-columns: 1fr;
  }
}

/* Large desktops */
@media (min-width: 1200px) {
  .skills__container {
    grid-template-columns: repeat(3, 1fr);
  }
  .projects__container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Extra large screens */
@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
  }
}

/* Fix last row cutting off issue */
.section {
  padding: 4rem 0 6rem;
}

/* Ensure proper spacing for last elements */
.projects__container,
.blog__container,
.contact__container {
  margin-bottom: 4rem;
}

/* Footer spacing fix */
.footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
}
