:root {
  --primary-color: #2c6e49;
  --secondary-color: #175934;
  --tertiary-color: #053c1d;
  --background-body: #fff;
  --background-table-th: #70a788;
  --text-color: #2b2b2b;
  --anchor-link: var(--secondary-color);
  --visited-link: #6d2c51;
  --font-weight-headings: 700;
  --gradient-sidebar-contactInfo: linear-gradient(#70a788, #ffffff);
  --fa-icon-background: #2c6e49;
  --table-odd-row: #f2f2f2;
  --project-card-background: lightgrey;
  --filter-btn-background: #70a788;
  --filter-btn-background-active: #d3d3d3;
}

:root.darkMode {
  --primary-color: #23583a;
  --secondary-color: #175934;
  --tertiary-color: #043017;
  --background-body: #181a1b;
  --background-table-th: #23583a;
  --anchor-link: #98e4ba;
  --text-color: #e8e6e3;
  --visited-link: #6d2c51;
  --font-weight-headings: 700;
  --gradient-sidebar-contactInfo: linear-gradient(
    rgb(72, 117, 98),
    rgb(24, 26, 27)
  );
  --fa-icon-background: #b2e6c8;
  --table-odd-row: #1f2223;
  --project-card-background: #313537;
  --filter-btn-background: #47926b;
  --filter-btn-background-active: #313537;
}

@media (prefers-color-scheme: dark) {
  /* defaults to dark mode if user preference is set to Dark */
  :root {
    --primary-color: #23583a;
    --secondary-color: #175934;
    --tertiary-color: #043017;
    --anchor-link: #98e4ba;
    --background-body: #181a1b;
    --background-table-th: #23583a;
    --text-color: #e8e6e3;
    --visited-link: #6d2c51;
    --font-weight-headings: 700;
    --gradient-sidebar-contactInfo: linear-gradient(
      rgb(72, 117, 98),
      rgb(24, 26, 27)
    );
    --fa-icon-background: #b2e6c8;
    --table-odd-row: #1f2223;
    --table-footer: #1f2223;
    --project-card-background: #313537;
    --filter-btn-background: #47926b;
    --filter-btn-background-active: #313537;
  }
  :root.lightMode {
    --primary-color: #2c6e49;
    --secondary-color: #175934;
    --tertiary-color: #053c1d;
    --background-body: #fff;
    --background-table-th: #70a788;
    --text-color: #2b2b2b;
    --anchor-link: #175934;
    --visited-link: #6d2c51;
    --font-weight-headings: 700;
    --gradient-sidebar-contactInfo: linear-gradient(#70a788, #ffffff);
    --fa-icon-background: #2c6e49;
    --table-odd-row: #f2f2f2;
    --table-footer: #fff;
    --project-card-background: lightgrey;
    --filter-btn-background: #47926b;
    --filter-btn-background-active: #313537;
  }
}

* {
  box-sizing: border-box;
}

/* Mode Toggle Button */
.title-toggle {
  display: flex;
  height: fit-content;
  margin-bottom: 0;
  padding-bottom: 0;
}

.title-toggle > h1 {
  flex-grow: 2;
}

.btn-toggle {
  background-color: #313537;
  border-radius: 100px;
  box-shadow: rgba(44, 187, 99, 0.2) 0 -25px 18px -14px inset,
    rgba(44, 187, 99, 0.15) 0 1px 2px, rgba(44, 187, 99, 0.15) 0 2px 4px,
    rgba(44, 187, 99, 0.15) 0 4px 8px, rgba(44, 187, 99, 0.15) 0 8px 16px,
    rgba(44, 187, 99, 0.15) 0 16px 32px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-family: "Roboto", "Segoe UI", sans-serif;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  transition: all 250ms;
  border: 0;
  font-size: 16px;
  font-weight: 400;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  height: fit-content;
}

.btn-toggle:hover {
  box-shadow: rgba(44, 187, 99, 0.35) 0 -25px 18px -14px inset,
    rgba(44, 187, 99, 0.25) 0 1px 2px, rgba(44, 187, 99, 0.25) 0 2px 4px,
    rgba(44, 187, 99, 0.25) 0 4px 8px, rgba(44, 187, 99, 0.25) 0 8px 16px,
    rgba(44, 187, 99, 0.25) 0 16px 32px;
  transform: scale(1.05);
}

/************* Default Text Elements ********/

/* html {
  font-size: 100%;
} */

body {
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  /* font-size: clamp(1.8rem, 2.5vw, 2.8rem); */
  font-size: 1.2rem;
  width: 100%;
  min-height: 100vh;
  color: var(--text-color);
  background: var(--background-body);
}

h1 {
  font-size: 40px;
  margin-top: 0;
  margin-bottom: 0;
}

h2 {
  font-size: 24px;
  font-weight: var(--font-weight-headings);
}

h3 {
  font-size: 20px;
  font-weight: var(--font-weight-headings);
}

p {
  font-size: 18px;
}

/******** End Default Text Elements ********/

/******** Links ********/
a:link {
  color: var(--anchor-link);
}

a:visited {
  color: var(--visited-link);
}

a:hover,
a:focus {
  text-decoration: none;
  background-color: var(--tertiary-color);
  color: white;
}

a:active {
  color: var(--visited-link);
}

/******** End Links ********/

/* Begin default page grid container */
layout-grid {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header"
    "main-content"
    "left-sidebar"
    "footer";

  /* fallback height - for bottom footer */
  min-height: 100vh;

  /* new small viewport height for modern browsers - for bottom footer */
  min-height: 100svh;
}

/* general column padding */
layout-grid > * {
  padding: 1rem;
}

/* assign columns to grid areas */
layout-grid > .header {
  grid-area: header;
  background-color: var(--primary-color);
  padding: 0;
}

layout-grid > .main-content {
  grid-area: main-content;
}
layout-grid > .left-sidebar {
  grid-area: left-sidebar;
  align-self: start;
}

.left-sidebar > img {
  width: 100%;
  height: auto;
  object-fit: scale-down;
}

.left-sidebar > contact-info {
  display: block;
  background-image: var(--gradient-sidebar-contactInfo);
  border-radius: 5px;
}

.left-sidebar > contact-info h2 {
  text-align: center;
  margin-bottom: 0;
}

.left-sidebar > contact-info p {
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 3px;
  padding-right: 2px;
  padding-right: 2px;
}

.web-address {
  text-align: center;
  margin: 0;
  background-color: #456f5d;
  color: whitesmoke;
}

.fa:hover {
  opacity: 0.7;
}

.fa fa-linkedin-square {
  font-size: 48px;
  color: var(--fa-icon-background);
}

.fa fa-github {
  font-size: 48px;
  color: var(--fa-icon-background);
}

layout-grid > .footer {
  grid-area: footer;
  text-align: center;
}

layout-grid > .footer p {
  margin-bottom: 0;
  margin-top: 0;
}

/* tablet breakpoint */
@media (min-width: 780px) {
  layout-grid {
    grid-template-columns: min-content 1fr;
    grid-template-areas:
      "header header"
      /* "title toggle" */
      "left-sidebar main-content"
      "footer footer";
  }
}
/***** END default page grid container *******/

.responsive {
  width: 100%;
  height: auto;
  object-fit: scale-down;
}

/******** About Table ********/

table {
  text-align: center;
  width: 100%;
  border: 1px solid #8c8273;
  border-collapse: collapse;
  margin: 20px auto 0;
}

@media (max-width: 443px) {
  table {
    text-align: center;
    width: max-content;
    max-width: 350px;
    height: 340px;
    display: block;
    border: 1px solid #8c8273;
    overflow: auto;
    margin: 20px auto 0;
  }
}

table caption {
  font-weight: bold;
}

th {
  padding: 5px;
  background-color: var(--background-table-th);
  position: sticky;
  top: 0;
  vertical-align: top;
}

td {
  padding-bottom: 7px;
  padding-top: 7px;
}

table ul {
  margin-top: 0;
  text-align: left;
}

table ul li {
  list-style-position: inside;
  padding-bottom: 5px;
  margin-bottom: 4px;
}

tr:nth-child(odd) {
  background-color: var(--table-odd-row);
}

tfoot tr {
  border: 1px solid #8c8273;
}

tfoot tr td {
  padding: 0;
}

/******** About Table Page End ********/

/******* Nav Bar *******/
.nav {
  width: 100%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
}
.nav > .nav-header {
  flex: 0.95;
  padding-left: 1rem;
}
.nav > .nav-header > .nav-title {
  font-size: 22px;
  color: #fff;
}
.nav > .nav-list {
  display: flex;
  gap: 2rem;
  font-size: 18px;
}
.nav > .nav-list > li {
  list-style-type: none;
  background-color: var(--primary-color);
}
.nav > .nav-list > li a {
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  padding: 5px;
}
#active {
  text-decoration: underline;
}
.nav > .nav-list > li a:hover {
  background-color: var(--background-table-th);
  border-radius: 5px;
  padding: 5px;
}

.nav > #nav-check {
  display: none;
}
@media (max-width: 480px) {
  .nav {
    padding: 1rem;
  }
  .nav > .nav-btn {
    display: inline-block;
    position: absolute;
    right: 0;
    top: 0;
    padding-top: 0.2rem;
  }
  .nav > .nav-btn > label {
    display: inline-block;
    width: 50px;
    height: 50px;
    padding: 13px;
  }
  .nav > .nav-btn > label > span {
    display: block;
    width: 25px;
    height: 10px;
    border-top: 2px solid #eee;
  }
  .nav > .nav-list {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    background-color: var(--primary-color);

    height: 0;
    transition: all 0.3s ease-in;
    top: 40px;
    left: 0;
    overflow: hidden;
  }
  .nav > .nav-list > li {
    width: 100%;
    margin-top: 1.5rem;
  }
  .nav > #nav-check:checked ~ .nav-list {
    height: calc(100vh - 50px);
  }
}
/******** END Nav bar ********/

