/* LAYOUT */

:root {
  font-family: 'EB Garamond', serif;
  font-size: calc(14px + 0.390625vw);
  font-weight: normal;
  line-height: 1.5;
}

@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url(/fonts/garamond/EBGaramond08-Regular.woff);
}

* {
  box-sizing:border-box;
}

body {
  --color-text: #333;
  --color-bg: #f5f5f5;
  --color-nav: var(--color-text);
  --color-link: var(--color-acc);
  --color-acc: #ee4400;
  --color-grey: #222;
  background: var(--color-bg);
  color: var(--color-text);
  margin: 1rem;
  max-width: 100vw;
  padding: 1rem;
}

a {
  color: var(--color-link);
  text-decoration: none;
  &:hover{
    text-decoration: underline;
    color: var(--color-acc);
  }
}

.content {
  margin: 5vw 0;
  grid-auto-rows: auto;
  display: grid;
  grid-template-columns: minmax(50%, 1fr);
  & > * {
    grid-column: 1/2;
  }
//*  & figure {
    height: 1rem;
    width: 100%;
    max-width: 100%;
    grid-column: 2/3;
    overflow: visible;
    margin: 0;
    padding-left: clamp(4px,6vw,4rem);
  }
  & figure img {
    width: 100%;
  }
*//
}

img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: inline-block;
}

p, blockquote, ul {
  max-width: 65ch;
  margin: 0 0 1rem 0;
}

h1, h2, h3, h4, h5, h6 {
  //* max-width: 30ch; **/
  font-weight: 600;
  margin: 2rem 0 1rem 0;
  &.header {
    font-size: 2rem;
    line-height: 1.1;
    margin: 1rem .5rem 0 0;
    max-width: 80vw;
  }
}

/* NAVIGATION */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  & span {
    flex-grow:1;
    font-style: italic;
  }
}

.site-nav a {
  font-size: 1.5rem;
  display: block;
  font-weight: 500;
  font-stretch: 100%;
  text-decoration: none;
  color: var(--color-text);
  &.active {
    text-decoration: none;    
    }
  &:hover {
    color: var(--color-acc);
    text-decoration: none;
  }
  }
}

.main-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  max-width: 100vw;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media screen and (max-width: 780px) {
  .site-nav,
  .main-menu {
    flex-direction: column;
    align-items: normal;
    gap: 0;
    font-size: 1.5rem;
  }
  .site-nav span {
    font-size: 1rem;
  }
  .site-nav a {
    transition: none; filter: none;
  }
  .content figure {
    height: initial;
    width: initial;
    grid-column: 1 / 2;
    padding: 0;
  }
}

/* LISTS */

.post-snippet {
  margin: 0 0 1rem 0;
}

.post-snippet h3 {
  margin: 0;
}

table {
  border-collapse: collapse;
  & td, th {
    vertical-align: top;
    text-align: left;
    padding: .5rem;
  }
  & tr:nth-child(2n) {
    background-color: var(--color-grey);
  }
}

#gallery {
    gap: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15vw, 1fr));
    justify-items: center;
    align-items: center;
    margin: 0;
}

#gallery figure {
    margin: 0;
    width: 100%;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    & :hover figcaption {
      visibility: visible;
    }
    & img {
      border-radius: .25rem;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    & figcaption {
      position: absolute;
      font-style: normal;
      padding: .5rem .75rem;
      margin: 0;
      bottom: 0;
      color: #858585;
      visibility: hidden;
     }
}

