/* 
---------------
--- RESET ---
---------------
*/

*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
button,
input,
label {
  line-height: 1.1;
}

img,
picture {
  max-width: 100%;
  display: block;
}

input,
button,
textarea,
select {
  font: inherit;
}

ul,
ol {
  list-style: none;
}

a {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

/* 
---------------
--- HOME ---
---------------
*/

body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  background-color: #406459;

  padding-block: 2rem;
}

#root {
  padding-inline: 1rem;
}

/* 
---------------
--- Main (home) ---
---------------
*/

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

  color: #e2dfd9;
  margin-inline: auto;
}

.grid-auto-fit {
  /* grid auto fit min column size */
  --auto-fit-min-col-size: 400px;

  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(var(--auto-fit-min-col-size), 100%), 1fr)
  );
}

.grid-auto-fit.single-card {
  max-width: 600px;
  margin-inline: auto;
}

.card {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;

  background: #2d4f4a;
  border: 1px solid #3d615a;
  border-radius: 12px;
  padding: 2rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;

  h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
  }

  p {
    color: #d4cfc4;
    font-size: 0.95rem;
    margin-top: auto;
    text-align: center;
  }

  .card-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
  }

  &:hover {
    border-color: #f0a500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }
}

/* ---Hero --- */

.hero {
  text-align: center;
  margin-bottom: 2rem;

  h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
    text-transform: uppercase;
    color: #e09d00;
    font-style: italic;
    text-shadow:
      0 0 30px rgba(224, 157, 0, 0.3),
      0 0 60px rgba(224, 157, 0, 0.1),
      0 4px 8px rgba(0, 0, 0, 0.3);

    /* --- Media Query --- */
    @media (width < 760px) {
      font-size: 2.8rem;
    }
  }

  .hero-subtitle {
    color: #d4c09a;
    margin-bottom: 2rem;
    text-transform: capitalize;

    /* --- Media Query --- */
    @media (width < 760px) {
      font-size: 0.9rem;
    }
  }

  .projects-page-link {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
    border: 1.5px solid #f0a500;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;

    transition:
      background 0.25s ease,
      color 0.25s ease,
      transform 0.2s ease,
      box-shadow 0.25s ease;

    &:hover {
      background: #2d4f4a;
      color: #f0a500;
      transform: translateY(-2px);
      box-shadow: 0 0 20px 5px rgba(240, 165, 0, 0.2);
    }

    &:active {
      transform: translateY(0);
      box-shadow: 0 2px 8px rgba(240, 165, 0, 0.15);
    }
  }
}

/* ---Stack Section --- */

.stack-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  text-align: center;

  .section-title {
    font-size: 2rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
  }

  .section-subtitle {
    font-size: 1.3rem;
    max-width: 700px;
    margin-inline: auto;
    color: #b0aca5;
  }
}

/* 
---------------
--- CONTENT ---
---------------
*/

.content {
  color: #d4cfc4;

  h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #f5efe4;
  }

  h3 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: #dfa959;
    line-height: 1.6;
  }

  h4 {
    font-size: 1.3rem;
    margin-block: 1rem;
    color: #c4956a;
    line-height: 1.6;
  }

  h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-block: 0.5rem;
    color: #bfa88a;
    line-height: 1.5;
  }

  p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e8e5e0;
    text-align: justify;
  }

  strong {
    color: #ebe3d6;
  }

  .attention {
    color: #7a1d13;
    font-style: italic;
    font-size: 0.95rem;
  }

  pre {
    display: inline-block;
    background: #1e1e1e;
    color: #e0e0e0;
    padding: 1.5rem;
    border-radius: 8px;
    margin-block: 0.5rem;
    font-size: 0.95rem;
    max-width: 100%;
    overflow-x: auto;
    word-break: break-word;
  }

  code {
    font-family: "Fira Code", "Courier New", monospace;
  }
}

/* --- Scroll Bar --- */

/* FireFox */
.content pre {
  scrollbar-width: auto;
  scrollbar-color: #ccc #2e2e2e;
}

.content pre::-webkit-scrollbar {
  height: 8px;
}

.content pre::-webkit-scrollbar-track {
  background: #2e2e2e;
  border-radius: 4px;
}

.content pre::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.content pre::-webkit-scrollbar-thumb:hover {
  background: #eee;
  cursor: pointer;
}

/* 
---------------
--- Not Found Page ---
---------------
*/

.not-found-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;

  .not-found-text {
    padding-block: 1rem;
    font-size: 2rem;
  }

  .not-found-link {
    color: #af7c0d;
    font-size: 1.2rem;
    transition:
      color 0.3s ease,
      scale 0.3s ease;

    &:hover {
      color: #f0a500;
      scale: 1.1;
    }
  }
}

/* 
---------------
--- Footer ---
---------------
*/

.site-footer {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;

  border-top: 2px solid #fff;
  border-radius: 1rem;
  color: #c4bfb0;
  padding-top: 1rem;

  .contacts {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;

    border-radius: 1rem;
    box-shadow: 0 0 5px 0.5px #e0aa59;
    color: #aaa;
    padding: 1rem;
  }
}

/* 
---------------
--- Custom ---
---------------
*/

.outerFunction-img-closure {
  height: auto;
  max-height: 600px;
  width: 100%;
  display: block;
  object-fit: contain;
}

.img-container {
  display: flex;
  max-height: 600px;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;

  .content-img {
    display: inline-block;
    min-width: 280px;
    flex: 1;
    max-height: 500px;
    border-radius: 8px;
    object-fit: contain;
  }
}

hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, #cbd5e1, transparent);
  margin: 1rem 0;
}

.accent-links-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0 2rem;
  flex-wrap: wrap;
}

.accent-link {
  display: inline-block;
  color: #e09d00;
  font-weight: 500;
  font-style: italic;
  border-left: 3px solid #e09d00;
  padding: 0.75rem 1rem;
  margin-block: 1rem;
  background: rgba(224, 157, 0, 0.05);
  border-radius: 0 8px 8px 0;
  transition:
    background 0.25s ease,
    border-color 0.5s ease,
    transform 0.25s ease;

  &:hover {
    background: rgba(224, 157, 0, 0.1);
    border-left-width: 5px;
    transform: scale(1.01);
  }
}

blockquote {
  display: inline-block;
  margin: 1rem auto;
  padding: 0.5rem 1rem;
  font-style: italic;
  line-height: 1.7;
  border-radius: 1rem;
  box-shadow: 0 0 3px 0.1px #928c83;
  color: #aaa;
  text-align: center;
  width: 100%;
  max-width: 700px;
}
.content {
  blockquote {
    p {
      color: #aaa;
      text-align: center;
    }
  }
}

.blockquote-wrapper {
  text-align: center;
}

.deprecated {
  color: #7a1d13;
  font-size: 0.8em;
  font-weight: normal;
}