/******** Project Cards - Work ********/
project-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas: "article article article";
  gap: 20px;
}

@media (max-width: 820px) {
  project-cards {
    grid-template-columns: 1fr;
    grid-template-areas: "article";
  }
}

.card {
  visibility: hidden;
  display: grid;
  grid-template-areas:
    "header-card"
    "screen-shot"
    "project-summary"
    "tech-info"
    "project-links";
  grid-template-rows: repeat(5, max-content);
  contain: layout;
  contain-intrinsic-size: 300px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); /* this adds the "card" effect */
  padding: 16px;
  background-color: var(--project-card-background);
}

.card:hover {
  background: rgba(0, 0, 0, 0.1);
  box-shadow: 1px 1px 10px var(--primary-color);
}

.card screen-shot {
  height: 200px;
  margin-bottom: 5px;
}

.card h2 {
  text-align: center;
}

.card h3 > p {
  margin-top: 0;
}
.card img {
  object-fit: scale-down;
  width: 100%;
  height: 100%;
}

.accordion-item {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  border: 3px solid whitesmoke;
  border-radius: 15px;
  overflow: hidden;
}

details.accordion-item {
  margin-bottom: 7px;
}

accordion-content p {
  padding-left: 8px;
  padding-right: 8px;
  text-align: justify;
}



