/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;
  --first-color: #ffffff;
  --first-color-alt: #cccccc;
  --title-color: #ffffff;
  --text-color: #e0e0e0; 
  --body-color: #000000;
  --container-color: #1a1a1a; 
}

/*=============== BASE ===============*/
body {
  background-color: var(--body-color);
  color: var(--text-color);
  transition: 0.4s ease;
}

h1, h2, h3 {
  color: var(--title-color); 
}

button, input, textarea {
  color: var(--first-color);
}

button:hover {
  background-color: var(--first-color-alt); 
  color: var(--body-color);
}

/*=============== THEME ===============*/
.change__theme {
  font-size: 1.25rem;
  cursor: pointer;
  transition: 0.3s;
}

.change__theme:hover {
  color: var(--first-color);
}

/*=============== LIGHT MODE COLORS ===============*/
body.light-theme {
  --first-color: #000000;
  --first-color-alt: #333333;
  --title-color: #000000; 
  --text-color: #333333;
  --body-color: #ffffff;
  --container-color: #f0f0f0;
}

button:hover {
  background-color: var(--first-color-alt); 
  color: var(--body-color);
}

/*========== Font and typography ==========*/
:root {
  --body-font: "Poppins", sans-serif;
  --biggest-font-size: 1.75rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
  --smaller-font-size: 0.75rem;
  --tiny-font-size: 0.625rem;
  --font-medium: 500;
  --font-semibold: 600;
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

@media screen and (min-width: 968px) {
  :root {
    --biggest-font-size: 2.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body, button, input, textarea {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--body-color);
  z-index: var(--z-fixed);
  transition: 0.4s;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--first-color);
  font-weight: var(--font-medium);
  transition: 0.4s;
}

.nav__logo:hover {
  color: var(--first-color-alt);
}

.nav__menu {
  position: fixed;
  bottom: 1rem;
  background-color: hsla(var(--second-hue), 32%, 16%, 0.8);
  width: 90%;
  border-radius: 4rem;
  padding: 1rem 2.25rem;
  backdrop-filter: blur(10px);
  transition: 0.4s;
}

.nav__list {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__link {
  color: var(--text-color);
  font-size: 1.25rem;
  padding: 0.4rem;
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: 0.4s;
  display: flex;
  border-radius: 5rem;
}

/* Active link */
.active-link {
  background: linear-gradient(
    180deg,
    hsla(var(--first-hue), var(--sat), var(--lig), 0.5),
    hsla(var(--first-hue), var(--sat), var(--lig), 0.2)
  );
  box-shadow: 0 0 16px hsla(var(--first-hue), var(--sat), var(--lig), 0.4);
  border-radius: 5rem;

  color: var(--title-color);
}

/*=============== WORK SECTION ===============*/
.work__container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.work__card {
  background-color: var(--container-color);
  padding: 1rem;
  border-radius: 1rem;
  transition: 0.4s;
  cursor: pointer;
}

.work__card:hover {
  transform: translateY(-10px);
}

.work__title {
  color: var(--first-color);
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
  margin-bottom: 0.75rem;
}

/*=============== POPUP SECTION ===============*/
.services__modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.services__modal.show {
  display: flex;
  opacity: 1;
}

.services__modal-content {
  background: var(--container-color);
  padding: 2rem;
  border-radius: 1rem;
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90%;
  overflow-y: auto;
}

.services__modal-title {
  color: var(--first-color);
  font-size: var(--h2-font-size);
  font-weight: var(--font-semibold);
  margin-bottom: 1rem;
}

.services__modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
}

.popup__images {
  display: block;
}

.popup__images img {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  transition: transform 0.3s ease;
}

.popup__images img:hover {
  transform: scale(1.05);
}

/* Tech Stack Section */
.popup__tech-stack {
  margin-top: 2rem;
}

.popup__tech-stack h4 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
}

.tech-stack-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tech-stack-icons img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.tech-stack-icons img:hover {
  transform: scale(1.2);
}

/* About Section Styling */
.about {
  padding: 4rem 2rem;
  background-color: #f0f0f0; 
  color: #333;
  text-align: center;
  transition: background-color 0.3s, color 0.3s;
  margin-top: 4rem;
}

.about__description {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #555; 
}

.section__title {
  font-size: 2rem;
  font-weight: bold;
  color: #000; 
  margin-bottom: 1.5rem;
  position: relative;
}

/* Underline effect for title */
.section__title::after {
  content: '';
  width: 80px;
  height: 3px;
  background-color: 0078df; 
  display: block;
  margin: 0.8rem auto 0;
}

/* Dark mode styling */
.dark-theme .about {
  background-color: var(--container-color); 
  color: #fff; 
}

.dark-theme .about__description {
  color: #ccc;
}

.dark-theme .section__title {
  color: #fff;
}

.dark-theme .section__title::after {
  background-color: 0000ff; 
}

/* Media Queries for responsiveness */
@media (max-width: 768px) {
  .about {
      padding: 2rem 1rem;
  }
  
  .section__title {
      font-size: 1.8rem;
  }
  
  .about__description {
      font-size: 1rem;
  }
}

