@import url("https://fonts.googleapis.com/css2?family=Cairo&family=Roboto:wght@400;700&display=swap");

:root {
  --background: #18181b;
  --background-header: #27272a;

  --text-white: #ffffff;

  --color-purple-300: #7c3aed;
  --color-purple-600: #4c1aa3;
}

* {
  margin: 0;
  padding: 0;

  box-sizing: border-box;
  list-style: none;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

html {
  scroll-padding-top: 92px;
}

body {
  display: flex;
  flex-direction: column;
  font-family: 'Roboto', sans-serif;

  color: var(--text-white);
  background-color: var(--background);
}

header {
  display: flex;

  align-items: center;
  justify-content: center;

  position: sticky;
  top: 0;
  left: 0;

  z-index: 100;
  gap: 2rem;

  height: 92px;
  padding: 0 2rem;

  background-color: var(--background-header);
  border-bottom: 2px solid var(--color-purple-300);
}

header button {
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 0.5rem;
  border-radius: 0.2rem;
  border: none;

  color: white;
  background-color: #2c2c2f;
  cursor: pointer;
}

header button:hover {
  color: white;
  background-color: #4e4e50;
}

header nav {
  display: flex;
  gap: 2rem;
}

header nav a {
  display: flex;

  padding: 0.2rem 0.6rem;
  gap: 0.4rem;

  font-size: 0.875rem;
  box-sizing: border-box;

  background-color: var(--color-purple-300);
  color: var(--text-white);
  text-decoration: none;
  font-weight: 500;

  text-align: center;

  justify-content: center;
  align-items: center;
  border-radius: 4px;
  padding: 0.34rem 1rem;
  border: 2px solid var(--color-purple-300);

  cursor: pointer;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
  transition: all 1s;
}

header nav a:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

header nav a:hover {
  background-color: var(--color-purple-600);
}

header nav a:focus {
  border: 2px solid var(--text-white);
}

main {
  display: flex;
  flex-direction: row;

  justify-content: center;
  align-items: center;

  gap: 6rem;
  min-height: calc(100vh - 92px);
  padding: 2rem;
}

.person {
  height: 80%;
  max-height: 642px;
  min-height: 50px;
  max-width: 100%;

  border-radius: 1.5rem;
  border: 1px solid var(--color-purple-300);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);

  object-fit: cover;
}

main section {
  display: flex;
  flex-direction: column;

  width: min(50%, 600px);

  align-items: center;
  text-align: center;
  gap: 2rem;
}

main section div {
  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  width: 100%;
  flex: 1;

  gap: 1rem;
}

main section div h1 {
  font-size: 2rem;
  letter-spacing: 0.3rem;
  font-weight: 100;
}

main section div p {
  font-size: 1rem;
  letter-spacing: 0.1rem;
  font-weight: 600;
  width: min(28rem, 100%);
  word-break: break-word;
}

.tech-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1rem 0.4rem;
  height: 12rem;
  overflow-y: scroll;
}

.tech-list li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.tech-list li:hover {
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.tech-list span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-white);
}

.tech-list img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.tech-list li:hover img {
  transform: scale(1.1);
}

.tech-list::-webkit-scrollbar {
  width: 4px;
}

.tech-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4rem;
}

.tech-list::-webkit-scrollbar-thumb {
  background: var(--color-purple-300);
  border-radius: 4rem;
}

.tech-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-purple-600);
}

.icon-white-bg {
  background-color: white !important;
  border-radius: 0.25rem !important;
  padding: 2px !important;
}

#about {
  display: grid;
  grid-template-rows: 120px 1fr;

  justify-content: center;

  padding: 4rem clamp(1.5rem, 8vw, 8rem);
  min-height: calc(100vh - 92px);

  color: #18181b;
  background-color: #f5f5f5;
}

#about h1 {
  text-align: center;
  font-size: 3rem;
  color: var(--color-purple-300);
}

.description {
  display: flex;
  flex-direction: column;
  flex: 1;

  height: 100%;
  text-align: center;

  gap: 2rem;
  margin: 0 auto;
  padding: 1rem 0;
}

.description p {
  align-items: center;
  font-size: 1.1rem;
  font-weight: 200;
  line-height: 1.6;
}

