@import "./reset.css";

:root {
  --max-width: 1240px;
  --border-radius: 10px;
  --section-padding: 8rem;
  --card-padding: 2.4rem;
  --grid-gap: 5.6rem;
  --flex-gap: 8rem;
  --section-gap: 4rem;

  --headings-font: "Inter", sans-serif;
  --paragraph-font: "Open Sans", sans-serif;

  --background-dark-color: #0b0f19;
  --background-light-color: #f8fafc;
  --surface-color: #111827;
  --border-color: #1f2937;

  --primary-color: #6366f1;
  --accent-color: #22d3ee;

  --text-primary-color: #e5e7eb;
  --text-secondary-color: #111827;
  --muted-color: #9ca3af;

  --hero-title: 5.2rem;
  --heading-size: 3.2rem;
  --subheading-size: 2.4rem;
  --paragraph-size: 1.6rem;
  --muted-text-size: 1.3rem;

  --paragraph-line-height: 1.7;
  --heading-line-height: 1.2;

  --transition-speed: 0.25s;
  --transition: all var(--transition-speed) ease-in-out;

  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.container {
  max-width: min(100% - 40px, var(--max-width));
  margin-inline: auto;
}

h1,
h2,
h3 {
  font-family: var(--headings-font);
  line-height: var(--heading-line-height);
}

p,
a,
button {
  font-family: var(--paragraph-font);
}

li {
  list-style: none;
}

a {
  text-decoration: none;
}

/* SHARED STYLES */
.close-btn,
.primary-btn,
.secondary-btn,
.navigation-list a,
.about-image,
.skills-list li,
.socials-list img,
.project-card {
  transition: var(--transition);
}

section:not(:nth-child(1)) {
  padding-block: var(--section-padding);
}

.section-title {
  font-size: var(--heading-size);
  color: var(--text-primary-color);
  padding-bottom: var(--section-gap);
}

.primary-btn,
.secondary-btn {
  display: flex;
  justify-content: center;
  font-size: var(--muted-text-size);
  width: 12rem;
  padding: 1.2rem;
  border-radius: var(--border-radius);
  color: #fff;
}

.primary-btn {
  background-color: var(--primary-color);
  text-align: center;
}

.secondary-btn {
  background-color: transparent;
  border: 1px solid var(--primary-color);
}

.primary-btn:hover {
  background-color: var(--accent-color);
}

.secondary-btn:hover {
  background-color: var(--primary-color);
}

.projects-list,
.about-container,
.contact-container article {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.project-card,
.about-container div,
.contact-container article > div {
  flex: 1 1 calc(50% - 4rem);
  max-width: calc(50% - 4rem);
}

.project-card,
.skills-list li {
  box-shadow: 0 3px 10px 0 rgb(34 211 238 /0.2);
}

.project-card:hover,
.skills-list li:hover {
  transform: translateY(-6px);
  box-shadow: 0 3px 15px 0 rgba(34, 211, 238, 0.6);
}

.about-section,
.contact-section {
  background-color: var(--background-light-color);
}

.socials-list,
form {
  display: flex;
  gap: 2.2rem;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  padding-block: 2rem;
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(11, 15, 25, 0.5) 50%, rgba(99, 101, 241, 0.5));
}

.text-gradient {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.header-container,
.navigation-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
}

.app-name {
  font-size: 2rem;
  font-weight: 700;
  line-height: 6rem;
  text-transform: uppercase;
  background-image: linear-gradient(to right, var(--accent-color), var(--primary-color));
}

.burger-menu {
  display: none;
}

.navigation-list a {
  color: var(--muted-color);
}

.navigation-list a:hover {
  color: #fff;
}

/* HERO */
.hero-section {
  padding-block: 22rem 12rem;
  background:
    radial-gradient(circle at 70% 40%, rgba(34, 211, 238, 0.15), transparent 40%),
    url(../media/images/bg-pattern.png) no-repeat center/cover,
    linear-gradient(135deg, var(--background-dark-color) 40%, var(--primary-color));
  color: #fff;
}

.hero-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10rem;
}

.hero-content {
  height: fit-content;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.hero-title {
  font-size: var(--hero-title);
}

.hero-image {
  max-width: 30rem;
  width: 100%;
}

.job-title {
  font-size: var(--heading-size);
  font-family: var(--paragraph-font);
  font-weight: 400;
  font-style: italic;
  color: var(--accent-color);
  text-shadow: 0px 0px 8px var(--accent-color);
}

#hero-btn {
  margin-top: 1.5rem;
  width: 20rem;
  padding: 1.5rem;
  font-size: 1.8rem;
}

/* ABOUT */
.about-container {
  gap: var(--flex-gap);
  background:
    url(../media/images/bg-pattern.png) no-repeat center/cover,
    var(--background-dark-color);
  border-radius: var(--border-radius);
  padding: var(--card-padding);
}

.about-paragraph {
  color: var(--muted-color);
  font-size: var(--paragraph-size);
  line-height: var(--paragraph-line-height);
}

.about-paragraph span {
  display: block;
  padding-bottom: 2rem;
}

.about-image {
  filter: grayscale(1);
  padding: 1rem;
}

.about-image img {
  width: 100%;
}

.about-image:hover {
  filter: grayscale(0);
}

/* SKILLS */
.skills-section {
  background-color: var(--background-dark-color);
  color: #fff;
  text-align: center;
}