details > summary {
  background-color: #70a788;
  color: rgb(0, 0, 0);
  padding: 5px;
  font-weight: 500;
  text-align: center;
  gap: 16px;
  justify-content: space-between;
  cursor: pointer;
}
/* Filter project cards section START */
.filter {
  margin-bottom: 5px;
}

.filter button {
  background-color: var(--filter-btn-background);
  color: var(--text-color);
  padding: 5px 7px;
  border-radius: 10px;
  border: 2px solid #d3d3d3;
  cursor: pointer;
  margin-bottom: 5px;
  margin-right: 5px;
  font-family: "Roboto", "Segoe UI", sans-serif;
  font-size: 1.25rem;
  text-align: center;
}

.filter button:hover {
  transform: scale(1.05);
  text-decoration: underline;
}

.filter button:focus {
  border: 4px solid #d3d3d3;
}

.filter button.active {
  border: 4px solid #6d2c51;
  background-color: var(--filter-btn-background-active);
}

.language {
  border: 1px solid #456f5d;
  padding: 5px;
  border-radius: 5px;
  margin-bottom: 5px;
}

.library {
  border: 1px solid #456f5d;
  padding: 5px;
  border-radius: 5px;
  margin-bottom: 5px;
}

.other {
  border: 1px solid #456f5d;
  padding: 5px;
  border-radius: 5px;
  margin-bottom: 5px;
}

.card {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.card.hidden {
  opacity: 0;
  visibility: hidden;
}
/* Filter project cards section END */
/******** END Project Cards - Work ********/
