* { margin: 0; padding: 0; box-sizing: border-box; }

/* VARIABLES
------------------------------------------ */

:root {
  font-size: 62.5%;
  --font-sans: sohne, system-ui, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}

:root[color-mode="light"] {
  --color-bg: #F8F8F8;
  --color-default: #666666;
  --color-link: #121212;
  --color-rule: #e9e9e9;
  --color-border: #d9d9d9;
  --color-secondary: #9E9797;
  --color-tertiary: rgba(0,0,0,0.2);
  --color-bright: #CE624C;
  --color-header-pop: #6C9F1A;
  --theme-switcher: #88A1D2;
}

:root[color-mode="dark"] {
  --color-bg: #212121;
  --color-default: #888888;
  --color-link: #cccccc;
  --color-rule: #333333;
  --color-border: #444444;
  --color-secondary: #706F6F;
  --color-tertiary: rgba(0,0,0,0.5);
  --color-bright: #CE624C;
  --color-header-pop: #6C9F1A;
  --theme-switcher: #ffdd00;
}

/* Any element with the class "light--hidden" will be hidden when the site is set to Light Mode */
:root[color-mode="light"] .light--hidden {
  display: none;
}

/* Any element with the class "dark--hidden" will be hidden when the site is set to Dark Mode */
:root[color-mode="dark"] .dark--hidden {
  display: none;
}

:root[color-mode="dark"] footer img {
  filter: invert(0.7); 
}

:root[color-mode="dark"] img {
  opacity: 0.8;
}

/*@media (prefers-color-scheme: dark) {
  /* defaults to dark theme */
  /*body {
    --color-bg: #222;
    --color-default: #ccc;
    --color-link: #FFF;
    --color-secondary: rgba(255,255,255,0.2);
    --color-tertiary: rgba(255,255,255,0.3);
  }
  img { opacity: 0.8; }
}*/

/* LAYOUT
------------------------------------------ */


html, body {
  color: var(--color-default);
  background-color: var(--color-bg);
  font-smooth: auto;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth; 
}

body {
  font-family: var(--font-sans); 
  font-size: 1.6rem;
  line-height: 2.4rem;
  font-weight: 400;
  padding: 2rem;
  margin: 0 auto;
}

@media (min-width: 600px) { 
  body { font-size: 1.8rem; line-height: 2.6rem; }   
}

ol, ul, li { margin: 0; padding: 0; border: 0; list-style: none; }

.core {
  max-width: 700px;
  margin: 0 auto;
}

section, article, header, footer { margin: 8% auto 0; }

hr { 
  border: 0;
  height: 0;
  border-bottom: 1px solid var(--color-border);
  margin: 5.5rem auto;
}


/* TYPOGRAPHY
------------------------------------------ */

h1 { font-weight: 500; font-size: 2rem; line-height: 2.8rem; margin-bottom: 1rem; }
h2 { color: var(--color-header-pop); font-weight: 500; font-size: 1.6rem; line-height: 2.4rem; margin-bottom: 2rem; }

@media (min-width: 600px) { 
  h1 { font-weight: 500; font-size: 2.2rem; line-height: 2.6rem; }
  h2 { font-weight: 500; font-size: 1.8rem; line-height: 2.4rem; } 
}

b, strong { font-family: var(--font-sans); font-weight: 500; }
em { font-style: italic; }

p, li { margin-bottom: 2rem; }

a { color: var(--color-link); text-decoration: none; transition: all .1s ease-in-out; }
a:hover { border-bottom: 1px solid;  }

img { width: 100%; height: auto; }

time { font-family: var(--font-sans); }

blockquote {
  border-left: 0.1rem solid var(--color-border);
  padding-left: 2rem;
}

small { color: var(--color-secondary); font-size: 1.4rem; line-height: 2.2rem; }

@media (min-width: 600px) { small { font-size: 1.6rem; line-height: 2.4rem; } }

.color-secondary { color: var(--color-secondary); }