.description table {
  /* margin: 0 auto; */
  border-collapse: collapse;
  width: 100%;
  flex: 1;
  /* display: block; */
  overflow-x: auto;
}

.description table th,
.description table td {
  padding: 0.8rem 1.5rem;
  
  border-bottom: 1px solid #ddd;
}

.description table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-purple-300);
}

.description table td {
  text-align: right;
}

#work {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 4rem;
  min-height: calc(100vh - 92px);
  color: var(--text-white);
  background-color: var(--background);
}

#work h1 {
  text-align: center;
  font-size: 3rem;
  color: var(--color-purple-300);
  margin-bottom: 1rem;
}

.work-intro {
  text-align: center;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-purple-300);
  box-shadow: 0 16px 32px rgba(124, 58, 237, 0.2);
}

.project-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-purple-300), #9333ea);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
}

.project-image i {
  font-size: 2rem;
  color: white;
}

.project-content h3 {
  font-size: 1.5rem;
  color: var(--text-white);
  margin-bottom: 1rem;
}

.project-content p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.project-tech span {
  background: rgba(124, 58, 237, 0.2);
  color: var(--color-purple-300);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.btn-primary,
.btn-secondary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--color-purple-300);
  color: white;
  border: 2px solid var(--color-purple-300);
}

.btn-primary:hover {
  background: transparent;
  color: var(--color-purple-300);
}

.btn-secondary {
  background: transparent;
  color: var(--text-white);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: var(--text-white);
  background: rgba(255, 255, 255, 0.1);
}

#contact {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 4rem;
  min-height: calc(100vh - 92px);
  color: #18181b;
  background-color: #f5f5f5;
}

#contact h1 {
  text-align: center;
  font-size: 3rem;
  color: var(--color-purple-300);
  margin-bottom: 1rem;
}

.contact-intro {
  text-align: center;
  font-size: 1.2rem;
  color: rgba(24, 24, 27, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--color-purple-300), #9333ea);
  border-radius: 1rem;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 1.5rem;
  color: white;
}

.contact-item h3 {
  font-size: 1.2rem;
  color: var(--color-purple-300);
  margin-bottom: 0.5rem;
}

.contact-item p {
  color: rgba(24, 24, 27, 0.8);
  font-size: 1rem;
}

.social-links h3 {
  font-size: 1.5rem;
  color: var(--color-purple-300);
  margin-bottom: 2rem;
  text-align: center;
}

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

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  text-decoration: none;
  color: #18181b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
  color: var(--color-purple-300);
}

.social-link i {
  font-size: 1.5rem;
  color: var(--color-purple-300);
}

.social-link span {
  font-weight: 500;
}

@media (max-width: 1024px) {
  main {
    gap: 3rem;
  }

  main section {
    width: 60%;
  }

  #about {
    padding: 4rem 3rem;
  }

  #work,
  #contact {
    padding: 4rem 2rem;
  }

  .contact-content {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  header nav {
    gap: 0.75rem;
  }

  header nav a {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  header nav a i {
    display: none;
  }

  header {
    height: auto;
    min-height: 64px;
    padding: 0.75rem 1rem;
  }

  html {
    scroll-padding-top: 64px;
  }

  main {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1rem;
    min-height: auto;
    padding-top: 3rem;
    width: 100%;
  }

  main section {
    width: 100%;
  }

  .person {
    width: 200px;
    height: 240px;
  }

  main section div h1 {
    font-size: 1.4rem;
  }

  .tech-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    height: 10rem;
  }

  .tech-list li {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .tech-list img {
    width: 22px;
    height: 22px;
  }

  .tech-list span {
    font-size: 0.75rem;
  }

  #about {
    padding: 2rem 1.5rem;
    grid-template-rows: 80px 1fr;
  }

  #work,
  #contact {
    padding: 2rem 1.5rem;
    gap: 2rem;
  }

  #about h1,
  #work h1,
  #contact h1 {
    font-size: 2rem;
  }

  .description p {
    font-size: 0.95rem;
  }

  .description table th,
  .description table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 0;
  }

  .project-card {
    padding: 1.5rem;
  }

  .project-links {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
  }

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

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

  .contact-item,
  .social-link {
    padding: 1rem;
  }

  footer {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  background: var(--color-purple-300);

  font-weight: 600;
}