:root {
  --main-bg-color: white;
  --main-invert-color: #222b2d;
  --main-text-color: #333;
  --main-shadow-color: #ccc;
  --main-accent-color: #36a52c;
  --article-meta-bg-color: #eee;
  --readmore-color: #222b2d;
  --clickable-hover-bg: #eee;
  --clickable-hover-color: #c22;
  --main-separator-color: #666;
}

body {
  font-size: 1.2em;
  margin: auto;
  padding: 0;
  line-height: 1.5em;
  color: var(--main-text-color);
  background: var(--main-bg-color);
}

.container {
    max-width: 1280px;
    min-width: 350px;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 1em;
    line-height: 1.5em;
    color: var(--main-text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container article {
  max-width: 80ch;
}

body a {
  text-decoration: underline 0.1em rgba(54, 165, 44, 0);
  color: var(--main-accent-color);
}

body a:hover {
  text-decoration: underline 0.1em var(--main-accent-color);
  color: var(--main-accent-color);
}

.default-style {
  color: var(--main-text-color);
  text-decoration: none;
}

.default-style:hover {
  color: var(--main-text-color);
  text-decoration: none;
}

/* header and footer areas */
nav {
  position: sticky;
  top: 0px;
  z-index: 1;
}

.menu { 
  padding: 0;
  text-align: center;
  font-size: 1em;
  background: var(--main-invert-color);
}

.menu a {
    display: block;
    color: #ddd;
    height: 100%;
    position: relative;
    padding: 20px 15px;
    text-decoration: underline 0.15em rgba(200,200,200,0);
    transition: text-decoration 0.25s ease-in-out;
}

.menu a:hover {
    color: #eee;
    text-decoration: underline 0.15em rgba(200,200,200,1);
}

.menu li {
    list-style-type: none;
    text-decoration: none;
    display: inline-block;
}

.article-meta {
  text-decoration: none;
  background: var(--article-meta-bg-color);
  padding: 5px;
  border-radius: 5px;
  line-height: 2.5em;
  font-size: 0.8em;
  width: 100%;
}
.article-meta, footer { text-align: center; }
.main-title { 
    font-size: 2.0em; 
    font-weight: bold;
    text-align: center;
}
.title { 
    font-size: 1.0em; 
    text-align: center;
}
footer a { text-decoration: none; }
hr {
  color: #ddd;
}
footer { margin-top: 100px; }

.readmore {
  display: inline-block;
  color: var(--readmore-color);
  border: none;
  padding: 0.6em 1.5em;
  text-align: center;
  font-size: 1rem;
  transition: all 0.25s ease-in-out;
  border-radius: 5px;
  border: 1px solid var(--main-invert-color);
  text-decoration: none;
}

.readmore:hover {
  color: var(--main-invert-color);
  background: #eee;
  text-decoration: none;
}

.listContainer {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  padding: 2rem 0;
  border-bottom: 1px solid var(--main-separator-color);
}

.listHeader {
  display: flex;
  justify-content: space-between;
  flex: 10 1 0;
  padding: 0 3rem;
  min-width: 200px;
  gap: 2rem;
}

.listLeft {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 1rem;
  min-width: 300px;
}

.listLeft h2 {
  margin: 20px;
  font-size: 1.2em;
}

.highlight, main pre {
  max-width: 90vw;
}

.listImg {
  flex: 0 0 0;
  min-width: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.listImg img {
  max-width: 100%;
  height: auto;
  box-shadow: 10px 10px 10px 5px var(--main-shadow-color);
}

.listHeader summary {
  line-height: 1.5em;
}

.listDate {
  flex: 1 0 0;
}

.hometime {
  margin-bottom: 0px;
}

.hometitle {
  font-size: 1.5em;
}

.terms {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  font-size: 1.5rem;
  list-style-type: none;
  line-height: 1.5em;
  padding: 0;
}

.terms li {
  flex-grow: 1;
  text-align: center;
  border-bottom: 1px solid #ddd;
  padding: 0.5em 0;
}

.terms a {
  width: 100%;
}

.terms li:hover {
  background-color: #eee;
}

.terms li:last-child {
  border-bottom: none;
}

.projectsContainer:last-child {
  border-bottom: none;
}

.proj {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    border-bottom: 1px solid #ddd;
}

.projDesc > a:hover {
  color: var(--clickable-hover-color);
}

.projImg {
  padding: 1.5rem;
  flex: 0 1 0;
}

.projDesc {
  padding: 1.5rem;
  flex: 2 1 0;
  min-width: 200px;
}

.dateCircle {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  width: 110px;
  /*background-image: linear-gradient(to bottom, #272829, #61677A);*/
  background-color: var(--main-invert-color);
  line-height: 2em;
  color: #ccc;
  margin: 2em auto;
}

.dateMon {
  text-transform: uppercase;
  font-size: 1em;
}
.dateNr {
  font-size: 2em;
  font-weight: bold;
  color: #fff;
}
.dateY {
  font-size: 0.8em;
}

.proj img {
    width: 150px;
    max-width: none;
}

.proj h2 {
    margin-top: 0px;
    margin-bottom: 0px;
}

@media (max-width: 768px) {
  .dateCircle {
    border-radius: 0;
    width: 100%;
    aspect-ratio: auto;
    justify-content: flex-start;
  }
  .listHeader {
    flex-basis: 100%;
    padding: 0 1rem;
  }
  .proj {
    flex-direction: column;
    text-align: center;
  }
  .projImg {
    flex-basis: 100%;
  }
  .listHeader {
    flex-direction: column-reverse;
  }
  .listLeft h2 {
    text-align: center;
    align-self: center;
    font-size: 1.2em;
  }
  .readmore {
    margin: 1em 0;
  }
}

/* code */
pre {
  border: 1px solid #ddd;
  box-shadow: 5px 5px 5px var(--main-shadow-color);
  padding: 1em;
  overflow-x: auto;
}
code { background: var(--main-bg-color); }
pre code { background: none; }

/* misc elements */
img, iframe, video { max-width: 100%; }
main { hyphens: auto; }
blockquote {
  background: var(--main-bg-color);
  border-left: 5px solid var(--main-accent-color);
  padding: 3px 1em 3px;
}

table {
  margin: auto;
  border-top: 1px solid var(--main-separator-color);
  border-bottom: 1px solid var(--main-separator-color);
}
table thead th { border-bottom: 1px solid #ddd; }
th, td { padding: 5px; }
thead, tfoot, tr:nth-child(even) { background: #eee }

@media (prefers-color-scheme: dark) {
  :root {
    --main-bg-color: #222222;
    --main-invert-color: #101210;
    --main-text-color: #bbb;
    --main-shadow-color: #222;
    --main-accent-color: #56b05f;
    --article-meta-bg-color: transparent;
    --readmore-color: #ddd;
    --clickable-hover-bg: #333;
    --clickable-hover-color: #a33;
    --main-separator-color: #555;
  }
}
