:root {
  --primary-color: #ba9501;
  --placeholder-color: #484848;
  --light-grey: #c3c2c2;
  --text-light-grey: #a7a3a3;
  --text-medium-grey: #615f5f;
  --text-dark-grey: #434343;
  --light-background: #a7a3a333;
}

:root {
  --border-radius: 6px;
}

.projects {
  padding: 4px 18px;
  height: 100%;
  background-color: var(--light-background);
  display: block;
}
@media (min-width: 650px) {
  .projects {
    display: flex;
    padding: 0 26px;
  }
}
.projects__side-bar {
  padding-left: 18px;
}
@media (min-width: 650px) {
  .projects__side-bar {
    width: 252px;
    border-right: 2px solid var(--light-grey);
    box-shadow: 3px 0px 6px -3px var(--light-grey);
  }
}
.projects__side-bar > div {
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.projects__side-bar > div a {
  color: var(--text-dark-grey);
  text-decoration: none;
}
.projects__side-bar > div a:hover {
  color: var(--primary-color);
  font-weight: 600;
}
.projects__side-bar__item {
  margin-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.projects__side-bar__item__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.projects__side-bar__item__button {
  height: 28px !important;
  width: 80px;
  min-width: 80px;
  flex-shrink: 0;
}
.projects__card {
  padding: 8px;
  margin: 18px;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}
@media (min-width: 650px) {
  .projects__card {
    width: 360px;
    padding: 16px;
  }
}
.projects__card h2 {
  text-align: center;
}
.projects__card__container {
  display: block;
  margin: auto;
}
@media (min-width: 650px) {
  .projects__card__container {
    display: flex;
  }
}
.projects__card__container__inputs {
  width: 200px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 650px) {
  .projects__card__container__inputs {
    margin: 18px;
  }
}
.projects__card__container__input {
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--text-light-grey);
  border-radius: 4px;
}
.projects__card__container__output {
  margin: 16px auto;
  font-weight: 600;
  text-align: center;
}
@media (min-width: 650px) {
  .projects__card__container__output {
    margin: auto;
  }
}

/* Code display cards */
.projects__code-card {
  padding: 16px;
  margin: 18px;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
  background-color: white;
  border-radius: 8px;
  max-width: 100%;
  overflow-x: auto;
}

@media (min-width: 650px) {
  .projects__code-card {
    max-width: 600px;
    padding: 24px;
  }
}

.projects__code-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--primary-color);
  text-align: center;
}

.projects__code-card pre {
  background-color: #f5f5f5;
  border: 1px solid var(--light-grey);
  border-radius: 4px;
  padding: 16px;
  margin: 0;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.4;
}

.projects__code-card code {
  color: var(--text-dark-grey);
  background: transparent;
  font-family: 'Courier New', Courier, monospace;
}

.description {
  margin: 26px;
  display: flex;
  flex-direction: column;
}
.description a {
  width: 160px;
  margin: 6px 8px;
  padding: 8px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  border: 1px solid var(--primary-color);
  transition: background-color 0.3s ease;
}
.description a:hover {
  background-color: white;
  color: var(--primary-color);
}

.footer {
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-items: center;
  width: 100%;
  color: var(--text-dark-grey);
  margin-top: auto;
  padding: 12px 0;
  border-top: 1px solid var(--light-grey);
}
.footer__title {
  color: var(--text-dark-grey);
  font-weight: 600;
}
.footer__link {
  color: var(--text-dark-grey);
  text-decoration: none;
}
.footer__link:hover {
  color: var(--primary-color);
  font-weight: 600;
}

.button-primary {
  color: white;
  background-color: var(--primary-color);
  font-weight: 600;
  width: auto;
  height: 36px;
  cursor: pointer;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

button:hover {
  background-color: white;
  color: var(--primary-color);
}

button.clicked {
  transform: scale(1.2);
  background-color: var(--placeholder-color);
}

a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-contrast: high) {
  :root {
    --primary-color: #000000;
    --text-dark-grey: #000000;
    --text-medium-grey: #000000;
    --light-grey: #000000;
  }
  
  .projects__card {
    border: 2px solid #000000;
  }
}

.projects__side-bar a:focus,
.footer__link:focus,
.description a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip navigation link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 4px;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*,
::before,
::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  color: var(--primary-color);
  margin-left: 18px;
}
