/* newsreader-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/newsreader-v20-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

html {
  box-sizing: border-box;
  font-size: 62.5%;
  line-height: 1.15;
}

:root {
  --bg-color: #fbf9f2;
  --font-color: rgb(43, 41, 36);
  --secondary-font-color: rgba(5, 5, 5, 0.7);
  --input-bg-color: rgb(0 0 0/8%);
  --input-color: rgba(3,9,17,.92);
  --button-color: hsla(0,0%,98%,.95);
  --button-bg-color-primary: #FF4F00;
}

[data-theme="dark"] {
  --bg-color: #17191e;
  --font-color: hsla(0, 0%, 100%, .85);
  --secondary-font-color: hsla(0, 0%, 100%, .65);
  --input-bg-color: hsla(0, 0%, 100%, 0.08);
  --input-color: hsla(0, 0%, 100%, 0.85);
}

body {
  background: var(--bg-color);
  color: var(--font-color);
  font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Inter,sans-serif;
  font-optical-sizing: auto;
  line-height: 1.77;
  max-width: 800px;
  margin: 0 auto;
  font-size: 18px;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 300;
}

.h1 {
  font-size: 2.6rem;
  line-height: 4rem;
  font-weight: 600;
  text-decoration: none;
}

h2, h3 {
  font-size: 28px;
  line-height: 34px;
}

a {
  color: var(--font-color);
  text-decoration: none;
}

h2 a {
  text-decoration: none;
}

h2 a:hover {
  text-decoration: underline;
}

label {
  display: block;
  margin-bottom: 5px;
}

.form-group {
  margin-bottom: 30px;
}

.button-group {
  display: flex;
  flex-direction: row;
  margin-bottom: 15px;
}

.nav .button-group {
  margin-bottom: 0;
}

.button-group button {
  margin-right: 15px;
  outline: none;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  border: 0;
  padding: 0 2.4rem;
  line-height: 4rem;
}

.button-primary {
  color: var(--button-color);
  background-color: var(--button-bg-color-primary);
}

input,
textarea {
  line-height: 4rem;
  font-size: 1.6rem;
  padding: 0 1.5rem;
  width: 100%;
  border: 0;
  background-color: var(--input-bg-color);
  outline: none;
  border-radius: 4px;
  color: var(--input-color);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus {
  background: #17191e;
  box-shadow: 0 0 0 2px #EB3F00;
}

textarea {
  padding: 1.5rem;
}

textarea#body {
  min-height: 30rem;
}

textarea#description {
  min-height: 10rem;
}

p.error-message {
  margin: 0;
  color: #EB3F00;
}

.field-error {
  border-color: #d4351c;
}

.excerpt {
  color: var(--secondary-font-color);
  font-size: 1.6rem;
  line-height: 1.5;
  margin-top: 1rem;
}

time {
  font-size: 1.6rem;
}

/* p { */
/*   margin-block-start: 24px; */
/*   margin-block-end: 0; */
/* } */

pre {
  font-size: 18px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  user-select: none;
}

header,
main,
footer {
  margin: 0 32px;
}

header {
  height: 24rem;
  display: grid;
  align-items: center;
  border-bottom: 1px dashed rgba(255,255,255,0.4);
  border-image: repeating-linear-gradient(
    to right,
    currentColor 0 8px,
    transparent 8px 14px
  ) 1;
}

footer {
  padding-bottom: 32px;
}

#page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 6rem;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

ol {
  list-style: none;
}

.nav {
  display: inline-flex;
  gap: 2.8rem;
  list-style: none;
  align-items: center;
}

.nav li.current a {
  color: #FF4F00;
  border-bottom: 2px solid;
}

/* nav li { */
/*   display: inline; */
/* } */

footer,
#latest-posts {
  padding-top: 128px;
}

#latest-posts {
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 2px;
  font-size: 1.2rem;
  font-weight: 600;
  color: hsla(0,0%,100%,.45);
  margin-top: 0;
}

#headshot {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 100%;
}

#theme-switch {
  appearance: none;
  background: none;
  border: none;
  display: flex;
  column-gap: 4px;
  color: var(--font-color);
}

#theme-switch:hover {
  cursor: pointer;
}

.icon {
  width: 16px;
  height: 16px;
}

#theme-switch .icon {
  mask-image: url("/images/theme-light.svg");
  background-color: var(--font-color);
}

[data-theme="dark"]  #theme-switch .icon {
  mask-image: url("/images/theme-dark.svg");
  /* background-color: var(--font-color); */
}

.select-image {
  max-width: 20%;
}

.post-title {
  font-size: 2rem;
  font-weight: 600;
  line-height: 2.8rem;
  white-space: normal;
  text-overflow: ellipsis;
  overflow: hidden;
  display:flex;
  align-items: center;
  gap: 0.5rem;
}

.permalink {
  position: absolute;
  z-index: 50;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

main {
  padding-top: 8rem;
  padding-bottom: 8rem;
  margin-bottom: 8rem;
  border-bottom: 1px dashed rgba(255,255,255,0.4);
  border-image: repeating-linear-gradient(
    to right,
    currentColor 0 8px,
    transparent 8px 14px
  ) 1;
}

main > * + * {
  margin-top: 2.8rem;
  margin-bottom: 0;
}

main ul {
  padding-left: 2.4rem;
}

main a {
  text-decoration: underline;
  text-decoration-thickness: 0.8rem;
  text-underline-offset: -0.4rem;
  text-decoration-color: rgba(255, 79, 0, 0.25);
  text-decoration-skip-ink: none;
}

main a:hover {
  text-decoration-thickness: 2rem;
  text-underline-offset: -1.6rem;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}

.me {
  width: 50%;
  filter: brightness(1.03) contrast(1.06);
}

.separator {
  border-top: 1px dashed rgba(255,255,255,0.4);
  border-image: repeating-linear-gradient(
    to right,
    currentColor 0 8px,
    transparent 8px 14px
  ) 1;
  margin: 0 32px;
}

.status {
  border: 1px solid hsla(0,0%,100%,0.12);
  border-radius: 4rem;
  padding: 0.2rem 1rem;
  width: fit-content;
  display: inline-flex;
  text-transform: uppercase;
  font-size: 1.2rem;
  line-height: 1.6rem;
}

.status.primary {
  color: var(--button-bg-color-primary);
  border-color: var(--button-bg-color-primary);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.image {
  border: 1px solid #eee;
  padding: 0.5rem;
  border-radius: 6px;
}

.image figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.image .button-group {
  flex-direction: column;
  gap: 1rem;
}

.image img {
  width: 100%;
  height: 200px;
  display: block;
  margin-bottom: 0.5rem;
  background: #f5f5f5;
  object-fit: cover;
}

.image figure:hover img {
  object-fit: contain;
  cursor: copy;
}

article {
  padding: 2.5rem 0;
  position: relative;
  margin-top: 0;
}

