/* ===== CSS VARIABLES ===== */
:root {
  --header-height: 3.5rem;
  
  /* Colors */
  --primary-color: #2563eb;
  --primary-color-alt: #1d4ed8;
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --title-color: #111827;
  --text-color: #6b7280;
  --text-color-light: #9ca3af;
  --body-color: #ffffff;
  --container-color: #ffffff;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --body-font: 'Inter', system-ui, -apple-system, sans-serif;
  --biggest-font-size: 3rem;
  --h1-font-size: 2.25rem;
  --h2-font-size: 1.875rem;
  --h3-font-size: 1.5rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.75rem;
  
  /* Font Weight */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;
  
  /* Spacing */
  --mb-0-25: 0.25rem;
  --mb-0-5: 0.5rem;
  --mb-0-75: 0.75rem;
  --mb-1: 1rem;
  --mb-1-25: 1.25rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;
  
  /* Z-index */
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

/* Responsive Typography */
@media screen and (max-width: 992px) {
  :root {
    --biggest-font-size: 2.5rem;
    --h1-font-size: 2rem;
    --h2-font-size: 1.625rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 0.938rem;
    --small-font-size: 0.813rem;
    --smaller-font-size: 0.75rem;
  }
}

/* ===== BASE ===== */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 0 var(--header-height) 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  line-height: 1.2;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== REUSABLE CSS CLASSES ===== */
.container {
  max-width: 1200px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

.grid {
  display: grid;
}

.section {
  padding: 5rem 0 2rem;
}

.section__title {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  text-align: center;
  margin-bottom: var(--mb-0-75);
}

.section__subtitle {
  display: block;
  font-size: var(--normal-font-size);
  color: var(--text-color);
  text-align: center;
  margin-bottom: var(--mb-3);
}

.section__header {
  margin-bottom: var(--mb-3);
}

/* ===== BUTTONS ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: var(--font-medium);
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  text-decoration: none;
  font-size: var(--normal-font-size);
}

.button:hover {
  background-color: var(--primary-color-alt);
  border-color: var(--primary-color-alt);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.button--outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.button--outline:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.button--primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-alt));
}

/* ===== HEADER & NAV ===== */
.header {
  width: 100%;
  position: fixed;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-color);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  font-size: 1.125rem;
}

.nav__logo svg {
  flex-shrink: 0;
}

.nav__list {
  display: flex;
  column-gap: 2rem;
}

.nav__link {
  color: var(--text-color);
  font-weight: var(--font-medium);
  transition: color 0.3s ease;
  position: relative;
}

.nav__link:hover,
.nav__link.active-link {
  color: var(--primary-color);
}

.nav__link.active-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.nav__toggle,
.nav__close {
  display: none;
}

/* Change header background */
.scroll-header {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px var(--shadow-color);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
}

.hero__container {
  gap: 2rem;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
}

.hero__data {
  padding-right: 2rem;
}

.hero__title {
  font-size: var(--biggest-font-size);
  margin-bottom: var(--mb-1);
  font-weight: var(--font-bold);
  line-height: 1.1;
}

.hero__title-accent {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__description {
  font-size: 1.125rem;
  color: var(--text-color);
  margin-bottom: var(--mb-2-5);
  line-height: 1.7;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__img {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__blob {
  width: 300px;
  fill: var(--primary-color);
}

.hero__image {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 48px rgba(37, 99, 235, 0.2);
}

/* ===== SERVICES ===== */
.services {
  background-color: #f9fafb;
}

.services__container {
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.services__card {
  background-color: var(--container-color);
  padding: 2.5rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.services__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.services__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.services__icon {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--mb-1-5);
  color: #fff;
}

.services__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: var(--title-color);
}

.services__description {
  color: var(--text-color);
  margin-bottom: var(--mb-1-5);
  line-height: 1.6;
}

.services__features {
  list-style: none;
}

.services__features li {
  padding: 0.5rem 0;
  color: var(--text-color);
  position: relative;
  padding-left: 1.5rem;
}

.services__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: var(--font-bold);
}

/* ===== ABOUT ===== */
.about__container {
  gap: 3rem;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
}

.about__data {
  padding-right: 2rem;
}

.about__description {
  color: var(--text-color);
  margin-bottom: var(--mb-1-5);
  line-height: 1.7;
  font-size: 1.125rem;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: var(--mb-2-5);
}

.about__stat {
  text-align: center;
  padding: 1.5rem;
  background-color: #f9fafb;
  border-radius: 1rem;
}

.about__stat-number {
  font-size: var(--h1-font-size);
  color: var(--primary-color);
  font-weight: var(--font-bold);
  margin-bottom: var(--mb-0-5);
}

.about__stat-text {
  color: var(--text-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
}

.about__img {
  position: relative;
}

.about__image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ===== PROJECTS ===== */
.projects {
  background-color: #f9fafb;
}

.projects__container {
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.projects__card {
  background-color: var(--container-color);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.projects__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.projects__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.projects__card:hover .projects__img {
  transform: scale(1.05);
}

.projects__data {
  padding: 2rem;
}

.projects__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-0-75);
  color: var(--title-color);
}

.projects__description {
  color: var(--text-color);
  margin-bottom: var(--mb-1-5);
  line-height: 1.6;
}

.projects__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.projects__tag {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
}

/* ===== CONTACT ===== */
.contact__container {
  gap: 3rem;
  grid-template-columns: repeat(2, 1fr);
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background-color: #f9fafb;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.contact__card:hover {
  background-color: #f3f4f6;
  transform: translateX(8px);
}

.contact__icon {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  width: 50px;
  height: 50px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.contact__title {
  font-size: var(--h3-font-size);
  color: var(--title-color);
  margin-bottom: var(--mb-0-25);
}

.contact__text {
  color: var(--text-color);
  line-height: 1.6;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__form-group {
  position: relative;
}

.contact__input,
.contact__textarea {
  width: 100%;
  background-color: #f9fafb;
  color: var(--text-color);
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  border: 2px solid transparent;
  outline: none;
  padding: 1rem;
  border-radius: 0.75rem;
  resize: none;
  transition: all 0.3s ease;
}

.contact__input:focus,
.contact__textarea:focus {
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact__button {
  width: 100%;
  padding: 1rem;
  font-size: var(--normal-font-size);
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--title-color);
  padding: 3rem 0 2rem;
  color: #fff;
}

.footer__container {
  gap: 3rem;
}

.footer__content {
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: var(--mb-2-5);
}

.footer__data {
  padding-right: 2rem;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: var(--font-semi-bold);
  font-size: 1.125rem;
  margin-bottom: var(--mb-1);
}

.footer__description {
  color: #d1d5db;
  margin-bottom: var(--mb-1-5);
  line-height: 1.6;
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social-link {
  background-color: rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s ease;
}

.footer__social-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

.footer__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: #fff;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__link {
  color: #d1d5db;
  transition: color 0.3s ease;
}

.footer__link:hover {
  color: var(--primary-color);
}

.footer__bottom {
  padding-top: var(--mb-2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer__copy {
  color: #9ca3af;
  font-size: var(--small-font-size);
}

/* ===== SCROLL UP ===== */
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -20%;
  background-color: var(--primary-color);
  width: 50px;
  height: 50px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.3s ease;
  z-index: var(--z-tooltip);
}

.scrollup:hover {
  background-color: var(--primary-color-alt);
  transform: translateY(-4px);
}

/* Show Scroll Up */
.show-scroll {
  bottom: 3rem;
}

/* ===== BREAKPOINTS ===== */
/* For large devices */
@media screen and (max-width: 992px) {
  .container {
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
  }

  .button {
    padding: 0.875rem 1.75rem;
  }

  .hero__container {
    gap: 1.5rem;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__data {
    padding-right: 0;
    order: 2;
  }

  .hero__img {
    order: 1;
    margin-bottom: var(--mb-2);
  }

  .hero__image {
    width: 200px;
    height: 200px;
  }

  .hero__blob {
    width: 250px;
  }

  .services__container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .about__container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__data {
    padding-right: 0;
    text-align: center;
  }

  .about__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .contact__container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer__data {
    padding-right: 0;
  }
}

/* For medium devices */
@media screen and (max-width: 768px) {
  .nav__menu {
    position: fixed;
    background-color: var(--container-color);
    width: 80%;
    height: 100%;
    top: 0;
    right: -100%;
    box-shadow: -2px 0 4px var(--shadow-color);
    padding: 4rem 0 0 3rem;
    border-radius: 1rem 0 0 1rem;
    transition: all 0.3s ease;
    z-index: var(--z-fixed);
  }

  .nav__close,
  .nav__toggle {
    display: flex;
    color: var(--title-color);
    font-size: 1.25rem;
    cursor: pointer;
  }

  .nav__close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
  }

  .nav__list {
    flex-direction: column;
    row-gap: 1.5rem;
  }

  .nav__link {
    color: var(--title-color);
    font-weight: var(--font-medium);
  }

  .nav__link.active-link::after {
    display: none;
  }

  /* Show menu */
  .show-menu {
    right: 0;
  }

  .hero__buttons {
    justify-content: center;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects__container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .footer__content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* For small devices */
@media screen and (max-width: 576px) {
  .container {
    margin-left: var(--mb-1);
    margin-right: var(--mb-1);
  }

  .nav__menu {
    padding: 2rem 1.25rem 0;
  }

  .nav__list {
    column-gap: 0;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .button {
    width: 100%;
    max-width: 300px;
  }

  .services__container {
    grid-template-columns: 1fr;
  }

  .services__card {
    padding: 2rem 1.5rem;
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  .projects__container {
    grid-template-columns: 1fr;
  }

  .contact__info {
    gap: 1.5rem;
  }

  .contact__card {
    padding: 1rem;
  }

  .scrollup {
    right: 1rem;
    width: 45px;
    height: 45px;
  }
}

@media screen and (max-width: 350px) {
  .container {
    margin-left: var(--mb-1);
    margin-right: var(--mb-1);
  }

  .nav__menu {
    padding: 2rem 1.25rem 0;
  }

  .hero__title {
    font-size: 1.75rem;
  }

  .hero__image {
    width: 180px;
    height: 180px;
  }

  .hero__blob {
    width: 220px;
  }

  .services__card {
    padding: 1.5rem 1rem;
  }

  .contact__card {
    flex-direction: column;
    text-align: center;
  }
}