/* VARIABLES */
:root {
  --primary-color: #008d3d;
  --secondary-color: #f90;
  --highlight-color: var(--secondary-color);
  --highlighted-text-color: white;
  --text-color: black;
  --text-color-secondary: #999;
  --border-color: #ccc;
  --ornament-color: #eee;
  --bg-color: #fff;
  --inline-code-color: #f44;
}

/* Dark Mode */
.dark-mode {
  --text-color: #fff;
  --border-color: #555;
  --ornament-color: #444;
  --bg-color: #222;
}

/* Gradients */
.blue-grad {
  --primary-color: hsl(210deg, 90%, 80%, 1);
  --secondary-color: hsl(212deg, 93%, 49%, 1);
  --highlight-color: var(--secondary-color);
}

.green-yellow-grad {
  --primary-color: #008d3d;
  --secondary-color: #ffd747;
  --highlight-color: var(--secondary-color);
}

.lime-grad {
  --primary-color: #6eee87;
  --secondary-color: #59d102;
  --highlight-color: var(--secondary-color);
}

.green-grad {
  --primary-color: #12511c;
  --secondary-color: #478151;
  --highlight-color: var(--secondary-color);
}



/**************** Root Element ****************/
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  font: 1em/1.5em "Open Sans", sans-serif;

  /* font-family: "Open Sans", sans-serif; */
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 90%;
  max-width: 768px;
  min-height: 100vh;
}



/******************* Shared *******************/

/* Links */
a {
  position: relative;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s ease, font-size 0.2s ease, background-size 0.2s ease;
}

/* Text Links */
a:not(.icon-link) {
  padding: 0 2px;
  background-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  background-position: 0% 100%;
  background-size: 100% 0.9px;
  background-repeat: no-repeat;
}

/* Highlight Color */
::selection {
  color: var(--highlighted-text-color);
  background-color: var(--highlight-color);
}

/* Headings */
h1 {
  line-height: 1em;
}

h1:not(:first-of-type) {
  padding-top: 1em;
}

h2, h3 {
  padding-top: 1em;
}

.flex-spacer {
  flex-grow: 1;
}

.observable-link {
  margin-top: 0.5em;
  font-size: 0.8em;
}

/* Full Height */
.full-height {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(40vh - 64px);
}

/* See more links */
.see-more-link {
  font-size: 14px;
}


/**************** Shared Section ****************/
.section {
  display: flex;
  flex-direction: column;
  justify-content: center;

  /* min-height: calc(100vh - 2em); */

  /* min-height: 50vh; */
  max-width: 768px;
  margin-bottom: 4em;

  /* align-items: center; */
  padding: 1em;
}

.section__sub-title {
  margin-top: 0;
  margin-bottom: 0.5em;
}

.section__item {
  margin-bottom: 1em;
  border-radius: 8px;

  /* display: flex;
  flex-direction: row;
  gap: 0.5em; */

  h4 {
    margin: 0;
    margin-right: 4px;
    font-weight: 500;
  }
}

.section__item:hover {
  /* background-color: #8882; */

  /* outline: black 1px solid; */
}

.section__item-head {
  display: flex;
  flex-direction: row;
  justify-content: space-between;

  /* flex-wrap: wrap; */
}

.section__item-period {
  margin-top: 0.2em;
  margin-bottom: 0;
  font-size: 0.9em;
  font-weight: 600;
  opacity: 0.5;
  text-wrap: nowrap;

  /* text-align: right; */
}

.section__item-content {
  display: flex;
  flex-direction: row;
  padding-top: 0.5em;

  /* gap: 0.5em; */

  /* stylelint-disable-next-line no-descending-specificity */
  > a {
    display: flex;
    align-items: center;
    background-image: none;
  }
}

.section__item-image {
  display: block;
  flex-grow: 0;
  width: 225px;
  max-width: 80vw;
  height: auto;
  margin-right: 1em;
  border: 1px solid var(--ornament-color);
  border-radius: 4px;
}

.section__item-image--dark {
  display: none;
}

.dark-mode .section__item-image--dark {
  display: block;
}

.dark-mode .section__item-image--light {
  display: none;
}

.section__item-description {
  margin-top: 0;
  font-size: 0.85em;
  line-height: 1.5em;
}

.section__item-pills {
  display: flex;
  text-wrap: nowrap;
  gap: 4px;
  flex-wrap: wrap;
}

.skill-pill {
  padding: 0 8px;
  border-radius: 2em;
  font-size: 12px;
  background-color: var(--ornament-color);
  cursor: default;
}

@media screen and (width <= 550px) {
  .section__item-content {
    flex-direction: column;
    align-items: center;
  }

  .section__item-image {
    margin-right: 0;
    margin-bottom: 0.5em;
  }
}

/* 404 Page */
#container-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Code Highlights */
pre:has(code) {
  padding: 8px;
  border-radius: 8px;
  overflow-y: auto;
}

pre code {
  display: block;
  min-width: fit-content;

  span {
    line-height: 1.5em;
  }
}

p > code {
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 1.1em;
  color: var(--inline-code-color);
  background-color: var(--ornament-color);
}

p > a > code {
  font-size: 1.1em;
}

/* Text Link Hover Effect - Putting this at the end to appease stylelint's no-descending-specificity rule */
a:not(.icon-link):hover {
  color: var(--highlighted-text-color);
  background-size: 100% 100%;
}


/* Observable input fixes */
input[type="number"] {
  border: 1px solid var(--border-color);
  border-radius: 2px;
  background: transparent;
}