.skills-container {
  padding: var(--card-padding);
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  padding-block: 2rem;
  gap: 7rem;
  justify-content: space-between;
}

.skills-list li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  height: 20rem;
  padding: var(--card-padding);
  border: 1px solid var(--border-color);
  color: var(--accent-color);
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
}

.skills-list img {
  width: 8rem;
  filter: invert(79%) sepia(19%) saturate(4635%) hue-rotate(146deg) brightness(96%) contrast(95%);
}

/* PROJECTS */
.projects-section {
  background-color: var(--background-dark-color);
}

.projects-section h2 {
  text-align: center;
}

.projects-list {
  gap: var(--grid-gap);
}

.project-card {
  display: grid;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.projects-section h2,
.project-content h3,
.contact-content p {
  color: var(--text-primary-color);
}

.project-img {
  height: 20rem;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  object-fit: cover;
}

.project-content {
  display: grid;
  gap: 1.5rem;
  padding: var(--card-padding);
}

.project-content h3 {
  font-size: var(--subheading-size);
}

.project-content p {
  color: var(--muted-color);
  font-size: var(--paragraph-size);
}

.tech-used-list,
.project-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

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

.tech-used-list li {
  background-color: rgba(34, 211, 238, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(34, 211, 238, 0.3);
  font-size: var(--muted-text-size);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5rem;
}

.link-icon {
  filter: invert(100%) sepia(100%) saturate(15%) hue-rotate(307deg) brightness(106%) contrast(103%);
  width: 1.5rem;
}

/* CONTACT */
.contact-container article {
  gap: var(--section-padding);
  background-color: var(--background-dark-color);
  border-radius: var(--border-radius);
  padding: 4rem;
}

.contact-container h2 {
  color: var(--text-secondary-color);
  text-align: center;
}

.socials-list {
  margin-top: 2rem;
}

.socials-list img {
  filter: invert(79%) sepia(19%) saturate(4635%) hue-rotate(146deg) brightness(96%) contrast(95%);
  width: 3rem;
}

.socials-list img:hover {
  filter: invert(100%) sepia(100%) saturate(15%) hue-rotate(307deg) brightness(106%) contrast(103%);
}

form {
  flex-direction: column;
}

.form-container {
  width: 100%;
}

label {
  text-align: left;
  display: block;
  color: var(--text-primary-color);
  margin-bottom: 1rem;
}

input,
textarea {
  width: 100%;
  color: var(--text-primary-color);
  background-color: transparent;
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 0;
}

input:focus,
textarea:focus {
  border-bottom-color: var(--accent-color);
}

textarea {
  resize: vertical;
}

form button {
  align-self: flex-end;
  font-weight: 500;
}

/* FOOTER */
footer {
  background-color: var(--background-dark-color);
  color: var(--text-primary-color);
  text-align: center;
  line-height: 10rem;
  height: 10rem;
}

/* SUCCESS POPUP MESSAGE */
.success-message {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background-color: rgba(11, 15, 25, 0.9);
  height: 100dvh;
  width: 100%;
}

.success-container {
  background-color: #fff;
  border-radius: var(--border-radius);
  padding: var(--card-padding);
  max-width: 50rem;
  width: 100%;
}

.success-container > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--flex-gap);
  padding-bottom: 2rem;
}

.success-container div p {
  font-size: var(--paragraph-size);
  font-weight: 500;
  color: var(--primary-color);
}

.close-btn {
  color: rgb(196, 0, 0);
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

.close-btn:hover {
  background-color: rgb(196, 0, 0);
  color: #fff;
}

.success-container p {
  font-size: 2rem;
}

@media (max-width: 1024px) {
  :root {
    --flex-gap: 2rem;
    --section-gap: 2rem;
  }

  nav {
    display: none;
  }

  .show-menu {
    display: block;
    position: absolute;
    top: 10rem;
    padding: 3rem 2rem;
    left: 0;
    width: 100%;
    background-color: var(--background-dark-color);
  }

  .navigation-list {
    flex-direction: column;
    font-size: var(--subheading-size);
  }

  .navigation-list a {
    border-bottom: 2px solid transparent;
  }

  .navigation-list a:hover {
    border-bottom-color: var(--accent-color);
  }

  .burger-menu {
    display: block;
    width: 3rem;
    background-color: transparent;
  }

  .hero-container {
    flex-direction: column;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-image {
    max-width: 20rem;
  }

  .about-paragraph {
    font-size: var(--muted-text-size);
  }

  .about-image img {
    max-width: 30rem;
  }

  .skills-list {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }

  .skills-list li {
    max-width: 14rem;
    width: 100%;
    height: fit-content;
    margin-inline: auto;
  }

  .skills-list img {
    width: 5rem;
  }

  .projects-list,
  .about-container,
  .contact-container article {
    flex-direction: column;
  }

  .project-card,
  .about-container div,
  .contact-container article > div {
    flex: 1 1 100%;
    max-width: 100%;
    text-align: center;
  }

  .project-content h3 {
    font-size: var(--paragraph-size);
  }

  .project-content p {
    font-size: var(--muted-text-size);
  }

  .project-img img {
    height: 100%;
  }

  .tech-used-list,
  .project-btns {
    justify-content: center;
  }

  .tech-used-list li {
    max-width: 12rem;
  }

  .tech-used-list li,
  .project-btns a {
    font-size: 1rem;
  }

  .socials-list {
    justify-content: center;
  }

  form button {
    align-self: center;
  }
}
