:root {
  --tag-g-bg: light-dark(hsl(150, 38%, 84%), hsl(150, 28%, 14%));
  --tag-g-text: light-dark(hsl(147, 34%, 25%), hsl(147, 34%, 75%));
  --tag-y-bg: light-dark(hsl(40, 37%, 83%), hsl(40, 27%, 13%));
  --tag-y-text: light-dark(hsl(44, 34%, 25%), hsl(44, 34%, 75%));
  --tag-p-bg: light-dark(hsl(264, 38%, 84%), hsl(264, 28%, 14%));
  --tag-p-text: light-dark(hsl(266, 35%, 28%), hsl(266, 25%, 78%));
  --tag-r-bg: light-dark(hsl(0, 38%, 84%), hsl(0, 28%, 14%));
  --tag-r-text: light-dark(hsl(0, 35%, 28%), hsl(0, 25%, 78%));

  --bg-card: light-dark(hsl(42, 50%, 98%), hsl(36, 9%, 10%));
  --bg-summary: light-dark(hsl(32, 50%, 96%), hsl(45, 9%, 12%));
  --bg-field: light-dark(hsl(42, 50%, 98%), hsl(36, 10%, 10%));
}

main {
  overflow-x: hidden;
}

main header {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.2rem;
  line-height: 1.5;
}

kbd {
  font-size: 1rem;
}

:is(h2, h3, h4, h5, h6) {
  font-family: "Libre Baskerville", Georgia, serif;
}
h1 {
  font-family: var(--ff-type);
  font-size: 2.52rem;
}

h2 {
  font-size: 0.9rem;
  font-style: italic;
  font-weight: lighter;
  margin: 0;
}

section > div {
  display: flex;
  align-items: center;
  gap: 1rem;
  line-height: normal;
  margin: 2.5rem 0 1.25rem;
}

hr {
  flex: 1;
  border: none;
  margin-block: 7.5px;
  border-top: 0.5px solid;
  background-color: transparent;
}

#jumper {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.2rem;
  line-height: 1.5;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  position: sticky;
  padding: 20px 5% 20px 5%;
  margin-bottom: 55px;
  top: calc(var(--header-height) + 0px);
  margin-left: -6%;
  width: 112%;
  z-index: 10;
  background-color: light-dark(
    hsla(224, 31%, 93%, 0.5),
    hsla(from var(--c-page) h s l / 0.8)
  );
  box-shadow: 5px 5px 5px
    light-dark(hsla(224, 31%, 93%, 0.5), hsla(from var(--c-page) h s l / 0.8));
  backdrop-filter: blur(2px);
}

:target h2,
:target hr {
  color: light-dark(orangered, orange);
}

section > details:target {
  outline: 2px solid light-dark(orangered, orange);
}

* {
  scroll-margin-top: 100px;
}

section > details {
  border: var(--glass-border);
  border-radius: 5px;
  background-color: var(--bg-card);
  overflow: hidden;
  box-shadow: 3px 3px 5px 0px
    light-dark(hsla(0, 0%, 0%, 0.4), hsla(0, 0%, 0%, 0.7));
  margin-bottom: 20px;

  &:last-of-type {
    margin-bottom: 100px;
  }

  > summary {
    padding: 1.25rem 1.5rem 1rem;
  }
  summary {
    list-style: none;
  }
  summary::-webkit-details-marker {
    display: none;
  }
}

.top-row {
  display: block;
  font-family: var(--ff-mono);
  font-weight: normal;
  font-size: 0.9rem;
  position: relative;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
  padding-right: 20px;
  line-height: normal;
}
.year {
  color: slateblue;
}
.title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: lighter;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.4;
  margin-bottom: 0.9rem;
}
.read {
  opacity: 0.5;
}

a.link {
  position: absolute;
  right: 0;

  &:after {
    position: absolute;
    top: 0;
    right: 0;
    content: "";
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    background-size: contain;
    vertical-align: text-bottom;
    font-size: 1.4rem;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='SlateBlue' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6'/><path d='m21 3-9 9'/><path d='M15 3h6v6'/></svg>")
      no-repeat center !important;
  }

  &:hover::after {
    content: "";
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236eb3f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6'/><path d='m21 3-9 9'/><path d='M15 3h6v6'/></svg>")
      no-repeat center !important;
  }
}

.tags {
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0;
  border-radius: 3px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: normal;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tags mark {
  border: var(--glass-border);
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: normal;
}

.period {
  background: var(--tag-y-bg);
  color: var(--tag-y-text);
}
.type {
  background: var(--tag-g-bg);
  color: var(--tag-g-text);
}
.school {
  background: var(--tag-p-bg);
  color: var(--tag-p-text);
}
.lang {
  background: var(--tag-r-bg);
  color: var(--tag-r-text);
}

.entry-body summary {
  background-color: var(--bg-summary);

  border-top: var(--glass-border);
  font-family: "DM Sans", system-ui, sans-serif;
  border-left: none;
  border-right: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  list-style: none;
  transition:
    background 0.1s ease,
    color 0.1s ease;
}

.entry-body details[open] > summary {
  border-bottom: var(--glass-border);
}

summary i {
  font-family: var(--ff-mono);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease;
  font-style: normal;
}

details[open] > summary i {
  transform: rotate(45deg);
}

.entry-body details {
  margin-top: 0;
  border-left: none;
}

.connection p {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: normal;
}

.connection a {
  padding: 0px 10px 10px 20px;
  display: block;
  font-size: 0.9rem;
  text-decoration: none;
  line-height: 1.6;

  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s ease;
  font-family: "DM Sans", system-ui, sans-serif;

  span {
    color: var(--c-text) !important;
    font-family: "Courier New", Courier, monospace;
    margin-left: 10px;
  }
}

.con-det {
  text-transform: uppercase;
}

.terms div {
  padding: 0.9rem 1.4rem 0.9rem;

  display: flex;
  gap: 10px;
}

.terms span {
  font-family: var(--ff-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: normal;
  font-size: 0.9rem;
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  border: var(--glass-border);
  color: var(--c-text);
  background: var(--bg-summary);
}

.argument div,
.notes div {
  padding: 1rem 1.5rem 1rem;
}

.argument p,
.notes p {
  padding: 0 !important;
  font-size: 1.1rem;
  line-height: 1.4;
  font-family: "DM Sans", system-ui, sans-serif;

  &:first-of-type {
    margin: 0 !important;
  }

  & + p {
    margin-top: 15px;
  }
}

.notes p.response {
  border-left: 2px solid slateblue;
  padding-left: 10px !important;
  margin-left: -10px !important;
}