.caps { text-transform: uppercase; }

.non-bold { font-weight: 400; }


/* HEADER + FOOTER
------------------------------------------ */

header, footer { 
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
}

header div:nth-of-type(2) { justify-self: end; }

header ul, footer ul, #more ul li {
  list-style: none;
  padding: 0;
  margin: 0;
  justify-self: end; 
  position: relative;
}

header ul li, footer ul li, #more ul li {
  display: inline-block;
  margin-left: 1.5rem;
}

header ul li:last-of-type { 
  margin-right: 0; 
  position: relative;
  width: 22px;
}

a:hover.nameplate { border-bottom: none; }
a:hover.nameplate strong { border-bottom: 1px solid; }

header a { border-bottom: none; }

.nameplate { position: relative; margin-left: 40px; }
.nameplate:before {
  content:"";
  position: absolute;
  top: -5px;
  left: -44px; 
  width: 36px;
  height: 36px;
  background-image: url('/assets/img/naz_avatar.png');
  background-size: cover;
}

@media (max-width: 600px) { 
  header ul li, footer ul li, #more ul li { margin-left: 1rem; }
}

@media (max-width: 320px) { 
  header ul li, footer ul li, #more ul li { margin-left: 0.5rem; }
  .nameplate { margin-left: 0; }
  .nameplate:before { display: none; }
}

footer img { height: 16px; width: auto; }

footer a { opacity: 0.5; }
footer a:hover { opacity: 1; }
footer ul:nth-of-type(2) { margin-right: 0; }

footer small ul li { margin-left: 0;  }

#more h2 { margin-bottom: 0; }




/* FORM
------------------------------------------ */


form input[type=email] {
  background-color: var(--color-rule);
  border: 1px solid var(--color-rule);
  font-size: 1.6rem;
  line-height: 2.4rem; 
  padding: 1rem 1.5rem;
  margin-right: 1%; 
  border-radius: 30px;
  width: 40%;
}

form input[type=submit] {
  border: 0;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 2.4rem;
  padding: 1rem 2rem;
  margin-top: 1rem;
  border-radius: 30px;
  color: var(--color-bg);
  background-color: var(--color-link);
  width: 20%;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

form input[type=submit]:hover {
  filter: brightness(1.4); 
}

@media (max-width: 600px) {
  header {  margin: 2rem auto; }
  form input[type=email] { width: 100%; }
  form input[type=submit] { width: 100%; }
}


/* ABOUT
------------------------------------------ */

.about img, .journal_index img, .journal_post article img { border-radius: 4px; }
.img-about { position: relative; }
.img-about span { font-size: 1.2rem; font-weight: 500; position: absolute; transform: rotate(-90deg); bottom: 6.5rem; right: -2.5rem; }
.img-about span a { color: var(--color-bg); }

@media screen and (max-width: 800px) {
  .about .grid-2-across ul:nth-of-type(2) h2 { margin-top: 8%; }
}



/* LIST
------------------------------------------ */

.list ul li {
  padding: 15px 10px;
  margin-bottom: 0;
  background-image: repeating-linear-gradient(270deg, #333333, #333333 1px, transparent 1px, transparent 4px, #333333 4px);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}

.list ul li h2 { margin-bottom: 4px; }
.list ul li p { margin-bottom: 0; }

ul.journal-list h1 { margin-bottom: 4rem; }

ul.journal-list li {
  display: grid;
  grid-template-columns: auto auto;
  grid-column-gap: 2rem;
  align-items: baseline;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-rule);
  transition: all .2s ease-in-out;
  margin: 0;
}

ul.journal-list li small { justify-self: end; }

ul.journal-list a li h2 { color: var(--color-link); margin: 0; }
ul.journal-list a:hover li { border-bottom: 1px solid #999; }
ul.journal-list h1 { padding-bottom: 1rem; margin-top: 5.5rem; margin-bottom: 0rem; }
.journal_index ul.journal-list h1 { border-bottom: 1px solid var(--color-border); } /* for the Newsletter Season headers */
ul.journal-list h1:first-of-type { margin-top: 0; }
ul.journal-list h2 { margin-top: 6rem; }



/* HOME
------------------------------------------ */

.home h2 { margin-bottom: 1.2rem; }
p.more { margin-top: 1rem; margin-left: -0.2rem; }
ul.journal-list li.other-posts-first { display: grid; grid-template-columns: 1fr; border-bottom: none; margin-bottom: 5.5rem; padding-top: 0; }
ul.journal-list a:hover li.other-posts-first  { border-bottom: none; }
ul.journal-list a:hover li.other-posts-first .more span { background: var(--color-link); color: var(--color-bg); }
li.other-posts-first h1 { margin-bottom: 1rem; }
li.other-posts-first p { color: var(--color-default); }


/* ARTICLES
------------------------------------------ */

article img { margin: 1rem auto 1rem; }
article h2 { margin-bottom: 1.2rem; }

.title-and-date {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  margin-bottom: 4%;
}

.home .title-and-date { margin-bottom: 0; }

.title-and-date p { justify-self: end; }

@media (min-width: 1020px) { 
  article img.breakout {
    margin-left: -80px;
    margin-right: -80px;
    width: calc(100% + 160px);
  }
}

article ul li {
  margin-left: 2rem;
  list-style-type: circle;
}

nav.pagination { margin-top: 7rem; }
.pagination a, .pagination span, .more a, .more span { 
  font-size: 1.4rem;
  line-height: 1.4rem;
  color: var(--color-default);
  border: 1px solid var(--color-border);
  padding: 0.6rem 1.2rem; 
  border-radius: 30px; 
  margin-right: 1rem; 
  transition: all .2s ease-in-out;
}
.pagination a:hover, .more a:hover, li.other-posts-first:hover .more span {
  color: var(--color-link);
  border: 1px solid var(--color-link);
}
span.pagination-item { opacity: 0.5; }

/* this controls the comma between tags */
.tags a { 
  font-size: 1.4rem; 
  line-height: 1.4rem; 
  color: var(--color-secondary); 
  background-color: var(--color-rule); 
  padding: 0.6rem 1.2rem 0.8rem; 
  border-radius: 30px; 
}
.tags a:hover { 
  border: none;
  color: var(--color-bg); 
  background-color: var(--color-default); 
}

section.related { margin: 16% auto 0; }

/* MINI GRIDS
------------------------------------------ */

.grid-2-across {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 4rem;
  grid-template-rows: auto;
  align-items: bottom;
  margin: 0;
}

@media (max-width:800px) { 
  .grid-2-across {
    grid-template-columns: 1fr;
  }
}

/* FONTS
------------------------------------------ */

@font-face {
  font-family: 'Sohne';
  src: url('/assets/fonts/soehne-buch.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Sohne';
  src: url('/assets/fonts/soehne-buch-kursiv.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'Sohne';
  src: url('/assets/fonts/soehne-kraftig.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Sohne';
  src: url('/assets/fonts/soehne-kraftig-kursiv.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
}


button.color-mode__btn { 
  border: none; 
  background: none; 
  cursor: pointer;
  line-height: 1;
}
.color-mode__btn svg {
  position:absolute;
  top: 2px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #222222;
  stroke: var(--color-link, #222222);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5px;
}

@media (max-width: 600px) { 
  .color-mode__btn svg {
    width: 20px;
    height: 20px;
  }
}

.color-mode__btn:hover svg,
.color-mode__btn:focus svg, .color-mode__btn:focus {
  outline: none;
  fill: #ffdd00;
  fill: var(--theme-switcher, #ffdd00);
}

/* 404
------------------------------------------ */

/*@media (prefers-color-scheme: dark) {
  html, body, time {
    color: #888;
    background-color: #212121;
  }

  .color-secondary { color: rgba(255,255,255,0.5);}

  body a {
    color: #ccc;
  }
}*/

